Advertisement
Guest User

Untitled

a guest
Apr 20th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.61 KB | None | 0 0
  1. //Author-Script Goddameit My forum : http://bit.ly/MDuQ9F
  2. //Author-Map TrojanWorm
  3. //Version 2012-10-31
  4.  
  5. //Don't re-release in anywhere and anyway
  6.  
  7. //////////////////////////////////////////////////////////////////////////
  8.  
  9. pvp_n_1-3 mapflag battleground 2
  10. pvp_n_1-3,53,99,0 script #BattleGroundwarpA2 100,{
  11. end;
  12. OnInit:
  13. waitingroom "Join Team Angel(Click)",2,"#BattleGroundwarpA2::OnJoin",1;
  14. end;
  15. OnJoin:
  16. if(!$@bg_id_a)
  17. set $@bg_id_a,waitingroom2bg("pvp_n_1-3",60,100,"","");
  18. else
  19. waitingroom2bg_single($@bg_id_a,"pvp_n_1-3",60,100,"#BattleGroundwarpA2");
  20. warpwaitingpc "pvp_n_1-3",60,100;
  21. end;
  22. }
  23. pvp_n_1-3,146,99,0 script #BattleGroundwarpB2 100,{
  24. end;
  25. OnInit:
  26. waitingroom "Join Team Demon(Click)",2,"#BattleGroundwarpB2::OnJoin",1;
  27. end;
  28. OnJoin:
  29. if(!$@bg_id_b)
  30. set $@bg_id_b,waitingroom2bg("pvp_n_1-3",139,100,"","");
  31. else
  32. waitingroom2bg_single($@bg_id_b,"pvp_n_1-3",139,100,"#BattleGroundwarpB2");
  33. warpwaitingpc "pvp_n_1-3",139,100;
  34. end;
  35. }
  36. pvp_n_1-3,66,99,0 script #BattleGroundwarpA1 45,2,2,{
  37. warp "pvp_n_1-3",82,99;
  38. end;
  39. }
  40. pvp_n_1-3,132,100,0 script #BattleGroundwarpB1 45,2,2,{
  41. warp "pvp_n_1-3",117,100;
  42. end;
  43. }
  44. yuno,154,179,4 script Demon VS Angel 100,{
  45. if(.status==2)
  46. {
  47. mes "Game is running.";
  48. close;
  49. }
  50. if(.status==1)
  51. {
  52.  
  53. if(.playernm>=128)
  54. {
  55. mes "Sorry, full";
  56. close;
  57. }
  58. select("Join");
  59. if(!.playerid[1])
  60. {
  61. //callsub OnEndd;
  62. initnpctimer;
  63. }
  64. set .playernm,.playernm+1;
  65. set .playerid[.playernm],getcharid(0);
  66. mes "Complete";
  67. close;
  68. }
  69. end;
  70. OnClock0100:
  71. OnClock0300:
  72. OnClock0500:
  73. OnClock0700:
  74. OnClock0900:
  75. OnClock1100:
  76. OnClock1300:
  77. OnClock1500:
  78. OnClock1700:
  79. //OnClock1900:
  80. //OnClock2100:
  81. OnClock2300:
  82. callsub OnActive;
  83. end;
  84.  
  85. OnActive:
  86. callsub OnEndd;
  87. set .status,1;
  88. enablenpc "Demon VS Angel";
  89. Announce "[Demon VS Angel]:Someone active the Angel vs Demon Game! Go to @GO pvp and join us!",0;
  90. Announce "[Demon VS Angel]:Prize is Poring Coin! Go to @GO pvp and join us!",0;
  91. end;
  92. OnTimer60000:
  93. if(.playernm<=32)
  94. {
  95. Announce "[Demon VS Angel]:Sorry, player amount isn't enough",0;
  96. callsub OnEndd;
  97. end;
  98. }
  99. Announce "[Demon VS Angel]:Angel vs Demon Event is ready!",0;
  100. for(set .@i,1;.@i<=.playernm;set .@i,.@i+1)
  101. {
  102. if(.@i%2==0)
  103. warpchar "pvp_n_1-3",59,99,.playerid[.@i];
  104. else
  105. warpchar "pvp_n_1-3",139,99,.playerid[.@i];
  106. }
  107. callsub OnEnab2;
  108. end;
  109. OnTimer90000:
  110. set .status,2;
  111. Announce "[Demon VS Angel]:Go!",0;
  112. bg_monster $@bg_id_a,"pvp_n_1-3",99,139,"Angel",1907,"Demon VS Angel::OnAdestory";
  113. bg_monster $@bg_id_b,"pvp_n_1-3",99,59,"Demon",1907,"Demon VS Angel::OnBdestory";
  114. callsub OnEnab1;
  115. end;
  116. OnTimer600000:
  117. if(.point[1]>.point[2])
  118. {
  119. for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 )
  120. {
  121. if( attachrid(.playerid[.@i]) )
  122. {
  123. if( getcharid(4) == $@bg_id_a )
  124. getitem 7539,10;
  125. }
  126. }
  127. Announce "[Demon VS Angel]:Team Angel Win!",0;
  128. }
  129. else if(.point[2]>.point[1])
  130. {
  131. for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 )
  132. {
  133. if( attachrid(.playerid[.@i]) )
  134. {
  135. if( getcharid(4) == $@bg_id_a )
  136. getitem 7539,10;
  137. }
  138. }
  139. Announce "[Demon VS Angel]:Team Demon Win!",0;
  140.  
  141. }else
  142. {
  143. Announce "[Demon VS Angel]:Draw!",0;
  144. }
  145. sleep2 3000;
  146. callsub OnEndd;
  147. end;
  148. OnBdestory:
  149. set .point[1],.point[1]+5;
  150. set .point[2],.point[2]-3;
  151. bg_updatescore "pvp_n_1-3",.point[1],.point[2];
  152. detachrid;
  153. sleep2 5000;
  154. bg_monster $@bg_id_b,"pvp_n_1-3",99,59,"Demon",1907,"Demon VS Angel::OnBdestory";
  155. end;
  156. OnAdestory:
  157. set .point[2],.point[2]+5;
  158. set .point[1],.point[1]-3;
  159. bg_updatescore "pvp_n_1-3",.point[1],.point[2];
  160. detachrid;
  161. sleep2 5000;
  162. bg_monster $@bg_id_a,"pvp_n_1-3",99,139,"Angel",1907,"Demon VS Angel::OnAdestory";
  163. end;
  164. OnEndd:
  165. set .status,0;
  166. bg_destroy $@bg_id_a;
  167. bg_destroy $@bg_id_b;
  168. set $@bg_id_a,0;
  169. set $@bg_id_b,0;
  170. setarray .point[1],0,0;
  171. killmonsterall "pvp_n_1-3";
  172. bg_updatescore "pvp_n_1-3",.point[1],.point[2];
  173. deletearray .playerid[0],128;
  174. mapwarp "pvp_n_1-3","turbo_room",99,113;
  175. disablenpc "Demon VS Angel";
  176. callsub OnDisa;
  177. return;
  178. OnEnab1:
  179. enablenpc "#BattleGroundwarpA1";
  180. enablenpc "#BattleGroundwarpB1";
  181. return;
  182. OnEnab2:
  183. enablenpc "#BattleGroundwarpA2";
  184. enablenpc "#BattleGroundwarpB2";
  185. disablenpc "Demon VS Angel";
  186. return;
  187. OnDisa:
  188. disablenpc "#BattleGroundwarpA1";
  189. disablenpc "#BattleGroundwarpB1";
  190. disablenpc "#BattleGroundwarpA2";
  191. disablenpc "#BattleGroundwarpB2";
  192. return;
  193. OnInit:
  194. sleep2 10000;
  195. setwall "pvp_n_1-3",69,96,8,0,0,"BattleGroundwarpA21";
  196. setwall "pvp_n_1-3",70,97,6,0,0,"BattleGroundwarpA22";
  197. setwall "pvp_n_1-3",71,97,6,0,0,"BattleGroundwarpA23";
  198. setwall "pvp_n_1-3",72,97,6,0,0,"BattleGroundwarpA24";
  199. setwall "pvp_n_1-3",73,97,6,0,0,"BattleGroundwarpA25";
  200. setwall "pvp_n_1-3",74,97,6,0,0,"BattleGroundwarpA26";
  201. setwall "pvp_n_1-3",75,97,6,0,0,"BattleGroundwarpA27";
  202. setwall "pvp_n_1-3",76,97,6,0,0,"BattleGroundwarpA28";
  203. setwall "pvp_n_1-3",129,97,6,0,0,"BattleGroundwarpB21";
  204. setwall "pvp_n_1-3",130,96,8,0,0,"BattleGroundwarpB22";
  205. setwall "pvp_n_1-3",128,97,6,0,0,"BattleGroundwarpB23";
  206. setwall "pvp_n_1-3",127,97,6,0,0,"BattleGroundwarpB24";
  207. setwall "pvp_n_1-3",126,97,6,0,0,"BattleGroundwarpB25";
  208. setwall "pvp_n_1-3",125,97,6,0,0,"BattleGroundwarpB26";
  209. setwall "pvp_n_1-3",124,97,6,0,0,"BattleGroundwarpB27";
  210. setwall "pvp_n_1-3",123,97,6,0,0,"BattleGroundwarpB28";
  211. callsub OnEndd;
  212. end;
  213. OnPCKillEvent:
  214. if(strcharinfo(3)=="pvp_n_1-3" && $@bg_id_a && $@bg_id_b)
  215. {
  216. if(getcharid(4) == $@bg_id_a)
  217. {
  218. set .point[1],.point[1]+1;
  219. }else
  220. set .point[2],.point[2]+1;
  221. bg_updatescore "pvp_n_1-3",.point[1],.point[2];
  222. }
  223. end;
  224. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement