• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Lua Teleport script 1.2

jackl90

Member
Joined
Jul 25, 2017
Messages
235
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
 

Sarah Wesker

ค∂vαηcε รүηтαx ❤
Support Team
Joined
Mar 16, 2017
Messages
1,177
Solutions
126
Reaction score
1,441
Location
London
GitHub
MillhioreBT
Twitch
millhiore_bt
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