• 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!

Teleport that reset outfit

Morcega Negra

Banned User
Joined
Aug 4, 2015
Messages
102
Solutions
1
Reaction score
8
This code works, the only problem is that female chars resets for male outfit
help?

Code:
local npos = {x=32360, y=31784, z=8} --- posição para onde sera teleportado
function onStepIn(cid, item, position, fromPosition, toPosition)
if not isPremium(cid) then
doTeleportThing(cid, npos)
doSendMagicEffect(npos,10)
outfit = {lookType = 128, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
        doCreatureChangeOutfit(cid, outfit)
else

end
return true
end
 
maby make an if statement to check if the player is male or female, then change looktype 128 to 136, or something

try this:

Code:
local config = {
    male = 1,
    female = 0,
    npos = {x = 32360, y = 31784, z = 8}
}

function onStepIn(cid, item, position, fromPosition, toPosition)
    if not isPremium(cid) then
        if getPlayerSex(cid) == config.male then
            outfit = {lookType = 128, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
        else
            outfit = {lookType = 136, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
        end

        doTeleportThing(cid, config.npos)
        doSendMagicEffect(config.npos,10)
        doCreatureChangeOutfit(cid, outfit)
    end

    return true
end
 
Last edited by a moderator:
Try this, havent coded in a while so u might get an error.
Code:
local npos = {x=32360, y=31784, z=8} --- posição para onde sera teleportado
function onStepIn(cid, item, position, fromPosition, toPosition)
if not isPremium(cid) then
doTeleportThing(cid, npos)
doSendMagicEffect(npos,10)
outfitmale = {lookType = 128, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
outfitfemale = {lookType = 136, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
if getPlayerSex(cid) == 1 then
        doCreatureChangeOutfit(cid, outfitmale)
        else
        doCreatureChangeOutfit(cid, outfitfemale)
end   
else

end
return true
end
 
maby make an if statement to check if the player is male or female, then change looktype 128 to 136, or something

try this:

Code:
local config = {
    male = 1,
    female = 0,
    npos = {x = 32360, y = 31784, z = 8}
}

function onStepIn(cid, item, position, fromPosition, toPosition)
    if not isPremium(cid) then
        if getPlayerSex(cid) == config.male then
            outfit = {lookType = 128, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
        else
            outfit = {lookType = 136, lookHead = 78, lookAddons = 0, lookLegs = 39, lookBody = 68, lookFeet = 76}
        end

        doTeleportThing(cid, config.npos)
        doSendMagicEffect(config.npos,10)
        doCreatureChangeOutfit(cid, outfit)
    end

    return true
end
WORK thanks!
 
Back
Top