Jump to content
  • 0

disable/enable warp


Question

Posted

Hello, I have a script in the works but I am stumped on how to make a warp appear/disappear depending on OnClock. I am trying to make the warp appear when the event start and vice versa. Can anyone lead me on the right track? Thanks a lot. ^^

PS: I know the script isn't much right now. DX

prontera,219,181,0 script Secret Warp::secret_warp -1,{
end;

OnClock1210:
announce "The Lucky Chest mini-game has started! Have fun!",bc_all,0xFFFF00;
end;

OnClock1213:
announce "The Lucky Chest mini-game has ended! Thank you for playing!",bc_all,0xFFFF00;
end;

}

2 answers to this question

Recommended Posts

Posted

move the NPC to a "hidden" location or any place that player cant reach.....

OnClock1210:
movenpc strnpcinfo(0),219,181;
end;


OnClock1213:
movenpc strnpcinfo(0),1,1; // Coordinate (1,1) is unreachable by default...
end;

Posted (edited)

Well, I found another way of doing it. Here is the script:


//=====================NPC: WARP POINT====================
prontera,219,181,0 warp gamewarp 2,2,prt_in,240,139


//===================NPC: SECRET WARP=====================
prontera,219,181,0 script Secret Warp::secret_warp -1,{
end;

OnInit:
disablenpc "gamewarp";
end;

OnClock1052:
announce "The Lucky Chest mini-game has started! Have fun!",bc_all,0xFFFF00;
enablenpc "gamewarp";
end;

OnClock1054:
announce "The Lucky Chest mini-game has ended! Thank you for playing!",bc_all,0xFFFF00;
disablenpc "gamewarp";
end;
}

It works and does what I want but if someone knows that this sort of script might give me problems if for example, there's a server reboot, please let me know.

Edited by PiXLCAT

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...