awesomazingxed Posted November 20, 2014 Posted November 20, 2014 Hello everyone. Can anyone of you guys help me. I want to set the time of my Devil Square event every 4 hours. Thanks you. phtownall,181,167,5 script Devil Square Guardian 1708,{ mes "[Devil Square Guardian]"; mes "Welcome to the entrance door to ^FF0000Devil Square^000000"; mes "If you failed or die, the door will be closed and you have to wait until it start to open again"; next; menu "Enter",-,"Info",L_info,"Cancel",L_cancel; if ( $@DS_entry == 0 ) goto L_error; if ( Baselevel < 70 || Zeny < 20000 ) goto L_req; if ( getmapusers("ordeal_1-1") >= 150 ) goto L_toomany; set Zeny,Zeny - 20000; announce strcharinfo(0)+" has entered the Devil Square",8; percentheal 100,100; warp "ordeal_1-1",183,182; end; L_error: mes "[Devil Square Guardian]"; mes "Devil Square is now closed"; mes "It'll be open again at:"; mes "15:00 and 23:00."; close; L_req: mes "[Devil Square Guardian]"; mes "Minimum base level to enter is 70"; mes "The registration fee is 20,000z"; close; L_toomany: mes "[Devil Square Guardian]"; mes "I'm sorry but the Devil Square is FULL"; mes "Maximum users to enter is 150 players"; close; L_info: mes "[Devil Square Guardian]"; mes "There are 3 level monster you'll encounter"; mes "Each level the enemies will grow stronger"; mes "If you succeded to win all 3 level monster, you'll get the opportunity to open 1 Awesomazing Coin with items, equips, and rare cards inside!!"; close; L_cancel: mes "[Devil Square Guardian]"; mes "See ya"; close; } ordeal_1-1,0,0,0 script DS_HiddenNpc -1,{ OnClock1322: : OnClock23: set $@DS_complete,0; disablenpc "Exit#DS"; mapannounce "ordeal_1-1","Devil Square is now closed",0; killmonsterall "ordeal_1-1"; announce "Devil Square is OPENED NOW!! 5 Minutes until it starts..!!",0; set $@DS_entry,1; sleep 60000; announce "Devil Square will begin in 4 minutes..!!",0; sleep 60000; announce "Devil Square will begin in 3 minutes..!!",0; sleep 60000; announce "Devil Square will begin in 2 minutes..!!",0; sleep 60000; announce "Devil Square will begin in 1 minutes..!!",0; sleep 60000; announce "Devil Square is STARTED NOW !!",0; initnpctimer; set $@DS_entry,0; set $@mob,51; areamonster "ordeal_1-1",183,182,246,244,"[DS] Twilight Vampire",1389,5,"DS_HiddenNpc::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Twilight Werewolf",1785,5,"DS_HiddenNpc::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Fiery",1598,20,"DS_HiddenNpc::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Awesomazing Guardian",1830,10,"DS_HiddenNpc::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Feiry Lizard",1831,10,"DS_HiddenNpc::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Fiery Lizard Queen",1719,1,"DS_HiddenNpc::Ondevildead"; end; Ondevildead: set $@mob,$@mob - 1; if($@mob == 25) mapannounce "ordeal_1-1","Devil Square : 25 mobs to enter the 2nd round",0; if($@mob == 5) mapannounce "ordeal_1-1","Devil Square : 5 mobs to enter 2nd round",0; if($@mob == 0) { mapannounce "ordeal_1-1","Devil Square will enter to 2nd round",0; goto Ondevil2; } end; Ondevil2: atcommand "@cleanmap"; set $@mob,72; areamonster "ordeal_1-1",183,182,246,244,"[DS] Stone Golem",2019,15,"DS_HiddenNpc::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Earthlings",1932,15,"DS_HiddenNpc::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Crystal Golem",2049,15,"DS_HiddenNpc::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Ancient Hunter",2074,20,"DS_HiddenNpc::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Earth Beast",2018,5,"DS_HiddenNpc::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1885,2,"DS_HiddenNpc::Ondevildead2"; end; Ondevildead2: set $@mob,$@mob - 1; if($@mob == 25) mapannounce "ordeal_1-1","Devil Square : 25 mobs left to enter the 3rd round",0; if($@mob == 5) mapannounce "ordeal_1-1","Devil Square : 5 mobs left to enter the 3rd round",0; if($@mob == 0) { mapannounce "ordeal_1-1","Devil Square will enter to 3rd round",0; goto Ondevil3; } end; Ondevil3: atcommand "@cleanmap"; set $@mob,58; areamonster "ordeal_1-1",183,182,246,244,"[DS] Yinyang Snake",1529,3,"DS_HiddenNpc::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Demonlings",1730,15,"DS_HiddenNpc::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Spirit Guardian",1921,10,"DS_HiddenNpc::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Soul",1599,15,"DS_HiddenNpc::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Illuminati",2283,5,"DS_HiddenNpc::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] Valentine",1708,1,"DS_HiddenNpc::Ondevildead3"; end; Ondevildead3: set $@mob,$@mob - 1; if($@mob == 25) mapannounce "ordeal_1-1","Devil Square : 25 mobs left to VICTORY",0; if($@mob == 5) mapannounce "ordeal_1-1","Devil Square : 5 mobs left to VICTORY",0; if($@mob == 0) { mapannounce "ordeal_1-1","Devil Square : CONGRATULATION - 10 will be yours now",0; goto Ondevil4; } end; Ondevil4: atcommand "@cleanmap"; set $@DS_complete,1; set $@mob,10; monster "ordeal_1-1",231,250,"Treasure Box",1324,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",234,247,"Treasure Box",1328,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",237,244,"Treasure Box",1332,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",240,241,"Treasure Box",1336,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",243,238,"Treasure Box",1340,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",246,235,"Treasure Box",1344,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",249,232,"Treasure Box",1348,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",252,229,"Treasure Box",1352,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",249,241,"Treasure Box",1356,1,"DS_HiddenNpc::Onboxdead"; monster "ordeal_1-1",240,249,"Treasure Box",1360,1,"DS_HiddenNpc::Onboxdead"; end; Onboxdead: set $@mob, $@mob - 1; announce "Devil Square : "+ strcharinfo(0) +" has opened the treasure box at Devil Square",0; if ($@mob == 0) enablenpc "Exit#DS"; end; OnTimer30000: if ( $@DS_complete == 1 ) { stopnpctimer; end; } else if (getmapusers("ordeal_1-1") == 0) { announce "All players failed to survive at Devil Square",0; killmonsterall "ordeal_1-1"; stopnpctimer; end; } else { mapannounce "ordeal_1-1",getmapusers("ordeal_1-1") +" players is still survive at Devil Square",0; initnpctimer; end; } } // -- Mapflags ordeal_1-1 mapflag nowarp ordeal_1-1 mapflag nowarpto ordeal_1-1 mapflag noteleport ordeal_1-1 mapflag nosave SavePoint ordeal_1-1 mapflag nomemo ordeal_1-1 mapflag nobranch ordeal_1-1 mapflag nopenalty ordeal_1-1,246,245,7 script Exit#DS 51,{ mes "[Exit]"; mes "I'll give you 100 thousand zeny and 1 Awesomazing Coin as a prize."; mes"Have an awesomazing day adventurer. See ya!"; zeny += 100000; getitem 6242; next; warp "SavePoint",0,0; close; } Quote
Winz Posted November 20, 2014 Posted November 20, 2014 change ordeal_1-1,0,0,0 script DS_HiddenNpc -1,{ OnClock1322: : OnClock23: to ordeal_1-1,0,0,0 script DS_HiddenNpc -1,{ startnpctimer; OnTimer7200000: if (!.@done){ stopnpctimer; set .@done, 1; initnpctimer; end; } set .@done,0; <the rest of script goes here> this shall do the trick. to start the counter 2 times. or, you can replace it with this instead, ordeal_1-1,0,0,0 script DS_HiddenNpc -1,{ OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: this will start the event exactly on those time listed (server time) Quote
Question
awesomazingxed
Hello everyone. Can anyone of you guys help me.
I want to set the time of my Devil Square event every 4 hours. Thanks you.
phtownall,181,167,5 script Devil Square Guardian 1708,{
mes "[Devil Square Guardian]";
mes "Welcome to the entrance door to ^FF0000Devil Square^000000";
mes "If you failed or die, the door will be closed and you have to wait until it start to open again";
next;
menu "Enter",-,"Info",L_info,"Cancel",L_cancel;
if ( $@DS_entry == 0 ) goto L_error;
if ( Baselevel < 70 || Zeny < 20000 ) goto L_req;
if ( getmapusers("ordeal_1-1") >= 150 ) goto L_toomany;
set Zeny,Zeny - 20000;
announce strcharinfo(0)+" has entered the Devil Square",8;
percentheal 100,100;
warp "ordeal_1-1",183,182;
end;
L_error:
mes "[Devil Square Guardian]";
mes "Devil Square is now closed";
mes "It'll be open again at:";
mes "15:00 and 23:00.";
close;
L_req:
mes "[Devil Square Guardian]";
mes "Minimum base level to enter is 70";
mes "The registration fee is 20,000z";
close;
L_toomany:
mes "[Devil Square Guardian]";
mes "I'm sorry but the Devil Square is FULL";
mes "Maximum users to enter is 150 players";
close;
L_info:
mes "[Devil Square Guardian]";
mes "There are 3 level monster you'll encounter";
mes "Each level the enemies will grow stronger";
mes "If you succeded to win all 3 level monster, you'll get the opportunity to open 1 Awesomazing Coin with items, equips, and rare cards inside!!";
close;
L_cancel:
mes "[Devil Square Guardian]";
mes "See ya";
close;
}
ordeal_1-1,0,0,0 script DS_HiddenNpc -1,{
OnClock1322: :
OnClock23:
set $@DS_complete,0;
disablenpc "Exit#DS";
mapannounce "ordeal_1-1","Devil Square is now closed",0;
killmonsterall "ordeal_1-1";
announce "Devil Square is OPENED NOW!! 5 Minutes until it starts..!!",0;
set $@DS_entry,1;
sleep 60000;
announce "Devil Square will begin in 4 minutes..!!",0;
sleep 60000;
announce "Devil Square will begin in 3 minutes..!!",0;
sleep 60000;
announce "Devil Square will begin in 2 minutes..!!",0;
sleep 60000;
announce "Devil Square will begin in 1 minutes..!!",0;
sleep 60000;
announce "Devil Square is STARTED NOW !!",0;
initnpctimer;
set $@DS_entry,0;
set $@mob,51;
areamonster "ordeal_1-1",183,182,246,244,"[DS] Twilight Vampire",1389,5,"DS_HiddenNpc::Ondevildead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Twilight Werewolf",1785,5,"DS_HiddenNpc::Ondevildead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Fiery",1598,20,"DS_HiddenNpc::Ondevildead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Awesomazing Guardian",1830,10,"DS_HiddenNpc::Ondevildead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Feiry Lizard",1831,10,"DS_HiddenNpc::Ondevildead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Fiery Lizard Queen",1719,1,"DS_HiddenNpc::Ondevildead";
end;
Ondevildead:
set $@mob,$@mob - 1;
if($@mob == 25) mapannounce "ordeal_1-1","Devil Square : 25 mobs to enter the 2nd round",0;
if($@mob == 5) mapannounce "ordeal_1-1","Devil Square : 5 mobs to enter 2nd round",0;
if($@mob == 0) {
mapannounce "ordeal_1-1","Devil Square will enter to 2nd round",0;
goto Ondevil2;
}
end;
Ondevil2:
atcommand "@cleanmap";
set $@mob,72;
areamonster "ordeal_1-1",183,182,246,244,"[DS] Stone Golem",2019,15,"DS_HiddenNpc::Ondevildead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Earthlings",1932,15,"DS_HiddenNpc::Ondevildead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Crystal Golem",2049,15,"DS_HiddenNpc::Ondevildead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Ancient Hunter",2074,20,"DS_HiddenNpc::Ondevildead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Earth Beast",2018,5,"DS_HiddenNpc::Ondevildead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1885,2,"DS_HiddenNpc::Ondevildead2";
end;
Ondevildead2:
set $@mob,$@mob - 1;
if($@mob == 25) mapannounce "ordeal_1-1","Devil Square : 25 mobs left to enter the 3rd round",0;
if($@mob == 5) mapannounce "ordeal_1-1","Devil Square : 5 mobs left to enter the 3rd round",0;
if($@mob == 0) {
mapannounce "ordeal_1-1","Devil Square will enter to 3rd round",0;
goto Ondevil3;
}
end;
Ondevil3:
atcommand "@cleanmap";
set $@mob,58;
areamonster "ordeal_1-1",183,182,246,244,"[DS] Yinyang Snake",1529,3,"DS_HiddenNpc::Ondevildead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Demonlings",1730,15,"DS_HiddenNpc::Ondevildead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Spirit Guardian",1921,10,"DS_HiddenNpc::Ondevildead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Soul",1599,15,"DS_HiddenNpc::Ondevildead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Illuminati",2283,5,"DS_HiddenNpc::Ondevildead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] Valentine",1708,1,"DS_HiddenNpc::Ondevildead3";
end;
Ondevildead3:
set $@mob,$@mob - 1;
if($@mob == 25) mapannounce "ordeal_1-1","Devil Square : 25 mobs left to VICTORY",0;
if($@mob == 5) mapannounce "ordeal_1-1","Devil Square : 5 mobs left to VICTORY",0;
if($@mob == 0) {
mapannounce "ordeal_1-1","Devil Square : CONGRATULATION - 10 will be yours now",0;
goto Ondevil4;
}
end;
Ondevil4:
atcommand "@cleanmap";
set $@DS_complete,1;
set $@mob,10;
monster "ordeal_1-1",231,250,"Treasure Box",1324,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",234,247,"Treasure Box",1328,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",237,244,"Treasure Box",1332,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",240,241,"Treasure Box",1336,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",243,238,"Treasure Box",1340,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",246,235,"Treasure Box",1344,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",249,232,"Treasure Box",1348,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",252,229,"Treasure Box",1352,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",249,241,"Treasure Box",1356,1,"DS_HiddenNpc::Onboxdead";
monster "ordeal_1-1",240,249,"Treasure Box",1360,1,"DS_HiddenNpc::Onboxdead";
end;
Onboxdead:
set $@mob, $@mob - 1;
announce "Devil Square : "+ strcharinfo(0) +" has opened the treasure box at Devil Square",0;
if ($@mob == 0) enablenpc "Exit#DS";
end;
OnTimer30000:
if ( $@DS_complete == 1 ) { stopnpctimer; end; }
else
if (getmapusers("ordeal_1-1") == 0) {
announce "All players failed to survive at Devil Square",0;
killmonsterall "ordeal_1-1";
stopnpctimer;
end;
} else {
mapannounce "ordeal_1-1",getmapusers("ordeal_1-1") +" players is still survive at Devil Square",0;
initnpctimer;
end;
}
}
// -- Mapflags
ordeal_1-1 mapflag nowarp
ordeal_1-1 mapflag nowarpto
ordeal_1-1 mapflag noteleport
ordeal_1-1 mapflag nosave SavePoint
ordeal_1-1 mapflag nomemo
ordeal_1-1 mapflag nobranch
ordeal_1-1 mapflag nopenalty
ordeal_1-1,246,245,7 script Exit#DS 51,{
mes "[Exit]";
mes "I'll give you 100 thousand zeny and 1 Awesomazing Coin as a prize.";
mes"Have an awesomazing day adventurer. See ya!";
zeny += 100000;
getitem 6242;
next;
warp "SavePoint",0,0;
close;
}
1 answer 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.