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

Lua Stats and such onlogin not working, where do i set?

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
177
Location
Sweden
I have an issue with items that has regen/stat changes, I've added them in movements.xml so it works on equip/deEquip but when you relog it doesn't work again.
Where do i have to put it more?

Regards,
Mjmackan
 
Solution
Look in creaturescripts for scripts with type login, it can also be in mods.

Then look for this
Code:
doRemoveConditions(cid, false)
Change it to this
Code:
doRemoveConditions(cid)
Ofcourse and TFS 0.4
Items:
XML:
<item id="5926" article="a" name="pirate backpack">
        <attribute key="description" value="[5% maxmana][5% maxhealth][50health/s][50mana/s][3+ melee/mag/dist][size: 35]" />
        <attribute key="armor" value="8" />
        <attribute key="maxHealthPercent" value="105"/>
        <attribute key="maxmanapercent" value="105"/>
        <attribute key="magiclevelpoints" value="3" />
        <attribute key="skillDist" value="3" />
        <attribute key="skillaxe" value="3" />
        <attribute key="skillsword" value="3" />
        <attribute key="skillclub" value="3" />
        <attribute key="healthGain" value="50" />
        <attribute key="healthTicks" value="1000" />
        <attribute key="manaGain" value="50" />
        <attribute key="manaTicks" value="1000" />
        <attribute key="absorbPercentDeath" value="40" />
        <attribute key="weight" value="1800" />
        <attribute key="containerSize" value="25" />
        <attribute key="slotType" value="backpack" />
    </item>
Movements:
XML:
    <movevent type="Equip" itemid="5926" slot="backpack" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="5926" slot="backpack" event="function" value="onDeEquipItem"/>


Edit: Same thing goes with ALL items with stats. So it feels like im missing to register something on login or such?
 
Last edited:
Look in creaturescripts for scripts with type login, it can also be in mods.

Then look for this
Code:
doRemoveConditions(cid, false)
Change it to this
Code:
doRemoveConditions(cid)
 
Solution
Big thanks, solved it, found it in my team event "war type of event". I didn't go through the script however but thanks!
 
Back
Top