• 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!

(Support) Help on my spell!

muriloww

New Member
Joined
Jan 18, 2009
Messages
7
Reaction score
1
Hello there, hope yours fine!

Well, i got a spell which i need help to fix it.

What's the spell?
The spell is called AUTO-HEAL, yeah i made somethings by my own, and mixing somes scripts, from here and otfans.

What are these spells?
AUTO-HEAL from otfans and Health Area from here at Spells & CreatureEvents.

What i want/What's the problem?
The problem is, if the player cast this spell 5x times, it will be healing 5x you for a certain time, All i need is if the player cast the spell, he must wait until to cast again or if he cast the spell, and cast again, and keep casting, it will be healing like the player casted 1 time only.

Here go the script:

--> CONFIG SPELL <--
local HEAL_DELAY = 3000
local HEAL_TIMES = 10
--> CONFIG SPELL <--

function onCastSpell(cid, var)
local function onCastSpell(parameters)
doCreatureAddHealth(cid, 20)
doSendMagicEffect(getPlayerPosition(cid), 14)

end

local parameters = {cid = cid, combat = combat, var = var}
for i = 0, math.max(HEAL_TIMES, 1) - 1 do
addEvent(onCastSpell, HEAL_DELAY * i, parameters)
end

return LUA_NO_ERROR
end

Well if you could help me, i'll be adding REP for you as fast i can!

sorry for my bad english, that's not my job :p
 
Last edited:
I see you edited my script... BUT WHY?

You just ruined it... It actually worked as you describe how you want it to work, no need to edit it.

Keep in mind that Gamemasters don't get exhaust, I got this problem too while I made the spell. It took me some time before I figured that the script was working perfectly fine, but GM's don't get exhaust so.... :)
 
lol dude, i've tryed ur version and got it

[30/01/2009 19:36:41] Lua Script Error: [Spell Interface]
[30/01/2009 19:36:41] data/spells/scripts/healing/autoheal.lua

[30/01/2009 19:36:41] luaCreateConditionObject(). Condition not found

[30/01/2009 19:36:41] Lua Script Error: [Spell Interface]
[30/01/2009 19:36:41] data/spells/scripts/healing/autoheal.lua

[30/01/2009 19:36:41] luaSetConditionParam(). Condition not found

[30/01/2009 19:36:41] Lua Script Error: [Spell Interface]
[30/01/2009 19:36:41] data/spells/scripts/healing/autoheal.lua

[30/01/2009 19:36:41] luaCreateConditionObject(). Condition not found

[30/01/2009 19:36:41] Lua Script Error: [Spell Interface]
[30/01/2009 19:36:41] data/spells/scripts/healing/autoheal.lua

[30/01/2009 19:36:41] luaSetConditionParam(). Condition not found

btw: i use The Forgotten Server, version 0.3 (Beta 2)
 
Just remove the exhaust condition and instead write in spells.xml 'exhaust="10"' or whatever the exhaust should be...
 
Back
Top