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

Different abilities for different vocs

Lucian

Active Member
Joined
Nov 11, 2014
Messages
184
Reaction score
27
Location
None Has Gone Before.
Hello, I was wondering if it possible to specific an armor could be wore with all voc but each voc may gain different abilities

e.g Magic plate armor
if it being wore by Knight :- It add 5 Sword Skills and protection all 3%
if it being wore by pally :- it add add 7 distance skills and protection all 7%
if it being wore by mages :- it add 10 Magic levels and protection 10%

is it possible ? if yes, are all attr keys are avilaible in this case or it gonna be different way ?


thanks. :)
 
I've got an Idea (and it's what I've been using on my ot server)

Edit your otb file, and duplicate the item you want to be held by a 'x' vocation.

You don't need to edit your spr or dat, only your definitions on the server-side.


For example: I will create 2 new demon armor.

Add each demon armor to movevents, one for knights, one for sorcerers and druids and the last for paladins.

Add in items.xml atributtes for each demon armor.

Now let's create an action to transform by click each armor (like a cycle)



To your first demon armor:


function onUse(cid, item, fromPosition, itemEx, toPosition)

doTransformItem(item.uid, IDOFNEXTDEMONARMOR)

end


And it's tag to actions.xml : <action itemid="DEMON ARMOR ID" event="script" value="script.lua"/>


Do the same with the following demon armors and with your last demon armor you should return to the first demon armor.


function onUse(cid, item, fromPosition, itemEx, toPosition)

doTransformItem(item.uid, IDOFFIRSTDEMONARMOR)

end


and Add it's own tag to actions.

Remember, each demon armor can be wielded by only one vocation and each armor has it's own atributtes.
Add the tags to movevents and with actions.
 
Hello, I was wondering if it possible to specific an armor could be wore with all voc but each voc may gain different abilities

e.g Magic plate armor
if it being wore by Knight :- It add 5 Sword Skills and protection all 3%
if it being wore by pally :- it add add 7 distance skills and protection all 7%
if it being wore by mages :- it add 10 Magic levels and protection 10%

is it possible ? if yes, are all attr keys are avilaible in this case or it gonna be different way ?


thanks. :)
in all TFS versions its easy to do.
IN TFS 1.x you do this in movements.xml and register items as equip event.
you get vocation with using function getVocation() on a userdata.
you create condition like that: Condition(CONDITION_ATTRIBUTES)
you set parameters to this condition inside the script.
and you set storage value to player what will activate in creaturescripts to protect % damage.
 
in all TFS versions its easy to do.
IN TFS 1.x you do this in movements.xml and register items as equip event.
you get vocation with using function getVocation() on a userdata.
you create condition like that: Condition(CONDITION_ATTRIBUTES)
you set parameters to this condition inside the script.
and you set storage value to player what will activate in creaturescripts to protect % damage.
I already did it, Thanks for your attention.
 
IDOFFIRSTDEMONARMOR
I've got an Idea (and it's what I've been using on my ot server)

Edit your otb file, and duplicate the item you want to be held by a 'x' vocation.

You don't need to edit your spr or dat, only your definitions on the server-side.


For example: I will create 2 new demon armor.

Add each demon armor to movevents, one for knights, one for sorcerers and druids and the last for paladins.

Add in items.xml atributtes for each demon armor.

Now let's create an action to transform by click each armor (like a cycle)



To your first demon armor:


function onUse(cid, item, fromPosition, itemEx, toPosition)

doTransformItem(item.uid, IDOFNEXTDEMONARMOR)

end


And it's tag to actions.xml : <action itemid="DEMON ARMOR ID" event="script" value="script.lua"/>


Do the same with the following demon armors and with your last demon armor you should return to the first demon armor.


function onUse(cid, item, fromPosition, itemEx, toPosition)

doTransformItem(item.uid, IDOFFIRSTDEMONARMOR)

end


and Add it's own tag to actions.

Remember, each demon armor can be wielded by only one vocation and each armor has it's own atributtes.
Add the tags to movevents and with actions.
Its already done, all in movements.
 
Back
Top