roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 200
Hi guys, how are u?
I use tfs 0.4, tibia 8.6 and have this action script...
when using the lever, all members of the party are teleported to a new position.
All must be level 100 or higher, otherwise you can not teleport anyone..
it is there that the error happens, it is teleporting those who have a level superior to 100 and not teleporting that is level inferior to 100
the correct one is: if there is any player level lower than 100 in the party, NONE should be teleported, I do not know where I went wrong, thank you!
I use tfs 0.4, tibia 8.6 and have this action script...
when using the lever, all members of the party are teleported to a new position.
All must be level 100 or higher, otherwise you can not teleport anyone..
it is there that the error happens, it is teleporting those who have a level superior to 100 and not teleporting that is level inferior to 100
the correct one is: if there is any player level lower than 100 in the party, NONE should be teleported, I do not know where I went wrong, thank you!
Code:
function onUse(cid, item, frompos, item2, topos)
local partyList = getPartyMembers(getPartyLeader(cid))
if #partyList == 4 then
for _, party in ipairs(getPartyMembers(cid)) do
if getPlayerLevel(party) < 100 then
doPlayerSendTextMessage(party, MESSAGE_INFO_DESCR, "All party member need do be at lvl 100.")
else
doTeleportThing(party, {x= 84, y= 212, z= 6})
doPlayerSendTextMessage(party, MESSAGE_INFO_DESCR, "Your team has been teleported by "..getCreatureName(cid)..".")
end
end
end
return TRUE
end