• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need this script plz

Ralfegor

New Member
Joined
Apr 6, 2008
Messages
297
Reaction score
1
I need a ring lets say gold ring (id= 2179) that when u put it on the ring slot the skills Club, Sword, Axe and Shielding
increase 35 and only knights can use it can some1 make me this script? and of course when u take out the ring the skills will be normal again

i was trying to do it copied some other scripts xD but when i put it on my ring slot it increase 35 but then it just go to normal skills again :(

local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 35)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 35)
setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 35)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 35)
function onEquip(cid, item, slot)
if (not(isSorcerer(cid) or isDruid(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
doAddCondition(cid, condition1)
end
end
function onDeEquip(cid, item, slot)
if isPlayer(cid) and getPlayerStorageValue(cid, 50780) == 1 then

doRemoveCondition(cid, CONDITION_ATTRIBUTES)

local pos = getCreaturePosition(cid)
setPlayerStorageValue(cid, 50780, 0)
local sex = getPlayerSex(cid)
end
end

can u help me plz?
 
If you want to do something like this, better way will be change something in items.xml =]

<attribute key="slotType" value="ring" />
<attribute key="decayTo" value="0" />
<attribute key="transformDeEquipTo" value="2166" />
<attribute key="skillFist" value="5" />
<attribute key="duration" value="300" />
<attribute key="showduration" value="1" />

That is some example what you can do.
 
<attribute key="skillFist" value="5" /> and for de club is "skillClub"? sword = "skillSword", for the Axe = "skillAxe"? and shielding? "skillShielding"?
 
Last edited:
doesnt work :( i put it on my ring slot but it doesnt increase nuting this is how i put it


<item id="2179" article="a" name="gold ring">
<attribute key="weight" value="100"/>
<attribute key="slotType" value="ring"/>
<attribute key="skillSword" value="35" />
<attribute key="skillAxe" value="35" />
<attribute key="skillClub" value="35" />
<attribute key="skillShield" value="35" />
 
Add to movements.xml:
Code:
	<movevent event="Equip" itemid="2179" slot="ring" function="onEquipItem"/>
	<movevent event="DeEquip" itemid="2179" slot="ring" function="onDeEquipItem"/>



And there are possible skill increasing attributes:

skillsword

skillaxe

skillclub

skilldist

skillfish

skillshield

skillfist
 
There was some trick that you could use in movements ;d

Here is an example of this :PP Just edit you as you need:p
<movevent event="Equip" itemid="7886" slot="feet" function="onEquipItem">
<vocation name="Sorcerer" />
<vocation name="Master Sorcerer" showInDescription="0" />
<vocation name="Druid" />
<vocation name="Elder Druid" showInDescription="0" />
</movevent>
<movevent event="DeEquip" itemid="7886" slot="feet" function="onDeEquipItem" />
 
Back
Top