• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Teleport script 1.2

jackl90

Member
Joined
Jul 25, 2017
Messages
249
Reaction score
12
for tfs 1.2 anyone can help me?
I need a script that changes the player's current outfit entire color to just one color when he enter in teleport.
Thank you very much in advance
 
data/movements/movements.xml
XML:
<movevent event="StepIn" actionid="6666" script="script.lua" />

data/movements/scripts/script.lua
Lua:
local outfitColour = 100
local destination = Position(0, 0, 0)

function onStepIn(creature, item, pos, fromPosition)
    if not creature:isPlayer() then
        return true
    end
    creature:teleportTo(destination)
    destination:sendMagicEffect(CONST_ME_TELEPORT)
    local outfit = creature:getOutfit()
    outfit.lookFeet = outfitColour
    outfit.lookLegs = outfitColour
    outfit.lookBody = outfitColour
    outfit.lookHead = outfitColour
    creature:setOutfut(outfit)
   return true
end

You put this actionid to your teleport and it already works when you pass over it, you can even make an item or a floor your teleport just by placing this actionid is on it.
 
Back
Top