GA
dúvida

Monstros usando novos efeitos.

Por gabriel28, 02 de jul. de 2015 em Scripts

monstros
efeitos
resolvido
script
19
3k
gabriel28G
04 de julho de 2015 às 11:29

Eu adicionei um efeito novo no servidor, já compilei as source com ele.

Está funcionando perfeitamente, o problema é quando ponho para um monstro usar, quando ele usa, da debug no client.

 

A pergunta é: tenho que compilar isso nas source? Se sim, como?


Alguém ajuda?

04 de julho de 2015 às 11:45

Adicionou o efeito no dat/spr?

gabriel28G
04 de julho de 2015 às 12:23

Sim, até na source.

04 de julho de 2015 às 12:40

Você já tento usar o efeito com o mando /z? /z e o numero do efeito

 

gabriel28G
04 de julho de 2015 às 12:54

Já uso ele em uma runa, está normal.

 

Creio que tem que por em algum lugar da source, já que, por exemplo, o efeito do Exori é HITAREA e no monstro fica como blackspark.

04 de julho de 2015 às 13:00

O efeito é efeito normal ou distanceeffect?

gabriel28G
04 de julho de 2015 às 13:09

Ambos, adicionei tanto areaeffect quanto shooteffect.

04 de julho de 2015 às 13:13

Tenta criar uma magia, com o efeito que você fez e você usar,

gabriel28G
04 de julho de 2015 às 13:18

Sim, eu consigo usar como magia pra player, o problema é usar ela pra monstro.

04 de julho de 2015 às 13:44

Poderia postar o script do monstro e o script da magia? e qual versão está usando

gabriel28G
04 de julho de 2015 às 13:45

Monstro:

 

 

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

<monster name="Old Warrior" nameDescription="old warrior" race="blood" experience="255" speed="476" manacost="450">
<health now="25850" max="25850"/>
<look type="368" head="58" body="114" legs="114" feet="94" corpse="6080"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" min="-250" max="-600"/>
<attack name="physical" interval="1000" chance="55" range="7" min="-400" max="-570">
<attribute key="shootEffect" value="spear"/>
</attack>
<attack name="physical" interval="1000" chance="25" range="7" min="-380" max="-750">
<attribute key="shootEffect" value="throwingknife"/>
</attack>
<attack name="effect" interval="1000" chance="6" radius="5" target="0" min="-350" max="-550">
<attribute key="areaEffect" value="blackspark"/>
</attack>
<attack name="physical" interval="1000" chance="25" range="7" min="-350" max="-650">
<attribute key="shootEffect" value="arrow"/>
</attack>
</attacks>
<defenses armor="53" defense="100">
<defense name="healing" interval="1000" chance="15" min="250" max="1000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="10" speedchange="1900" duration="8000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element firePercent="10"/>
<element earthPercent="50"/>
<element energyPercent="20"/>
<element deathPercent="30"/>
<element physicalPercent="60"/>
<element icePercent="10"/>
</elements>
<immunities>
<immunity lifedrain="0"/>
<immunity paralyze="0"/>
<immunity outfit="0"/>
<immunity drunk="0"/>
<immunity invisible="0"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Kneel down before me!"/>
<voice sentence="One more head for me!"/>
<voice sentence="I came from the past to terrorize all!"/>
</voices>
<loot>
<item id="3976" countmax="10" chance="50000"/><!-- worm -->
<item id="2148" countmax="20" chance="100000"/><!-- gold coin -->
<item id="2464" chance="6666"/><!-- chain armor -->
<item id="2125" chance="2500"/><!-- crystal necklace -->
<item id="2387" chance="3333"/><!-- double axe -->
<item id="2458" chance="5000"/><!-- chain helmet -->
<item id="1987" chance="100000"><!-- bag -->
<inside>
<item id="2674" countmax="4" chance="10000"/><!-- red apple -->
<item id="2420" chance="10000"/><!-- machete -->
<item id="2666" countmax="3" chance="20000"/><!-- meat -->
<item id="2147" countmax="2" chance="2500"/><!-- small ruby -->
<item id="2145" countmax="2" chance="2500"/><!-- small diamond -->
<item id="2200" chance="1000"/><!-- protection amulet -->
<item id="2463" chance="1333"/><!-- plate armor -->
</inside>
</item>
</loot>
</monster>

Magia:

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_OLDSD)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_OLDSD)
--setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.25, -30, -1.7, 0)
function onGetFormulaValues(cid, level, maglevel)
min = -(level * 1.5 + maglevel * 2) * 1.3
max = -(level * 1.5 + maglevel * 2) * 1.7
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

TFS 0.4 Tibia 8.6

Editado Julho 4 por gabrielvs

04 de julho de 2015 às 13:50

Você adicionou o efeito na lib constant? data/lib constant?

gabriel28G
04 de julho de 2015 às 13:54

Sim, editei lá também. Essa magia funciona corretamente.

04 de julho de 2015 às 13:56

Ok, você adiconou a tag no spells.xml certo?como está o nome da magia na tag, sabe me dizer o numero do efeito ?

gabriel28G
04 de julho de 2015 às 13:59

Tag:

 

<rune name="Sudden Physical" id="2263" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/sudden physical.lua"/>

 

N° do efeito é:

 

areaeffet n°70 e distance efect n°42