Ir para conteúdo

[Pokemon] Bayas System


Gabrieltxu

Posts Recomendados

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"/>
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...