Jump to content
  • 0

[Mysterious] RFYL


GM Takumirai

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

Mysterious how can i set this an automated RFYL?


//===== rAthena Script =======================================
//= Run for Your Life
//===== By: ==================================================
//= Mysterious
//===== Current Version: =====================================
//= 2.8
//===== Compatible With: =====================================
//= rAthena SVN 
//===== Description: =========================================
//= A Run for your Life event (Based for Novices)
//===== TODO: ================================================
// - Change more coding
//===== Additional Comments: =================================
//= v1.0 - First release [Mysterious]
//= v2.0 - Overhaul of Entire Script [Mysterious]
//= v2.1 - Fixed Sentence structures [Mysterious]
//= v2.2 - Fixed a Typo and made it obvious what players had to change [Mysterious]
//= v2.3 - Removed unnecessary 'next;' thanks to soUPas [Mysterious]
//= v2.4 - Fixed an issue where the prize giver was showing up when not supposed to [Mysterious]
//= v2.5 - Added Friendly Messages [Mysterious]
//= v2.6 - Removed duplicated OnInIt labels [Mysterious]
//= v2.7 - Cleaning and organizing [Mysterious]
//= v2.8 - Optimized a little better [Mysterious]
//============================================================ 

-	script	RFYL#disable	-1,{

OnInit:
disablenpc "Zombie Master";
disablenpc "Present#RFYL";
}

xxx,xxx,xxx,xxx	script	Zombie Minion	1015,{

if (getgmlevel() >= 40) goto LMS_Admin;
mes "[Minion]";
if (!.Status)
	mes "My master seems to be slacking..";
else {
	mes "My master is currently busy! He has an invasion scheduled!";
}
close;

LMS_Admin:
next;
if (!.Status)
	mes "[Minion]";
	mes "My master has no invasion planned at the moment. Do you wish to schedule an invasion?";
	menu "- Start Event",M_RFYL,"- Spectate",M_warp,"- End Event",M_EndEvent,"- No Thanks",M_Leave;
else {
	mes "[Minion]";
	mes "Sorry! But there's already an invasion scheduled! Come back later.";
}
close;

M_RFYL:
	next;
	mes "[Minion]";
	mes "Hold on while I call my master.";
	close2;
	goto StartEvent;

M_warp:
	next;
	mes "[Minion]";
	mes "Very well, I will warp you to the map!";
	warp "quiz_01",42,369;
	close;

M_Leave:
	next;
	mes "[Minion]";
	mes "Ok " + strcharinfo(0) +"! Please come back after.";
	close;

M_EndEvent:
	next;
	mes "[Minion]";
	mes "Ok master, I will stop the event for you right away!";
	next;
	set .Status,0;
	disablenpc "Zombie Master";
	disablenpc "Present#RFYL";
	killmonsterall "quiz_01";
	areawarp "quiz_01",10,10,450,450,"rachel",120,135;
	stopnpctimer;
	disablenpc "Zombie Minion";
	warp "rachel",120,135;
	sleep 180000;
	enablenpc "Zombie Minion";

// =========================
StartEvent: //Announcement to notify all players
// =========================
set .Status,1;
announce "Zombie Vs. Novice event Will begin in 3 minutes. Head East/North",0;
killmonsterall "quiz_01";
sleep 55000;
announce "Zombie Vs. Novice event will begin in 2 minutes! Head East/North",0;
sleep 5000;
announce "Zombie Master: I have now appeared in Rachel!",0;
enablenpc "Zombie Master";
sleep 60000;
announce "Zombie Vs. Novice event will begin in 1 minute!",0;
sleep 30000;
mapannounce "quiz_01","In 30 seconds the zombies will spawn!",0;
sleep 25000;
announce "Zombie Vs. Novice event will begin in ~5~",0;
sleep 1000;
announce "Zombie Vs. Novice event will begin in ~4~",0;
sleep 1000;
announce "Zombie Vs. Novice event will begin in ~3~",0;
sleep 1000;
announce "Zombie Vs. Novice event will begin in ~2~",0;
sleep 1000;
announce "Zombie Vs. Novice event will begin in ~1~",0;
sleep 1000;
announce "Zombie Vs. Novice event has now begun!",0,0x00FF00;
disablenpc "Zombie Master";

// =========================
// Round 1
// =========================
sleep 10000;
monster "quiz_01",42,369,"Zombie",1015,1;
sleep 10000;
monster "quiz_01",42,369,"Zombie",1015,1;
sleep 10000;
monster "quiz_01",42,369,"Zombie",1015,1;
sleep 10000;
monster "quiz_01",42,369,"Zombie",1015,1;
sleep 55000;
// =========================
// Round 2
// =========================
mapannounce "quiz_01","Round 2!",0;
sleep 10000;
monster "quiz_01",42,369,"Zombie-2",1015,1;
sleep 55000;
monster "quiz_01",42,369,"Zombie-2",1015,1;
// =========================
// Round 3
// =========================
mapannounce "quiz_01","Round 3!",0;
sleep 10000;
monster "quiz_01",42,369,"Zombie-3",1015,1;
sleep 55000;
monster "quiz_01",42,369,"Zombie-3",1015,1;
// =========================
// Round 4
// =========================
mapannounce "quiz_01","Round 4!",0;
sleep 10000;
monster "quiz_01",42,369,"Zombie-4",1015,1;
sleep 10000;
monster "quiz_01",42,369,"Zombie-4",1015,1;
sleep 55000;
monster "quiz_01",42,369,"Zombie-4",1015,1;
// =========================
// Round 5
// =========================
mapannounce "quiz_01","Round 5!",0;
sleep 10000;
monster "quiz_01",42,369,"Zombie-5",1015,1;
sleep 55000;
monster "quiz_01",42,369,"Zombie-5",1015,1;
// =========================
// Round 6
// =========================
mapannounce "quiz_01","Round 6!",0;
sleep 10000;
monster "quiz_01",42,369,"Zombie-6",1015,1;
sleep 55000;
monster "quiz_01",42,369,"Zombie-6",1015,1;
// =========================
// Round 7
// =========================
mapannounce "quiz_01","Round 7! Final Round!",0;
sleep 10000;
monster "quiz_01",42,369,"Zombie-7",1015,1;
sleep 20000;
monster "quiz_01",42,369,"Zombie-7",1015,1;
sleep 30000;
monster "quiz_01",42,369,"Zombie-7",1015,1;
sleep 40000;
monster "quiz_01",42,369,"Zombie-7",1036,1;
sleep 50000;
monster "quiz_01",42,369,"Zombie-7",1036,1;
sleep 60000;
monster "quiz_01",42,369,"Zombie-7",1015,1;
initnpctimer;
end;
// =========================
// End of Rounds
// =========================

OnTimer0500: 
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 "rachel",120,135;
	atcommand "@alive "+ strcharinfo(0);
	dispbottom "Sorry, but you were killed.";
}
sleep2 500;
if (.@mapnvz$ == "quiz_01" && getmapusers("quiz_01") == 1 ) {
	killmonsterall "quiz_01";
	mapannounce "quiz_01","You have won, approach the Present NPC please.",0;
	enablenpc "Present#RFYL";
	stopnpctimer;
	end;
}
end;
}

quiz_01,42,378,3	script	Present#RFYL	72,{

mes "[Present For You]";
mes "Please tell me your name:";
next;
input .@name$;
if(.@name$ != strcharinfo(0)) {
	mes "[Present For You]";
	mes "Are you sure that is your name?";
	close;
}
mes "[Present For You]";
mes "Congrats. You've won.";
close2;
announce "Present For You: We have a winner! "+.@name$+" has won the Novice vs Zombie event!",0;
getitem 674, 3; // Change This item id to what ever you want
warp "rachel",120,135;
disablenpc "Present#RFYL";
set .Status,0;
end;
}

xxxx,xxx,xxx,xxx	script	Zombie Master	1298,{
if (BaseLevel > 1) goto L_ClassLevel; //Change '1' to your desired level
if (class == 0) goto L_Event; //Checks if the player is a Novice, if so, proceeds into the event.
if (class > 0) goto L_ClassLevel; //Checks if the Player is NOT a Novice. If they aren't, they are not allowed to participate.

L_Event:
mes "[ ^0000FFZombie Master^000000 ]";
mes "You wish to participate the Zombie Vs. Novice event?";
next;
switch(select("- Yes","- No")) {
case 1:
   sc_end SC_ALL;
   percentheal 100,100;
   warp "quiz_01",42,369;
   end;
   break;
case 2:
   next;
   mes "[ ^0000FFZombie Master^000000 ]";
   mes "Come back when your ready.";
   close;
   break;

L_ClassLevel:
mes "[ ^0000FFZombie Master^000000 ]";
mes "Sorry, but it seems you are not a Novice and Level 1.";
close;
}

// =========================
// 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

11 answers to this question

Recommended Posts


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


announce "Manager: No Player win the Event, due to all participant die.",0

Link to comment
Share on other sites


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

OnMinute00:  // start every hour
StartEvent: //Announcement to notify all players

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

Where should i put the OnMinute00:

and StartEvent:

- thanks sir Emistry

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

There's

// =========================

StartEvent: //Announcement to notify all players

// =========================

On The Script.

Put OnMinute00: Before it.

Edited by Dastgir Pojee
  • Upvote 1
Link to comment
Share on other sites


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


OnMinute30:

if( gettime(3) % 2 != 0 ) end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

no emistry i mean
for 2hours? what  OnMinute??

for 30min ? what Onminute??

 

but Thankyou for that ^_^ il try that

Link to comment
Share on other sites


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

no emistry i mean

for 2hours? what  OnMinute??

for 30min ? what Onminute??

 

but Thankyou for that ^_^ il try that

OnMinute00:
if( gettime(3) % 2 != 0 ) end;  // every 2 hour


OnMinute00:
OnMinute30: // every 30 minute..
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

sir emistry can you help me error on line 74 

 

i used the 
OnMinute00:
if( gettime(3) % 2 != 0 ) end; // every 2 hour
 

prontera,138,176,3	script	Run For Your Life	1015,{
if(Weight > 0) {
mes "Lower your weight, Remove all your items.";
close;
}
mes "[^0000FFRun For Your Life^000000]";
mes "You want to join the Event?";
next;
switch(select("Yes","No")) {
case 1:
npctalk ""+strcharinfo(0)+" has registered for the Run For Your Life Event.";
sc_end SC_ALL;
sc_start SC_DECREASEAGI,1200000,10;
percentheal 100,100;
sc_start SC_STRIPSHIELD,1200000,5;
sc_start SC_STRIPWEAPON,1200000,5;
sc_start SC_STRIPARMOR,1200000,5;
sc_start SC_STRIPHELM,1200000,5;
statusup2 bStr,-999;
statusup2 bAgi,-999;
statusup2 bVit,-999;
statusup2 bInt,-999;
statusup2 bDex,-999;
statusup2 bLuk,-999;
warp "quiz_01",42,369;
end;
case 2:
mes "[^0000FFRun For Your Life^000000]";
mes "Come Again, if you want to join.";
break;
}
close;

OnInit:
disablenpc "Run For Your Life";
disablenpc "Prize";
end;

OnMinute00:
if( gettime(3) % 2 != 0 ) end;  // every 2 hour
announce "Manager: Run For Your Life Event Registration is now Open, 3 minutes",0;
killmonsterall "quiz_01";
sleep 5000;
announce "Manager: NPC Appeared at Prontera Town' Register Now!",0;
enablenpc "Run For Your Life";
sleep 55000;
announce "Manager: Run For Your Life Registration will be closed in 2 minutes!",0;
sleep 60000;
announce "Manager: Run For Your Life Registration will be closed in 1 minute!",0;
sleep 50000;
mapannounce "quiz_01","Registration Closed!! in 10 seconds the Event will Start!",0;
disablenpc "Run For Your Life";
sleep 5000;
for( set .@a,5; .@a > 0; set .@a,.@a - 1 ){
announce "Manager: Monster will spawn in ~"+.@a+"~",0;
sleep 1000;
}
if(getmapusers("guild_vs5") == 1){
mapannounce "guild_vs5","Manager: Event Ended 1 Participant Only..",0;
disablenpc "Prize";
announce "Manager: Event Ended 1 Participant Only",0;
disablenpc "Run For Your Life";
sleep 1000;
}
for( set .@a,3; .@a > 0; set .@a,.@a - 1 ){
monster "quiz_01",42,369,"Zombie",1015,2;
sleep 10000;
}
while( getmapusers("quiz_01") > 1 ){
mapannounce "quiz_01",getmapusers("quiz_01") +" players still alive in the Event.",0,0x00FF00;
sleep 2000;
}
killmonsterall "quiz_01";
announce "Manager: No Player win the Event, due to all participant die.,0;
mapannounce "quiz_01","Manager: You survive the zombie waves, talk to the Prize NPC to get the reward.",0;
enablenpc "Prize";
end;

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 100;
if (.@mapnvz$ == "sec_pri" && getmapusers("quiz_01") == 1 ) {
killmonsterall "sec_pri";
sc_start SC_BASILICA,30000,1;
mapannounce "sec_pri","You have won, approach the R.F.Y.L. Banker NPC please.",0;
enablenpc "Prize";
stopnpctimer;
end;
}
end;
}

quiz_01,42,369,3 script Prize 72,{
if(getmapusers("quiz_01") > 1){
npctalk "Only the last Survivor can talk with me.";
end;
}
announce "In ' Run For Your Life ' has won" + strcharinfo (0) + "! We congratulate "+(( Sex )? "HIM":"HER")+"!",0;
getitem 7227,50;
warp "prontera",147,170;
disablenpc "Prize";
end;
}

// == Mapflags
quiz_01 mapflag gvg
quiz_01 mapflag nowarp
quiz_01 mapflag nowarpto
quiz_01 mapflag noteleport
quiz_01 mapflag nosave
quiz_01 mapflag nomemo
quiz_01 mapflag nobranch
quiz_01 mapflag pvp_noparty
quiz_01 mapflag nocommand 80
quiz_01 mapflag restricted 5
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

Thanks alot emistry 

 

announce "Manager: No Player win the Event, due to all participant die.",0;
 i put the " it works now thankyou verry much emistry|

your the BEST!
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...