dnmk
New Member
- Joined
- Jan 9, 2017
- Messages
- 14
- Reaction score
- 1
Hi there. I am seeking for help with my loot and spells situation, and as I dont want to make another topic, im gonna split this into 2 problems I have.
I am working on TFS 1.5 Nekiro downgrade 8.6, and with Emporia Vapus datapack which was originally for 0.4, but i wanted to switch for a newer version.
Most of problems solved but about this i realised after finally getting it all up on Ubuntu.
Problem 1
Monsters doesnt drop loot at all. Every monster is just "nothing". I tried on a clean account without any access, also tried with different vocations.xml file as i've searched that it might be the problem. Where to look for?
Here is my monster.lua:
And here is a rotworm for example:
Problem 2
Spells not working. They are taking mana, giving magic level, but no healing nor any damage.
Here is exura from spells.xml:
And here is the light_healing.lua:
Any help is appreciated!
I am working on TFS 1.5 Nekiro downgrade 8.6, and with Emporia Vapus datapack which was originally for 0.4, but i wanted to switch for a newer version.
Most of problems solved but about this i realised after finally getting it all up on Ubuntu.
Problem 1
Monsters doesnt drop loot at all. Every monster is just "nothing". I tried on a clean account without any access, also tried with different vocations.xml file as i've searched that it might be the problem. Where to look for?
Here is my monster.lua:
Lua:
function Monster:onDropLoot(corpse)
if hasEventCallback(EVENT_CALLBACK_ONDROPLOOT) then
EventCallback(EVENT_CALLBACK_ONDROPLOOT, self, corpse)
end
end
function Monster:onSpawn(position, startup, artificial)
if hasEventCallback(EVENT_CALLBACK_ONSPAWN) then
return EventCallback(EVENT_CALLBACK_ONSPAWN, self, position, startup, artificial)
else
return true
end
end
And here is a rotworm for example:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Rotworm" nameDescription="a rotworm" race="blood" experience="40" speed="116" manacost="305">
<health now="65" max="65"/>
<look type="26" corpse="5967"/>
<targetchange interval="2000" chance="0"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="1"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="30" attack="20"/>
</attacks>
<defenses armor="8" defense="11"/>
<loot>
<item id="10608" chance="10750" /> <!-- lump of dirt -->
<item id="2666" chance="20825" /> <!-- meat -->
<item id="2148" countmax="17" chance="24350" /> <!-- gold coin -->
<item id="2671" chance="20575" /> <!-- ham -->
<item id="1987" chance="100000"> <!-- bag -->
<inside>
<item id="3976" countmax="3" chance="2250" /> <!-- worm -->
<item id="2376" chance="3675" /> <!-- sword -->
<item id="2398" chance="4650" /> <!-- mace -->
</inside>
</item>
</loot>
</monster>
Problem 2
Spells not working. They are taking mana, giving magic level, but no healing nor any damage.
Here is exura from spells.xml:
Code:
<instant group="healing" name="Light Healing" words="exura" level="8" mana="20" aggressive="0" selftarget="1" cooldown="1000" needlearn="0" script="healing/light_healing.lua">
<vocation name="Sorcerer" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Master Sorcerer" />
<vocation name="Elder Druid" />
<vocation name="Royal Paladin" />
</instant>
And here is the light_healing.lua:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
function onGetFormulaValues(player, level, magicLevel)
local min = (level / 5) + (magicLevel * 1.4) + 8
local max = (level / 5) + (magicLevel * 1.8) + 11
return min, max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
Any help is appreciated!