Jump to content
  • 0

Make auto hide PVP NPC


jigsgfx

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

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



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 by jigsgfx
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  123
  • Reputation:   4
  • Joined:  11/21/11
  • Last Seen:  

[b]OnInit:[/b]
[b]OnClock1400:[/b]
[b]disablenpc "PVP Warper";[/b]

OnInit it will disable.

try to remove oninit

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

thanks guys ill try this out.. /no1

btw will it disable also the duplicate npcs?

Edited by jigsgfx
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

i see thanks, it work like a charm :D/no1

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