Advertisement
Guest User

Untitled

a guest
Oct 17th, 2012
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.42 KB | None | 0 0
  1. //===== eAthena Script ======================================================================
  2. //= Emperium Wars
  3. //===== Original By =========================================================================
  4. //= Toxic Aka Hellflaem
  5. //===== Credit =========================================================================
  6. //= Hellflaem
  7. //= ~AnnieRuru~ (Support)
  8. //= diedlikeahero (poring Ball)
  9. //= Any one I forgot.
  10. //===== Current Version: ====================================================================
  11. //= 1.0
  12. //===== Compatible With: ====================================================================
  13. //= Any eAthena
  14. //===== Description: ========================================================================
  15. //= This is just a fun little gvg game,
  16. //= Any one person from 2 different guilds can play it.
  17. //= First guild to kill the other emp 5 times wins.
  18. //= Killing your own Emp takes away points.
  19. //===== Comments================================================================
  20. //= Edit it to your servers likings.
  21. //=Own a Server? Add it to http://Top100Ros.com/
  22. //===========================================================================================
  23. - script WOR#announcer -1,{
  24. end;
  25.  
  26. OnInit:
  27. disablenpc "WOR";
  28. hideonnpc "Emperium Wars#WOR1";
  29. end;
  30.  
  31. OnMinute30: // every 30minutes On << pa edit nalang !
  32. announce "The [ GaiaRo War Event Started ].",bc_blue;
  33. sleep2 10000;
  34. announce "The Gaia Ragnarok Small WoE War will Starting Shortly",bc_blue;
  35. sleep2 10000;
  36. announce "For those 2 GUILDs want to Participate Please Wait The Portal in Prontera",bc_blue;
  37. sleep2 10000;
  38. announce "Portal is now Open Please Now Enter And Register..!!",bc_blue;
  39. enablenpc "WOR";
  40. initnpctimer;
  41. end;
  42.  
  43. OnTimer30000:
  44. announce "Last 30 Seconds WAR Portal Has been Close",bc_blue;
  45. sleep2 5000;
  46. announce "Come On All Guild Member and Guild leader Enter now !",bc_blue;
  47. end;
  48.  
  49. OnTimer50000:
  50. announce "Last 10 Seconds",bc_blue;
  51. end;
  52.  
  53. OnTimer55000:
  54. announce "Counting : 5",bc_blue;
  55. end;
  56.  
  57. OnTimer56000:
  58. announce "Counting : 4",bc_blue;
  59. end;
  60.  
  61. OnTimer57000:
  62. announce "Counting : 3",bc_blue;
  63. end;
  64.  
  65. OnTimer58000:
  66. announce "Counting : 2",bc_blue;
  67. end;
  68.  
  69. OnTimer59000:
  70. announce "Counting : 1",bc_blue;
  71. end;
  72.  
  73. OnTimer60000:
  74. announce "The WAR Portal has been Close Wait for Next 30minutes to War Start",bc_blue;
  75. end;
  76.  
  77. OnTimer61000:
  78. disablenpc "WOR";
  79. donpcevent "Emperium Wars#WOR1::OnEnable";
  80. stopnpctimer;
  81. end;
  82. }
  83.  
  84. //--------------------------------------------------
  85.  
  86. prontera,163,183,0 warp WOR 2,2,quiz_02,363,346
  87.  
  88. //--------------------------------------------------
  89.  
  90. quiz_02,364,356,4 script Emperium Wars#WOR1 722,{
  91.  
  92. set $npcname$,"[Gaia Emperium Wars]";
  93. set $rewarditem, 20011;
  94.  
  95. mes $npcname$;
  96. mes "Hello "+strcharinfo(0)+" what do you want?";
  97. next;
  98. menu "^FF0000Sign Up^000000",L_signup,"^996600Enter^000000",L_enter,"^006699Information^000000",L_info,"^00AA00Nothing^000000",bye;
  99. close;
  100.  
  101. L_signup:
  102. if (($@state_match!=1) && ($@guildID1!=0) && ($@guildID2!=0) && (getguildname($@guildID1)!="null") && (getguildname($@guildID2)!="null")) {
  103. mes $npcname$;
  104. mes "Sorry "+strcharinfo(0)+" , Two Guilds are signed up for this event already.";
  105. close;
  106. }
  107.  
  108. mes $npcname$;
  109. mes "Hello "+strcharinfo(0)+" , Two Guilds are needed for this event.";
  110. mes "Would you like to Sign up yours?";
  111. mes "If so Please do so now.";
  112. menu "Guild 1",L_guild1,"Guild 2",L_guild2,"None",-;
  113. next;
  114. mes $npcname$;
  115. mes "Bye!";
  116. close;
  117.  
  118. L_guild1:
  119. // If a match is in play
  120. if ($@state_match >= 1) {
  121. mes $npcname$;
  122. mes "The warpers are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
  123. close;
  124. }
  125.  
  126. // Does the player belong to a guild?
  127. if (getcharid(2)==0) {
  128. mes $npcname$;
  129. mes "This Event is for Guilds, and you're not in a Guild. Come back with a Guild!";
  130. close;
  131. }
  132.  
  133. // Is the group of the player subscribed as the other guild already?
  134. if (getcharid(2)==$@guildID2) {
  135. mes $npcname$;
  136. mes "Hey! A player from the opposing Guild! Get ready to face off one of the best Guilds!";
  137. mes "The formidable " + GetGuildName($@guildID1) + "";
  138. close;
  139. }
  140.  
  141. // If a team is already subscribed, and that team still exists
  142. if (($@guildID1!=0) && (getguildname($@guildID1)!="null")) {
  143.  
  144. // if the player belongs to that team that's already subscribed
  145. if ($@guildID1==getcharid(2)) {
  146. mes $npcname$;
  147. mes "Do you wish to unsubscribe your team?";
  148. next;
  149. if (select("Yes, we want to stop the match.","No, we're staying.")==2) close;
  150.  
  151. // if the player wishes to unsubscribe their team
  152. announce "Team " + GetGuildName($@guildID1) + " has disbanded. We need another Guild to sign up now!",bc_blue|bc_map;
  153. set $@guildID1, 0;
  154. close;
  155. }
  156. mes $npcname$;
  157. mes "A Guild is already subscribed! It's Team "+getguildname($@guildID1)+".";
  158. close;
  159. }
  160.  
  161.  
  162. // if there are no teams subscribed and that the subscriptions are open
  163. mes $npcname$;
  164. mes "Do you wish to subscribe your team?";
  165. next;
  166. if (select("Yes, we want to subscribe.","No.")==2) close;
  167.  
  168. // Team subscription
  169. if ($@guildID1==0 || (getguildname($@guildID1)=="null")) {
  170. set $@guildID1, getcharid(2);
  171. mes $npcname$;
  172. mes "Your Guild is now subscribed, good luck!";
  173. announce "" + getguildname($@guildID1) + " Guild has subscribed For the Emperium War!",bc_blue|bc_map;
  174. doevent "empwar::OnSubscriptionguild";
  175. close;
  176. } else {
  177. mes $npcname$;
  178. mes "I'm sorry! Another Guild has subscribed before you...";
  179. close;
  180. }
  181. end;
  182.  
  183.  
  184. L_guild2:
  185. // If a match is in play
  186. if ($@state_match >= 1) {
  187. mes $npcname$;
  188. mes "The warpers are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
  189. close;
  190. }
  191.  
  192. // Does the player belong to a group?
  193. if (getcharid(2)==0) {
  194. mes $npcname$;
  195. mes "This Event is for Guilds, and you're not in a Guild. Come back with a Guild!";
  196. close;
  197. }
  198.  
  199. // Is the group of the player subscribed as the other guild already?
  200. if (getcharid(2)==$@guildID1) {
  201. mes $npcname$;
  202. mes "Hey! A player from the opposing Guild! Get ready to face off one of the best Guild!";
  203. mes "The formidable " + GetGuildName($@guildID2) + "";
  204. close;
  205. }
  206.  
  207. // If a team is already subscribed, and that team still exists
  208. if (($@guildID2!=0) && (getguildname($@guildID2)!="null")) {
  209. // if the player belongs to that team that's already subscribed
  210. if ($@guildID2==getcharid(2)) {
  211. mes $npcname$;
  212. mes "Do you wish to unsubscribe your guild?";
  213. next;
  214. if (select("Yes, we want to stop the match.","No, we're staying.")==2) close;
  215.  
  216. // if the player wishes to unsubscribe their team
  217. announce "Team "+getguildname($@guildID2)+" has disbanded. We need another Guild to sign up!",bc_blue|bc_map;
  218. set $@guildID2, 0;
  219. close;
  220. }
  221. mes $npcname$;
  222. mes "A Guild is already subscribed! It's Team "+getguildname($@guildID2)+".";
  223. close;
  224. }
  225.  
  226. // if there are no teams subscribed and that the subscriptions are open
  227. mes $npcname$;
  228. mes "Do you wish to subscribe your Guild?";
  229. next;
  230. if (select("Yes, we want to subscribe.","No.")==2) close;
  231.  
  232. // Team subscription
  233. if ($@guildID2==0 || (getguildname($@guildID2)=="null")) {
  234. set $@guildID2, getcharid(2);
  235. mes $npcname$;
  236. mes "Your Guild is now subscribed, good luck!";
  237. announce ""+getguildname($@guildID2)+" Guild has subscribed to the Emperium War!",bc_blue|bc_map;
  238. doevent "empwar::OnSubscriptionguild";
  239. close;
  240. } else {
  241. mes $npcname$;
  242. mes "I'm sorry! Another Guild has subscribed before you...";
  243. close;
  244. }
  245. end;
  246.  
  247.  
  248. L_enter:
  249. if (($@guildID1!=0) && ($@guildID2!=0) && (getguildname($@guildID1)!="null") && (getguildname($@guildID2)!="null")) {
  250.  
  251. if (getcharid(2)==$@guildID1) {
  252. savepoint "bat_a01",171,340;
  253. warp "bat_a01.gat", 171, 340; end;
  254. }
  255.  
  256. if (getcharid(2)==$@guildID2) {
  257. savepoint "bat_a01",155,48;
  258. warp "bat_a01.gat", 155, 48; end;
  259.  
  260. }
  261.  
  262. mes $npcname$;
  263. mes "Your not in one of the Signed up guilds";
  264. close;
  265.  
  266. }
  267. mes $npcname$;
  268. mes "There is not any guilds signed up";
  269. close;
  270.  
  271.  
  272.  
  273. L_info:
  274. mes $npcname$;
  275. mes "This Game is GvG";
  276. mes "A Guild Must Kill the other Guilds Emperium 5 times";
  277. mes "Before the other guild does.";
  278. mes "If your Guild wins the people in your Guild on the";
  279. mes "map when it ends gets the Prize by talking with one of the Exit npcs.";
  280. mes "Good Luck.";
  281. close;
  282.  
  283. bye:
  284. mes $npcname$;
  285. mes "Bye.";
  286. close;
  287.  
  288. // if the 2 guilds are subscribed
  289. OnSubscriptionguild:
  290. if (($@guildID1!=0) && ($@guildID2!=0) && (getguildname($@guildID1)!="null") && (getguildname($@guildID2)!="null")) {
  291. announce "Gaia Emperium War : We have 2 Guilds signed up now : "+getguildname($@guildID1)+" and "+getguildname($@guildID2)+".",bc_yellow|bc_map;
  292. announce "Gaia Emperium War : The members of each Guild can come Enter the War now.",bc_yellow|bc_map;
  293. set $@state_match, 1;
  294. donpcevent "Ew::OnBegin";
  295. warp "Jazeera",158,127;
  296. hideonnpc "Emperium Wars#WOR1";
  297. end;
  298. }
  299.  
  300. }
  301.  
  302. //Exit
  303. bat_a01.gat,149,351,5 script Exit::Ewexit 88,{
  304. if(getcharid(2) == $Ewgid){
  305. getitem $rewarditem,rand(1,5);
  306. savepoint "Jazeera",158,127;
  307. warp "Jazeera", 158, 127; end;
  308. }
  309. savepoint "Jazeera",158,127;
  310. warp "Jazeera", 158, 127; end;
  311. }
  312.  
  313.  
  314. // function Ew Start
  315. - script Ew -1,{
  316.  
  317. OnBegin:
  318.  
  319. if (.points2 >= 15) {
  320. Announce "The Gaia Emperium War is over!",8;
  321. Announce "The Winner of Gaia Emperium War is the [" + GetGuildName($@guildID2) + "] guild.",bc_blue;
  322. set $Ewgid,getcharid(2);
  323. donpcevent "Ew::OnEnded";
  324. end;
  325. }
  326.  
  327. if (.points1 >= 15) {
  328. Announce "The Gaia Emperium War is over!",8;
  329. Announce "The Winner of Gaia Emperium War is the [" + GetGuildName($@guildID1) + "] guild.",bc_blue;
  330. set $Ewgid,getcharid(2);
  331. donpcevent "Ew::OnEnded";
  332. end;
  333. }
  334.  
  335. initnpctimer;
  336. MapRespawnGuildID "bat_a01",$Ewgid,7;
  337. monster "bat_a01",173,346,"EMPERIUM",1288,1,"Ew::OnEmpDead1";
  338. monster "bat_a01",165,50,"EMPERIUM",1288,1,"Ew::OnEmpDead2";
  339. end;
  340.  
  341. OnEmpDead2:
  342.  
  343. if ( getcharid(2) == $@guildID2 ) {
  344. stopnpctimer;
  345. set .points2, .points2 -1;
  346. dispbottom "Stop killing your own emp";
  347. Announce "The [" + GetGuildName($@guildID2) + "] guild has lost a Point for killing there own Emperium and now has [" + .points2 + "] Points!.",bc_blue;
  348. goto OnBegin;
  349. end;
  350.  
  351. } else {
  352.  
  353. stopnpctimer;
  354. set .points1, .points1 +1 ;
  355. Announce "[WoR] [ "+strcharinfo(0)+" ] of [" + GetGuildName($@guildID1) + "] Guild Has [" + .points1 + "] Points!.",bc_blue;
  356. goto OnBegin;
  357. end; }
  358.  
  359. OnEmpDead1:
  360.  
  361. if ( getcharid(2) == $@guildID1 ) {
  362. stopnpctimer;
  363. set .points1, .points1 -1;
  364. dispbottom "Stop killing your own emp";
  365. Announce "The [" + GetGuildName($@guildID1) + "] guild has lost a Point for killing there own Emperium and now has [" + .points1 + "] Points!.",bc_blue;
  366. goto OnBegin;
  367. end;
  368.  
  369. } else {
  370.  
  371. stopnpctimer;
  372. set .points2, .points2 +1 ;
  373. Announce "[WoR] [ "+strcharinfo(0)+" ] of [" + GetGuildName($@guildID1) + "] Guild has [" + .points1 + "] Points!.",bc_blue;
  374. goto OnBegin;
  375. end; }
  376.  
  377. OnEnded:
  378. stopnpctimer;
  379. set $@state_match, 0;
  380. set .points1,0;
  381. set .points2,0;
  382. killmonsterall "bat_a01";
  383. end;
  384.  
  385. OnTimer900000:
  386. Announce "The Emperium War is over, No one was the winner!",8;
  387. set $Ewgid,0;
  388. donpcevent "Ew::OnEnded";
  389. end;
  390.  
  391. }
  392.  
  393.  
  394. //duplicates
  395. bat_a01.gat,363,266,0 duplicate(Ewexit) Ewexit#2 45,1,1
  396. bat_a01.gat,353,60,0 duplicate(Ewexit) Ewexit#3 45,1,1
  397. bat_a01.gat,138,57,0 duplicate(Ewexit) Ewexit#4 45,1,1
  398.  
  399. bat_a01 mapflag gvg
  400. bat_a01 mapflag nowarpto
  401. bat_a01 mapflag nowarp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement