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

Solved Problem with Save outfit

Seumion

★ Spell Maker & Mapper ★
Joined
Feb 24, 2015
Messages
172
Reaction score
2
hello otland i have problem in my script when i click on lever it gave me an outfit but if i logout it won't save
 
nice the way you think that we will guess how your script looks like and which engine you are using, you are a very very very very very smart person :)
 
can u edit here is my script
Code:
    local cfg = {
        cost = 300,
        id = 2157
    }
local ids = {192, 26 ,200 ,77 ,198 ,62 ,60 ,120 ,15 } -- put there ids of your outfits
function onUse(cid, item, frompos, item2, topos)
if(getPlayerItemCount(cid, cfg.id) >= cfg.cost) then
doPlayerRemoveItem(cid, cfg.id, cfg.cost)
local outfit = {lookType = ids[math.random(#ids)]}
    return doSetCreatureOutfit(cid, outfit)
    else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven't got enough gold nuggets for this outfit.")
end
end
 
and here you want
Code:
    local cfg = {
        cost = 300,
        id = 2157
    }
local ids = {192, 26 ,200 ,77 ,198 ,62 ,60 ,120 ,15 } -- put there ids of your outfits
function onUse(cid, item, frompos, item2, topos)
if(getPlayerItemCount(cid, cfg.id) >= cfg.cost) then
doPlayerRemoveItem(cid, cfg.id, cfg.cost)
local outfit = {lookType = ids[math.random(#ids)]}
    return doCreatureChangeOutfit(cid, outfit)
    else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven't got enough gold nuggets for this outfit.")
end
end


just change

Code:
return doSetCreatureOutfit(cid, outfit)

to

Code:
return doCreatureChangeOutfit(cid, outfit)
 
and here you want
Code:
    local cfg = {
        cost = 300,
        id = 2157
    }
local ids = {192, 26 ,200 ,77 ,198 ,62 ,60 ,120 ,15 } -- put there ids of your outfits
function onUse(cid, item, frompos, item2, topos)
if(getPlayerItemCount(cid, cfg.id) >= cfg.cost) then
doPlayerRemoveItem(cid, cfg.id, cfg.cost)
local outfit = {lookType = ids[math.random(#ids)]}
    return doCreatureChangeOutfit(cid, outfit)
    else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven't got enough gold nuggets for this outfit.")
end
end


just change

Code:
return doSetCreatureOutfit(cid, outfit)

to

Code:
return doCreatureChangeOutfit(cid, outfit)
thanks bro
 
Back
Top