danne3131
Active Member
- Joined
- Jun 26, 2008
- Messages
- 390
- Solutions
- 1
- Reaction score
- 48
The damage dealt doesnt give any exp, Lets say a mosnter have 100 hp and gives 100 exp.. If the wand is doing 50 damage and 50 damage are given by etc Exori vis, The player only recieve exp by the Exori vis (50Damage) and the 50 damage give by wand isnt calculated to exp
What is the code to add this into the script? =) Thanks!
What is the code to add this into the script? =) Thanks!
Code:
function onUseWeapon(player, var)
local item = player:getSlotItem(CONST_SLOT_LEFT)
if not item or item.itemid ~= 2453 then
return true
end
local element = elements[item.actionid]
if not element then
player:sendCancelMessage("You must enchant this wand before using it. Ask Magic Mike located in Thais temple for more information!")
return true
end
local target = Creature(var:getNumber())
player:getPosition():sendDistanceEffect(target:getPosition(), element.distEff)
doTargetCombatHealth(0, target, element.dmgType, -115, -150, element.magEff)
return true
end