GA
action

[Pokemon] Bayas System

Por Gabrieltxu, 04 de jul. de 2013 em Actions e Talkactions

bayas system
script
5
1.8k
GabrieltxuG
04 de julho de 2013 às 18:03

Fala ai galerinha ! Esse Sistema é Igual do GBA

São bayas onde cada uma faz uma função.

Exemplo uma Aspear Berry

Tira o Efeito Freeze do Pokemon.

Vo postar 6 Sistemas das berry .

 

Aspear Berry:

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) then return true end
if not isSummon(item2.uid) then doPlayerSendCancel(cid, "This berry can only be used on pokémons.") return true end
if not doAdvancedConfuse(item2.uid) then doPlayerSendCancel(cid, "This pokémon is not under the frezee effects.") return true end
doCureStatus(getThingPos(item2.uid), "confuse", false)
doSendMagicEffect(getThingPos(item2.uid), 14)
doRemoveItem(item.uid, 1)

return true
end

 

 

Cheri Berry:

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) then return true end
if not isSummon(item2.uid) then doPlayerSendCancel(cid, "This berry can only be used on pokémons.") return true end
if not doAdvancedConfuse(item2.uid) then doPlayerSendCancel(cid, "This pokémon is not paralized.") return true end
doCureStatus(getThingPos(item2.uid), "confuse", false)
doSendMagicEffect(getThingPos(item2.uid), 14)
doRemoveItem(item.uid, 1)

return true
end

 

 

Chesto Berry:

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) then return true end
if not isSummon(item2.uid) then doPlayerSendCancel(cid, "This berry can only be used on pokémons.") return true end
if not isSleeping(item2.uid) then doPlayerSendCancel(cid, "This pokémon is not under the sleep effects.") return true end
doCureStatus(getThingPos(item2.uid), "sleep", false)
doSendMagicEffect(getThingPos(item2.uid), 14)
doRemoveItem(item.uid, 1)

return true
end

 

 

Leppa Berry:

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) then return true end
if not isSummon(item2.uid) then doPlayerSendCancel(cid, "This berry can only be used on pokémons.") return true end
doCreatureAddHealth(getThingPos(cid), 4000)
doSendMagicEffect(getThingPos(item2.uid), 14)
doRemoveItem(item.uid, 1)
return true
end

 

 

Lum Berry:

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) then return true end
if not isSummon(item2.uid) then doPlayerSendCancel(cid, "This berry can only be used on pokémons.") return true end
if not doAdvancedConfuse(item2.uid) then doPlayerSendCancel(cid, "This pokémon is not paralized.") return true end
doCureStatus(getThingPos(item2.uid), "all", false)
doSendMagicEffect(getThingPos(item2.uid), 14)
doRemoveItem(item.uid, 1)

return true
end

 

 

Pecha Berry:

 

function onUse(cid, item, frompos, item2, topos)

if not isCreature(item2.uid) then return true end
if not isSummon(item2.uid) then doPlayerSendCancel(cid, "This berry can only be used on pokémons.") return true end
if not isPoisoned(item2.uid) then doPlayerSendCancel(cid, "This pokémon is not poisoned.") return true end
doCureStatus(getThingPos(item2.uid), "poison", false)
doSendMagicEffect(getThingPos(item2.uid), 14)
doRemoveItem(item.uid, 1)

return true
end

 

 

 

Depois Só adicionar essas tags no action.xml

<!-- Bayas -->
    <action itemid="xxx" event="script" value="Bayas/Cheri Berry.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="xxx" event="script" value="Bayas/Chesto Berry.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="xxx" event="script" value="Bayas/Pecha Berry.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="xxx" event="script" value="Bayas/Aspear Berry.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="xxx" event="script" value="Bayas/Leppa Berry.lua" allowfaruse="1" blockwalls="1"/>
    <action itemid="xxx" event="script" value="Bayas/Lum Berry.lua" allowfaruse="1" blockwalls="1"/>
kttallanK
04 de julho de 2013 às 18:12

Muito fods gabriel 6x reps por kd actions muhahahha

GabrieltxuG
04 de julho de 2013 às 18:16

haha Gogo Testa ai Lembrando que a Leppa Berry:

ela da um Pouco de vida ao Pokemon meio que uma Potion u.u

felipex521F
06 de julho de 2013 às 14:38

Mas, quais são os Itens utilizados? Tipo, a ID, é minha escolha?

GabrieltxuG
06 de julho de 2013 às 14:41

Sim Só vc arrumar na tag o ID