SHARE
TWEET

a

a guest Jan 24th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Custom Command Mods by Icebear
  2. //@storage map block
  3. //@gstorage map block
  4. //@resetpvprank - to reset annie pvp ladder 2.9
  5.  
  6. -   script  customcmd   -1,{
  7.  
  8. OnInit:
  9. setarray .map_blocks$[0],
  10. "prontera",
  11. "payon";
  12.  
  13. bindatcmd "storage",strnpcinfo(0)+"::OnStorage";
  14. bindatcmd "gstorage",strnpcinfo(0)+"::OnGstorage";
  15. bindatcmd "resetpvprank",strnpcinfo(0)+"::OnLadderReset",99,99;
  16. end;
  17.  
  18. OnLadderReset:
  19. menu "Confirmtion - Yes, please reset the pvp ladder",-;
  20. query_sql("TRUNCATE TABLE `pvpladder`");
  21. query_sql("TRUNCATE TABLE `ownladder`");
  22. showscript "PvP Ladder resetted successful.",getcharid(3),SELF;
  23. end;
  24.  
  25. OnStorage:copyarray .map_arrays_storage$[0],getvariableofnpc( .map_blocks$[0], "customcmd" ), 8;
  26. for(set .@i,0; .@i<getarraysize(.map_arrays_storage$); set .@i,.@i+1)
  27. if(strcharinfo(3) != .map_arrays_storage$[.@i]){ openstorage; end; } else { showscript "You cannot use @storage on ["+strcharinfo(3)+"] this map.",getcharid(3),SELF; end; } end;
  28. OnGstorage:copyarray .map_arrays_gstorage$[0],getvariableofnpc( .map_blocks$[0], "customcmd" ), 8;
  29. for(set .@i,0; .@i<getarraysize(.map_arrays_gstorage$); set .@i,.@i+1)
  30. if(strcharinfo(3) != .map_arrays_gstorage$[.@i]){ guildopenstorage; end; } else { showscript "You cannot use @gstorage on ["+strcharinfo(3)+"] this map.",getcharid(3),SELF; end; } end;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top