line 2246, above "local ring"Yea, what RosOT said, it should be a fixed value, but not that high hehe
If I want to add possibility to get exp bonus from armors for example, how do I add that?
for k = 1, 9 do -- code end
does same thing happen for regHP.+x (with/without %) and regMP.+x%?There seems to be some problems with mana gain. I got this: [regMP.+10]
But while hunting, it goes bananas, either stops working or it gives alot more mana.
17:32 You see a legendary wedding ring. It weighs 0.40 oz. [death.+7%][regHP.+5][exp.+48%][ice.+6%]
17:29 You gained 540 experience points. -- this is the added 48% of 1125 17:29 You gained 1125 experience points.
function stat_onPrepareDeath(creature, lastHitKiller, mostDamageKiller) local necklace = creature:getSlotItem(CONST_SLOT_NECKLACE) local slotc = necklace:getStatSlotCount() if not Player(lastHitKiller) then if slotc > 0 then local cur_slots = necklace:getStatSlots() for i = 1, slotc do if cur_slots[i] == 'PVE death' then if cur_slots[i]:match("%%") then local a, b = cur_slots[i]:match('([+-])(%d+)%%') if math.random(1, 100) > tonumber(a..b) then necklace:remove() return true end end local maxhp = creature:getMaxHealth() creature:addHealth(maxhp) addEvent(doCreatureAddHealth, 100, creature:getId(), maxhp) creature:teleportTo(creature:getTown():getTemplePosition()) necklace:remove() return true end end end end return true end
Alright i get what you mean by the Exp now it works flawlessly thenhealing issue:
It makes you weaker for healing so healing spells are more effective on your character.
Let's say you use exura or someone sio on you for +100 and you wear item [healing.-10%], then you will receive +110 heal.
exp.+33 = random exp between 1 and 33 for killing a monster
exp.+33% = fixed value of +33% exp
okay, new to-do list(just a reference for me in fixing later):
1. test necklace/no necklace again
2. add "if" statement to not send combat while 0 dmg(combat did 0 dmg, effect had to be sent to avoid client debug)
3. check regeneration again
if not Player(lastHitKiller) then if slotc > 0 then
if necklace then