Jump to content
  • 0

Help in RFYL Event


chibikyle

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   3
  • Joined:  05/22/12
  • Last Seen:  

RFYL Script

-    script    announce#nvz    -1,{
 
OnClock1952: 
 
announce "Zombie vs Novice event will begin in 3 minutes Please use Level 1 Novice Job to join the event.",0;
killmonsterall "g_room2";
sleep 5000;
announce "NPC Zombie vs Novice has appeared in turbo_room Event Area !",0;
enablenpc "Zombie vs Novice";
sleep 55000;
announce "Event Zombie vs Novice will begin in 2 minutes. Please use Level 1 Novice Job to join the event.",0;
sleep 60000;
announce "Event Zombie vs Novice will begin in 1 minute. Please use Level 1 Novice Job to join the event.",0;
sleep 30000;
mapannounce "g_room2","Get ready, Zombies will spawn in 30 seconds!!",0;
sleep 25000;
announce "Event Zombie vs Novice will begin in ~5~",0;
sleep 1000;
announce "Event Zombie vs Novice will begin in ~4~",0;
sleep 1000;
announce "Event Zombie vs Novice will begin in ~3~",0;
sleep 1000;
announce "Event Zombie vs Novice will begin in ~2~",0;
sleep 1000;
announce "Event Zombie vs Novice will begin in ~1~",0;
sleep 1000;
announce "Event Zombie vs Novice has begun!!",0,0x00FF00;
monster "g_room2",42,369,"Zombie",1015,1;
disablenpc "Zombie vs Novice";
sleep 10000;
monster "g_room2",42,369,"Zombie-2",1015,1;
sleep 10000;
monster "g_room2",42,369,"Zombie-3",1015,1;
sleep 10000;
monster "g_room2",42,369,"Zombie-4",1015,1;
initnpctimer;
end;
 
OnTimer5000:
if ( getmapusers("g_room2") == 0 )
{
killmonsterall "g_room2";
announce "Zombie vs Novice event ended.",0;
disablenpc "Prize";
stopnpctimer;
end;
}
else if ( getmapusers("g_room2") > 1 )
{
mapannounce "g_room2",getmapusers("g_room2") +"the player still survive on Event.",0,0x00FF00;;
initnpctimer;
end;
}
initnpctimer;
end;
 
OnPCDieEvent:
getmapxy .@mapnvz$,.@xnvz,.@ynvz,0;
if ( .@mapnvz$ == "g_room2") {
sleep2 1;
warp "prontera",156,191;
dispbottom "you have lost...";
}
sleep2 1000;
if ( .@mapnvz$ == "g_room2" && getmapusers("g_room2") == 1 ) {
killmonsterall "g_room2";
mapannounce "g_room2","You have won, please talk to Prize NPC at the center of this area to get your prize.",0;
enablenpc "Prize";
stopnpctimer;
end;
}
end;
}
 
g_room2,42,371,4    script    Prize    72,{
if (sex == 1) {
announce "" + strcharinfo (0) + " has won the Zombie vs Novice Event. Congratulations to him!",0;
}
else {
announce "" + strcharinfo (0) + " has won the Zombie vs Novice Event. Congratulations to her!",0;
}
getitem 7539,100;
warp "turbo_room",99,112;
sleep2 250;
disablenpc "Prize";
end;
}
 
turbo_room,136,84,3    script    Zombie vs Novice    1015,{

getinventorylist;
if( @inventorylist_count ){
mes "[^0000FFZombie vs Novice^000000]";
mes "Please store all your item now!";
close;
}

if (BaseLevel > 1) goto NO;
if (class == 0) goto event;
if (class > 0) goto NO;

event:
mes "[^0000FFZombie vs Novice^000000]";
mes "Do you wish to join Zombie vs Novice Event?";
next;
switch(select("Yes","No")) {
case 1:
sc_end SC_ALL;
sc_start SC_DECREASEAGI,300000,10;
percentheal 100,100;
warp "g_room2",42,369;
end;
break;
case 2:
mes "[^0000FFZombie vs Novice^000000]";
mes "Come back later if you ready.";
close;
break;
NO:
mes "[^0000FFZombie vs Novice^000000]";
mes "You are not Level 1 Novice!! Go away!";
close;
}
OnInit:
disablenpc "Zombie vs Novice";
disablenpc "Prize";
end;
}

g_room2    mapflag    nowarp
g_room2    mapflag    nowarpto
g_room2    mapflag    noteleport
g_room2    mapflag    nosave
g_room2    mapflag    nomemo
g_room2    mapflag    nobranch
g_room2    mapflag    noloot
g_room2    mapflag    noskill
g_room2    mapflag    nopenalty
g_room2    mapflag    nocommand    99

My problem is when the event is already done and already have a winner. The monster still spawning. sorry for my bad english hehez

Edited by Emistry
Please use CODEBOX.
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  132
  • Reputation:   8
  • Joined:  07/19/12
  • Last Seen:  

initnpctimer;
while(getmapusers("g_room2") > 1) {
	monster "g_room2",42,369,"Zombie-2",1015,1;
	sleep 10000;
}

Use that to replace this:

sleep 10000;
monster "g_room2",42,369,"Zombie-2",1015,1;
sleep 10000;
monster "g_room2",42,369,"Zombie-3",1015,1;
sleep 10000;
monster "g_room2",42,369,"Zombie-4",1015,1;
initnpctimer;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   3
  • Joined:  05/22/12
  • Last Seen:  

16 hours ago, Valiente said:

initnpctimer;
while(getmapusers("g_room2") > 1) {
	monster "g_room2",42,369,"Zombie-2",1015,1;
	sleep 10000;
}

Use that to replace this:


sleep 10000;
monster "g_room2",42,369,"Zombie-2",1015,1;
sleep 10000;
monster "g_room2",42,369,"Zombie-3",1015,1;
sleep 10000;
monster "g_room2",42,369,"Zombie-4",1015,1;
initnpctimer;

 

Thankyou ! :)

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