Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. or try prontera,155,150,5 script iuniono 89,{ if ( #reward_on_one_month ) { mes "you already get your reward"; close; } query_sql "SELECT `userid` FROM `login` WHERE `account_id`="+ getcharid(3), .@userid$; query_logsql "select datediff( curdate(),`time`) from `loginlog` where `user`='"+ escape_sql( .@userid$ ) +"' order by `time` asc limit 1", .@tmp; if ( .@tmp > 30 ) { // more than 1 month = reward #reward_on_one_month = 1; getitem 501,1; mes "1 month is not too long isn't it?"; close; } else { mes "keep going!"; mes "^0000ff*I have been here for "+ .@tmp +" day"+ ( .@tmp > 1 ? "s" : "" ) +" now.*"; close; } }
  2. eathena doesn't support direct variable assignment - .@acc_id = getcharid(3); - for( .@i = 0; .@i < $@partymembercount; .@i++ ) + set .@acc_id, getcharid(3); + for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) - #CASHPOINTS += ( 100 / $@partymembercount ); + set #CASHPOINTS, #CASHPOINTS + ( 100 / $@partymembercount );
  3. - mes <Hey!! it's a nice day to play Kyojin RO>; + mes "<Hey!! it's a nice day to play Kyojin RO>"; you must put " " to define a text ingame
  4. - .@guild_id = getcharid(2); - : means 'delete the line' + set .@guild_id, getcharid(2); + : means 'add the line' prontera,150,150,5 script ihjbnik 56,{ .@guild_id = getcharid(2);// <---- REPLACE HERE if ( !.@guild_id ) { Like that prontera,150,150,5 script ihjbnik 56,{ set .@guild_id, getcharid(2); if ( !.@guild_id ) { mes "you are not in a guild"; close; } else if ( getguildmasterid(.@guild_id) != getcharid(0) ) { mes "I only talk to the guild master"; close; } mes "warp?"; next; if ( select( "yes", "no" ) -1 ) end; warpguild "prontera",161,181,.@guild_id; end; } it's hard to help you
  5. the preview script only work when a player reach lvl 99, the player can't click on it try this one prontera,145,150,5 script Sample 56,{ if( BaseLevel == 99 && reward_lvl == 0 && Upper && .count < 100 ){ if( .count < 3 ) getitem 714,1; if( .count < 100 ) getitem 7227,1; reward_lvl++; .count++; announce "Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only "+ (100-.count) +" rewards left!",0; } else if ( reward_lvl ) { mes "you already get your reward"; close; } else if ( BaseLevel != 99 ) { mes "you are not lvl 99"; close; } end; OnInit: .count = query_sql( "select `value` from `global_reg_value` where `str`= 'reward_lvl'", .@value ); if ( .count >99 ) end; // limit to 127 players online here .@size = query_sql( "select `account_id` from `char` where `char_id` not in ( select `char_id` from `global_reg_value` where `str`= 'reward_lvl' ) and `online`=1", .@account_id ); for ( .@i = 0; .@i < .@size; .@i++ ) { attachrid .@account_id[.@i]; if ( reward_lvl ) { .count++; if ( .count >99 ) end; } } end; }
  6. - .@guild_id = getcharid(2); + set .@guild_id, getcharid(2);
  7. This? prontera,150,150,5 script ihjbnik 56,{ .@guild_id = getcharid(2); if ( !.@guild_id ) { mes "you are not in a guild"; close; } else if ( getguildmasterid(.@guild_id) != getcharid(0) ) { mes "I only talk to the guild master"; close; } mes "warp?"; next; if ( select( "yes", "no" ) -1 ) end; warpguild "prontera",161,181,.@guild_id; end; }
  8. http://rathena.org/board/topic/57262-anti-corruption-a-step-taken-to-stop-corrupt-gms/ you must update the mod for your version
  9. it was a sample add your message in each case switch(.@rand) { case 1: mes "Hello "+ strcharinfo(0) +" how are you today?"; break; case 2: mes "Hey it's a Nice day to Play (Server Name)"; break; etc..
  10. you have more than 8 players with a value? I don't see anything wrong in this script
  11. On Emistry's script, =7 persons with14pts a label name can be ~anything then add the script under OnNPCKillEvent
  12. try it btw with this script you can gain 2 cards at once (normal drop+by script) I suggest to implement theses commands on your server (rathena only, search the trac) *addmonsterdrop <monster id>,<item id>,<rate>; *addmonsterdrop "<monster name>",<item id>,<rate>; *delmonsterdrop <monster id>,<item id>; *delmonsterdrop "<monster name>",<item id>; These commands will temporarily add or delete a monster drop, which will be reset when the mob database reloads or the server shuts down. They return 1 upon success. If the monster already drops the specified item, its drop rate will be updated with the given rate (100 = 1%). Examples: // Makes Owl Baron drop Honey at an 80% rate. addmonsterdrop 1295,518,8000; // Deletes Executioner's Mitten from Rybio. delmonsterdrop 1201,7017;
  13. Capuche

    Requesting

    ? the link is alive http://pastebin.com/u7QKZPk7 CREATE TABLE IF NOT EXISTS `callfrnd` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(100) NOT NULL default '', `last_ip2` varchar(100) NOT NULL default '', `ref_name` varchar(23) NOT NULL default '', `ref_id` int(11) NOT NULL default '0', `mins` tinyint(3) unsigned NOT NULL default '0', `days` tinyint(3) unsigned NOT NULL default '0', `task_end` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM;
  14. - if( BaseLevel == 99 ){ + if( BaseLevel == 99 && $count < 100 && Upper ){
  15. dispbottom "gained rewards.."; } + $count++; + announce "Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only "+ (100-$count) +" rewards left!",0; nb. this way a player get the prize twice, in normal and rebirth job
  16. http://www.eathena.ws/board/index.php?showtopic=237765
  17. In an npc Basic_Scripting#Adding_Scripts for more infos this script give the killed's skull directly in the inventory of the killer since there isn't any commands in this version to drop a skull with name
  18. It was a sample.. Replace by OnWhisperGlobal: if ( getgmlevel() < 99 ) end; deletearray .random_number, .total_number; dispbottom "Number reseted"; OnInit: for ( set .@i, 1; .@i < 17; set .@i, .@i +1 ) set .random_number[.@i-1], .@i;// initialize all number (1->16) in an array index (0->15) set .total_number, 16;// total: 16 index end; to re-initialize the number
  19. cell_game,155,140,3 script Tournament Official 405,{ if ( .total_number == 0) { mes "[Tournament Official]"; mes "All numbers were drawn. Better luck next time!"; close; } mes "[Tournament Official]"; mes "You can now pick a number!"; next; select( "Pick a number" ); if ( .total_number == 0) {// another player pick the lastnumber mes "[Tournament Official]"; mes "All numbers were drawn. Better luck next time!"; close; } set .@index, rand( .total_number ); set .@tmp, .random_number[.@index]; set .number_draw[.size_draw], .@tmp; set .name_draw$[.size_draw], strcharinfo(0); set .size_draw, .size_draw +1; deletearray .random_number[.@index], 1; set .total_number, .total_number -1; mes "."; next; mes "."; mes ".."; next; mes "."; mes ".."; mes "..."; next; mes "[Tournament Official]"; mes "Congratulations!"; mes "You have drawn #"+ .@tmp +"!"; close2; mapannounce "cell_game","Tournament Official : "+strcharinfo(0)+" will be the "+ .@tmp + ( .@tmp == 1 ? "st" : .@tmp == 2 ? "nd" : "th" ) +" combatant in the POTM Tournament!",0; //warp "poring_w02",99,85; end; OnInit: for ( set .@i, 1; .@i < 17; set .@i, .@i +1 ) set .random_number[.@i-1], .@i;// initialize all number (1->16) in an array index (0->15) set .total_number, 16;// total: 16 index end; OnWhisperGlobal: if ( getgmlevel() < 99 ) end; deletearray .random_number, .total_number; dispbottom "Number reseted"; end; } Use whisper system to reset the value
  20. Capuche

    Requesting

    You can try this ? http://www.eathena.ws/board/index.php?showtopic=270783
  21. - script zehj -1,{ OnPCKillEvent: .@map$ = strcharinfo(3); if ( .@map$ == "guild_vs3" || .@map$ == "pvp_y_1-2" ) { .@char_id = getcharid( 0,rid2name( killedrid ) ); getitem2 7420,1,1,0,0,254,0, ( .@char_id & 65535 ), ( .@char_id >> 16 ); } end; }
  22. You should make a topic in the bugtracker, it's working in my old version (17324) but not with the new revision
  23. Ha yeah you must keep x2 disablenpc "prtevent"; not hideonnpc for this npc I will make some test finally..
  24. In script_commands.txt (docs)
  25. Use F_RandMes function getitem callfunc( "F_RandMes", 3, 1101, 1201, 1501 ),.@itemamount; http://rathena.org/board/topic/78263-scripting-faqtipstricks/ for more infos
×
×
  • Create New...