bom eu tavo querendo que quando abrir a box 0 ,1,2,3,4 etc queria que aparecesse em vermelho e que todos podessem ver oque tirou
function onUse(cid, item, frompos, item2, topos)
local box = {
[1] ={msg = "You Open a Box +1",np = "Contains a Rattata.",nm= 'Rattata'},
[2] ={msg = "You Open a Box +1",np = "Contains a Weedle.",nm= 'Weedle'},
[3] ={msg = "You Open a Box +1",np = 'Contains a Caterpie.',nm= 'Caterpie'}
}
local level = 1 -- level para usar
local e = box[math.random(1,3)]
local boxid = 2222 -- id da ball que vai ser dada ao jogador
local pk = "This is "..e.nm.."'s pokeball. HP = [1/1]"
local gender = math.random(1,3)
if getPlayerLevel(cid) >= level then
if getPlayerFreeCap(cid) <= 0.99 then
b = doCreateItemEx(cid, boxid-1, 1)
doItemSetAttribute(b, "poke", pk)
doItemSetAttribute(b, "nome", "e.nm")
doItemSetAttribute(b, "description", e.np)
doSetItemText(b, gender)
doPlayerSendMailByName(getCreatureName(cid), b,1)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,21,"You Open a Poke Box 1,Good Luck You pokeball has been sent to your depot")
else
doPlayerSendTextMessage(cid,21," You opened your Box 1 and received a "..e.nm.."")
b = doPlayerAddItem(cid, boxid, 1)
doItemSetAttribute(b, "poke", pk)
doItemSetAttribute(b, "nome", "e.nm")
doItemSetAttribute(b, "description", e.np)
doPlayerSendCancel(cid, "You must be at least level "..level.." to use this box.")
doPlayerSendTextMessage(cid,21," You opened your Box 1 and received a "..e.nm.."")
doCreatureSay(cid, "You opened your Box 1 and received a "..e.nm.."", TALKTYPE_ORANGE_1)


info
Grupo: Campones
Registrado: 01/09/11
Posts: 13
Reputação: 0
bom eu tavo querendo que quando abrir a box 0 ,1,2,3,4 etc queria que aparecesse em vermelho e que todos podessem ver oque tirou