// ===== eAthena Script =======================================// = Maze Event// ===== By: ==================================================// = Cruxiaer// ===== Current Version: =====================================// = 1.00// ===== Compatible With: =====================================// = eAthena 1.x// ===== Description: =========================================// = Maze Game where players have to walk into portals// = till they win.// ===== How to use: ==========================================// $@prize = amount of Event Points to be won// @chance = the difficulty of winning, higher is harder// Edit OnClock events to change when will the Event start// ===== Changelog: ===========================================// 1.00 - First release// 1.01 - Fixed 500EP bonus and added active upon PM func//===== Credits: =============================================//= Euph for original Maze Game script//============================================================prontera,156,170,0 script mazeevent 45,2,2,{if( $mazeinit ==0){disablenpc"mazeevent";end;}// Check for equipment that would give an advantage.if(countitem(1363) ||countitem(1372) ||countitem(1373) ||countitem(2410) ||countitem(2515) ||countitem(4131) ||countitem(4210) ||countitem(5150) ||countitem(5203) ||countitem(5273) ||countitem(5274) ||countitem(5275)){mes"[^FF0000Maze^000000]";mes"Please store any equipment that increases your movement speed.";close;end;}// Check for any consumable items that would give an advantage.if(countitem(662) ||countitem(12016) ||countitem(12028) ||countitem(12262)){mes"[^FF0000Maze^000000]";mes"Please store any consumables that increases your movement speed.";close;end;}// Remove Peco / Cartatcommandstrcharinfo(0)+":@option 0 0 0";// Remove Any Speed Buffssc_endSC_SPEEDUP0;sc_endSC_SPEEDUP1;sc_endSC_INCREASEAGI;sc_endSC_WINDWALK;sc_endSC_CARTBOOST;sc_endSC_CLOAKING;sc_endSC_BERSERK;sc_endSC_RUN;sc_endSC_AVOID;// Grant 5 Minute Walking Speed Increasesc_startSC_INCREASEAGI,600000,1;// Warp to Eventwarp"force_1-3", 19, 189;set #EVENTPOINTS, #EVENTPOINTS+500;dispbottom"500 Event Points are awarded for joining this Event.";}- script Maze#announcer -1,{OnInit:// Unload NPCs except this one at server start.disablenpc"mazeevent";disablenpc"mz_portal#1";disablenpc"mz_portal#2";disablenpc"mz_portal#3";disablenpc"mz_portal#4";disablenpc"mz_portal#5";disablenpc"mz_portal#6";disablenpc"mz_portal#7";disablenpc"mz_portal#8";disablenpc"mz_portal#9";disablenpc"mz_portal#10";disablenpc"mz_portal#11";disablenpc"mz_portal#12";disablenpc"mz_portal#13";disablenpc"mz_portal#14";disablenpc"mz_portal#15";disablenpc"mz_portal#16";disablenpc"mz_portal#17";disablenpc"mz_portal#18";disablenpc"mz_portal#19";disablenpc"mz_portal#20";disablenpc"mz_portal#21";disablenpc"mz_portal#22";disablenpc"mz_portal#23";disablenpc"mz_portal#24";disablenpc"Maze#asdf";end;OnClock0100:OnClock0200:OnClock0300:OnClock0400:OnClock0500:OnClock0600:OnClock0700:OnClock0800:OnClock0900:OnClock1000:OnClock1100:OnClock1200:OnClock1300:OnClock1400:OnClock1500:OnClock1600:OnClock1700:OnClock1800:OnClock1900:OnClock2000:OnClock2100:OnClock2200:OnClock2300:OnClock0000:announce"Maze: A maze event will begin in 2 minutes in Prontera.",0,0x99FFCC;sleep290000;announce"Maze: Enter the Warp in Prontera to join the Maze event.",0,0x99FFCC;// Clear up the map.areawarp"force_1-3",104,18,189,10,"prontera",159,116;// Load NPCs + hide the Maze guyset $mazeinit, 1;enablenpc"mazeevent";enablenpc"Maze#asdf";hideonnpc"Maze#asdf";initnpctimer;end;OnTimer30000:mapannounce"prontera","Maze: Last 30 seconds.",0,0x99FFCC;sleep25000;mapannounce"prontera","Maze: If you want to join please enter the Warp Portal.",0,0x99FFCC;end;OnTimer50000:mapannounce"prontera","Maze: Last 10 seconds.",0,0x99FFCC;end;OnTimer60000:mapannounce"prontera","Maze: Time's up.",0,0x99FFCC;end;OnTimer61000:disablenpc"mazeevent";donpcevent"Maze#asdf::OnEnable";stopnpctimer;end;}force_1-3,100,187,4 script Maze#asdf 702,{set $@prize, rand(5000,10000);mes"[Maze Manager]";mes"Here is your prize:^336699";mes $@prize+"^000000 Event Points!";set #EVENTPOINTS, #EVENTPOINTS+$@prize;logmes"EP won from Maze Event :"+$@prize;goto L_EndIt;L_EndIt:next;warp"prontera",155,175;// Hide the NPCdisablenpc"Maze#asdf";end;OnEnable:if(getmapusers("force_1-3")<2)goto L_NotEnough;mapannounce"force_1-3","Maze: We are about to start the maze... here's how to play.",0,0x99FFCC;sleep24000;mapannounce"force_1-3","Maze: Everybody must keep running through portals.",0,0x99FFCC;sleep24000;mapannounce"force_1-3","Maze: Each portal will warp you to a random room.",0,0x99FFCC;sleep24000;mapannounce"force_1-3","Maze: With some luck, somebody will find the finish!",0,0x99FFCC;sleep24000;mapannounce"force_1-3","Maze: And then, they will win the event.",0,0x99FFCC;sleep24000;mapannounce"force_1-3","Maze: Is everybody ready?! We're going to start!",0,0x99FFCC;sleep24000;mapannounce"force_1-3","Maze: 3....",0,0x99FFCC;sleep22000;mapannounce"force_1-3","Maze: 2...",0,0x99FFCC;sleep22000;mapannounce"force_1-3","Maze: 1..",0,0x99FFCC;sleep22000;mapannounce"force_1-3","Maze: GO!",0,0x99FFCC;enablenpc"mz_portal#1";enablenpc"mz_portal#2";enablenpc"mz_portal#3";enablenpc"mz_portal#4";enablenpc"mz_portal#5";enablenpc"mz_portal#6";enablenpc"mz_portal#7";enablenpc"mz_portal#8";enablenpc"mz_portal#9";enablenpc"mz_portal#10";enablenpc"mz_portal#11";enablenpc"mz_portal#12";enablenpc"mz_portal#13";enablenpc"mz_portal#14";enablenpc"mz_portal#15";enablenpc"mz_portal#16";enablenpc"mz_portal#17";enablenpc"mz_portal#18";enablenpc"mz_portal#19";enablenpc"mz_portal#20";enablenpc"mz_portal#21";enablenpc"mz_portal#22";enablenpc"mz_portal#23";enablenpc"mz_portal#24";end;L_NotEnough:mapannounce"force_1-3","Maze: Not enough players. Cancelling this round.",0,0x99FFCC;areawarp"force_1-3",10,189,189,10,"prontera",143,171;disablenpc"mz_portal#1";disablenpc"mz_portal#2";disablenpc"mz_portal#3";disablenpc"mz_portal#4";disablenpc"mz_portal#5";disablenpc"mz_portal#6";disablenpc"mz_portal#7";disablenpc"mz_portal#8";disablenpc"mz_portal#9";disablenpc"mz_portal#10";disablenpc"mz_portal#11";disablenpc"mz_portal#12";disablenpc"mz_portal#13";disablenpc"mz_portal#14";disablenpc"mz_portal#15";disablenpc"mz_portal#16";disablenpc"mz_portal#17";disablenpc"mz_portal#18";disablenpc"mz_portal#19";disablenpc"mz_portal#20";disablenpc"mz_portal#21";disablenpc"mz_portal#22";disablenpc"mz_portal#23";disablenpc"mz_portal#24";end;}- script mazer -1,{OnWhisperGlobal:if(getgmlevel()==99){announce"Maze: A maze event will begin in 2 minutes in Prontera.",0,0x99FFCC;sleep290000;announce"Maze: Enter the Warp in Prontera to join the Maze event.",0,0x99FFCC;// Clear up the map.areawarp"force_1-3",104,18,189,10,"prontera",159,116;// Load NPCs + hide the Maze guyset $mazeinit, 1;enablenpc"mazeevent";enablenpc"Maze#asdf";hideonnpc"Maze#asdf";initnpctimer;end;OnTimer30000:mapannounce"prontera","Maze: Last 30 seconds.",0,0x99FFCC;sleep25000;mapannounce"prontera","Maze: If you want to join please enter the Warp Portal.",0,0x99FFCC;end;OnTimer50000:mapannounce"prontera","Maze: Last 10 seconds.",0,0x99FFCC;end;OnTimer60000:mapannounce"prontera","Maze: Time's up.",0,0x99FFCC;end;OnTimer61000:disablenpc"mazeevent";donpcevent"Maze#asdf::OnEnable";stopnpctimer;end;}else{dispbottom"You are not authorised for this function.";}}- script mz_portal::maze_portal-1,{OnTouch:set @chance, rand(20,30);set .@win_chance, (getmapusers("force_1-3")*@chance);if(rand(1,.@win_chance)== .@win_chance ){warp"force_1-3",100,184;announce"Maze: "+strcharinfo(0)+" has solved the maze event! Next round is in 1 hour.",0,0x99FFCC;disablenpc"mz_portal#1";disablenpc"mz_portal#2";disablenpc"mz_portal#3";disablenpc"mz_portal#4";disablenpc"mz_portal#5";disablenpc"mz_portal#6";disablenpc"mz_portal#7";disablenpc"mz_portal#8";disablenpc"mz_portal#9";disablenpc"mz_portal#10";disablenpc"mz_portal#11";disablenpc"mz_portal#12";disablenpc"mz_portal#13";disablenpc"mz_portal#14";disablenpc"mz_portal#15";disablenpc"mz_portal#16";disablenpc"mz_portal#17";disablenpc"mz_portal#18";disablenpc"mz_portal#19";disablenpc"mz_portal#20";disablenpc"mz_portal#21";disablenpc"mz_portal#22";disablenpc"mz_portal#23";disablenpc"mz_portal#24";sleep5000;areawarp"force_1-3",10,189,29,170,"prontera",155,175;areawarp"force_1-3",170,189,189,170,"prontera",155,175;areawarp"force_1-3",10,147,189,11,"prontera",155,175;mapannounce"force_1-3","Maze: Congratulations! Talk to me for a prize.",0,0x99FFCC;hideoffnpc"Maze#asdf";end;}set .@this_entry, rand(1,15);switch(.@this_entry){case1:warp"force_1-3",19,189;end;case2:warp"force_1-3",170,179;end;case3:warp"force_1-3",19,147;end;case4:warp"force_1-3",59,128;end;case5:warp"force_1-3",90,138;end;case6:warp"force_1-3",179,128;end;case7:warp"force_1-3",109,100;end;case8:warp"force_1-3",140,50;end;case9:warp"force_1-3",170,99;end;case10:warp"force_1-3",19,50;end;case11:warp"force_1-3",100,10;end;case12:warp"force_1-3",170,60;end;case13:warp"force_1-3",20,29;end;case14:warp"force_1-3",60,29;end;case15:warp"force_1-3",130,20;end;}}force_1-3,29,179,0 duplicate(maze_portal) mz_portal#145,2,2force_1-3,180,170,0 duplicate(maze_portal) mz_portal#245,2,2force_1-3,29,99,0 duplicate(maze_portal) mz_portal#345,2,2force_1-3,69,138,0 duplicate(maze_portal) mz_portal#445,2,2force_1-3,109,137,0 duplicate(maze_portal) mz_portal#545,2,2force_1-3,140,147,0 duplicate(maze_portal) mz_portal#645,2,2force_1-3,60,90,0 duplicate(maze_portal) mz_portal#745,2,2force_1-3,130,100,0 duplicate(maze_portal) mz_portal#845,2,2force_1-3,180,90,0 duplicate(maze_portal) mz_portal#945,2,2force_1-3,69,59,0 duplicate(maze_portal) mz_portal#1045,2,2force_1-3,90,59,0 duplicate(maze_portal) mz_portal#1145,2,2force_1-3,179,50,0 duplicate(maze_portal) mz_portal#1245,2,2force_1-3,20,10,0 duplicate(maze_portal) mz_portal#1345,2,2force_1-3,69,19,0 duplicate(maze_portal) mz_portal#1445,2,2force_1-3,179,29,0 duplicate(maze_portal) mz_portal#1545,2,2force_1-3,139,109,0 duplicate(maze_portal) mz_portal#1645,2,2force_1-3,10,99,0 duplicate(maze_portal) mz_portal#1745,2,2force_1-3,130,137,0 duplicate(maze_portal) mz_portal#1845,2,2force_1-3,59,69,0 duplicate(maze_portal) mz_portal#1945,2,2force_1-3,109,59,0 duplicate(maze_portal) mz_portal#2045,2,2force_1-3,60,109,0 duplicate(maze_portal) mz_portal#2145,2,2force_1-3,100,147,0 duplicate(maze_portal) mz_portal#2245,2,2force_1-3,100,128,0 duplicate(maze_portal) mz_portal#2345,2,2force_1-3,180,109,0 duplicate(maze_portal) mz_portal#2445,2,2force_1-3 mapflag nobranchforce_1-3 mapflag nomemoforce_1-3 mapflag nopenaltyforce_1-3 mapflag nosave SavePointforce_1-3 mapflag noskillforce_1-3 mapflag noteleportforce_1-3 mapflag nowarptoforce_1-3 mapflag restricted 3