- 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
Question
chibikyle
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 EmistryPlease use CODEBOX.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.