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

problem with movements

foxkbt

Member
Joined
Sep 29, 2009
Messages
290
Reaction score
7
Location
Salvador
eu tentei editar um item para ter efeito diferente em cada classe
but it makes my pc restart
PHP:
function onEquip(cid, item, slot)
    if getPlayerVocation(cid) == 13 or getPlayerVocation(cid) == 15 or getPlayerVocation(cid) == 17 then
        doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 2)
    end
return true
end
function onDeEquip(cid, item, slot)
    if getPlayerVocation(cid) == 13 or getPlayerVocation(cid) == 15 or getPlayerVocation(cid) == 17 then
        doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, -2)
    end
return true
end
 
sr i dont explain
whem ekipe this item nothing change
but if have vocation 13, 15 or 17
add distance 2

but this script bug my serv restart my computer
 
Ok...
Items.xml add to ur item this line:
Code:
<attribute key="skillDist" value="2"/>

Then go to movements.xml
and add something like this
Code:
<movevent type="Equip" itemid="xxxx" slot="yyyy" event="function" value="onEquipItem">
		<vocation id="13" showInDescription="0"/>
		<vocation id="15" showInDescription="0"/>
		<vocation id="17" showInDescription="0"/>
	</movevent>
	<movevent type="DeEquip" itemid="xxxx" slot="yyyy" event="function" value="onDeEquipItem"/>

xxxx = id of ur item
yyyy = slot...

But why u have in your script doPlayerAddSkillTry??
 
XD
you dont understand
This item can be used for any vocation
but when used by vocation 13 15 or 17 give the player 2 distance
and if remove the item removes the distance
 
Back
Top