• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved All Healing Spells Suddenly Bugged. TFS 0.3.6

Lucian

Active Member
Joined
Nov 11, 2014
Messages
184
Reaction score
27
Location
None Has Gone Before.
Hello Community, something appeared suddenly to me.
all my healing spells stopped work, spell word work, buff effect work, BUT don't add any heal.

*no error in console*
*All Attacking Spells Working Fine*

Anyone could help please ? :(
 
If function onStatsChange returns false, then the player won't lose or gain health/mana.
There is this.
Code:
if getPlayerStorageValue(cid, 12269) >= 1 and isMonster(attacker) or isPlayer(attacker) then
    return false
end

If it should only happen with health or mana loss you can add this instead of: "and isMonster(attacker) or isPlayer(attacker)".
Code:
and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)


Btw you can remove this, statschange can only work for creatures since only creatures can gain/lose mana/hp.
Code:
if not isCreature(cid) then
     return true
end
 
If it should only happen with health or mana loss you can add this instead of: "and isMonster(attacker) or isPlayer(attacker)".
Code:
and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)
You Know what ?!

You are the beeeeeeeeest here.
Work 100% xD

Thank you Limos, how can i rep you ?
 
@Limos

Sorry to bump such an old thread but I as well am having issues with this same problem. Is there something you see that could fix this? Players can not use healing spells.


function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) == true and isPlayer(attacker) == true then
local aEvent = getPlayerStorageValue(attacker, eventConfig.indicatorStorage)
local cEvent = getPlayerStorageValue(cid, eventConfig.indicatorStorage)
if eventAreas[cEvent].etype == 1 or eventAreas[cEvent].etype == 99 then -- event most kills
if type == 1 and getCreatureHealth(cid) <= value then
local frags = getPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter)
if frags == -1 then
setPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter, 1)
else
setPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter, frags + 1)
end
doPlayerSendTextMessage(attacker, MESSAGE_STATUS_WARNING, "You owned " .. getPlayerName(cid) .. "!" .. " You have " .. getPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter) .. " frags!")
doTeleportThing(cid, eventAreas[cEvent].left)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
return false
end
 
Bump. @Limos @Printer

anyone know anything about this or can help point me in the right direction?
If function onStatsChange returns false, then the player won't lose or gain health/mana.
There is this.
Code:
if getPlayerStorageValue(cid, 12269) >= 1 and isMonster(attacker) or isPlayer(attacker) then
    return false
end

If it should only happen with health or mana loss you can add this instead of: "and isMonster(attacker) or isPlayer(attacker)".
Code:
and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)


Btw you can remove this, statschange can only work for creatures since only creatures can gain/lose mana/hp.
Code:
if not isCreature(cid) then
     return true
end
 
@StreamSide a little more help/direction is needed my friend. I seen the previous post, hence why I tagged Limos, however just replacing with the code he wrote didn't fix the problem.



function onStatsChange(cid, attacker, type, combat, value)
if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
local aEvent = getPlayerStorageValue(attacker, eventConfig.indicatorStorage)
local cEvent = getPlayerStorageValue(cid, eventConfig.indicatorStorage)
if eventAreas[cEvent].etype == 1 or eventAreas[cEvent].etype == 99 then -- event most kills
if type == 1 and getCreatureHealth(cid) <= value then
local frags = getPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter)
if frags == -1 then
setPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter, 1)
else
setPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter, frags + 1)
end
doPlayerSendTextMessage(attacker, MESSAGE_STATUS_WARNING, "You killed " .. getPlayerName(cid) .. "!" .. " You have " .. getPlayerStorageValue(attacker, eventConfig.mostKillsFragCounter) .. " frags!")
doTeleportThing(cid, eventAreas[cEvent].left)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
return false
end


maybe @Lucian could help
 
Last edited:
Back
Top