Ir para conteúdo

[Encerrado] [PEDIDO] Ao matar tal monstro recebe item na bag!


HenrikDiamond

Posts Recomendados

Olá amigoos! Gostaria desse script pro meu poketibia 2.9 versao do slicer, Seria um Script (creio que é uma creatureevent) que toda vez que o player matar tal pokemon Shiny, recebesse uma Shiny Stone na Bag! Shiny Stone = 11454!

 

Espero que me ajudem

Link para o comentário
Compartilhar em outros sites

Aki \/

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Shiny Tropius" nameDescription="a shiny tropius" race="grass" experience="0" speed="160" manacost="0">
<health now="40" max="40"/>
<look type="1504" head="90" body="105" legs="95" feet="113" corpse="12680"/>
<targetchange interval="10000" chance="0"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="1"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag passive="1"/>
<flag illusionable="1"/>
<flag convinceable="1"/>
<flag pushable="1"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
<flag hungerdelay="15"/>
</flags>
<attacks>
<attack name="melee" interval="2000" chance="100" range="1" min="-35" max="-60"/>
<attack name="Quick Attack" interval="2852" chance="29" range="1"/>
<attack name="Razor Leaf" interval="2758" chance="30" range="4"/>
<attack name="Slash" interval="2993" chance="28" range="6"/>
<attack name="Vine Whip" interval="2711" chance="30" range="1"/>
<attack name="Headbutt" interval="3557" chance="25" range="4"/>
<attack name="Leech Seed" interval="4779" chance="17" range="6"/>
<attack name="Bullet Seed" interval="5766" chance="18" range="6"/>
<attack name="Solar Beam" interval="4497" chance="21" range="6"/>
</attacks>
<defenses armor="0" defense="0">
</defenses>
<voices interval="5000" chance="10">
<voice sentence="Trooo!"/>
<voice sentence="PIUSS!"/>
<voice sentence="TROPIUS!"/>
</voices>
<loot>
<item id="12163" chance="1000" countmax="50"/>
<item id="11454" chance="1000" count="1" countmax="3"/>
<item id="12155" chance="5000" count="1" countmax="1"/>
<item id="12153" chance="5000" count="1" countmax="1"/>
<item id="12779" chance="50" countmax="50"/>
<item id="12778" chance="25" countmax="50"/>
<item id="12785" chance="5" countmax="50"/>
</loot>
<script>
<event name="Spawn"/>
</script>
</monster>

 

 

Link para o comentário
Compartilhar em outros sites

Monstro:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Shiny Tropius" nameDescription="a shiny tropius" race="grass" experience="0" speed="160" manacost="0">
  <health now="40" max="40"/>
  <look type="1504" head="90" body="105" legs="95" feet="113" corpse="12680"/>
<targetchange interval="10000" chance="0"/>
<strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag passive="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="1"/>
    <flag canpushitems="0"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
   <flag hungerdelay="15"/>
</flags>
  <attacks>
   <attack name="melee" interval="2000" chance="100" range="1" min="-35" max="-60"/> 
        <attack name="Quick Attack" interval="2852" chance="29" range="1"/>
        <attack name="Razor Leaf" interval="2758" chance="30" range="4"/>
        <attack name="Slash" interval="2993" chance="28" range="6"/>
        <attack name="Vine Whip" interval="2711" chance="30" range="1"/>
        <attack name="Headbutt" interval="3557" chance="25" range="4"/>
        <attack name="Leech Seed" interval="4779" chance="17" range="6"/>
        <attack name="Bullet Seed" interval="5766" chance="18" range="6"/>
        <attack name="Solar Beam" interval="4497" chance="21" range="6"/>
  </attacks>
  <defenses armor="0" defense="0">
  </defenses>
  <voices interval="5000" chance="10">
<voice sentence="Trooo!"/>
<voice sentence="PIUSS!"/>
<voice sentence="TROPIUS!"/>
  </voices>
  <loot>
        <item id="12163" chance="1000" countmax="50"/>
        <item id="11454" chance="1000" count="1" countmax="3"/>
        <item id="12155" chance="5000" count="1" countmax="1"/>
        <item id="12153" chance="5000" count="1" countmax="1"/>
      <item id="12779" chance="50" countmax="50"/>
  <item id="12778" chance="25" countmax="50"/>
  <item id="12785" chance="5" countmax="50"/>
  </loot>
<script>
<event name="Spawn"/>
<event name="ItemShiny"/>
</script>
</monster>

[/code]

 

 

Creaturescripts:


<event type="kill" name="ItemShiny" event="script" value="ItemShiny.lua"/>

ItemShiny.lua:

function onKill(cid, target, damage, flags)
doPlayerAddItem(uid, 11454)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, Você acabou de ganhar uma Shiny Stone)
end

Ache o login.lua e registre o evento:

registerCreatureEvent(cid, "ItemShiny")
Editado por Techrlz
Link para o comentário
Compartilhar em outros sites

Parece q vai dar certinho mas ta dando erro na distro:

 

[30/03/2014 16:17:17] Reloaded creature events.
[30/03/2014 16:17:36] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/ItemShiny.lua:3: ')' expected near 'acabou'
[30/03/2014 16:17:36] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/ItemShiny.lua)
[30/03/2014 16:17:36] data/creaturescripts/scripts/ItemShiny.lua:3: ')' expected near 'acabou'

 

--Edit

 

Retirei a mensagem e parou de dar erro. Mas ai quando o poke vai pra morrer, ele fica la parado sem vida e nao para de aparecer isso aki la

 

 

[30/03/2014 16:20:41] [Error - CreatureScript Interface]
[30/03/2014 16:20:41] data/creaturescripts/scripts/ItemShiny.lua:onKill
[30/03/2014 16:20:41] Description:
[30/03/2014 16:20:41] (luaDoPlayerAddItem) Player not found

Editado por HenrikDiamond
Link para o comentário
Compartilhar em outros sites

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, Você acabou de ganhar uma Shiny Stone)

 

por

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você acabou de ganhar uma Shiny Stone")
Link para o comentário
Compartilhar em outros sites

Mas quando o pokemon vai pra morrer, fica dando um erro que nao acaba mais..

 

\/

[30/03/2014 16:20:41] [Error - CreatureScript Interface]
[30/03/2014 16:20:41] data/creaturescripts/scripts/ItemShiny.lua:onKill
[30/03/2014 16:20:41] Description:
[30/03/2014 16:20:41] (luaDoPlayerAddItem) Player not found

Link para o comentário
Compartilhar em outros sites

local pokes = {"Shiny Rattata", "Shiny Alakazam"}

function onKill(cid, target, damage, flags)

if isInArray(pokes, getCreatureName(target)) then

doPlayerAddItem(cid, 11454, 1)

doPlayerSendTextMessage(cid, 27, Você acabou de ganhar uma Shiny Stone)

end

end

 

 

 

Troca o teu script por este ai.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...