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

Solved How to make an Exura Sword

FilipeJF

New Member
Joined
Jan 9, 2012
Messages
124
Reaction score
4
I want to make exura healing according the Exura Sword.

I have this script, but isn't working:

Code:
function getMinMaxValues(cid, level, magiclevel)
local skill = getPlayerSkillLevel(cid, SKILL_SWORD)
local min = (skill * 1 + level/2)
local max = min * math.random(105, 125) / 100
return min, max
end


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)
setHealingFormula(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getMinMaxValues")


function onCastSpell(cid, var)
doPlayerAddSkillTry(cid,  2, 100)
return doCombat(cid, combat, var)
end

I make it to heal according the sword, obviously. It's my spell into spells.xml:

Code:
<instantname="Exura Sword"words="exura sword"lvl="1"mana="20"aggressive="0"selftarget="1"exhaustion="1000"needlearn="1"event="script"value="healing/exura sword.lua">
  <vocationid="1"/>
  <vocationid="2"/>
  <vocationid="3"/>
  <vocationid="4"/>
  <vocationid="5"/>
  <vocationid="6"/></instant>

Well, the spell is healing SO MUCH [skill + (lvl divided by 2)] ranging up to 125%, and the player is receiving Yellow PK too. I don't want that. I want to make an simple Exura based in sword skill and level of player.
 
If you solve your problem, post the solution, this might help other people with the same problem who search for a solution.
 
In the spell at function getminmaxvalues add:

Code:
    local skill = getPlayerSkillLevel(cid, SKILL_SWORD)
    local min = (skill * 3 + level/3)
    local max = min * math.random(500, 1000) / 100
    return min, max

And into "function onCastSpell" add:

Code:
    doPlayerAddSkillTry(cid,  2, 10)

Here's the solution =D
 
Back
Top