- Joined
- Mar 16, 2017
- Messages
- 1,302
- Solutions
- 141
- Reaction score
- 1,654
- Location
- London
- GitHub
- MillhioreBT
- Twitch
- millhiore_bt
Small Upgrade System
The upgrade of wands and rods is allowed.
You can add several types of object to use the system, in example code I have configured two objects
per example:

Each object has its well defined properties and it is already a matter of you using your imagination
||||||||: Here we have a 100%
||||||||: Here we have a 50%
per example:

||||||||: We only define the variable
||||||||: We only define
||||||||: We only define
others:

||||||||: If this variable is true, then failed attempts degrade the object
||||||||: If this variable is true, the attempts are infinite
images:

File: data/scripts/small_upgrade_system.lua
Don't forget to trigger the following events in the events.xml file
¿What is this system about?
This is a simple system that updates item attributes.
per example:
Attack from a weapon
The armor of an legs
The abilities of a shield or something else
in general any attribute can be upgradeable
You must bear in mind that not all attributes can be upgrade, but here I will leave a list of the attributes that can be upgrade
Note:
I will try to add more attributes to it in the future.
If you notice any bug you can leave me a comment.
I know there are better systems and with many more details, but I just wanted to share my small version
The upgrade of wands and rods is allowed.
You can add several types of object to use the system, in example code I have configured two objects
per example:

Each object has its well defined properties and it is already a matter of you using your imagination
||||||||: Here we have a 100%
chance
so it will be very easy to improve with this object, however we will give few attributes||||||||: Here we have a 50%
chance
so it will be easy to improve with this object, in this case we will give more attributes for the difficultyper example:

||||||||: We only define the variable
chance
here, this is because it is level 0||||||||: We only define
downLvl
and chance
here, This is because we can have a degradation or an increase||||||||: We only define
downLvl
here, This is because we can have a degradation but not an increaseothers:

||||||||: If this variable is true, then failed attempts degrade the object
||||||||: If this variable is true, the attempts are infinite
images:

File: data/scripts/small_upgrade_system.lua
Don't forget to trigger the following events in the events.xml file
XML:
<event class="Creature" method="onTargetCombat" enabled="1" />
...
<event class="Player" method="onItemMoved" enabled="1" />
¿What is this system about?
This is a simple system that updates item attributes.
per example:
Attack from a weapon
The armor of an legs
The abilities of a shield or something else
in general any attribute can be upgradeable
You must bear in mind that not all attributes can be upgrade, but here I will leave a list of the attributes that can be upgrade
Lua:
attack
defense
extraDefense
armor
wandDamage
elementDamage
fist fighting
club fighting
sword fighting
axe fighting
distance fighting
shielding
fishing
max health
max mana
magic level
reg health
reg mana
speed
critical hit chance
critical extra damage
hitpoints leech chance
hitpoints leech amount
manapoints leech chance
mana points leech amount
Note:
I will try to add more attributes to it in the future.
If you notice any bug you can leave me a comment.
I know there are better systems and with many more details, but I just wanted to share my small version
Last edited: