Quote:
Originally Posted by mohamad512
Hello ، First of all DON'T tell me to use HELP THREAD because my last question i had write there no one answer it !! so :
I have make a function which check the player position ( if the player in the position that i wanna or not !!)
now i wanna function that do Automatic check for the position function !!
example while i == 1 do
..but { while } make laqe !! and crash my captain !!
Hmmmm same like { Auto Notice } but not for a notice for a function and always not in Specific time !
|
Incase the players can get to that place via teleport only(NPC/Item) just write a script for a stun or something like that(I used "hold" in the script") then also insert into their inventory a scroll/bottle or anything they can pop with another function that remove the stun and check their position.
Example for the NPC function:
function Example1()
dlg_title("Your NPC title")
dlg_text("The text they will see")
dlg_menu("The name of the place","Teleport_Example()")
dlg_show()
end
Teleport function example:
function Teleport_Example()
insert_item(Your item code, 1, 0, 0, 2)
add_state(6007, 1, 86400000)
warp(coordinate X,coordinate Y)
end
Example for the item function:
function new_item()
--X and Y not have to be corner,can be only the limits you wanna check,this function check the position and warp to Horizon if needed but maybe you should add another paramater,like their level.
if (gv("x")>coordinate X(corner) and gv("x")<coordinate X(another corner) and gv("y")>coordinate Y(corner) and gv("y")<coordinate Y(another cornet) then
remove_state(6007, get_state_level(6007))
warp(152465, 76951) -- Teleport to Horizon
else
remove_state(6007, get_state_level(6007))
end
end
Hope I helped you