• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

~Get out now if wearing shield help

Hey, I cannot figure out how to add shield to this script:

~ Get out now if wearing Medium or Heavy armor
doneif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0)
Specifically, I'd like to have this work where a buckler is the only shield you can wear without the script ending.

Essentially, this is a feat that requires that you be wearing light or no armor, and may not use shields except bucklers.

I tried adding hero.shield or hero.lightshield or hero.heavyshield but those don't seem to exist. Is there a comprehensive list of item references somewhere?

Thanks in advance.
 
Last edited:
Unique Id's for shields

Buckler ID = shBuckler

Heavy Steel Shield ID = shHvSteel

Light Steel Shield ID = shLtSteel

Tower Shield ID = shTower

:)
 
I tried adding hero.shield or hero.lightshield or hero.heavyshield but those don't seem to exist. Is there a comprehensive list of item references somewhere?
Make a new character. Add a buckler. Equip the buckler.

Go to "Develop->Floating Info Windows->Show Hero Tags" will show you every tag currently active on the hero. Look through the list for helpful tags. We find we have "Hero.EquipShld" and "ShldClass.Buckler" when a buckler is equipped. Or we have "Hero.EquipShld" and "ShldClass.Light" when its a light shield.

So with this info we can do the following:
Code:
~ Get out now if wearing Medium or Heavy armor
doneif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) 
~ Get out now if wearing a shield besides a buckler
doneif (hero.tagis[Hero.EquipShld] - hero.tagis[ShldClass.Buckler] <> 0)

So tagis returns 1 or 0. So if we have a equipped shield (Hero.EquipShld) we get a value of 1. If its a Buckler (ShldClass.Buckler) it will also return 1 giving a final result of 1 - 1 = 0 which when compared to not equal to 0 will return false. If we have a light shield we get 1 - 0 = 1 which is NOT equal to zero and will return TRUE and end the script.
 
Back
Top