function onUse(cid, item, frompos, item2, topos)
local price = 900000
local outfit_male = {lookType=309,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0}
local outfit_female = {lookType=310,lookHead=0,lookAddons=0,lookLegs=0,lokBody=0,lookFeet=0}
local time = 1 -- em minutos
local storage = getPlayerStorageValue(cid,52525) -- n mexa
local male = 309
local female = 310 -- ?
local addon = 1
if storage == -1 then
if(doPlayerRemoveMoney(cid,price) == TRUE) then
if(getPlayerSex(cid) == 1) then
doPlayerAddOutfit(cid, male, addon)
doSetCreatureOutfit(cid, outfit_male, time*60*1000)
doPlayerSetStorageValue(cid,52525,1)
doPlayerSendTextMessage (cid, 22, 'Traje especial comprado! Você perdeu 90 crystal coins')
elseif(getPlayerSex(cid) == 0) then
doPlayerAddOutfit(cid, female, addon)
doSetCreatureOutfit(cid, outfit_female, time*60*1000)
doPlayerSetStorageValue(cid,52525,1)
doPlayerSendTextMessage (cid, 22, 'Traje especial comprado! Você perdeu 90 crystal coins')
end
else
doPlayerSendTextMessage (cid, 22, 'Você não tem dinheiro suficiente para comprar o traje, 90 crystal coins')
end
else
doPlayerSendTextMessage (cid, 22, 'Você já possui essa outfit')
end
return TRUE
end
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

Editado Julho 11 por Vodkart
info
Grupo: Conde
Registrado: 30/01/10
Posts: 706
Reputação: +125
Gênero: Masculino
Char no Tibia: Bakwin

Vodkart Tu Erro uma Coisinha ali no Script
function onUse(cid, item, frompos, item2, topos)
local price = 90000
local outfit = {lookType=309,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0}
local time = 9 -- em minutos
local storage = getPlayerStorageValue(cid,11545) -- n mexa
if storage == -1 then
if(doPlayerRemoveMoney(cid,price) == TRUE) then
doPlayerAddOutfit(cid,309, 0)
doSetCreatureOutfit(cid, outfit, time*60*1000)
doPlayerSetStorageValue(cid,52525,1)
doPlayerSendTextMessage (cid, 22, 'Traje especial comprado! Você perdeu 90 crystal coins')
else
doPlayerSendTextMessage (cid, 22, 'Você não tem dinheiro suficiente para comprar o traje, 90 crystal coins')
end
else
doPlayerSendTextMessage (cid, 22, 'Você já possui essa outfit')
end
end
Algumas Letras Estavao Separadas!
Abraços
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

só uma dúvida essa outfit é de monstro?
arrumei la o script
qualquer coisa se for de monstro tira a parte do storage ![]()
ficando assim
function onUse(cid, item, frompos, item2, topos)
local price = 900000
local outfit= {lookType=309,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0}
local time = 9 -- em minutos
local addon = 1
if(doPlayerRemoveMoney(cid,price) == TRUE) then
doPlayerAddOutfit(cid, outfit, addon)
doSetCreatureOutfit(cid, outfit, time*60*1000)
doPlayerSendTextMessage (cid, 22, 'Traje especial comprado! Você perdeu ' .. price .. ' ')
else
doPlayerSendTextMessage (cid, 22, 'Você não tem dinheiro suficiente para comprar o traje, ' .. price .. ' ')
end
return TRUE
end
Editado Julho 11 por Vodkart
info
Grupo: Conde
Registrado: 30/01/10
Posts: 706
Reputação: +125
Gênero: Masculino
Char no Tibia: Bakwin

Eu Acho Bem Melhor com Storage Value , Se nao o Cara Desloga , Vai la e Pega Denovo , Ficando Chato! Bom so Minha Opniao!!
Abraços!
info
Grupo: Herói
Registrado: 17/02/08
Posts: 2.5k
Reputação: +193

Sanado - movido.


info
Grupo: Campones
Registrado: 29/04/07
Posts: 57
Reputação: +1
Char no Tibia: Careta Feia
Bem, ja tetei d etudo, mas não consegui, olha meu script:
Kero que ele vista o outfit, e de preferecnia fique salvado, pra depois ele poder por denovo! Se não por ele no traje só.