jigsgfx Posted December 20, 2012 Posted December 20, 2012 (edited) hi, i have this pvp warper script.. and i want it to set autohide or disable every 14:00 and enable again @ 16:00 same with the duplicate npcs .. i tried to add code using enable and disable but its not working with no error on my SSH.. please correct me if i did wrong.. here's the script thanks in advance to those who will help me turbo_room,87,117,6 script PVP Warper 470,{ mes "[Pvp Warper]"; mes "Would You Like Join sRO Pvp Arena"; next; menu "PvP Arena",Arena,"Cancel",Cancel; Arena: mes "[Pvp Warper]"; mes "Are You Ready?"; next; mes "Let Go!!"; next; warp "guild_vs5",0,0; L_All: announce "[Pvp Warper]: "+strcharinfo(0)+" Has Enter Pvp Arena come and Kill him!",bc_all,0xFF9500; close; Cancel: mes "[Pvp Warper]"; mes "Wah !! So Fast u're Surrender"; next; mes "See You Again"; next; emotion e_pif; close; OnClock1600: enablenpc "PVP Warper"; end; OnInit: OnClock1400: disablenpc "PVP Warper"; end; } prontera.gat,151,187,4 duplicate(PVP Warper) PVP Warper#p1-1 469 morocc.gat,159,97,4 duplicate(PVP Warper) PVP Warper#p1-2 469 geffen.gat,111,63,4 duplicate(PVP Warper) PVP Warper#p1-3 469 geffen.gat,111,63,4 duplicate(PVP Warper) PVP Warper#p1-4 469 payon.gat,169,229,4 duplicate(PVP Warper) PVP Warper#p1-5 469 alberta.gat,188,149,4 duplicate(PVP Warper) PVP Warper#p1-6 469 izlude.gat,138,110,4 duplicate(PVP Warper) PVP Warper#p1-7 469 aldebaran.gat,144,123,4 duplicate(PVP Warper) PVP Warper#p1-8 469 xmas.gat,142,126,4 duplicate(PVP Warper) PVP Warper#p1-9 469 comodo.gat,207,152,4 duplicate(PVP Warper) PVP Warper#p1-10 469 hugel.gat,102,149,4 duplicate(PVP Warper) PVP Warper#p1-11 469 Edited December 20, 2012 by jigsgfx Quote
mleo1 Posted December 20, 2012 Posted December 20, 2012 [b]OnInit:[/b] [b]OnClock1400:[/b] [b]disablenpc "PVP Warper";[/b] OnInit it will disable. try to remove oninit Quote
Joseph Posted December 20, 2012 Posted December 20, 2012 You can add a check under OnInit to see if the time is within 14:00-16:00. OnInit: .@hour = gettime(3); if (.@hour >= 14 && .@hour < 16) disablenpc strnpcinfo(0); else enablenpc strnpcinfo(0); end; OnClock1400: disablenpc strnpcinfo(0); end; OnClock16000: enablenpc strnpcinfo(0); end; Quote
jigsgfx Posted December 20, 2012 Author Posted December 20, 2012 (edited) thanks guys ill try this out.. btw will it disable also the duplicate npcs? Edited December 20, 2012 by jigsgfx Quote
Joseph Posted December 20, 2012 Posted December 20, 2012 Use strnpcinfo(0) instead of specifying the NPC name as each NPC has different name (hidden name). OnInit: .@hour = gettime(3); if (.@hour >= 14 && .@hour < 16) disablenpc strnpcinfo(0); else enablenpc strnpcinfo(0); end; OnClock1400: disablenpc strnpcinfo(0); end; OnClock16000: enablenpc strnpcinfo(0); end; Quote
jigsgfx Posted December 21, 2012 Author Posted December 21, 2012 i see thanks, it work like a charm Quote
Question
jigsgfx
hi, i have this pvp warper script.. and i want it to set autohide or disable every 14:00 and enable again @ 16:00 same with the duplicate npcs ..
i tried to add code using enable and disable but its not working with no error on my SSH..
please correct me if i did wrong..
here's the script thanks in advance to those who will help me
Edited by jigsgfx5 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.