Advertisement
Guest User

Untitled

a guest
Jul 28th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. prontera,x,y,z script Rewards 899,{
  2.  
  3. //Set the GM Min Level to Give Reward
  4. set .gmlevel,99;
  5. //------------------------------------
  6.  
  7. if(getgmlevel() >= .gmlevel) goto GMMenu;
  8. if(#freerewards == 1) {
  9. mes "Hi, here's your reward";
  10. getitem $itemid,$itemamt;
  11. set #freerewards,0;
  12. end;
  13. }
  14. mes "Sup";
  15. end;
  16.  
  17. GMMenu:
  18. mes "Do you want to give reward ?";
  19. switch(select("Yes:No") {
  20. case 1:
  21. next;
  22. mes "Type the ID of the Item";
  23. input $itemid;
  24. next;
  25. mes "So it's ^FF0000"+getitemname($itemid)+"^000000.";
  26. mes "How many of the amount you want to give ?";
  27. input $itemamt;
  28. next;
  29. mes "So it's "+$itemamt+" of ^FF0000"+getitemname($itemid)+"^000000(s).";
  30. mes "Are you sure this is right ?";
  31. switch(select("Yes:No") {
  32. case 1:
  33. query_sql "SELECT COUNT(*) FROM `char` WHERE online=1",@onlineplayers;
  34. query_sql "SELECT `account_id`, `name` FROM `char` WHERE online=1",$@account_id,$@name$;
  35. for (set @i,0; @i <= @onlineplayers-1; set @i,@i+1) {
  36. attachrid($@accountid[@i]);
  37. set #freerewards,1;
  38. }
  39. mes "Rewards has successfully given";
  40. end;
  41.  
  42. case 2:
  43. end;
  44. }
  45.  
  46. case 2:
  47. end;
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement