adric21
Well-Known Member
- Joined
- Apr 26, 2016
- Messages
- 275
- Solutions
- 1
- Reaction score
- 71
I have a problem with these scripts for version tfs 1.2 8.6
The first one does not work swimming.lua since the player when entering the sea does not change.
The second problem is when creating a teleport so that only players with level 250 can enter it does not work either.
The first one does not work swimming.lua since the player when entering the sea does not change.
Lua:
local condition = Condition(CONDITION_OUTFIT)
condition:setOutfit({lookType = 267})
condition:setTicks(-1)
function onStepIn(creature, item, position, fromPosition)
if not creature:isPlayer() then
return false
end
creature:addCondition(condition)
return true
end
function onStepOut(creature, item, position, fromPosition)
if not creature:isPlayer() then
return false
end
creature:removeCondition(CONDITION_OUTFIT)
return true
end
The second problem is when creating a teleport so that only players with level 250 can enter it does not work either.
Lua:
function onStepIn(cid, item, position, fromPosition)
local player = Player(cid)
local creature = Creature(cid)
if(item.actionid<2000 and item.actionid>1000) then
local levelReq = item.actionid-1000
if(player:getLevel() <= levelReq) then
creature:teleportTo(fromPosition, true)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to be atleast level "..levelReq.." to enter.")
return false
end
end
return true
end
Last edited by a moderator: