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

Action Skill Items!

This Is War

Member
Joined
Aug 22, 2013
Messages
123
Reaction score
11


Hello and im here to re-host a Skill Item script, Im not the one who created it but i thought id share it with otland :) Mainly tested on 8.60 forgotten server .0.3.6 crying damson v8

Data/Actions/Actions.xml
Lua:
        <action itemid="8304" script="magiclv.lua"/>
        <action itemid="4869" script="axe.lua"/>
        <action itemid="4863" script="dist.lua"/>
        <action itemid="4865" script="shield.lua"/>


Data/Actions/Scripts/Axe.lua
Code:
function onUse(cid, item, frompos, item2, topos) 

if item.itemid == 4869 then 

rand = math.random(1,1) 

if rand == 1 then 
doPlayerAddSkillTry(cid,3,2 * 44000) 
doRemoveItem(item.uid,1) 
doSendMagicEffect(frompos, 28) 
doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE)

end 
end 
return 1 
end

Data/Actions/Scripts/Distance.lua
Code:
function onUse(cid, item, frompos, item2, topos) 

if item.itemid == 4863 then 

rand = math.random(1,1) 

if rand == 1 then 
doPlayerAddSkillTry(cid,4,2 * 43000) 
doRemoveItem(item.uid,1) 
doSendMagicEffect(frompos, 28) 
doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE)

end 
end 
return 1 
end

Data/Actions/Scripts/Magiclv.lua
Code:
function onUse(cid, item, frompos, item2, topos) 

if item.itemid == 8304 then 

rand = math.random(1,1) 

if rand == 1 then 
doPlayerAddSpentMana(cid, 4100000) 
doRemoveItem(item.uid,1) 
doSendMagicEffect(frompos, 28) 
doSendAnimatedText(getPlayerPosition(cid), "Magic Up!", TEXTCOLOR_BLUE)

end 
end 
return 1 
end

Data/Actions/Scripts/Shield.lua
Code:
function onUse(cid, item, frompos, item2, topos) 

if item.itemid == 4865 then 

rand = math.random(1,1) 

if rand == 1 then 
doPlayerAddSkillTry(cid,5,2 * 45000) 
doRemoveItem(item.uid,1) 
doSendMagicEffect(frompos, 28) 
doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE)

end 
end 
return 1 
end

 
Last edited:
Lua:
local skills = {
	[4869] = SKILL_AXE,
	[4863] = SKILL_DISTANCE,
	[8304] = SKILL__MAGLEVEL,
	[4865] = SKILL_SHIELD
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	doPlayerAddSkillTry(cid, skills[item.itemid], 88000) 
	doRemoveItem(item.uid) 
	doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE) 
	doSendAnimatedText(fromPosition, "Skill Up", TEXTCOLOR_BLUE)
	return true
end

All in one. :p Don't post unoptimized scripts, they are useless. Always use loops and arrays.
 
Unoptimized is a good learning ability. I appreciate people posting them. Thanks for this very helpful for something I'm currently working on.
 
Back
Top