coloquei assim e nao deu certo ainda no caso onde e o id da outfit seria o look type da outfit ?
function onUse(cid, item, fromPosition, itemEx, toPosition)
local outid = getCreatureOutfit(cid)
local store = getPlayerStorageValue(cid, 5030) -- um valor qualquer
if store < 0 then
doPlayerSetStorageValue(uid, 5030, outid) -- o mesmo valor qualquer
doCreatureChangeOutfit(cid, 1857) -- id do novo outfit
else
doPlayerSetStorageValue(uid, 5030, -1) -- o mesmo valor qualquer
doCreatureChangeOutfit(cid, store)
end
return true
end
7 minutos atrás, felippe reine disse:
coloquei assim e nao deu certo ainda no caso onde e o id da outfit seria o look type da outfit ?
function onUse(cid, item, fromPosition, itemEx, toPosition)
local outid = getCreatureOutfit(cid)
local store = getPlayerStorageValue(cid, 5030) -- um valor qualquer
if store < 0 then
doPlayerSetStorageValue(uid, 5030, outid) -- o mesmo valor qualquer
doCreatureChangeOutfit(cid, 1857) -- id do novo outfit
else
doPlayerSetStorageValue(uid, 5030, -1) -- o mesmo valor qualquer
doCreatureChangeOutfit(cid, store)
end
return true
end
para ficar mais facil esse seria o o script da costume bag que tranforma em um monstro teria como editar ele ja resolveria o problema esse tranforma vc em um montro por 5 minutos e o item desaparece teria como transforma o player em uma criatura ao clicar no item e ao clicar denovo ele voltasse a outfit normal que estava antes e o item nao sumir ?
local config = {
[7737] = {'orc warrior', 'pirate cutthroat', 'dworc voodoomaster', 'dwarf guard', 'minotaur mage', 'ogre shaman', 'ogre brute', 'rat'}, -- common
[7739] = {'serpent spawn', 'demon', 'juggernaut', 'behemoth', 'ashmunrah', 'vexclaw', 'grimeleech', 'hellflayer', 'black sheep'}, -- uncommon
[9076] = {'quara hydromancer', 'diabolic imp', 'banshee', 'frost giant', 'lich', 'vexclaw', 'grimeleech', 'hellflayer', 'ogre shaman', 'ogre brute', 'pig'} -- deluxe
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local monsterNames = config[item.itemid]
if not monsterNames then
return true
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, 'You will stay 5 minutes transformed in a monster!')
doSetMonsterOutfit(player, monsterNames[math.random(#monsterNames)], 300 * 1000)
player:addAchievementProgress('Masquerader', 100)
item:getPosition():sendMagicEffect(36)
item:remove()
return true
end
3 horas atrás, Poccnn disse:
local outid = getCreatureOutfit(cid)
local store = getPlayerStorageValue(cid,10000) -- um valor qualquer
if store < 0 then
doPlayerSetStorageValue(uid, 10000, outid) -- o mesmo valor qualquer
doCreatureChangeOutfit(cid, newoutfitID) -- id do novo outfit
else
doPlayerSetStorageValue(uid, 10000, -1) -- o mesmo valor qualquer
doCreatureChangeOutfit(cid, store)
end
independente da collor que o player use, ela vai mudar o outfit apenas.
????