• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Cure CURSE_CONDITION in area makes player get white skull (even in protection zone) - Help -

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
Hello, I haven't found anything like this in the forum. I'm testing a very powerful monster in my server but it makes a very strong curse.

EDITED: I'm using this script that actually works but makes the character that has casted it (druid or elder druid) with skull and I dont know why:


LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_CURSED)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onCastSpell(cid, var)
    local storage = 23004
    local spellname = "Cure Curse"
    local time = 20

        if exhaustion.check(cid, storage) == false then
                exhaustion.set(cid, storage, time)
                return doCombat(cid, combat, var)
        else
                doPlayerSendCancel(cid, "You are exhausted in " .. spellname .. " for: " ..exhaustion.get(cid, storage).." seconds.")
        end
end

spells.xml:

LUA:
        <instant name="Cure Curse" words="exana gran mort res" lvl="50" mana="200" aggressive="0" exhaustion="500" needlearn="0" script="healing/masscurecurse.lua">
        <vocation id="2"/>
        <vocation id="6"/>
    </instant>
 
Last edited:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_CURSED)
setCombatArea(combat, createCombatArea(AREA_CIRCLE3X3))

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_CURSED)
setCombatArea(combat, createCombatArea(AREA_CIRCLE3X3))

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

The same, I try and I get white skull in depot because it's like I've attacked another player... is almost 100% = than exura gran mas res. I can't find the difference... Why this spell is considered like attacking and exura gran mas res doesn't even start combat (small swords in interface). I can't understand. Can another script be involved? from another folder?

Thanks.
 
Last edited:
Guys, I need help. I will open my server in some hours and I need the script fixed. Otherwisr I will have to remove it.
 
Last edited:
check spells.xml.. maybe you have the same spell line in 2 separate places?

I could also create the spell for you using lua functions.. but it won't be optimised or look like a regular spell inside the script. In-game there would be no difference.
 
Hello, I only have this line in spells.xml


LUA:
        <instant name="Cure Curse" words="exana gran mort res" lvl="50" mana="500" aggressive="0" exhaustion="500" needlearn="0" script="healing/masscurecurse.lua">
        <vocation id="2"/>
        <vocation id="6"/>
    </instant>

This is so weird... You can check the script with the exura gran mas res script or even cancel invisibility. They are so similar, but I dont know why or how, this script makes the caster druid get skull even in depot. It dispells his curse and the curse of the others if they're in the area, which is cool, but lol why pz combat? why skull? It makes no sense.
 
Hello, I only have this line in spells.xml


LUA:
        <instant name="Cure Curse" words="exana gran mort res" lvl="50" mana="500" aggressive="0" exhaustion="500" needlearn="0" script="healing/masscurecurse.lua">
        <vocation id="2"/>
        <vocation id="6"/>
    </instant>

This is so weird... You can check the script with the exura gran mas res script or even cancel invisibility. They are so similar, but I dont know why or how, this script makes the caster druid get skull even in depot. It dispells his curse and the curse of the others if they're in the area, which is cool, but lol why pz combat? why skull? It makes no sense.
Depends how the source is coded I guess.
The source is seeing a combat object that is 'removing' something from a character, and it doesn't know if that removal is good or bad, so it just assumes it's bad, is my guess.

If you can post a screenshot of the area you want the spell to work in, I can try to create the spell via lua functions.
 
Depends how the source is coded I guess.
The source is seeing a combat object that is 'removing' something from a character, and it doesn't know if that removal is good or bad, so it just assumes it's bad, is my guess.

If you can post a screenshot of the area you want the spell to work in, I can try to create the spell via lua functions.

Same than exura gran mas res, mate.

If it's an inconvenient I just will remove it. The thing is that I open my server now at 18.00 CET and I've made all the db restart already...
 
Same than exura gran mas res, mate.

If it's an inconvenient I just will remove it. The thing is that I open my server now at 18.00 CET and I've made all the db restart already...
I haven't played RL tibia for about 4 years at this point, and I haven't played a high level druid in over 8.
I know it's circle shaped, and 5-7 tiles wide but I'm not going to sit here and guess what area size it is that you need.

So whatever do it yourself.

Create an array with the tiles positions
LUA:
local area = {{0, 0}, {-1, 0}, {0, 1}} -- et cetera
Loop through the area using getSpectators using the casters position as the focal point, and perform the work-around required to only locate 1 tile at a time, since 0.4 getSpectators minimum area size is 3 by 3 tiles.

Confirm that the creatures found are players, and use the lua function
LUA:
doRemoveCondition(cid, type[, subId])
To remove the death/curse attribute.

Send a magic effect to every tile, while you're looping through them.
(or alternatively, send blue sparkles to tiles without creatures, and green sparkles to one's with a creature found)

add whatever other checks you want to add (like exhaustion).

Done.
 
I haven't played RL tibia for about 4 years at this point, and I haven't played a high level druid in over 8.
I know it's circle shaped, and 5-7 tiles wide but I'm not going to sit here and guess what area size it is that you need.

So whatever do it yourself.

Create an array with the tiles positions
LUA:
local area = {{0, 0}, {-1, 0}, {0, 1}} -- et cetera
Loop through the area using getSpectators using the casters position as the focal point, and perform the work-around required to only locate 1 tile at a time, since 0.4 getSpectators minimum area size is 3 by 3 tiles.

Confirm that the creatures found are players, and use the lua function
LUA:
doRemoveCondition(cid, type[, subId])
To remove the death/curse attribute.

Send a magic effect to every tile, while you're looping through them.
(or alternatively, send blue sparkles to tiles without creatures, and green sparkles to one's with a creature found)

add whatever other checks you want to add (like exhaustion).

Done.

Sorry mate, I thought you knew how the spell was... Is like this:

AREA_CIRCLE3X3

2e2fhy0.jpg


Got it from google.

Anyway I will try to make the script with your instructions. Thanks you!!
 
Back
Top