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

Spell To Add Skills

leonardo123

New Member
Joined
Jul 10, 2008
Messages
90
Reaction score
0
i need a spell to add skills to a player like a exori but instead of dealing damage giving skills, please if it can be done i need it :S it will be for a training monk
 
Last edited:
local conditionAttrib = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(conditionAttrib, CONDITION_PARAM_TICKS, 10000)
setConditionParam(conditionAttrib, CONDITION_PARAM_SKILL_SHIELDPERCENT, 0)
setConditionParam(conditionAttrib, CONDITION_PARAM_SKILL_MELEEPERCENT, 135) -- skill,

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatCondition(combat, conditionAttrib)

function onCastSpell(cid, var)
if(doCombat(cid, combat, var) == LUA_NO_ERROR) then
return LUA_NO_ERROR
end
return LUA_ERROR
end
just copied blood rage "utito tempo"
e
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)


local area = createCombatArea(AREA_SQUARE1X1)

setCombatArea(combat, area)

local skilltries = 1 -- Number of tries per skill
local t = 2 * 1000


function trainMeB(p)
if isPlayer(p.cid) then
for b = 1, t do
if(b == t) then
doPlayerAddSkillTry(p.cid, SKILL_FIST, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_CLUB, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_SWORD, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_AXE, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_DISTANCE, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_SHIELD, skilltries)
end
end
addEvent(trainMeB, t, p)
end
return FALSE
end


function onCastSpell(cid, var)

return
doCombat(cid, combat, var)

end

im looking for a spell like that but a working one if somone can fix it or somthing please leave a message in here
 
Last edited:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatArea(combat, createCombatArea(AREA_SQUARE1X1))

local t = {}
local function f(cid)
	if isPlayer(cid) then
		for _, i in ipairs({1, 2, 3, 5}) do
			doPlayerAddSkillTry(cid, i, 1)
		end
		t[cid] = addEvent(f, 2000, cid)
	else
		t[cid] = nil
	end
end

function onCastSpell(cid, var)
	if t[cid] then
		stopEvent(t[cid])
		t[cid] = nil
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	else
		t[cid] = addEvent(f, 2000, cid)
		doCombat(cid, combat, var)
	end
	return true
end
 
Last edited:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatArea(combat, createCombatArea(AREA_SQUARE1X1))

local t, f = {},
function(cid)
	if isPlayer(cid) then
		for _, i in ipairs({1, 2, 3, 5}) do
			doPlayerAddSkillTry(cid, i, 1)
		end
		t[cid] = addEvent(f, 2000, cid)
	else
		t[cid] = nil
	end
end

function onCastSpell(cid, var)
	if t[cid] then
		stopEvent(t[cid])
		t[cid] = nil
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	else
		t[cid] = addEvent(f, 2000, cid)
		doCombat(cid, combat, var)
	end
	return true
end

thank you bro i rlly appreciate it im going to try it right now


edit:
is not working >.<
 
Last edited:
is not needed to use t and f just a spell for a training monk to add skilltries to players just that thats all i need but i need as a exori type
cuz my train room is like this
trainz.png
 
Looooooool.....
All mans helping to do a spell....
@Thread: why u dont say that u want a monster to do it??? ¬¬
Ok... So now he need to add to the xml of the monster a way to use the spell......
 
lol bump? do what dantarrix said find the training monk, and after you have registered the spell in the spells.xml take whatever name you put in there and add it to the training monks spells. not that hard.
 
lol bump? do what dantarrix said find the training monk, and after you have registered the spell in the spells.xml take whatever name you put in there and add it to the training monks spells. not that hard.

it's not that simple. with this script, it would try to add skills to the monk (Player not found).
it has to be edited to execute the function for each player in combat area
 
Back
Top