Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. poring_w02,129,101,5 script Fabre Punch Event 952,{
  2.  
  3. set @npc$, "[ Fabre Punch Event ]";
  4. if (getgmlevel() >= 40) goto ppe_Admin;
  5. mes @npc$;
  6. mes "Hello "+strcharinfo(0)+", this NPC is for Event GM's use only.";
  7. close;
  8.  
  9. ppe_Admin:
  10. mes @npc$;
  11. mes "Hello "+strcharinfo(0)+", what would you like to do?";
  12. menu "Start Fabre Punch Event",ppe_start,"Nothing",endppe;
  13. ppe_start:
  14. if ($@PoringEventChecker == 1) goto ppe_started;
  15. mes " ";
  16. mes "Ok, starting Fabre Punch Event.";
  17. close2;
  18. donpcevent "Fabre Puncher::OnStartPPE";
  19. end;
  20.  
  21. endppe:
  22. next;
  23. mes @npc$;
  24. mes "Ok, nice seeing you.";
  25. close;
  26.  
  27. ppe_started:
  28. mes @npc$;
  29. mes "The event is still running";
  30. close;
  31.  
  32.  
  33.  
  34. }
  35.  
  36.  
  37.  
  38. - script PPE_inital -1,{
  39. OnInit:
  40. set $@PoringEventChecker, 0;
  41. end;
  42. }
  43.  
  44. prontera,144,183,6 script Fabre Puncher 952,{
  45.  
  46. mes "[ Fabre Punch Event ]";
  47. mes "Hello, I'm the Fabre Punch Event Manager. What do you want to do?";
  48. mes " ";
  49. menu "Join Event Now",PPE_Join,"Host this Event",PPE_Host,"How does this work?",PPE_HowTo,"Nevermind",PPE_nvm;
  50.  
  51. PPE_HowTo:
  52. next;
  53. mes "[ Fabre Punch Event ]";
  54. mes "This is an event where everyone can join in. All you have to do is to punch the right poring and to avoid the wrong ones. Each poring has its corresponding points. You only have 5 minutes to earn points as much as you can. The Highest Scorer at the end of this event shall win.";
  55. mes " ";
  56. mes "Reminder: No weapons, cart,homuns and pets is allowed in this event.";
  57. next;
  58. mes "[ Fabre Punch Event ]";
  59. mes "Monster values:";
  60. mes "Fabre: ^FF0000+1^000000 points.";
  61. mes "Pupas: ^FF0000+10^000000 points.";
  62. close;
  63.  
  64. PPE_Host:
  65. next;
  66. if ( $@PoringEventChecker != 0 ){
  67. mes "[ Fabre Punch Event ]";
  68. mes "Fabre Punch Event is still on-going.";
  69. mes " ";
  70. close;
  71. }else{
  72. mes "[ Fabre Punch Event ]";
  73. mes "You need to pay ^FF00001,000,000,000z^000000 to host this event. Would you like to pay to host this event?";
  74. next;
  75. menu "Yes",PPE_HostYes,"No",-;
  76. mes "[ Fabre Punch Event ]";
  77. mes "Okay. Maybe next time.";
  78. mes " ";
  79. close;
  80. PPE_HostYes:
  81. if ( Zeny >= 1000000000 ){
  82. mes "[ Fabre Punch Event ]";
  83. mes "Thanks "+strcharinfo(0)+", for hosting this event. It will start shortly.";
  84. mes " ";
  85. set Zeny, Zeny-1000000000;
  86. close2;
  87. announce ""+strcharinfo(0)+" paid to host Fabre Punch Event!",0;
  88. killmonsterall "pvp_n_1-2";
  89. sleep2 10000;
  90. donpcevent "Fabre Puncher::OnStartPPE";
  91. end;
  92. }else{
  93. mes "[ Fabre Punch Event ]";
  94. mes "Sorry "+strcharinfo(0)+", you dont have enough zenies to host this event.";
  95. mes " ";
  96. close;
  97. }end;
  98. }end;
  99.  
  100. PPE_Join:
  101. if (getgmlevel() > 0) {
  102. next;
  103. mes "[ Fabre Punch Event ]";
  104. mes "Sorry, but GM's can't join this event.";
  105. close;
  106. }
  107. if ( $@PoringEventChecker != 0 ){
  108. //if (gethominfo(2) != "null" || getpetinfo(2) != "null" || checkcart() || checkfalcon() || checkmount()) {
  109. //if (gethominfo(2) != "null" || getpetinfo(2) != "null" || checkcart() || checkfalcon()) {
  110. if (gethominfo(2) != "null" || getpetinfo(2) != "null" || checkcart() || checkfalcon() || checkriding())
  111. {
  112. mes "[ Fabre Punch Event ]";
  113. mes "Sorry "+strcharinfo(0)+" but you can't join this event!" ;
  114. mes "You have Mount, or Homonculus";
  115. mes "Remove first the following";
  116. mes "Peco Peco, Cart, Falcon, Pets and Homonculus";
  117. close;
  118. }
  119. else{
  120. mes "Good luck "+strcharinfo(0)+".";
  121. mes " ";
  122. close2;
  123. set @PoringPoints,0;
  124. warp "pvp_n_1-2",0,0;
  125. end;
  126. }
  127.  
  128. }else{
  129. mes "Sorry. No Fabre Punch Event is held at the moment.";
  130. mes " ";
  131. close;
  132. }end;
  133.  
  134. PPE_nvm:
  135. mes "Okay. Maybe next time.";
  136. close;
  137.  
  138. OnPoringKill:
  139. set $@mobppe,-1;
  140. if (getequipweaponlv(4)>0) {
  141. sleep2 1;
  142. dispbottom "You have to punch the monster without any weapon.";
  143. warp "poring_w02",98,70;
  144. end;
  145. }
  146. if (getequipweaponlv(3)>0) {
  147. sleep2 1;
  148. dispbottom "You have to punch the monster without any weapon.";
  149. warp "poring_w02",98,70;
  150. end;
  151. }
  152. set @PoringPoints,@PoringPoints+1;
  153. if (@PoringPoints == $@HighestPoringPoints) {
  154. set .@size,getarraysize($@HighestPoringPointsName$);
  155. for (set .@i,0;.@i<.@size;set .@i,.@i+1) {
  156. if ($@HighestPoringPointsName$[.@i] == strcharinfo(0)) {
  157. end;
  158. }
  159. }
  160. set $@ppewinners,$@ppewinners+1;
  161. set $@HighestPoringPointsName$[$@ppewinners],strcharinfo(0);
  162. end;
  163. }
  164. if (@PoringPoints > $@HighestPoringPoints) {
  165. deletearray $@HighestPoringPointsName$[0],getarraysize($@HighestPoringPointsName$);
  166. set $@ppewinners,0;
  167. set $@HighestPoringPointsName$[$@ppewinners],strcharinfo(0);
  168. set $@HighestPoringPoints,@PoringPoints;
  169. }
  170. dispbottom "You have "+@PoringPoints+" "+(@PoringPoints > 1 ? "points":"point")+"";
  171. end;
  172.  
  173. OnPoringKill2:
  174. set $@mobppe,-1;
  175. if (getequipweaponlv(4)>0) {
  176. sleep2 1;
  177. dispbottom "You have to punch the monster without any weapon.";
  178. warp "poring_w02",98,70;
  179. end;
  180. }
  181. if (getequipweaponlv(3)>0) {
  182. sleep2 1;
  183. dispbottom "You have to punch the monster without any weapon.";
  184. warp "poring_w02",98,70;
  185. end;
  186. }
  187. set @PoringPoints,@PoringPoints+10;
  188. if (@PoringPoints == $@HighestPoringPoints) {
  189. set .@size,getarraysize($@HighestPoringPointsName$);
  190. for (set .@i,0;.@i<.@size;set .@i,.@i+1) {
  191. if ($@HighestPoringPointsName$[.@i] == strcharinfo(0)) {
  192. end;
  193. }
  194. }
  195. set $@ppewinners,$@ppewinners+1;
  196. set $@HighestPoringPointsName$[$@ppewinners],strcharinfo(0);
  197. dispbottom "You have "+@PoringPoints+" "+(@PoringPoints > 1 ? "points":"point")+"";
  198. end;
  199. }
  200. if (@PoringPoints > $@HighestPoringPoints) {
  201. deletearray $@HighestPoringPointsName$[0],getarraysize($@HighestPoringPointsName$);
  202. set $@HighestPoringPointsName$[0],strcharinfo(0);
  203. set $@HighestPoringPoints,@PoringPoints;
  204. }
  205. dispbottom "You have "+@PoringPoints+" "+(@PoringPoints > 1 ? "points":"point")+"";
  206. end;
  207.  
  208.  
  209. OnClock0230:
  210. OnClock0530:
  211. OnClock0830:
  212. OnClock1130:
  213. OnClock1430:
  214. OnClock1735:
  215. OnClock2030:
  216. OnClock2330:
  217. if ($@woe_ongoing == 1) {
  218. end;
  219. }
  220. if ( $@PoringEventChecker == 0 ) {
  221. set $@PoringEventChecker, 1;
  222. donpcevent "Fabre Puncher::OnStartPPE";
  223. end;
  224. }
  225. end;
  226.  
  227. OnStartPPE:
  228. set $@PoringEventChecker, 1;
  229. initnpctimer;
  230. waitingroom "Event: On",0;
  231. announce "Fabre Punch Event: Starting in 1 minute.",0;
  232. deletearray $@HighestPoringPointsName$[0],getarraysize($@HighestPoringPointsName$);
  233. set $@ppewinners,0;
  234. set $@HighestPoringPointsName$," ";
  235. set $@HighestPoringPoints,0;
  236. end;
  237.  
  238. OnTimer30000:
  239. mapannounce "pvp_n_1-2","Note: If you go out of this map your points will reset to 0.",0;
  240. end;
  241.  
  242. OnTimer55000:
  243. mapannounce "pvp_n_1-2","Fabre Punch Event is starting in 5.",0;
  244. end;
  245.  
  246. OnTimer56000:
  247. mapannounce "pvp_n_1-2","Fabre Punch Event is starting in 4.",0;
  248. end;
  249.  
  250. OnTimer57000:
  251. mapannounce "pvp_n_1-2","Fabre Punch Event is starting in 3.",0;
  252. end;
  253.  
  254. OnTimer58000:
  255. mapannounce "pvp_n_1-2","Fabre Punch Event is starting in 2.",0;
  256. end;
  257.  
  258. OnTimer59000:
  259. mapannounce "pvp_n_1-2","Fabre Punch Event is starting in 1.",0;
  260. end;
  261.  
  262. OnTimer60000:
  263. set $@mobppe,315;
  264. announce "The Fabre Punch event has started.",0;
  265. monster "pvp_n_1-2",0,0,"Fabre",1007,60,"Fabre Puncher::OnPoringKill";
  266. monster "pvp_n_1-2",0,0,"Pupa",1008,10,"Fabre Puncher::OnPoringKill2";
  267. end;
  268.  
  269. OnTimer120000:
  270. mapannounce "pvp_n_1-2","Fabre Punch Event: 2 minutes left.",0;
  271. monster "pvp_n_1-2",0,0,"Fabre",1007,60,"Fabre Puncher::OnPoringKill";
  272. monster "pvp_n_1-2",0,0,"Pupa",1008,10,"Fabre Puncher::OnPoringKill2";
  273. end;
  274.  
  275. OnTimer180000:
  276. mapannounce "pvp_n_1-2","Fabre Punch Event: 1 minute left.",0;
  277. monster "pvp_n_1-2",0,0,"Fabre",1007,60,"Fabre Puncher::OnPoringKill";
  278. monster "pvp_n_1-2",0,0,"Pupa",1008,10,"Fabre Puncher::OnPoringKill2";
  279. end;
  280.  
  281. OnTimer240000:
  282. delwaitingroom "Fabre Puncher";
  283. stopnpctimer;
  284. killmonsterall "pvp_n_1-2";
  285. if ( getmapusers("pvp_n_1-2") < 1 ) {
  286. announce "There are no players inside the event map...so it will auto terminate.",0;
  287. mapwarp "pvp_n_1-2","poring_w02",98,70;
  288. set $@PoringEventChecker, 0;
  289. end;
  290. }
  291. if ($@mobppe == 315) {
  292. mapannounce "pvp_n_1-2","No one wins! You have to punch and kill at least one poring to win this event.",0;
  293. killmonsterall "pvp_n_1-2";
  294. sleep2 3000;
  295. mapannounce "pvp_n_1-2","You will be warp at Main Town in a short while.",16;
  296. sleep2 5000;
  297. mapwarp "pvp_n_1-2","poring_w02",98,70;
  298. set $@PoringEventChecker, 0;
  299. end;
  300. }
  301. if ($@HighestPoringPointsName$ == " ") || ($@HighestPoringPoints == 0) {
  302. mapannounce "pvp_n_1-2","No one wins! You have to punch and kill at least one poring to win this event.",0;
  303. killmonsterall "pvp_n_1-2";
  304. sleep2 3000;
  305. mapannounce "pvp_n_1-2","You will be warp at Main Town in a short while.",16;
  306. sleep2 5000;
  307. mapwarp "pvp_n_1-2","poring_w02",98,70;
  308. set $@PoringEventChecker, 0;
  309. end;
  310. }
  311. if ($@ppewinners > 1) {
  312. set .@size,getarraysize($@HighestPoringPointsName$);
  313. for (set .@i,0;.@i < .@size;set .@i,.@i+1) {
  314. announce "Fabre Punch Event has ended and the event winner is \""+$@HighestPoringPointsName$[.@i]+"\" with "+$@HighestPoringPoints+" "+($@HighestPoringPoints > 1 ? "points":"point")+"",0;
  315. getitem 25468,1,getcharid(3,$@HighestPoringPointsName$[.@i]);
  316. sleep2 1;
  317. }
  318. sleep2 5000;
  319. mapannounce "pvp_n_1-2","You will be warp at Main Town in a short while.",16;
  320. sleep2 5000;
  321. mapwarp "pvp_n_1-2","poring_w02",98,70;
  322. set $@PoringEventChecker,0;
  323. end;
  324. }
  325. if ($@ppewinners == 1) {
  326. set .@size,getarraysize($@HighestPoringPointsName$);
  327. for (set .@i,0;.@i < .@size;set .@i,.@i+1) {
  328. getitem 25468,1,getcharid(3,$@HighestPoringPointsName$[.@i]);
  329. announce "Fabre Punch Event has ended and the event winner is \""+$@HighestPoringPointsName$[.@i]+"\" with "+$@HighestPoringPoints+" "+($@HighestPoringPoints > 1 ? "points":"point")+"",0;
  330. sleep2 1;
  331. }
  332. sleep2 5000;
  333. mapannounce "pvp_n_1-2","You will be warp at Main Town in a short while.",16;
  334. sleep2 5000;
  335. mapwarp "pvp_n_1-2","poring_w02",98,70;
  336. set $@PoringEventChecker,0;
  337. end;
  338. }
  339. set .@size,getarraysize($@HighestPoringPointsName$);
  340. for (set .@i,0;.@i < .@size;set .@i,.@i+1) {
  341. announce "Fabre Punch Event has ended and the event winner is \""+$@HighestPoringPointsName$[.@i]+"\" with "+$@HighestPoringPoints+" poring "+($@HighestPoringPoints > 1 ? "points":"point")+"",0;
  342. getitem 25468,1,getcharid(3,$@HighestPoringPointsName$[.@i]);
  343. sleep2 1;
  344. }
  345. sleep2 5000;
  346. mapannounce "pvp_n_1-2","You will be warp at Prontera City in a short while.",16;
  347. sleep2 5000;
  348. mapwarp "pvp_n_1-2","poring_w02",98,70;
  349. set $@PoringEventChecker,0;
  350. end;
  351.  
  352. }
  353.  
  354.  
  355.  
  356. // MAPFLAGS
  357. pvp_n_1-2 mapflag nobranch
  358. pvp_n_1-2 mapflag noexp
  359. pvp_n_1-2 mapflag noskill
  360. pvp_n_1-2 mapflag nomemo
  361. pvp_n_1-2 mapflag nopenalty
  362. pvp_n_1-2 mapflag pvp off
  363. pvp_n_1-2 mapflag nosave SavePoint
  364. pvp_n_1-2 mapflag noskill
  365. pvp_n_1-2 mapflag noteleport
  366. pvp_n_1-2 mapflag nowarp
  367. pvp_n_1-2 mapflag nowarpto
  368. pvp_n_1-2 mapflag notrade
  369. pvp_n_1-2 mapflag noloot
  370. pvp_n_1-2 mapflag nodrop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement