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

[Request] Spell with levels

Matians

New Member
Joined
Dec 5, 2010
Messages
40
Reaction score
1
Hi, I need this system. Example.

I am the gammer of my server and my server you need learn the spell to use.

I am level 55.

I learned the utevo lux, and utevo vis lux.

If I say, utevo lux, and I have learned utevo vis lux, how utevo vis lux it's more stronger what utevo lux, use utevo vis lux but say utevo lux.

Any understand?
 
You want to use the words utevo lux for the spell Ultimate Light (utevo vis lux)? You can just change the words in spells.xml.
 
You want to use the words utevo lux for the spell Ultimate Light (utevo vis lux)? You can just change the words in spells.xml.

No he wants to do like this

When he is level 8 and use utevo lux he gets the normal spell

But when he is level 70 and learned both spells he want utevo lux to automaticly be vis lux.
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_LIGHT)
setConditionParam(condition, CONDITION_PARAM_LIGHT_LEVEL, 9)
setConditionParam(condition, CONDITION_PARAM_LIGHT_COLOR, 215)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33 * 60 * 1000)
setCombatCondition(combat, condition)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, false)

local condition2 = createConditionObject(CONDITION_LIGHT)
setConditionParam(condition2, CONDITION_PARAM_LIGHT_LEVEL, 6)
setConditionParam(condition2, CONDITION_PARAM_LIGHT_COLOR, 215)
setConditionParam(condition2, CONDITION_PARAM_TICKS, (6 * 60 + 10) * 1000)
setCombatCondition(combat2, condition2)


function onCastSpell(cid, var)

	if getPlayerLevel(cid) >= 55 and getPlayerLearnedInstantSpell(cid, 'Ultimate Light') then
		doCombat(cid, combat, var)
	else
		doCombat(cid, combat2, var)
	end
	return true
end
 
Very thankz, I don't know the lua function getPlayerLearnedInstantSpell xD. Now I can create my sistem with spell with level.

Thankz you now I am little better scripter for you xD, if you need my help, tell me.

------------ UPDATE ---------

Its possible create this system but in talkaction?

Example. I create new spell, the name of spell are. kienzanlvl1 and kienzanlvl2. I create new file in talkaction/script the name is kienzan.lua

And the script say if i learned kienzanlvl1, i the script send the spell kienzanlvl1 but if I learned kienzanlvl2 send the spell kienzanlvl2 and no kienzanlvl1
 
Last edited:
Yes, that's possible, what is the reaon you want it as a talkaction instead of a spell? Just to make sure I understand your what you want, because what I think you mean, would be the same in spells.
 
You should get skype and add me, ill be your scripter lol.. Im doing all scripting services free atm. Until I join a potential server.

here is the other spell.

very simple..

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, -10, 5, 5, 0.85, 1.95, -20, -40)

local combat2 = createCombatObject()   -- Spell damage if learned 2nd spell.. --
setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, -10, 5, 5, 0.85, 1.95, -20, -40)

local second_spell_name = type spell name here   --If this doesnt work wrap " around the spell name you type in--

function onCastSpell(cid, var)
if doPlayerLearnInstantSpell(cid, second_spell_name) == true then
	return doCombat(cid, combat2, var)
else
	return doCombat(cid, combat, var)
end
end

- - - Updated - - -

not a talkaction :) // dont forget to rep+

Its good to remember all functions can be used in all places.
 
Last edited:
Back
Top