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

Incompatibility between those two systems

reisbro

Member
Joined
May 15, 2017
Messages
94
Solutions
1
Reaction score
7
System number 1 = Feature - Random Attributes

System number 2 = Perfect Upgrade System

The random attributes is perfect, I tested it and it works like a charm. The upgrade system also works, but only on items that did not suffer from the random attributes changes. For instance:
I edited the axe for a chance to get bonus attack and bonus defense, and it worked. But when I tried to refine the axe to make it even stronger, the upgrade system reverted the axe TOTAL DAMAGE to 0 and then started to increase by 2 with each succesful refine! So a +1 axe has only 2 damage.

When I used it in a non modified club (7/7) the refine system worked normally, and each '+' the club got, the attack increased by 2.

I read both scripts and couldn't find the source of this error
 
Last edited:
Post the code from Tibia King here insted, everyone dosn't have a login there.

Oh, my bad! Codex NG posted the script for me haha, but I will remember this for the future, thanks!


Thank you!

And hey I have one suggestion.
The random attributes mod changes the .xml of the items, so you can add a min/max value for both the attack and the extra attack of a weapon:

XML:
<item id="2386" article="an" name="axe">
        <attribute key="weight" value="4000" />
        <attribute key="defense" value="5" />
        <attribute key="attack" random_min="11" random_max="20" />
        <attribute key="extraattack" chance="50" random_min="2" random_max="6" />
        <attribute key="extradefense" chance="50" random_min="3" random_max="5" />
        <attribute key="weaponType" value="axe" />
</item>

If I leave it this way, the refine system won't work properly, because I think it literally searches for the word 'value' in the .xml file instead of the actual attack of the weapon. The attack here has no value, it has a random_min and random_max, so the script takes the 'value' as nil and transforms it to 0.
I really think this is true, because if I remove the random_min and random_max and use a fixed 'value', the script works properly. However I would really like to have random base damage and random extra damage! Looking at the function I couldn't find why and where it searches for the literal 'value' and not the actual attack attribute of the weapon. Thanks in advance!
 
I mean I could combine the 2 to work together, for a price of course ;)

As much as I wanted, I couldn't pay you because I live in brazil and have no paypal account or whatsoever haha.
I will try to figure it out though since I just started studying computer engineering :p
 
Back
Top