//======Name========================================// Poring Race//======Version=====================================// 1.0//======Author(s)===================================// Sandbox//======Comments====================================// In loving memory of AstralRO//==================================================//======================================Race Trigger Function=========================================//====================================================================================================prontera,156,182,5 script Poring Race Warper 909,{mes"[Poring Race Warper]";mes"Would you like to join the Poring Race Event?";next;menu"Yes!",P_Yes,"Nevermind.",P_NVM;P_Yes:warp"p_track02",73,33;end;P_NVM:close;}- script pracetrigger -1,{OnInit:disablenpc"Poring Race Warper";disablenpc"Bet Manager";end;OnRaceTrigger:if(agitcheck()==1)end;enablenpc"Poring Race Warper";announce"We are going to have a Poring Race Event! Place a bet and you could win 700 SPECs!",bc_all;sleep21000;announce"Warper to the event map is located in the middle Prontera! Anyone can join!",bc_all;sleep21000;announce"The Warper would be open for 3 minutes",bc_all;sleep2120000;announce"Last 60 seconds..",bc_all;sleep260000;announce"Warper Closed.",bc_all;disablenpc"Poring Race Warper";donpcevent"Poring Race Event::OnPoringRaceStart";end;}- script Poring Race Event -1,{OnPoringRaceStart:set $@race,1;enablenpc"Poring#race";movenpc"Poring#race",58,38;enablenpc"Drops#race";movenpc"Drops#race",58,36;enablenpc"Poporing#race";movenpc"Poporing#race",58,34;enablenpc"Marin#race";movenpc"Marin#race",58,32;enablenpc"Pouring#race";movenpc"Pouring#race",58,30;enablenpc"Santa Poring#race";movenpc"Santa Poring#race",58,28;mapannounce"p_track02","The Poring Race will start in a minute.",bc_blue;enablenpc"Bet Manager";sleep21500;mapannounce"p_track02","We will be collecting your bets now, when the race starts, you can't place bets anymore.",bc_blue;sleep21500;mapannounce"p_track02","You can talk to the Bet Manager found at the bottom right corner of the map if you want to place a bet.",bc_blue;sleep22000;mapannounce"p_track02","3 minutes before the race starts..",bc_blue;sleep260000;mapannounce"p_track02","2 minutes before the race starts..",bc_blue;sleep260000;mapannounce"p_track02","1 minute before the race starts..",bc_blue;sleep230000;mapannounce"p_track02","30 seconds before the race starts..",bc_blue;sleep21500;mapannounce"p_track02","We are not accepting bets anymore.",bc_blue;disablenpc"Bet Manager";set $@race,2;sleep21500;mapannounce"p_track02","When the race ends, you'll have 25 minutes to claim your prizes, after that the NPC closes.",bc_blue;sleep225000;mapannounce"p_track02","Gentlerings, get ready!",bc_blue;sleep25000;mapannounce"p_track02","On your mark!",bc_blue;sleep23000;mapannounce"p_track02","Get set!",bc_blue;sleep23000;mapannounce"p_track02","GOO!",bc_blue;areawarp"p_track02",58,42,76,18,"p_track02",61,32;set $@win,rand(1,6);switch($@win){case1:donpcevent"Poring#race::OnPoringWin"; break;case2:donpcevent"Drops#race::OnDropsWin"; break;case3:donpcevent"Poporing#race::OnPoporingWin"; break;case4:donpcevent"Marin#race::OnMarinWin"; break;case5:donpcevent"Pouring#race::OnPouringWin"; break;default:donpcevent"Santa Poring#race::OnSantaWin"; break;}end;}//=================================Bet Manager========================================================//====================================================================================================p_track02,73,22,1 script Bet Manager 109,{mes"[ ^0000FFBet Manager^000000 ]";mes"Hi, what would you want to do?";menu"Place a Bet",-,"Claim Prize",Lclaim,"Warp Back to Prontera",Lwarp;next;if(@bet > 0)goto Lalreadybet;if($@race < 1)goto Lnorace;if($@race ==2)goto Lracestarted;mes"[ ^0000FFBet Manager^000000 ]";mes"Where would you place your bet?";mes"There's a 50,000z fee and you could only bet once."; //Edit bet type you want, by default it is set to 1,000,000z for a player to place a bet. The player can only bet oncemenu"Poring",-,"Drops",Ldrops,"Poporing",Lpopo,"Marin",Lmarin,"Pouring",Lpour,"Santa Poring",Lsanta;next;if(Zeny < 50000)goto Lnenough; //Edit to match the desired bet type.mes"[ ^0000FFBet Manager^000000 ]";mes"You've placed your bet on ^0000FFPoring^000000, Goodluck!";set @bet,1;setZeny,Zeny-50000; //Edit to match the desired bet type.close;Lwarp:next;getitem6153,30;dispbottom"Poring Race: You've been rewarded extra 30x SPECs for joining!";next;warp"prontera",155,181;end;Ldrops:next;if(Zeny < 50000)goto Lnenough; //Edit to match the desired bet type.mes"[ ^0000FFBet Manager^000000 ]";mes"You've placed your bet on ^0000FFDrops^000000, Goodluck!";set @bet,2;setZeny,Zeny-50000; //Edit to match the desired bet type.close;Lpopo:next;if(Zeny < 50000)goto Lnenough; //Edit to match the desired bet type.mes"[ ^0000FFBet Manager^000000 ]";mes"You've placed your bet on ^0000FFPoporing^000000, Goodluck!";set @bet,3;setZeny,Zeny-50000; //Edit to match the desired bet type.close;Lmarin:next;if(Zeny < 50000)goto Lnenough; //Edit to match the desired bet type.mes"[ ^0000FFBet Manager^000000 ]";mes"You've placed your bet on ^0000FFMarin^000000, Goodluck!";set @bet,4;setZeny,Zeny-50000; //Edit to match the desired bet type.close;Lpour:next;if(Zeny < 50000)goto Lnenough; //Edit to match the desired bet type.mes"[ ^0000FFBet Manager^000000 ]";mes"You've placed your bet on ^0000FFPouring^000000, Goodluck!";set @bet,5;setZeny,Zeny-50000; //Edit to match the desired bet type.close;Lsanta:next;if(Zeny < 50000)goto Lnenough;//Edit to match the desired bet type.mes"[ ^0000FFBet Manager^000000 ]";mes"You've placed your bet on ^0000FFSanta Poring^000000, Goodluck!";set @bet,6;setZeny,Zeny-50000;//Edit to match the desired bet type.close;Lnenough:next;mes"[ ^0000FFBet Manager^000000 ]";mes"We need zeny for the race maintenance!"; //Edit to match the desired bet type.close;Lalreadybet:mes"[ ^0000FFBet Manager^000000 ]";mes"You've already placed your bet on: ^0000FF";switch(@bet){case1:mes"Poring"; break;case2:mes"Drops"; break;case3:mes"Poporing"; break;case4:mes"Marin"; break;case5:mes"Pouring"; break;case6:mes"Santa Poring"; break;default:mes"None"; break;}mes"^000000";close;Lnorace:mes"[ ^0000FFBet Manager^000000 ]";mes"There's no race being held at the moment, or it's finished already.";close;Lclaim:next;if($@race ==1)goto Lnoclaim;if($@win != @bet)goto Lnowin;mes"[ ^0000FFBet Manager^000000 ]";mes"Congratulations! You've won!";set @bet,0;getitem6153,700; //Edit to the prize that you want if a bettor's bet wins.close;Lnoclaim:mes"[ ^0000FFBet Manager^000000 ]";mes"You can't claim prizes during the bet collection process.";close;Lracestarted:mes"[ ^0000FFBet Manager^000000 ]";mes"The race has started, you can't place bets anymore.";close;Lnowin:mes"[ ^0000FFBet Manager^000000 ]";mes"Either you've already got your prize or the monster you've placed your bet on didn't won.";close;OnRaceStart:set $@win,7;disablenpc"Bet Manager";disablenpc"Poring#race";disablenpc"Drops#race";disablenpc"Poporing#race";disablenpc"Marin#race";disablenpc"Pouring#race";disablenpc"Santa Poring#race";sleep21800000;announce"Poring Race Event: Congratulations to the winner/s! Thank you all for participating!",bc_all;end;}//======================================Race Function=================================================//====================================================================================================p_track02,58,38,3 script Poring#race 1002,{end;npcspeed200;OnInit:disablenpc"Poring#race";disablenpc"Bet Manager";end;OnPoringWin:npcwalkto55,38;donpcevent"Drops#race::OnDropsLose";donpcevent"Poporing#race::OnPoporingLose";donpcevent"Marin#race::OnMarinLose";donpcevent"Pouring#race::OnPouringLose";donpcevent"Santa Poring#race::OnSantaLose";sleep22500;npcwalkto52,38;sleep24000;npcwalkto46,38;sleep22500;npcwalkto41,38;sleep22500;npcwalkto37,38;sleep22500;npcwalkto30,38;sleep210000;mapannounce"p_track02","Poring won the Race!!",bc_blue;set $@race,0;enablenpc"Bet Manager";npcwalkto58,38;end;OnPoringLose:npcwalkto53,38;sleep24000;npcwalkto46,38;sleep22500;npcwalkto44,38;sleep22500;npcwalkto39,38;sleep22500;npcwalkto36,38;sleep24500;npcwalkto30,38;sleep23000;npcwalkto58,38;end;}p_track02,58,36,3 script Drops#race 1113,{end;npcspeed200;OnInit:disablenpc"Drops#race";end;OnDropsWin:npcwalkto55,36;donpcevent"Poring#race::OnPoringLose";donpcevent"Poporing#race::OnPoporingLose";donpcevent"Marin#race::OnMarinLose";donpcevent"Pouring#race::OnPouringLose";donpcevent"Santa Poring#race::OnSantaLose";sleep22500;npcwalkto52,36;sleep24000;npcwalkto46,36;sleep22500;npcwalkto41,36;sleep22500;npcwalkto37,36;sleep22500;npcwalkto30,36;sleep210000;mapannounce"p_track02","Drops won the Race!!",bc_blue;set $@race,0;enablenpc"Bet Manager";npcwalkto58,36;end;OnDropsLose:npcwalkto54,36;sleep24000;npcwalkto47,36;sleep22500;npcwalkto43,36;sleep22500;npcwalkto37,36;sleep22500;npcwalkto35,36;sleep24500;npcwalkto30,36;sleep23000;npcwalkto58,36;end;}p_track02,58,34,3 script Poporing#race 1031,{end;npcspeed200;OnInit:disablenpc"Poporing#race";end;OnPoporingWin:npcwalkto55,34;donpcevent"Poring#race::OnPoringLose";donpcevent"Drops#race::OnDropsLose";donpcevent"Marin#race::OnMarinLose";donpcevent"Pouring#race::OnPouringLose";donpcevent"Santa Poring#race::OnSantaLose";sleep2500;npcwalkto52,34;sleep24000;npcwalkto46,34;sleep22500;npcwalkto41,34;sleep22500;npcwalkto37,34;sleep22500;npcwalkto30,34;sleep210000;mapannounce"p_track02","Poporing won the Race!!",bc_blue;set $@race,0;enablenpc"Bet Manager";npcwalkto58,34;end;OnPoporingLose:npcwalkto54,34;sleep24000;npcwalkto47,34;sleep22500;npcwalkto43,34;sleep22500;npcwalkto37,34;sleep22500;npcwalkto34,34;sleep24500;npcwalkto30,34;sleep23000;npcwalkto58,34;end;}p_track02,58,32,3 script Marin#race 1242,{end;npcspeed200;OnInit:disablenpc"Marin#race";end;OnMarinWin:npcwalkto55,32;donpcevent"Poring#race::OnPoringLose";donpcevent"Drops#race::OnDropsLose";donpcevent"Poporing#race::OnPoporingLose";donpcevent"Pouring#race::OnPouringLose";donpcevent"Santa Poring#race::OnSantaLose";sleep22500;npcwalkto52,32;sleep24000;npcwalkto46,32;sleep22500;npcwalkto41,32;sleep22500;npcwalkto37,32;sleep22500;npcwalkto30,32;sleep210000;mapannounce"p_track02","Marin won the Race!!",bc_blue;set $@race,0;enablenpc"Bet Manager";npcwalkto58,32;end;OnMarinLose:npcwalkto52,32;sleep24000;npcwalkto48,32;sleep22500;npcwalkto40,32;sleep22500;npcwalkto37,32;sleep22500;npcwalkto33,32;sleep24500;npcwalkto30,32;sleep23000;npcwalkto58,32;end;}p_track02,58,30,3 script Pouring#race 1894,{end;npcspeed200;OnInit:disablenpc"Pouring#race";end;OnPouringWin:npcwalkto55,30;donpcevent"Poring#race::OnPoringLose";donpcevent"Drops#race::OnDropsLose";donpcevent"Poporing#race::OnPoporingLose";donpcevent"Marin#race::OnMarinLose";donpcevent"Santa Poring#race::OnSantaLose";sleep22500;npcwalkto52,30;sleep24000;npcwalkto46,30;sleep22500;npcwalkto41,30;sleep22500;npcwalkto37,30;sleep22500;npcwalkto30,30;sleep210000;mapannounce"p_track02","Pouring won the Race!!",bc_blue;set $@race,0;enablenpc"Bet Manager";npcwalkto58,30;end;OnPouringLose:npcwalkto50,30;sleep24000;npcwalkto43,30;sleep22500;npcwalkto38,30;sleep22500;npcwalkto35,30;sleep22500;npcwalkto31,30;sleep24500;npcwalkto30,30;sleep23000;npcwalkto58,30;end;}p_track02,58,28,3 script Santa Poring#race 1062,{end;npcspeed200;OnInit:disablenpc"Santa Poring#race";end;OnSantaWin:npcwalkto55,28;donpcevent"Poring#race::OnPoringLose";donpcevent"Drops#race::OnDropsLose";donpcevent"Poporing#race::OnPoporingLose";donpcevent"Pouring#race::OnPouringLose";donpcevent"Marin#race::OnMarinLose";sleep22500;npcwalkto52,28;sleep24000;npcwalkto46,28;sleep22500;npcwalkto41,28;sleep22500;npcwalkto37,28;sleep24500;npcwalkto30,28;sleep210000;mapannounce"p_track02","Santa Poring won the Race!!",bc_blue;set $@race,0;enablenpc"Bet Manager";npcwalkto58,28;end;OnSantaLose:npcwalkto49,28;sleep24000;npcwalkto48,28;sleep22500;npcwalkto47,28;sleep22500;npcwalkto35,28;sleep22500;npcwalkto32,28;sleep24500;npcwalkto30,28;sleep23000;npcwalkto58,28;end;}p_track02,78,41,5 script Warp Back to Prontera 723,{mes"[Warp Back to Prontera]";mes"Are you sure?";next;menu"Yes!",P_Yes;P_Yes:getitem6153,30;dispbottom"Poring Race: You've been rewarded extra 30x SPECs for joining!";next;warp"prontera",155,181;end;P_NVM:close;}p_track02 mapflag nowarpp_track02 mapflag nowarptop_track02 mapflag noskillp_track02 mapflag noteleportp_track02 mapflag nomemop_track02 mapflag nosave SavePointp_track02 mapflag noicewallp_track02 mapflag noreturnp_track02 mapflag nolootp_track02 mapflag noitemconsumption