Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. my version @checkip - script jkbddkk -1,{ OnInit: bindatcmd "checkip", strnpcinfo(3) +"::Oncheckip",99,99; end; Oncheckip: .@myname$ = strcharinfo(0); if ( .@atcmd_numparameters == 0 ) { message .@myname$, "usage : "+ .@atcmd_command$ +" <ip>"; end; } .@count = countstr( .@atcmd_parameters$[0], "." ); explode( .@atcmd_parameters$[0], .@tmp$, "." ); for ( .@i = 0; .@i < .@count; .@i++ ) if ( .@tmp$[.@i] != "0" && .@tmp$[.@i] != "%" && ( atoi(.@tmp$[.@i]) <= 0 || atoi(.@tmp$[.@i]) > 255 ) ) break; if ( .@i < .@count || .@count != 3 ) { message .@myname$, "wrong ip"; end; } .@amount = query_sql( "select name, last_ip from `char` join login on `char`.account_id = login.account_id WHERE online = 1 and last_ip LIKE '"+ .@atcmd_parameters$[0] +"' order by name desc limit 128", .@name$, .@last_ip$ ); if ( .@amount <= 0 ) { message .@myname$, "none player found"; end; } message .@myname$, "player online with this ip :"; for ( .@i = 0; .@i < .@amount; .@i++ ) message .@myname$, .@name$[.@i] +" : "+ .@last_ip$[.@i]; end; } @getip, what about @accinfo? Edit: fixed a typo
  2. - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand",99,99; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; freeloop 1; while ( .@i < .@amount ) { do { .@dx = rand( -200, 200 ); .@dy = rand( -200, 200 ); } while( !checkcell( .@map$,(.@x+.@dx),(.@y+.@dy),cell_chkpass ) ); makeitem .@item_id, 1, .@map$, (.@x + .@dx), (.@y + .@dy); .@i++; } end; } .@item_id typo error
  3. - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand",99,99; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; while ( .@i < .@amount ) { do { .@dx = rand( -200, 200 ); .@dy = rand( -200, 200 ); } while( !checkcell( .@map$,(.@x+.@dx),(.@y+.@dy),cell_chkpass ) ); makeitem .@itemid, 1, .@map$, (.@x + .@dx), (.@y + .@dy); .@i++; } end; }
  4. use the optionnal parameter of bindatcmd https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6863
  5. means you set a non-existent view 0 to a npc. Change the view ID of your custom npc
  6. - script item_floor -1,{ OnInit: bindatcmd "itemfloor",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: .@item_id = atoi(.@atcmd_parameters$[0]); .@amount = ( .@amount = atoi(.@atcmd_parameters$[1]) ) ? .@amount : 1; if ( getiteminfo( .@item_id,0 ) == -1 ) { message strcharinfo(0), "non existent item id"; message strcharinfo(0), "usage "+ .@atcmd_command$ +" <item_id> {<amount>}"; end; } getmapxy .@map$, .@x, .@y, 0; makeitem .@item_id, .@amount, .@map$, .@x, .@y; end; }
  7. if( .@aid[.@i] != .@self_id && !checkvending(.@name$[.@i]) ){
  8. replace do { set .@guessrepeat, 0; set $monster, 1000 + rand(1,950); for (set .@k, 0; .@k <getarraysize($Forbidden); set .@k, .@k+1) { if ($monster == $Forbidden[.@k]) { set .@guessrepeat, 1; break; } } } while (.@guessrepeat); by query_sql "select `ID` from mob_db where ~Mode & 32 order by rand() limit 1", $monster;
  9. Maybe with a query, select a random monster in mob_db sql (no boss) select `ID` from mob_db where ~Mode & 32 order by rand() limit 1
  10. Table ... doesn't exist.. what does that mean Answer : that means the table doesn't exist ! Maybe import it in mysql ?
  11. sth like this if ( #reward_account ) { mes "already claimed"; close; } getitem ... $total_claimed++; if ( $total_claimed > 100 ) disablenpc
  12. https://github.com/rathena/rathena/blob/master/db/produce_db.txt#L282 I don't understand this request
  13. of the skill 0:0:0:0:10:10:20:20:30:30 10 occurrences, 1 rate per abra skill level
  14. https://github.com/rathena/rathena/blob/master/db/abra_db.txt increase the rate per lvl 292,Class Change,0:0:0:0:10:10:20:20:30:30
  15. prontera,151,190,5 script PvP Warper 843,{ announce ""+strcharinfo(0)+" has entered PvP Arena [Ancient - Nightmare ]", bc_all; warp "guild_vs2.gat",0,0; delwaitingroom; waitingroom "PvP Warper ["+getmapusers("guild_vs2")+"]",0; end; OnInit: while(1) { waitingroom "PvP Warper ["+getmapusers("guild_vs2")+"]",0; sleep 10000; delwaitingroom; } end; } I was asleep yesterday..
  16. prontera,150,180,5 script excahnger 56,{ if ( countitem(7828) ) {// valor getitem 522, countitem(7828); delitem 7828, countitem(7828); } else if ( countitem(7829) ) {// bravery getitem 522, countitem(7829); delitem 7829, countitem(7829); } end; }
  17. It adds a timer to reset the variable, it's just a debug (otherwise you need to log out/in to reset the var if you didn't make it in time)
  18. if ( getstatus ( 37 || 99 || 98 || 97 || 146 || 144)) is incorrect if ( getstatus (37) || getstatus (99) )// etc.. is correct
  19. - .mob = 70; + .mob = 50; areamonster "ordeal_1-1",183,182,246,244,"[DS] GARGOYLE",1253,15,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] ALARM",1193,10,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] HIGH ORC",1213,10,strnpcinfo(0)+"::Ondevildead2"; you change the total spawn but real amount of mob spawn is still 70
  20. I would like to add OnPCLoginEvent: // Expired! if(HuntStart && gettimetick(2) >= HuntStart) { callsub(OnTimeOut); } addtimer 1000*Time,strnpcinfo(3)+"::OnTimeOut"; end; OnPCLogoutEvent: if(HuntStart && gettimetick(2) < HuntStart) Time = HuntStart - gettimetick(2); end;
  21. you must update your waitingroom to display the current number of player in the map X prontera,151,190,5 script PvP Warper 843,{ mes "[ ^ff0000PVP Warper^000000 ]"; announce ""+strcharinfo(0)+" has entered PvP Arena [Ancient - Nightmare ]", bc_all; warp "guild_vs2.gat",0,0; close2; delwaitingroom; OnInit: waitingroom "PvP Warper ["+getmapusers("guild_vs2")+"]",0; end; }
  22. You are stone by default (a wrong const --> 0 = SC_STONE) replace SC_INC_AGI by SC_INCREASEAGI
×
×
  • Create New...