Advertisement
zero84ena

TCG Event v2.2

Dec 18th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. //==ExcaliburRO
  2. //==Made by Karul
  3. //--------------------
  4. //Edited by zero84ena[meru]
  5. //http://pastebin.com/dRAZdxPG
  6. //v2.1 [Some text pozition Bugs]
  7. //v2.2 [group item spawn yes/no configurable] [bug fix!]
  8. prt_in,43,94,9 script TCG Event 793,{
  9.  
  10.  
  11.  
  12.  
  13. set .Name$,"[TCG Event]";
  14. if(getgmlevel() < 99) {
  15. mes "Sorry you must be a Level 99 Admin";
  16. close;
  17. }
  18.  
  19. Main:
  20. mes "What do you want to do?";
  21. switch(select("Item [" + getitemname(.ItemID) + "]:Start Event:Start Custom Event")) {
  22. case 1:
  23. mes "What item would you want for the event?";
  24. mes "Please input the item ID:";
  25. input .ItemID;
  26. goto Main;
  27. case 2:
  28. mes "Starting the event now...";
  29. close2;
  30. goto OnStart;
  31. case 3:
  32. mes "Starting the event now...";
  33. close2;
  34. goto OnCustomStart;
  35. }
  36.  
  37.  
  38. OnStart:
  39. OnClock1500:
  40. OnClock2100:
  41. OnClock0300:
  42. OnClock0900:
  43. OnClock2342:
  44.  
  45.  
  46. deletearray $@towns$;
  47. deletearray $@cordsx;
  48. deletearray $@cordsy;
  49. deletearray $@displayname$;
  50. deletearray $@items;
  51. deletearray $@noum$;
  52. deletearray $@equipment;
  53.  
  54. setarray $@towns$[0],"prontera","prt_in","prt_in";
  55. setarray $@cordsx[0],115,195,32,44,127,131;
  56. setarray $@cordsy[0],164,244,96,115,69,74;
  57. setarray $@displayname$[0],"Center Prontera","Prontera Starting House","Prontera Tool Shop";
  58. //setarray $@towns$[0],"prt_in";
  59. //setarray $@cordsx[0],32,44;
  60. //setarray $@cordsy[0],96,115;
  61. //setarray $@displayname$[0],"Starting House";
  62. setarray $@items[0],675,503,504,505;
  63. setarray $@equipment[0],2631,1143,1159;
  64. setarray $@noum$[0],"One","Two","Three","Four","Five","Six","Seven";
  65. set $@group_up,0; // 1 or 0 for true or false // is to group items up or each have they own x,y coords
  66.  
  67. //randomize
  68. set $@t, rand(getarraysize($@towns$));
  69. set $@town$, $@towns$[$@t];
  70. set $@displ$, $@displayname$[$@t];
  71. set $@t, $@t * 2;
  72. set $@randomx,rand($@cordsx[$@t],$@cordsx[$@t+1]);
  73. set $@randomy,rand($@cordsy[$@t],$@cordsy[$@t+1]);
  74. //this 2 rows are for dinamic spawn cycle or Fixed comment uncomment if u wish to use the other.
  75. set $@spawn_loop, rand(1,getarraysize($@noum$));
  76. //set $@spawn_loop,5;
  77. //
  78. set $@spawned,0;
  79.  
  80. Announce $@noum$[$@spawn_loop-1]+" items are spawning @ "+$@displ$+"! (90secitemlife)",bc_all;
  81.  
  82. for(set .@i,0; .@i < $@spawn_loop; set .@i, .@i+1) {
  83. sleep2 1500;
  84. if ($@group_up == 0) {
  85. set $@randomx,rand($@cordsx[$@t],$@cordsx[$@t+1]);
  86. set $@randomy,rand($@cordsy[$@t],$@cordsy[$@t+1]);
  87. }
  88. if($@spawned != 1) {
  89. set $@eq, rand(0,1);
  90. }
  91. if($@eq == 1) {
  92. //this is equipment so we dont need the qty...
  93. set .item, $@equipment[rand(getarraysize($@equipment))];
  94. makeitem .item,1,$@town$,$@randomx,$@randomy;
  95. set $@spawned, 1; //only 1 equipment should be spawned! 0 - for 50%
  96. set $@eq, 0;
  97. }else{
  98. set $@spawn_qty,rand(10,100);//So that every spawnd items qty differs!
  99. set .item, $@items[rand(getarraysize($@items))];
  100. makeitem .item,$@spawn_qty,$@town$,$@randomx,$@randomy;
  101. }
  102. }
  103. end;
  104.  
  105. OnCustomStart:
  106. if(.ItemID==0) {
  107. mes "You have no item set up as the prize";
  108. close;
  109. }
  110. Announce "One item was spawned around Strhouse!",bc_all;
  111. //This will make item spawn in protera in by the flower girl!
  112. makeitem .ItemID,1,"prt_in",rand(32,44),rand(96,115);
  113. end;
  114.  
  115. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement