Advertisement
icabit

gm spawner

Jan 27th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. dewata,162,274,4 script GMSPAWNER 990,{
  2. query_sql "SELECT `group_id` FROM `login` WHERE `account_id` ="+getcharid(3),.@getgroupid;
  3. if(.@getgroupid >3)
  4. {
  5. mes "Spawn Monster or Get Item";
  6. switch(select("Monster:Item")) {
  7. Case 1: mes "[ ^FF0000Enter Monster ID^000000 ]";
  8. mes "Refer From Ratemyserver.net";
  9. next;
  10. input .@monsterid$;
  11. next;
  12. mes "[ ^FF0000Enter Amount^000000 ]";
  13. next;
  14. input .@amount$;
  15. mes "[ ^FF0000Enter Map name^000000 ]";
  16. mes "Refer From Ratemyserver.net";
  17. mes "example pay_fild04";
  18. next;
  19. input .@map$;
  20. mes "[ ^FF0000Enter Valid Reason^000000 ]";
  21. mes "Be responsible with your spawning";
  22. next;
  23. input .@reason$;
  24. query_sql "INSERT INTO `gmspawner` (`char_id`,`gmname`,`monsterid`,`amount`,`map`,`reason`,`TimeandDate`) VALUES (" + getcharid(0) + ",'" + strcharinfo(0) + "','"+.@monsterid$+"','"+.@amount$+"','"+.@map$+"','"+.@reason$+"','" + gettimestr("%A %B %d %Y - %I:%M %p",40) + "')";
  25. mes "your summoning was successfull";
  26. monster .@Map$,0,0,"SPAWNED BY A GM",.@monsterid$,.@amount$,"GMSPAWNER::OnSpecialKill";
  27. close;
  28. end;
  29.  
  30. end;
  31. Case 2: mes "[ ^FF0000Enter Item ID^000000 ]";
  32. mes "Refer From Ratemyserver.net";
  33. next;
  34. input .@itemid;
  35. next;
  36. mes "[ ^FF0000Enter Amount^000000 ]";
  37. next;
  38. input .@amount;
  39. mes "[ ^FF0000Enter Valid Reason^000000 ]";
  40. mes "Be responsible with the item your getting";
  41. next;
  42. input .@reason$;
  43. query_sql "INSERT INTO `gmitem` (`char_id`,`gmname`,`itemid`,`amount`,`reason`,`TimeandDate`) VALUES (" + getcharid(0) + ",'" + strcharinfo(0) + "','"+.@itemid+"','"+.@amount+"','"+.@reason$+"','" + gettimestr("%A %B %d %Y - %I:%M %p",40) + "')";
  44. mes "your summoning was successfull";
  45. getitem .@itemid,.@amount;
  46. close;
  47. end;
  48. }
  49. }
  50. mes "only staffs can do transaction with me";
  51. close;
  52. end;
  53.  
  54. OnInit:
  55. query_sql("CREATE TABLE IF NOT EXISTS `gmspawner` (`char_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `gmname` varchar(255) NOT NULL DEFAULT '0', `monsterid` varchar(255) NOT NULL DEFAULT '0', `amount` varchar(255) NOT NULL DEFAULT '0', `map` varchar(255) NOT NULL DEFAULT '0', `reason` varchar(255) NOT NULL DEFAULT '0', `TimeandDate` varchar(255) NOT NULL DEFAULT '0', KEY `char_id` (`char_id`)) ENGINE=MyISAM");
  56. query_sql("CREATE TABLE IF NOT EXISTS `gmitem` (`char_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `gmname` varchar(255) NOT NULL DEFAULT '0', `itemid` varchar(255) NOT NULL DEFAULT '0', `amount` varchar(255) NOT NULL DEFAULT '0', `reason` varchar(255) NOT NULL DEFAULT '0', `TimeandDate` varchar(255) NOT NULL DEFAULT '0', KEY `char_id` (`char_id`)) ENGINE=MyISAM");
  57. end;
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement