Jump to content
  • 0

Poring Catcher Automation


Yami

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  111
  • Reputation:   2
  • Joined:  01/02/14
  • Last Seen:  

Hi I have Mr. Sandox's Poring Race script, I tried to have it start automatically every 2 hours but fails to start anyway. No errors, No nothing but doesn't start on the hour set.

 

Here's the script with a bit of editing for my Server. As you can see, I have followed the instructions provided at his link, also hours are set.

I have no Idea why it's still not starting by any chance without errors or anything.

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


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

-	script	praced#disable	-1,{
OnInit:
disablenpc "PWarper";
disablenpc "Bet Manager";
end;
}

prontera,156,172,4	warp	PWarper	2,2,p_track02,43,41

-	script PRaceStart	-1,{
OnMinute27:
if(gettime(3) == 1 || gettime(3) == 3 || gettime(3) == 5 || gettime(3) == 7 || gettime(3) == 9 || gettime(3) == 11 || gettime(3) == 13 || gettime(3) == 15 || gettime(3) == 17 || gettime(3) == 19 || gettime(3) == 21 || gettime(3) == 23) donpcevent "pracetrigger::OnRaceTrigger";
end;
}

-	script	pracetrigger	-1,{

OnRaceTrigger:
if(agitcheck() == 1) end;
enablenpc "PWarper";
announce "It's Time for Poring Race Event!",bc_all,0x7FFF00;
sleep2 1000;
announce "Enter the Portal in Prontera to join.",bc_all,0x7FFF00;
sleep2 1000;
announce "Poring Race Event will begin 2 minutes.",bc_all,0x7FFF00;
announce "Enter the Portal in Prontera if You want to join.",bc_all,0x7FFF00;
sleep2 90000;
announce "Last 30 Seconds.",bc_all,0x7FFF00;
sleep2 30000;
announce "The Portal is Now Closed.",bc_all,0x7FFF00;
disablenpc "PWarper";
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 7859,250; //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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  111
  • Reputation:   2
  • Joined:  01/02/14
  • Last Seen:  

Can someone give me an automated poring race script? Thank you

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

it's already an automated script.

-	script PRaceStart	-1,{
OnMinute27:
if(gettime(3) == 1 || gettime(3) == 3 || gettime(3) == 5 || gettime(3) == 7 || gettime(3) == 9 || gettime(3) == 11 || gettime(3) == 13 || gettime(3) == 15 || gettime(3) == 17 || gettime(3) == 19 || gettime(3) == 21 || gettime(3) == 23) donpcevent "pracetrigger::OnRaceTrigger";
end;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  111
  • Reputation:   2
  • Joined:  01/02/14
  • Last Seen:  

But sir emistry, the script is not working, its been on my server for 4 days now and it hasn't activated even once since.

 

Can you check the script if there's something wrong with it and why it's not working.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Can't you just stack OnHour event labels? xD

This one works, try it if you want

// Capuche cleaning Base on the Poring Race Event by Zell_ff8, xianz, Neko
sec_in01,161,174,3	script	Poring Race Event	882,{

	if( .access_Prace == 0 ) {
		mes "[Poring Race Event Staff]";
		mes "Poring Race Event has ended.";
		close;
	}
	mes "[Poring Race Event Staff]";
	mes "Do you want to participate on Poring Race Event?";
	if( select( "Yes","No" ) -1 ) {
		next;
		mes "[Poring Race Event Staff]";
		mes "See you again next time!";
		close;
	}
	if( .access_Prace == 0 ) {
		next;
		mes "[Poring Race Event Staff]";
		mes "...";
		mes "...";
		mes "Cheater!!~~";
		close;
	}
	close2;
	@prace_winner$ = "";
	warp "p_track01",52,41;
	end;
// OnInit:
OnMinute20:
	if( gettime(3)%2 ) end;
	set .access_Prace, 1;
	announce "Poring Race Event is now open!",0;
	setnpctimer 100000,"Bidder#prace0";
	startnpctimer "Bidder#prace0";
	end;
OnPraceEnd:
	set .access_Prace, 0;
	announce "Poring Race Event is over!",0;
	end;
OnInit:
	waitingroom "Poring Race Event",0;
	end;
}


p_track01,58,41,3	script	Bidder#prace0	877,{
function checkevent;

	mes "[Bidder]";
	if( getstrlen( @prace_winner$ ) ) {
		mes "You have chosen ^00bb00"+ @prace_winner$ +"^000000";
		close;
	}
	else if ( checkevent() || .start ) {
		mes "There is a race in progress...";
		close;
	}
	else if( !getvariableofnpc( .access_Prace,"Poring Race Event" ) ) {
		mes "There is no race.";
		close;
	}
	mes "Choose the poring you want to bet:";
	mes "It will cost "+ .zeny_req +" Zeny.";

	.@s = select( .menu_$ );
	if( .@s == 7 ) {
		next;
		mes "[Bidder]";
		mes "Goodbye.";
		close;
	}
	.@c$ = .monst_$[ .@s -1 ];

	if ( checkevent() ) {
		next;
		mes "[Bidder]";
		mes "...";
		mes "...";
		mes "Cheater!!~~";
		close;
	}
	else if( Zeny < .zeny_req ) {
		next;
		mes "[Bidder]";
		mes "You don't have enough Zeny.";
		close;
	}
	Zeny -= .zeny_req;
	@prace_winner$ = .@c$;
	.prace_bidders[ .prace_bets ] = getcharid(3);
	.prace_bets++;

	next;
	mes "[Bidder]";
	mes "I have "+ .prace_bets +" bets.";
	initnpctimer;
	npctalk "I got "+ strcharinfo(0) +" bet!";
	close;
OnTimer60000:
	npctalk "I got "+ .prace_bets +" bets. Anyone else?";
	end;
OnTimer80000:
	npctalk "The race will start soon. Last chance.";
	end;
OnTimer90000:
	stopnpctimer;
	.start = 1;
	mapannounce "p_track01","Porings, on your marks...",1;
	sleep 2500;
	for( .@i = 3; .@i > 0; .@i-- ) {
		mapannounce "p_track01","..."+ .@i +"...",1;
		sleep 1000;
	}
	donpcevent strnpcinfo(0) +"::OnStartRace";
	sleep 1000;
	mapannounce "p_track01","Gooo!!!",1;
	end;
OnTimer320000:
	mapwarp "p_track01","prontera",155,180;
	donpcevent "Poring Race Event::OnPraceEnd";
	.prace_winner$ = "";
	.start = .prace_bets = 0;
	donpcevent strnpcinfo(0) +"::OnReturnRace";
	end;

OnStartRace:
	callsub L_label, "OnRace";
OnStopRace:
	callsub L_label, "OnStop";
OnReturnRace:
	callsub L_label, "OnReturn";
L_label:
	donpcevent "Metaling#prace3::"+ getarg(0);
	donpcevent "Poring#prace1::"+ getarg(0);
	donpcevent "Poporing#prace6::"+ getarg(0);
	donpcevent "Angeling#prace2::"+ getarg(0);
	donpcevent "Santa Poring#prace5::"+ getarg(0);
	donpcevent "Deviling#prace4::"+ getarg(0);
	if( getarg(0) == "OnStop" && .prace_winner$ != "" )
		callsub L_WinRace;
	end;
L_WinRace:
	mapannounce "p_track01", "The winner is "+ .prace_winner$,1;
	donpcevent strnpcinfo(0) +"::OnChequeo";
	sleep 3000;
	donpcevent strnpcinfo(0) +"::OnReturnRace";
	sleep 10000;
	mapwarp "p_track01","prontera",155,180;
	donpcevent "Poring Race Event::OnPraceEnd";
	.prace_winner$ = "";
	.start = .prace_bets = 0;
	end;
OnChequeo:
	for( .@i = 0 ; .@i < getarraysize( .prace_bidders ); .@i++ ) {
		if( attachrid( .prace_bidders[.@i] ) && getstrlen( @prace_winner$ ) ) {
			dispbottom "The winner is "+ .prace_winner$ +" and you have bet for "+ @prace_winner$ +".";
			if( @prace_winner$ == .prace_winner$ ) {
				dispbottom "You have won!";
				mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1;
				set #EvtPts,#ChaosPoints,+10;
				dispbottom "You gained 10 Chaos Points.";
				emotion 21,1;
			}
			else {
				dispbottom "You have lost.";
				emotion 28,1;
			}
			@prace_winner$ = "";
		}
	}
	deletearray .prace_bidders;
	end;
OnInit:
	.zeny_req = 100000;
	.item_gained = 7539;
	.item_num_gain = 20;
	setarray .monst_$,"Poring","Angeling","Metaling","Deviling","Santa Poring","Poporing","None";
	.menu_$ = implode( .monst_$, ":" );
	end;

function checkevent {
	getmapxy .@mapname$, .@x1, .@y, 1, "Poring#prace1";
	getmapxy .@mapname$, .@x2, .@y, 1, "Angeling#prace2";
	getmapxy .@mapname$, .@x3, .@y, 1, "Metaling#prace3";
	getmapxy .@mapname$, .@x4, .@y, 1, "Deviling#prace4";
	getmapxy .@mapname$, .@x5, .@y, 1, "Santa Poring#prace5";
	getmapxy .@mapname$, .@x6, .@y, 1, "Poporing#prace6";
	.@t = ( .@x1 + .@x2 + .@x3 + .@x4 + .@x5 + .@x6 ) != 58 * 6;
	return .@t;
}
}
//-----------------------------------
// Racer NPC's
//-----------------------------------

-	script	pori_race	-1,{
OnRace:
	initnpctimer;
	end;
OnStop:
	stopnpctimer;
	end;
OnReturn:
	sleep 1000;
	while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++;
	movenpc strnpcinfo(3), 58, .walk_t[.@i];
	end;
OnTimer1100:
	getmapxy .@mapname$,.@x,.@y,1, strnpcinfo(3);
	if( rand(100) < .prace_random )
		npcwalkto .@x-1, .@y;
	.@r = rand( .prace_random2 );
	if ( .@x -1 == 29 ) {
		while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++;
		set getvariableofnpc( .prace_winner$, "Bidder#prace0" ), .monst$[ .@i ];
		emotion 29;
		donpcevent "Bidder#prace0::OnStopRace";
		end;
	}
	stopnpctimer;
	setnpctimer .@r;
	startnpctimer;
	end;
OnInit:
	deletearray .walk_t;
	deletearray .monst$;
	setarray .walk_t, 38, 36, 34, 32, 30, 28;
	setarray .monst$, "Poring", "Angeling", "Metaling", "Deviling", "Santa Poring", "Poporing";
	.prace_random = 70;
	.prace_random2 = 600;
	end;
}

p_track01,58,38,2	duplicate(pori_race)	Poring#prace1	1002
p_track01,58,36,2	duplicate(pori_race)	Angeling#prace2	1096
p_track01,58,34,2	duplicate(pori_race)	Metaling#prace3	1613
p_track01,58,32,2	duplicate(pori_race)	Deviling#prace4	1582
p_track01,58,30,2	duplicate(pori_race)	Santa Poring#prace5	1062
p_track01,58,28,2	duplicate(pori_race)	Poporing#prace6	1031

p_track01,78,42,0	warp	p_track002	1,3,prontera,142,170

p_track01	mapflag	nobranch
p_track01	mapflag	noicewall
p_track01	mapflag	nomemo
p_track01	mapflag	noreturn
p_track01	mapflag	noteleport
p_track01	mapflag	nowarpto
p_track01	mapflag	nowarp
p_track01	mapflag	pvp	off
p_track01	mapflag	nosave
Edited by PandaLovesHamster
Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

×
×
  • Create New...