Jump to content
  • 0

how to enable no pots allowed on RFYL


jpnazar

Question


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

heres the script

-	script	RFYLBank	-1,{

OnInit:
	disablenpc "RFYL Master";
	disablenpc "R.F.Y.L. Banker";
}

gonryun,167,98,3	script	RFYL Master	718,{
	mes "[RFYL]";
	mes "Hello What can I do for you?";
	next;
	menu "Register",-,"What is RFYL?",what,"Leave",leave;
	next;
	mes "[RFYL]";
	mes "Thank you for registering Mr. " + strcharinfo(0) + ", Have fun!";
	close2;
	npctalk ""+strcharinfo(0)+" has registered for the RFYL Event.";
	warp "quiz_01",138,369;
	end;

	what:
	mes "[RFYL]";
	mes "RFYL Event, You just run for you life to survive the number of wave of Monsters.";
	next;
	mes "[RFYL]";
	mes "RFYL Event have different Difficulties.";
	mes "If Only 1 player survive the wave the game is Over.";
	next;
	mes "[RFYL]";
	mes "That's all";
	close;

	leave:
	mes "[RFYL]";
	mes "I hope you will register next time";
	close;
}

-	script	RFYL	-1,{
OnClock1605:
	enablenpc "RFYL Master";
	delwaitingroom;
	waitingroom "Register RFYL Event Now",0;
	pvpoff "quiz_01";
	announce "RFYL Event Will begin in 3 minutes.",0;
	killmonsterall "quiz_01";
	sleep 55000;
	announce "RFYL Event will begin in 2 minutes!",0;
	sleep 5000;
	announce "Mr RFYL: I have now appeared inside Event Hall!",0;
	enablenpc "RFYL Master";
	sleep 60000;
	announce "RFYL event will begin in 1 minute!",0;
	sleep 30000;
	mapannounce "quiz_01","In 30 seconds the monsters will spawn!",0;
	sleep 25000;
	announce "RFYL Event will begin in ~5~",0;
	sleep 1000;
	announce "RFYL Event will begin in ~4~",0;
	sleep 1000;
	announce "RFYL Event will begin in ~3~",0;
	sleep 1000;
	announce "RFYL Event will begin in ~2~",0;
	sleep 1000;
	announce "RFYL Event will begin in ~1~",0;
	sleep 1000;
	announce "RFYL Event has now begun!",0,0x00FF00;
	disablenpc "RFYL Master";
	if(getmapusers("quiz_01") == 1){
		announce "quiz_01","Mr RFYL: Event Ended 1 Participant Only..",0;
		pvpoff "quiz_01";
		mapwarp "quiz_01","prontera",0,0;
		stopnpctimer;
	}

// =========================
// Round 1
// =========================
initnpctimer;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian",1829,1;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian",1829,1;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian",1829,1;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian",1829,1;
sleep 55000;
// =========================
// Round 2
// =========================
mapannounce "quiz_01","Round 2!",0;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian-2",1829,2;
sleep 55000;
monster "quiz_01",130,368,"Sword Guardian-2",1829,2;
// =========================
// Round 3
// =========================
mapannounce "quiz_01","Round 3!",0;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian-3",1829,3;
sleep 55000;
monster "quiz_01",146,368,"Sword Guardian-3",1829,3;
// =========================
// Round 4
// =========================
mapannounce "quiz_01","Round 4!",0;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian-4",1829,4;
sleep 10000;
monster "quiz_01",146,368,"Sword Guardian-4",1829,4;
sleep 55000;
monster "quiz_01",130,368,"Sword Guardian-4",1829,4;
// =========================
// Round 5
// =========================
mapannounce "quiz_01","Round 5!",0;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian-5",1829,5;
sleep 55000;
monster "quiz_01",138,369,"Sword Guardian-5",1829,5;
// =========================
// Round 6
// =========================
mapannounce "quiz_01","Round 6!",0;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian-6",1829,6;
sleep 55000;
monster "quiz_01",138,369,"Sword Guardian-6",1829,6;
// =========================
// Round 7
// =========================
mapannounce "quiz_01","Round 7! Final Round!",0;
sleep 10000;
monster "quiz_01",138,369,"Sword Guardian-7",1829,7;
sleep 20000;
monster "quiz_01",146,368,"Sword Guardian-7",1829,1;
sleep 30000;
monster "quiz_01",138,369,"Sword Guardian-7",1829,2;
sleep 40000;
monster "quiz_01",130,368,"Sword Guardian-7",1829,3;
sleep 50000;
monster "quiz_01",146,368,"Sword Guardian-7",1829,4;
sleep 60000;
monster "quiz_01",130,368,"Sword Guardian-7",1829,1;
goto OnWin2;
end;
// =========================
// End of Rounds
// =========================

OnTimer10000:
if ( getmapusers("quiz_01") > 1 ){
	initnpctimer;
	end;
}
else{
	mapannounce "quiz_01","You have won, approach the R.F.Y.L. Banker NPC please.",0;
	enablenpc "R.F.Y.L. Banker";
	stopnpctimer;
}
end;


OnWin2:
if ( getmapusers("quiz_01") == 0 ) {
killmonsterall "quiz_01";
announce "RFYL Event: Event has ended. No one has joined.",0;
stopnpctimer;
end;
} else if ( getmapusers("quiz_01") > 1 ) {
mapannounce "quiz_01",getmapusers("quiz_01") +" has survived the event.",0,0x00FF00;;
initnpctimer;
end;
}
initnpctimer;
end;

// =========================
// When players die
// ========================= 
OnPCDieEvent:
getmapxy .@mapnvz$,.@xnvz,.@ynvz,0;
if ( .@mapnvz$ == "quiz_01") {
sleep2 100;
warp "prontera",0,0;
atcommand "@alive "+ strcharinfo(0);
dispbottom "Sorry, but you were killed.";
}
sleep2 500;
if (.@mapnvz$ == "quiz_01" && getmapusers("quiz_01") == 1 ) {
killmonsterall "quiz_01";
sc_start SC_BASILICA,30000,1;
mapannounce "quiz_01","You have won, approach the R.F.Y.L. Banker NPC please.",0;
enablenpc "R.F.Y.L. Banker";
stopnpctimer;
end;
}
end;
}

quiz_01,138,377,3	script	R.F.Y.L. Banker	72,{
if(getmapusers("quiz_01") > 1){
npctalk "Only the last Survivor can talk with me.";
end;
}
mes "[R.F.Y.L. Banker]";
mes "Please tell me your name:";
next;
input .@name$;
if(.@name$ != strcharinfo(0)) {
mes "[R.F.Y.L. Banker]";
mes "Are you sure that is your name?";
close;
}
mes "[R.F.Y.L. Banker]";
mes "Congrats. You've won.";
close2;
announce "R.F.Y.L. Banker: We have a winner! "+.@name$+" has won the Novice vs Zombie event!",0;
getitem 7711, 1; // Change This item id to what ever you want
warp "prontera",0,0;
disablenpc "R.F.Y.L. Banker";
end;

OnInit:
while(1){
delwaitingroom;
waitingroom "["+getmapusers("quiz_01")+"] Participants ",0;
sleep 1000;
}
end;

}

// == Mapflags
quiz_01	mapflag	nowarpto
quiz_01	mapflag	nowarp
quiz_01	mapflag	noteleport
quiz_01	mapflag	nomemo
quiz_01	mapflag	nosave	SavePoint
quiz_01	mapflag	nobranch
quiz_01	mapflag	noicewall
quiz_01	mapflag	nopenalty
quiz_01	mapflag	nobranch
quiz_01	mapflag	noexp
quiz_01	mapflag	noreturn
quiz_01	mapflag	pvp_noparty
quiz_01	mapflag	restricted	1

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

In your script

quiz_01	mapflag	restricted	1

So add the items ID you want to restrict in db/re/item_noequip.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

 In your script
quiz_01    mapflag    restricted    1

So add the items ID you want to restrict in db/re/item_noequip.txt

 

like this 

506,32

 

32 - because maflag restricted to 1 right ?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

32 - because maflag restricted to 1 right ?

Yes

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