Jump to content
  • 0

Question

16 answers to this question

Recommended Posts

  • 0
Posted

Can anyone can fix this script?

its not working well..

the event summon a npc to warp in event location but the event wont trigger to start

please some one help me thanks

-	script	Race npc#disable	-1,{

OnInit:
disablenpc "Race Event";
end;
}


sec_in01,161,176,5	script	Race Event	899,{
if(getgmlevel() < 60 ) end;
mes "Hello there GM " + strcharinfo(0) + " !";
next;
set .menu$, select(.gm_menu$);
switch( select ("Open Race Event:No Thanks")) {
		case 1: // Race Event
				next;
				mes "I will now create warps, announce, & warp you.";
				close2;
				warp "turbo_n_1",58,365;
				Announce "There will be a 'Race' Event Held!",bc_all;
				sleep2 2500;
				enablenpc "Race event";
				sleep2 2500;
				Announce "If you want to join, the warp will be open in Prontera. It will be open for 2 minute!",bc_all;
				sleep2 30000;
				Announce "You have only 1 minute left to join the event!",bc_all;
				sleep2 1000;
				initnpctimer;
				goto L_Timer;
				end;
				close;

		case 2:
				mes "[Race Event]";
				mes "Come back if you change your mind, See Yah!";
				close;
		}
L_Timer:
	OnTimer00000:
		Announce "Timer has started!",bc_all;
		end;
		
	OnTimer30000:
		Announce "Thirty Seconds Have Passed By!",bc_all;
		sleep2 5000;
		Announce "Hurry to Prontera if you want to join!",bc_all;
		end;
							
	OnTimer40000:
		Announce "Twenty seconds left!",bc_all;
		end;
							
	OnTimer50000:
		Announce "Ten seconds left!",bc_all;
		end;
							
	OnTimer55000:
		Announce "5!",bc_all;
		sleep2 1000;
		Announce "4!",bc_all;
		sleep2 1000;
		Announce "3!",bc_all;
		sleep2 1000;
		Announce "2!",bc_all;
		sleep2 1000;
		Announce "1!",bc_all;
		sleep2 1000;
		Announce "The warp is now closed!",bc_all;
		sleep2 1000;
		disablenpc "Race Event";
		stopnpctimer;
		end;
		
OnInit:
	setarray .gmevents$,"Race?";
	for ( set .@i, 0; .@i < getarraysize(.gmevents$); set .@i, .@i +1 )
	set .gm_menu$, .gm_menu$ + (.gmevents$[.@i]) +":";
	disablenpc "Race event";
	end;
}

-	script	Master0#tt_main	-1,{	
function	RName;
OnEnable:
	set .@w$,callfunc("F_tt");
	enablenpc "Master0#"+.@w$;
	initnpctimer;
	end;

OnDisable:
	set .@w$,callfunc("F_tt");
	stopnpctimer;
	disablenpc "Master0#"+.@w$;
	end;

OnTimer7000:
	mapannounce strnpcinfo(4),"Welcome to the Turbo Track.",bc_map,"0x33FF66";
	end;

OnTimer9000:
	mapannounce strnpcinfo(4),"The game will be hosted for 15 minutes and at least one person must complete the entire course.",bc_map,"0x33FF66";
	end;

OnTimer11000:
	mapannounce strnpcinfo(4),"We hope you will do your best.",bc_map,"0x33FF66";
	end;

OnTimer13000:
	mapannounce strnpcinfo(4),"The game will begin after a 5 second countdown. Everyone, please take your positions behind the Starting Line.",bc_map,"0x33FF66";
	end;

OnTimer15000:
	mapannounce strnpcinfo(4),"The countdown will commence shortly.",bc_map,"0x33FF66";
	end;

OnTimer17000:
	mapannounce strnpcinfo(4),"- 5 -",bc_map,"0x33FF66";
	end;

OnTimer18000:
	mapannounce strnpcinfo(4),"- 4 -",bc_map,"0x33FF66";
	end;

OnTimer19000:
	mapannounce strnpcinfo(4),"- 3 -",bc_map,"0x33FF66";
	end;

OnTimer20000:
	mapannounce strnpcinfo(4),"- 2 -",bc_map,"0x33FF66";
	end;

OnTimer21000:
	mapannounce strnpcinfo(4),"- 1 -",bc_map,"0x33FF66";
	end;

OnTimer22000:
	mapannounce strnpcinfo(4),"- 0 -",bc_map,"0x33FF66";
	end;

OnTimer23000:
	set .@w$,callfunc("F_tt");
	mapannounce strnpcinfo(4),"Now! The race has begun! Go Go Go!!",bc_map,"0x33FF66";
	disablenpc "No_Unfair_Start#"+.@w$+"-1";
	disablenpc "No_Unfair_Start#"+.@w$+"-2";
	if (strnpcinfo(4) == "turbo_n_1") set $@start_time,gettimetick(0);
	end;

OnTimer30000:
	mapannounce strnpcinfo(4),"Remember that this is a 15 minute race. After 15 minutes, everyone will be transported out of the race track.",bc_map,"0x33FF66";
	end;

OnTimer83000:
	mapannounce strnpcinfo(4),"You have 14 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer143000:
	mapannounce strnpcinfo(4),"You have 13 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer203000:
	mapannounce strnpcinfo(4),"You have 12 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer263000:
	mapannounce strnpcinfo(4),"You have 11 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer323000:
	mapannounce strnpcinfo(4),"You have 10 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer383000:
	mapannounce strnpcinfo(4),"You have 9 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer443000:
	mapannounce strnpcinfo(4),"You have 8 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer503000:
	mapannounce strnpcinfo(4),"You have 7 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer563000:
	mapannounce strnpcinfo(4),"You have 6 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer623000:
	mapannounce strnpcinfo(4),"You have 5 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer683000:
	mapannounce strnpcinfo(4),"You have 4 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer743000:
	mapannounce strnpcinfo(4),"You have 3 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer803000:
	mapannounce strnpcinfo(4),"You have 2 minutes left.",bc_map,"0x33FF66";
	end;

OnTimer863000:
	mapannounce strnpcinfo(4),"You have 1 minute left.",bc_map,"0x33FF66";
	end;

OnTimer893000:
	mapannounce strnpcinfo(4),"You have 30 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer903000:
	mapannounce strnpcinfo(4),"You have 20 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer913000:
	mapannounce strnpcinfo(4),"You have 10 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer918000:
	mapannounce strnpcinfo(4),"You have 5 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer919000:
	mapannounce strnpcinfo(4),"You have 4 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer920000:
	mapannounce strnpcinfo(4),"You have 3 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer921000:
	mapannounce strnpcinfo(4),"You have 2 seconds left.",bc_map,"0x33FF66";
	end;

OnTimer922000:
	mapannounce strnpcinfo(4),"You have 1 second left.",bc_map,"0x33FF66";
	end;

OnTimer923000:
	mapannounce strnpcinfo(4),"Time's up!",bc_map,"0x33FF66";
	end;

OnTimer925000:
	mapannounce strnpcinfo(4),"The race is over.",bc_map,"0x33FF66";
	end;

OnTimer927000:
	set .@w$,callfunc("F_tt");
	mapannounce strnpcinfo(4),"[Everyone will be transported to a Waiting Room.]",bc_map,"0x33FF66";
	mapwarp strnpcinfo(4),"turbo_room",71,89;
	disablenpc "Broadcast#"+.@w$;
	donpcevent "Master0#"+.@w$+"::OnDisable";
	if (strnpcinfo(4) == "turbo_n_1") {
		donpcevent "Solo Mode#n1::OnEnable";
	} else {
		donpcevent RName(.@w$)+"::OnEnable";
	}
	enablenpc "No_Unfair_Start#"+.@w$+"-1";
	enablenpc "No_Unfair_Start#"+.@w$+"-2";
	donpcevent "snake#"+.@w$+"::OnReset";
	donpcevent "hunting#"+.@w$+"::OnReset";
	disablenpc "bing2#"+.@w$;
	disablenpc "Winner Helper#TBT_"+.@w$;
	enablenpc "#cos_"+.@w$+"_end";
	enablenpc "Notice_Maker1#TBT_"+.@w$;
	enablenpc "Notice_Maker3#TBT_"+.@w$;
	enablenpc "Notice_Maker4#TBT_"+.@w$;
	enablenpc "Disposable_Switch#"+.@w$;
	disablenpc "Flasher_Exit_1#"+.@w$;
	disablenpc "Flasher_Exit_2#"+.@w$;
	end;
	
OnInit:
	set .@w$,callfunc("F_tt");
	disablenpc "Master0#"+.@w$;
	end;
	
	function	RName	{
		.@string$ = getarg(0);
		.@s = ( getstrlen(.@string$) > 2 ? substr(.@string$,1,2) : charat(.@string$,getstrlen(.@string$)-1) );
		set .@rn$,((compare(strnpcinfo(4),"_e_"+.@s))?"Expert mode":"Normal mode")+" - "+.@s+" person";
		return .@rn$;
	}
}

prontera,155,171,5	script	Race event	811,{

	mes "[ Race Event ]";
	mes "Hello, I'm the Race Event Manager. My record says that the defending champion on this event was "+$PPEDefendingChampion$+". Anyways, what do you want to do?";
	mes " ";
	mes "Scripted by: ^777777TestRO^000000";
	next;
	menu "Join Event Now",PPE_Join,"Nevermind",PPE_nvm;

PPE_Join:{
			if (gethominfo(2) != "null"){
				mes "No homunculus is allowed in this event! Sorry "+strcharinfo(0)+" but you can't join this event!";
				close;
			}
			if (getpetinfo(2) != "null"){
				mes "No pet is allowed in this event! Sorry "+strcharinfo(0)+" but you can't join this event!";
				close;
			}
			if (checkcart()){
				mes "[ Race Event ]";
				mes "No cart is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
				close;
			}
			if (checkfalcon()){
				mes "No falcon is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
				close;
			}
			if (checkriding()){
				mes "No riding is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
				close;
			}
			mes "[ Race Event ]";
			mes "Good luck "+strcharinfo(0)+".";
			mes " ";
			mes "Scripted by: ^777777TestRO^000000";
			close2;
			warp "turbo_n_1",58,365;

			end;
		}

	PPE_nvm:
		mes "[ Race Event ]";
		mes "Okay. Maybe next time.";
		mes " ";
		mes "Scripted by: ^777777TestRO^000000";
		close;
		
}

 

Posted (edited)

It's enabled default, you just have to add a warp NPC to turbo_room.

how lol

sorry im new

im confuse with the scripts

there's 9 scripts in the turbo track folder..

Edited by donkeyg
Posted

Turbo Track doesn't require you to start, you just need to add a warp like I said in previous reply. Player can toggle the event themselves. (Either single challenge mode and few vs few mode)

Posted

Turbo Track doesn't require you to start, you just need to add a warp like I said in previous reply. Player can toggle the event themselves. (Either single challenge mode and few vs few mode)

how do i make it the event auto held everyday at 8PM ? and when the event is going to start, there's a warp portal appear at the main town. then all the player can go in and join the event

Posted

First, put disable warp mapflag to turbo_room. Then use this warper:

prontera,150,150,1<tab>script<tab>Turbo Event Warper<tab>53,{
mes "Welcome. do you want to join Turbo Race event?";
next;
if (select("Yes:No") == 2) close;
close2;
warp "turbo_room",12,12;
end;
OnClock2000:
hideoffnpc;
end;
OnInit:
hideonnpc;
end;
}

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.

  • Recently Browsing   0 members

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