Jump to content

Recommended Posts

Posted

File Name: Custom Poring Race

File Submitter: sandbox

File Submitted: 21 Feb 2014

File Category: Games, Events, Quests

Content Author: sandbox


This is a custom poring race which was based from the Hugel's monster race. Kindly take note that this was badly written because I was still new at scripting when I wrote this. Though it is fully functional.

Installation

  • Enable the script on your NPC folder
  • To trigger it, you have to create a new NPC, something like this
  • - script PRaceTrigger -1,{ OnMinute00:if(gettime(3) == 0 || gettime(3) == 3 || gettime(3) == 6 || gettime(3) == 9 || gettime(3) == 12 || gettime(3) == 15)  donpcevent "pracetrigger::OnRaceTrigger";end; }

  • Carefully read the comments I made inside the script and make sure to configure it properly
  • Things to configure MANUALLY:

  1. Bet type
  2. Prize type
  3. Warper NPC
  4. Disable NPCs existing inside the p_track02 map


Terms & Conditions

  • You are not allowed to reproduce or make profit of this script
  • You are not allowed to take credit for this script. Though you can modify/edit it to your liking.
  • I can give you support, but please, do not message me.



Click here to download this file

  • Upvote 3
Posted

where do i change the warp portal location? for this line

announce "Poring Race Event: For those who want to place a bet, please warp @ mellina 115 150!",bc_all,0xFF4500;
Posted

 

where do i change the warp portal location? for this line

announce "Poring Race Event: For those who want to place a bet, please warp @ mellina 115 150!",bc_all,0xFF4500;

 

xD the first NPC under this comment

 

 
//Edit to where you want to place your warper
Posted

which line? i really can't find it D:!

//======Name========================================
// Poring Race
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// In loving memory of AstralRO
//==================================================


//======================================Race Trigger Function=========================================
//====================================================================================================

-	script	pracetrigger	-1,{


OnInit:
disablenpc "Poring Race Warper";
disablenpc "Bet Manager";
end;


OnRaceTrigger:
if(agitcheck() == 1) end;
enablenpc "Poring Race Warper";
announce "Poring Race Event: We are going to have a Poring Race Event",bc_all,0xFF4500;
sleep2 1000;
announce "Poring Race Event: For those who want to place a bet, please warp @ mellina 115 150!",bc_all,0xFF4500;
sleep2 1000;
announce "Poring Race Event: The Warper would be open for 2 minutes",bc_all,0xFF4500;
sleep2 90000;
announce "Poring Race Event: Last 30 Seconds.",bc_all,0xFF4500;
sleep2 30000;
announce "Poring Race Event: Warper Closed.",bc_all,0xFF4500;
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";
sleep2 1500;
mapannounce "p_track02","We will be collecting your bets now, when the race starts, you can't place bets anymore.",bc_blue;
sleep2 1500;
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;
sleep2 2000;
//mapannounce "p_track02","3 minutes before the race starts..",bc_blue;
//sleep2 60000;
//mapannounce "p_track02","2 minutes before the race starts..",bc_blue;
//sleep2 60000;
mapannounce "p_track02","1 minute before the race starts..",bc_blue;
sleep2 30000;
mapannounce "p_track02","30 seconds before the race starts..",bc_blue;
sleep2 1500;
mapannounce "p_track02","We are not accepting bets anymore.",bc_blue;
disablenpc "Bet Manager";
set $@race,2;
sleep2 1500;
mapannounce "p_track02","When the race ends, you'll have 25 minutes to claim your prizes, after that the npc closes.",bc_blue;
sleep2 25000;
mapannounce "p_track02","Gentlerings, get ready!",bc_blue;
sleep2 5000;
mapannounce "p_track02","On your mark!",bc_blue;
sleep2 3000;
mapannounce "p_track02","Get Set!",bc_blue;
sleep2 3000;
mapannounce "p_track02","GOOOOOOOOOOOOOOOOO!!!!!",bc_blue;
areawarp "p_track02",58,42,76,18,"p_track02",61,32;
set $@win,rand(1,6);
switch($@win)
{
case 1: donpcevent "Poring#race::OnPoringWin"; break;
case 2: donpcevent "Drops#race::OnDropsWin"; break;
case 3: donpcevent "Poporing#race::OnPoporingWin"; break;
case 4: donpcevent "Marin#race::OnMarinWin"; break;
case 5: donpcevent "Pouring#race::OnPouringWin"; break;
default: donpcevent "Santa Poring#race::OnSantaWin"; break;
}
donpcevent "Bet Manager::OnRaceStart";
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;
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 1,000,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 once
menu "Poring",-,"Drops",Ldrops,"Poporing",Lpopo,"Marin",Lmarin,"Pouring",Lpour,"Santa Poring",Lsanta;
next;
if(Zeny < 1000000) 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;
set Zeny,Zeny-1000000; //Edit to match the desired bet type.
close;

Ldrops:
next;
if(Zeny < 1000000) 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;
set Zeny,Zeny-1000000; //Edit to match the desired bet type.
close;

Lpopo:
next;
if(Zeny < 1000000) 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;
set Zeny,Zeny-1000000; //Edit to match the desired bet type.
close;

Lmarin:
next;
if(Zeny < 1000000) 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;
set Zeny,Zeny-1000000; //Edit to match the desired bet type.
close;

Lpour:
next;
if(Zeny < 1000000) 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;
set Zeny,Zeny-1000000; //Edit to match the desired bet type.
close;

Lsanta:
next;
if(Zeny < 1000000) 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;
set Zeny,Zeny-1000000;//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){
case 1: mes "Poring"; break;
case 2: mes "Drops"; break;
case 3: mes "Poporing"; break;
case 4: mes "Marin"; break;
case 5: mes "Pouring"; break;
case 6: 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;
getitem 7227,1; //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:
sleep2 1800000;
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";
end;

}


//======================================Race Function=================================================
//====================================================================================================
p_track02,58,38,3	script	Poring#race	1002,{
end;
npcspeed 200;

OnInit:
disablenpc "Poring#race";
disablenpc "Bet Manager";
end;



OnPoringWin:
npcwalkto 55,38;
donpcevent "Drops#race::OnDropsLose";
donpcevent "Poporing#race::OnPoporingLose";
donpcevent "Marin#race::OnMarinLose";
donpcevent "Pouring#race::OnPouringLose";
donpcevent "Santa Poring#race::OnSantaLose";
sleep2 2500;
npcwalkto 52,38;
sleep2 4000;
npcwalkto 46,38;
sleep2 2500;
npcwalkto 41,38;
sleep2 2500;
npcwalkto 37,38;
sleep2 2500;
npcwalkto 30,38;
sleep2 10000;
mapannounce "p_track02","Poring won the Race!!",bc_blue;
set $@race,0;
enablenpc "Bet Manager";
npcwalkto 58,38;
end;

OnPoringLose:
npcwalkto 53,38;
sleep2 4000;
npcwalkto 46,38;
sleep2 2500;
npcwalkto 44,38;
sleep2 2500;
npcwalkto 39,38;
sleep2 2500;
npcwalkto 36,38;
sleep2 4500;
npcwalkto 30,38;
sleep2 3000;
npcwalkto 58,38;
end;



}

p_track02,58,36,3	script	Drops#race	1113,{
end;
npcspeed 200;

OnInit:
disablenpc "Drops#race";
end;

OnDropsWin:
npcwalkto 55,36;
donpcevent "Poring#race::OnPoringLose";
donpcevent "Poporing#race::OnPoporingLose";
donpcevent "Marin#race::OnMarinLose";
donpcevent "Pouring#race::OnPouringLose";
donpcevent "Santa Poring#race::OnSantaLose";
sleep2 2500;
npcwalkto 52,36;
sleep2 4000;
npcwalkto 46,36;
sleep2 2500;
npcwalkto 41,36;
sleep2 2500;
npcwalkto 37,36;
sleep2 2500;
npcwalkto 30,36;
sleep2 10000;
mapannounce "p_track02","Drops won the Race!!",bc_blue;
set $@race,0;
enablenpc "Bet Manager";
npcwalkto 58,36;
end;

OnDropsLose:
npcwalkto 54,36;
sleep2 4000;
npcwalkto 47,36;
sleep2 2500;
npcwalkto 43,36;
sleep2 2500;
npcwalkto 37,36;
sleep2 2500;
npcwalkto 35,36;
sleep2 4500;
npcwalkto 30,36;
sleep2 3000;
npcwalkto 58,36;
end;




}

p_track02,58,34,3	script	Poporing#race	1031,{
end;
npcspeed 200;

OnInit:
disablenpc "Poporing#race";
end;

OnPoporingWin:
npcwalkto 55,34;
donpcevent "Poring#race::OnPoringLose";
donpcevent "Drops#race::OnDropsLose";
donpcevent "Marin#race::OnMarinLose";
donpcevent "Pouring#race::OnPouringLose";
donpcevent "Santa Poring#race::OnSantaLose";
sleep2 500;
npcwalkto 52,34;
sleep2 4000;
npcwalkto 46,34;
sleep2 2500;
npcwalkto 41,34;
sleep2 2500;
npcwalkto 37,34;
sleep2 2500;
npcwalkto 30,34;
sleep2 10000;
mapannounce "p_track02","Poporing won the Race!!",bc_blue;
set $@race,0;
enablenpc "Bet Manager";
npcwalkto 58,34;
end;


OnPoporingLose:
npcwalkto 54,34;
sleep2 4000;
npcwalkto 47,34;
sleep2 2500;
npcwalkto 43,34;
sleep2 2500;
npcwalkto 37,34;
sleep2 2500;
npcwalkto 34,34;
sleep2 4500;
npcwalkto 30,34;
sleep2 3000;
npcwalkto 58,34;
end;

}

p_track02,58,32,3	script	Marin#race	1242,{
end;
npcspeed 200;

OnInit:
disablenpc "Marin#race";
end;

OnMarinWin:
npcwalkto 55,32;
donpcevent "Poring#race::OnPoringLose";
donpcevent "Drops#race::OnDropsLose";
donpcevent "Poporing#race::OnPoporingLose";
donpcevent "Pouring#race::OnPouringLose";
donpcevent "Santa Poring#race::OnSantaLose";
sleep2 2500;
npcwalkto 52,32;
sleep2 4000;
npcwalkto 46,32;
sleep2 2500;
npcwalkto 41,32;
sleep2 2500;
npcwalkto 37,32;
sleep2 2500;
npcwalkto 30,32;
sleep2 10000;
mapannounce "p_track02","Marin won the Race!!",bc_blue;
set $@race,0;
enablenpc "Bet Manager";
npcwalkto 58,32;
end;


OnMarinLose:
npcwalkto 52,32;
sleep2 4000;
npcwalkto 48,32;
sleep2 2500;
npcwalkto 40,32;
sleep2 2500;
npcwalkto 37,32;
sleep2 2500;
npcwalkto 33,32;
sleep2 4500;
npcwalkto 30,32;
sleep2 3000;
npcwalkto 58,32;
end;


}

p_track02,58,30,3	script	Pouring#race	1894,{
end;
npcspeed 200;

OnInit:
disablenpc "Pouring#race";
end;


OnPouringWin:
npcwalkto 55,30;
donpcevent "Poring#race::OnPoringLose";
donpcevent "Drops#race::OnDropsLose";
donpcevent "Poporing#race::OnPoporingLose";
donpcevent "Marin#race::OnMarinLose";
donpcevent "Santa Poring#race::OnSantaLose";
sleep2 2500;
npcwalkto 52,30;
sleep2 4000;
npcwalkto 46,30;
sleep2 2500;
npcwalkto 41,30;
sleep2 2500;
npcwalkto 37,30;
sleep2 2500;
npcwalkto 30,30;
sleep2 10000;
mapannounce "p_track02","Pouring won the Race!!",bc_blue;
set $@race,0;
enablenpc "Bet Manager";
npcwalkto 58,30;
end;

OnPouringLose:
npcwalkto 50,30;
sleep2 4000;
npcwalkto 43,30;
sleep2 2500;
npcwalkto 38,30;
sleep2 2500;
npcwalkto 35,30;
sleep2 2500;
npcwalkto 31,30;
sleep2 4500;
npcwalkto 30,30;
sleep2 3000;
npcwalkto 58,30;
end;



}

p_track02,58,28,3	script	Santa Poring#race	1062,{
end;
npcspeed 200;

OnInit:
disablenpc "Santa Poring#race";
end;


OnSantaWin:
npcwalkto 55,28;
donpcevent "Poring#race::OnPoringLose";
donpcevent "Drops#race::OnDropsLose";
donpcevent "Poporing#race::OnPoporingLose";
donpcevent "Pouring#race::OnPouringLose";
donpcevent "Marin#race::OnMarinLose";
sleep2 2500;
npcwalkto 52,28;
sleep2 4000;
npcwalkto 46,28;
sleep2 2500;
npcwalkto 41,28;
sleep2 2500;
npcwalkto 37,28;
sleep2 4500;
npcwalkto 30,28;
sleep2 10000;
mapannounce "p_track02","Santa Poring won the Race!!",bc_blue;
set $@race,0;
enablenpc "Bet Manager";
npcwalkto 58,28;
end;

OnSantaLose:
npcwalkto 49,28;
sleep2 4000;
npcwalkto 48,28;
sleep2 2500;
npcwalkto 47,28;
sleep2 2500;
npcwalkto 35,28;
sleep2 2500;
npcwalkto 32,28;
sleep2 4500;
npcwalkto 30,28;
sleep2 3000;
npcwalkto 58,28;
end;


}


p_track02	mapflag	nowarp
p_track02	mapflag	nowarpto
p_track02	mapflag	noskill
p_track02	mapflag	noteleport
p_track02	mapflag	nomemo
p_track02	mapflag	nosave	SavePoint
p_track02	mapflag	noicewall
p_track02	mapflag	noreturn
p_track02	mapflag	noloot

thinking to buy glasses x_x

Posted

Damn.. I need to re-upload a new version again :( But yeah, you just have to create an NPC that functions as a warper so your players can access p_track02

Posted

oh lol and i was like "i must be blind"

 

allright, the warpe will need a specific name right o: ? well huh, i haven't practiced with them, but well i ll give a try, thanks still good release o:

Posted

Any name would do because it would not interfere with any of the NPC functions, just make sure to modify the disable/enable npc of for the warper that you will be making

  • 2 months later...
Posted (edited)

thx for ssandbox sometime just ready carefuly the instruction :-) now working fine :-)

 

sir sandbox why if im done the race its not warp back? should i setting some command?

Edited by lchtea120
Posted

You could create an exit npc :D like how you did the entrance npc :P

hahah what da stupid question i asking hahahaha because i think there have auto exit if done hahaha thx for the reply :-)

  • 3 weeks later...
  • 1 month later...
Posted

Thanks sandbox for this script i hope the bug here is fix scenario on past server which it dupes out the prize even they win or lose lol. anyways how will i change zeny into tcg let say i bet up 50tcg when i win it will double up the prize thanks and nice script =)

  • 3 weeks later...
  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...