Lua Teleport script 1.2

jackl90

Member
Joined
Jul 25, 2017
Messages
213
Reaction score
7
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
 

Sarah Wesker

ค∂vαηcε รүηтαx ❤
Support Team
Joined
Mar 16, 2017
Messages
918
Solutions
90
Reaction score
902
Location
London
GitHub
MillhioreBT
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.
 
Top