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

Only Mages gets that -question-

WiLDTuRTLE

Member
Joined
Feb 26, 2011
Messages
478
Reaction score
5
Im wondering how we setup the skills thing on the items.
i mean..

Code:
	<item id="2494" article="a" name="demon armor">
		<attribute key="weight" value="8000"/>
		<attribute key="armor" value="48"/>
		<attribute key="slotType" value="body"/>
		<attribute key="magiclevelpoints" value="5"/>
		<attribute key="skillSword" value="5"/>
		<attribute key="skillAxe" value="5"/>
		<attribute key="skillClub" value="5"/>
		<attribute key="skillShield" value="5"/>
		<attribute key="skillDist" value="5"/>
		<attribute key="absorbPercentAll" value="4"/>
	</item>

I want mages to only gets the ml, and knights to only gets the axe/club~
 
simply go to movement/scripts and create a new .lua
if you have no experience you can ask me and i will do it
and add at the top

LUA:
function onEquip(cid, item, slot)
local s = {1,2,5,6}
local k = {3,4,7,8}
		if item.itemid == 2494 and slot == CONST_SLOT_ARMOR and isInArray(s, getPlayerVocation(cid)) then
			doPlayerAddSkillTry(cid,7, 500)-- the 500 isn't = 500 skill nah..it is = 500 hit---1 hit = 1%--500 hit = 500% = +5
			doPlayerSendTextMessage(cid, 14,"You Have Got Extra Magic Level")
			elseif isInArray(k,getPlayerVocation(cid)) then
			for i = 1,3 do
		doPlayerAddSkillTry(cid,i, 500)
		doPlayerSendTextMessage(cid, 14,"You Have Got Extra Skills")
			end
		end
	return true
end
	
function onDeEquip(cid, item, slot)
	--TODO...this may work
			if item.itemid == 2494 and slot == CONST_SLOT_ARMOR and isInArray(s, getPlayerVocation(cid)) then
			doPlayerAddSkillTry(cid,7, -500)-- the 500 isn't = 500 skill nah..it is = 500 hit---1 hit = 1%--500 hit = 500% = +5
		elseif isInArray(k,getPlayerVocation(cid)) then
	for i = 1,3 do
		doPlayerAddSkillTry(cid,i, -500)
			end
		return true
	end
end

Not 100% of this script but don't forgot to add onEquip and deEquip in movement.xml and i will help you if it didn't work :)

- - - Updated - - -

anyone correct me..first time to make a onEquip
 
Back
Top