Bem deve ser isso:
local cost = 75000
local coins = 23254
local btype = "normal"
function onUse(cid, item, frompos, item2, topos)
local pokemon = ""
if item.uid == nil then return true end
if getPlayerStorageValue(cid, coins) < cost then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont have enough cassino coins, you need "..cost.." coins.")
return true
end
if getPlayerMana(cid) >= 6 then
return doPlayerSendCancel(cid, "You don't have capacity for your prize!")
end
if item.actionid == 22420 then
pokemon = "Porygon"
elseif item.actionid == 22421 then
pokemon = "Chansey"
elseif item.actionid == 22422 then
pokemon = "Ditto"
else
return true
end
if pokemon == "" then return true end
local gender = getRandomGenderByName(pokemon)
if not mypoke then return true end
addPokeToPlayer(cid, pokemon, 0, gender, btype)
doPlayerSendTextMessage(cid, 27, "You choose a "..pokemon..".")
setPlayerStorageValue(cid, 23254, getPlayerStorageValue(cid, 23254) - cost)
doSendMagicEffect(getThingPos(cid), 29)
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
Se não pegar posta os erros ai ou caso não seja oque você quer só falar







info
Grupo: Herói
Registrado: 12/06/12
Posts: 2.2k
Reputação: +739
Gênero: Masculino
Char no Tibia: Supreme Player
Bom galera como varios sabem não manjo dus Scripts mais então eu precisava de uma ajuda nesse aqui que eu tenho!
Tipo ele faz o Seguinte! : se tem la Exemplo: 1k de coins no casino ai se quer usar eles para compara um pokemon ai se clica no bau que tem a action para o Pokemon escolido etc...
ai nesse meu System esta para Server com lvl eu precisava tirar e não sei como Posso tirar para deixar para server sem lvl ! Uso PDA By Slicer 1.9.1!
então ai vai o Script! \/
local level = 40
local extrastr = 1
local cost = 75000
local coins = 23254
local btype = "normal"
function onUse(cid, item, frompos, item2, topos)
local pokemon = ""
if item.uid == nil then return true end
if item.actionid == 22420 then
pokemon = "Porygon"
elseif item.actionid == 22421 then
pokemon = "Chansey"
elseif item.actionid == 22422 then
pokemon = "Ditto"
else
return true
end
if getPlayerStorageValue(cid, coins) < cost then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont have enough cassino coins, you need 75000 coins.")
return true
end
if getPlayerMana(cid) >= 6 then
return doPlayerSendCancel(cid, "You don't have capacity for your prize!")
end
if pokemon == "" then return true end
local gender = getRandomGenderByName(pokemon)
local mypoke = getPokemonStatus(pokemon)
if not mypoke then return true end
local offense = mypoke.off * level * extrastr
local defense = mypoke.def * level * extrastr
local speed = mypoke.agi * level * extrastr
local vit = mypoke.vit * level * extrastr
local spatk = mypoke.spatk * level * extrastr
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "level", level)
doItemSetAttribute(item, "exp", leveltable[level])
doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, pokeballs[btype].on)
doPlayerSendTextMessage(cid, 27, "You choose a "..pokemon..".")
setPlayerStorageValue(cid, 23254, getPlayerStorageValue(cid, 23254) - 75000)
doSendMagicEffect(getThingPos(cid), 29)
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
é isso só preciso da Ajuda para deixar esse Script para o PDA sem lvl do Slicer! xD 2rep++ para quem me ajudar