GA
[pedido] ajuda com script

[Encerrado] [Pedido] Ajuda com Script

Por Gabrieltxu, 27 de mai. de 2013 em Tópicos Sem Resposta

resolvido
script
6
613
GabrieltxuG
27 de maio de 2013 às 18:25

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

zerefshirouZ
28 de maio de 2013 às 12:46

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

kttallanK
28 de maio de 2013 às 15:50

Gabriel Para Evitar Mais Topicos Vou Te Dizer Como Tirar a Função De Level Desse Scripter De Poke

Assim man essas config tão desativadas pela forma sem level do slicer.

 

 

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..".")

 

 

Intão Quando Vocé Ver um scripter Com isso E Vocé Quer usar No Seu Serve Remova As partes Colocadas Acima Ai Vocé Não Vai ter que criar varios topicos por causa disso pq agora vocé ja sabe obg.

GabrieltxuG
28 de maio de 2013 às 19:13

ZerefShirou Estarei testando e Obrigado por me ajudar ! jaja mando resposta

 

 

 

kttallan isso eu sei mais como falei nesse script não entendi muito oque apagar!

3 meses depois...
vital900V
04 de agosto de 2013 às 18:34

Tópico movido para a seção de dúvidas e pedidos resolvidos.

Tópico movido para a seção de dúvidas e pedidos resolvidos.

4 anos depois...
StigalS
21 de abril de 2018 às 02:57
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.