Here is another request and do not report an error
I would like to know the feasibility of, if there is no slotType set in the movements (in an equipable item, of course), return the slotType of items.xml
This would make it easier to register items in MoveEvents in revscriptsys, since you can place all items of a certain level in a single function (regardless of the slot)
Example:
```lua
-- mage
local equipment = MoveEvent()
function equipment.onEquip(player, item, slot, isCheck)
return true
end
equipment:id(813,818,819,820,827,828,829,830,3210,7992,9653,11674,12599,13996,19366)
equipment:vocation("sorcerer", true, true)
equipment:vocation("druid", true, true)
equipment:register()
local equipment = MoveEvent()
function equipment.onDeEquip(player, item, slot, isCheck)
return true
end
equipment:id(813,818,819,820,827,828,829,830,3210,7992,9653,11674,12599,13996,19366)
equipment:vocation("sorcerer", true, true)
equipment:vocation("druid", true, true)
equipment:register()
-- paladin
local equipment = MoveEvent()
function equipment.onEquip(player, item, slot, isCheck)
return true
end
equipment:id(3571,8044,8063,8095)
equipment:vocation("paladin", true, true)
equipment:register()
local equipment = MoveEvent()
function equipment.onDeEquip(player, item, slot, isCheck)
return true
end
equipment:id(3571,8044,8063,8095)
equipment:vocation("paladin", true, true)
equipment:register()```
To me it looks perfect as it is right now, there is no point in joining two objects from different slot_type with the same script.
I don't like the idea either of having in the same MoveEvent different slotTypes but I can enhance it in the sense that it looks for the first item and gets the slotType from items.xml if there is no slotType set.
That way we could get rid of atleast one function.
my suggestion is, one file for each slot type:
armors.lua (all vocations)
boots.lua (all vocations) etc
I can make a script for each slot, without any problem. However I thought of leaving everything in one for the ease of adding new items.
It is generally cataloged. Just adding the item at the respective level / vocation.
But, if prefer a file for each slot, no problem.
I can make a script for each slot, without any problem. However I thought of leaving everything in one for the ease of adding new items.
It is generally cataloged. Just adding the item at the respective level / vocation.
But, if prefer a file for each slot, no problem.
Currently a single file can be used for the number of events you want.
Example various events on one file:

I can make a script for each slot, without any problem. However I thought of leaving everything in one for the ease of adding new items.
It is generally cataloged. Just adding the item at the respective level / vocation.
But, if prefer a file for each slot, no problem.Currently a single file can be used for the number of events you want.
Example various events on one file:
I understand that you can put everything in a single file (separated by slot)
I just think it is bad to record many things. For example, at OTServBR - Global, we follow the current protocol, there are many items. Converting only these that I sent in the issue example looks like this: https://pastebin.com/FvRH3Bi2
227 lines
The way I sent it was just 35 lines.
Ultimately, the codes will be greater than in the XML. In my view revscriptsys can make a lot easier .
Putting one record per item looks bad (in my view)
I would not do it that way either, I would rather separate them by groups and so it looks more ordered ;)
I would not do it that way either, I would rather separate them by groups and so it looks more ordered ;)
No problem, I'm already doing it like this
The change from @EvilHero90 will help a lot
thanks @EvilHero90, good enhancement.