Ir para conteúdo

Pergunta

Olá Xtibianos(as).

 

Estou aqui para pedir um script de pet.

 

Nivel de scriting: Baixo (Quase NADA).

 

Favor fazer o script o mais facil de entender possivel.

 

Bom quero um script de pet system que ao dar use em um item|id: 2271|sairá um monster|feito especialmente para o script|e oque o player atakar ele ataka e o player pode escolher por talkaction os attacks|favor colocar um tutorial explicando como adicionar magias para o pet| que ele poderá dar.

 

 

 

REP++ PARA OQUE CONSEGUIR

Link para o comentário
https://xtibia.com/forum/topic/202036-pet-system-meio-antigo/
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

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

if #getCreatureSummons(cid) > 0 then

doPlayerSendCancel(cid, "Você pode sumonar apenas um pet.")

return true

end

local MyCreature = doSummonCreature("Dragon",topos)

doConvinceCreature(cid, MyCreature)

if item.type > 1 then

doChangeTypeItem(item.uid,item.type-1)

else

doRemoveItem(item.uid,1)

end

return 1

end

 

<action itemid="0000" event="script" value="summon.lua"/>

 

Para adicionar ataques ao monstro você pode fazer do mesmo jeito que se adiciona um ataque a um monstro comun no otserv.

Link para o comentário
https://xtibia.com/forum/topic/202036-pet-system-meio-antigo/#findComment-1418726
Compartilhar em outros sites

  • 0

vou testar Manyzin jaja te dou o rep :D

 

 

Manyzin pode me dizer como que coloco spells no monster como vc disse, e eu colocando do jeito que vc disse o player que sumonou o monster poderá escolher a spell que ele irá mandar?

 

------------------------------------EDIT:

 

Valeu pela ajuda mas isso foi metade do que pedi :S mas ta bom deu pra quebra o galho queria que o player escolhece a magia que o pet vai mandar mas valeu :D

Editado por Nathannael
Link para o comentário
https://xtibia.com/forum/topic/202036-pet-system-meio-antigo/#findComment-1419807
Compartilhar em outros sites

  • 0

Cara você pode escolher, o pet que você sumonou é um monstro não é ?

 

então faz o seguinte.

Vá em data/monster/SEUMONSTRO

vou usar um Dragon Lord como exemplo.

 

esse é o script dele

 

<?xml version="1.0" encoding="UTF-8"?>

<monster name="dragon lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="245" manacost="0">

<health now="1900" max="1900"/>

<look type="39" head="20" body="30" legs="40" feet="50" corpse="5984"/>

<targetchange interval="5000" chance="8"/>

<strategy attack="100" defense="0"/>

<flags>

<flag summonable="0"/>

<flag attackable="1"/>

<flag hostile="1"/>

<flag illusionable="1"/>

<flag convinceable="0"/>

<flag pushable="0"/>

<flag canpushitems="1"/>

<flag canpushcreatures="1"/>

<flag targetdistance="1"/>

<flag staticattack="90"/>

<flag runonhealth="300"/>

</flags>

<attacks>

<attack name="melee" interval="2000" skill="70" attack="75"/>

<attack name="fire" interval="2000" chance="22" range="7" radius="4" target="1" min="-100" max="-180">

<attribute key="shootEffect" value="fire"/>

<attribute key="areaEffect" value="firearea"/>

</attack>

<attack name="firefield" interval="1000" chance="15" range="7" radius="4" target="1">

<attribute key="shootEffect" value="fire"/>

</attack>

<attack name="fire" interval="2000" chance="18" length="8" spread="3" min="-150" max="-340">

<attribute key="areaEffect" value="firearea"/>

</attack>

</attacks>

<defenses armor="22" defense="35">

<defense name="healing" interval="1000" chance="25" min="57" max="93">

<attribute key="areaEffect" value="blueshimmer"/>

</defense>

</defenses>

<elements>

<element energyPercent="-20"/>

<element icePercent="10"/>

<element earthPercent="-80"/>

</elements>

<immunities>

<immunity fire="1"/>

<immunity paralyze="1"/>

<immunity invisible="1"/>

</immunities>

<voices interval="5000" chance="10">

<voice sentence="ZCHHHHH" yell="1"/>

<voice sentence="YOU WILL BURN!" yell="1"/>

</voices>

<loot>

<item id="2148" countmax="70" chance1="40000" chancemax="0"/>

<item id="2148" countmax="80" chance1="33333" chancemax="0"/>

<item id="2672" countmax="5" chance1="80000" chancemax="0"/>

<item id="2033" chance="1818"/>

<item id="1976" chance="3333"/>

<item id="2413" chance="5000"/>

<item id="2498" chance="1188"/>

<item id="2492" chance="933"/>

<item id="7378" countmax="2" chance1="2000" chancemax="0"/>

<item id="2547" countmax="7" chance1="8222" chancemax="0"/>

<item id="2796" countmax="1" chance1="6666" chancemax="0"/>

<item id="5948" countmax="1" chance1="5000" chancemax="0"/>

<item id="1987" chance="100000">

<inside>

<item id="2148" countmax="100" chance1="100000" chancemax="0"/>

<item id="2149" countmax="2" chance1="833" chancemax="0"/>

<item id="2392" chance="1428"/>

<item id="2146" countmax="2" chance1="3222" chancemax="0"/>

<item id="2528" chance="2033"/>

<item id="7402" chance="1833"/>

<item id="7588" chance="1833"/>

<item id="2414" chance="1309"/>

<item id="5882" countmax="1" chance1="5000" chancemax="0"/>

</inside>

</item>

</loot>

</monster>

 

 

O Que ta em azul são ataques , que podem ser tanto de magia como também podem ser melee (corpo a corpo)

O Que ta em verde são as defes , tipo , ele usa algumas magias para se defender , tipo healing , speed... e etc

no caso ai ele usa heal, veja:

 

<defenses armor="22" defense="35">

<defense name="healing" interval="1000" chance="25" min="57" max="93">

<attribute key="areaEffect" value="blueshimmer"/>

</defense>

 

se quiser por mais magias de defesa, é só fazer seguindo esse exemplo, procure em alguns outros monstros do seu ot casa n saiba por..

 

 

Aqui ele usa pra ataque , veja

 

<attack name="fire" interval="2000" chance="18" length="8" spread="3" min="-150" max="-340">

<attribute key="areaEffect" value="firearea"/>

</attack>

 

é aquele lança chama dele.

é só vc usar isso ai como base, muda o attack name, o intervalo, dano min e max, caso precise...

entendeu?

 

ja por talkaction eu n sei..

Editado por Manyzin
Link para o comentário
https://xtibia.com/forum/topic/202036-pet-system-meio-antigo/#findComment-1422969
Compartilhar em outros sites

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