• 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 when you step on the floor activate the lua function

Sr.Taco

Member
Joined
Jul 9, 2015
Messages
21
Reaction score
8
Hi, does anyone know how to activate the function
Lua:
 doPlayerSendOutfitWindow(cid)
when stepping on a tile
sorry for my English
 
Solution
Remember to change the item ID (below) and give the tile an action ID (in map editor):

movements.xml
Code:
<movevent type="StepIn" itemid="0000" event="script" value="script.lua"/>

script.lua
Lua:
local action = 12345
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition)
    if not isPlayer(cid) or isPlayerGhost(cid) then
        return true
    end

    if item.actionid == action then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end
I have an idea that could be like this

but it does nothing
😅😓
Code:
<movevent type="StepIn" fromid="36663" toid="14874" event="script" value="doout.lua"/>
    <movevent type="StepOut" fromid="36663" toid="14874" event="script" value="doout.lua"/>

Lua:
function onStepIn(cid, position, fromPosition)
     doPlayerSendOutfitWindow(cid)
end

function onStepOut(cid, position, fromPosition)
 doPlayerSendOutfitWindow(cid)
end
 

try this

Lua:
function onStepIn(cid, item, position, fromPosition)
    if(item.actionid > xxx and item.actionid < xxx) then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end

also you can try this

Lua:
function onStepIn(cid, item, position, fromPosition)
    ifitem.actionid == xxxx then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end
 
Remember to change the item ID (below) and give the tile an action ID (in map editor):

movements.xml
Code:
<movevent type="StepIn" itemid="0000" event="script" value="script.lua"/>

script.lua
Lua:
local action = 12345
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition)
    if not isPlayer(cid) or isPlayerGhost(cid) then
        return true
    end

    if item.actionid == action then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end
 
Solution
try this

Lua:
function onStepIn(cid, item, position, fromPosition)
    if(item.actionid > xxx and item.actionid < xxx) then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end

also you can try this

Lua:
function onStepIn(cid, item, position, fromPosition)
    ifitem.actionid == xxxx then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end

try both and it didn't give me the function, but thank you very much 🙌

Remember to change the item ID (below) and give the tile an action ID (in map editor):

movements.xml
Code:
<movevent type="StepIn" itemid="0000" event="script" value="script.lua"/>

script.lua
Lua:
local action = 12345
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition)
    if not isPlayer(cid) or isPlayerGhost(cid) then
        return true
    end

    if item.actionid == action then
        doPlayerSendOutfitWindow(cid)
    end
    return true
end

thanks man it worked again thank you very much 🙌
 
Back
Top