I dont know error, not show anything on console :S
Movements:
Please help!
Movements:
Lua:
local cfg = {
level = 8,
storage = 65502,
open = {"2", "open", "openpvp"},
tpActive = {x=1354, y=1045, z=6},
tpCancel = {x=1354, y=1048, z=6},
textActive = 'Your PVP now are Actived.',
cancelText = 'You PVP is already active.'
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if not isPlayer(cid) then
return true
end
if getCreatureStorage(cid, cfg.storage) > -1 then
doPlayerSendCancel(cid, cfg.cancelText)
return true
end
if getPlayerLevel(cid) < cfg.level then
doPlayerSendCancel(cid, 'Your need level ['..cfg.level..'], for getout from city')
return true
end
if item.actionid == cfg.storage then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, cfg.textActive)
doTeleportThing(cid, cfg.tpCancel, 0)
doCreatureSetStorage(cid, cfg.storage, 1)
end
local world = getWorldType()
if(table.isStrIn(param, cfg.open)) and isPlayer(cid) then
setWorldType(WORLDTYPE_OPEN)
doTeleportThing(cid, cfg.tpActive, 0)
world = "Open PvP"
end
return true
end
Please help!
Last edited: