Jump to content
  • 0

disable/enable warp


PiXLCAT

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  07/21/12
  • Last Seen:  

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;

}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  07/21/12
  • Last Seen:  

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