Hi guys!! I found a script for hunting rooms here at otland. But it wasnt exacly as I wanted. Now its working like this: Go at x square, teleports you into the room, after 30 min you automatically tps out. But I want to have an "item required tp", so you need for example 1cc to go into the room. Here is the movement script for the enter square:
Thanks!!
PHP:
function onStepIn(cid, item, pos, fromPosition)
local storage_global = 16591 -- whenever the next room you need to change the value!
if getGlobalStorageValue(storage_global) == -1 then
doPlayerSendTextMessage(cid, 25, 'You have 30 minutes in the hunting room.')
setGlobalStorageValue(storage_global, 1)
doTeleportThing(cid, {x=33134, y=32970, z=6}) -- Position sqm see picture (welcome)
return addEvent(function()
if isPlayer(cid) and getGlobalStorageValue(storage_global) == 1 then
doTeleportThing(cid, {x=33134, y=32976, z=6}) -- Position sqm see picture (end exp)
doPlayerSendTextMessage(cid, 25, 'Your time is over.')
return setGlobalStorageValue(storage_global, -1)
end end,
1 * 60 * 1000, -- How long exp
cid, storage_global)
else
doTeleportThing(cid, fromPosition)
return doPlayerSendTextMessage(cid, 25, 'Ktos juz sie znajduje w roomie lub nie posiadasz Vip Coin!')
end
return true
end
Thanks!!