• 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

There is any script for...

FaeruN

Active member
Hey, sorry for bothering again, is just I don't know where to find all the scripts so I can look for them by myself, so I have to ask for some scripts...

There is any script like field[gIsEquip].value <> 0 but that only works for the off-hand?

like for make a weapon to increase the enhancement bonus just if the hero holds the weapon on the off-hand?

Thank you by the way :)
 
Here is a good trick that might help in the future. Go to Develop -> Enable Data file debugging. Now add a weapon to your character, right click the weapon and pick Show debug tags, Now you have a list of the tags on that weapon. Equip it in the main hand, what tags were added? Now equip it in the off hand, which tags are added?

Now you should have enough information to write your script looking for the off hand tag.

Does the weapon get a bonus when wielded in 2 hands? If so then you only need to check for the off hand. If not then you need to check and make sure the main hand tag is not also present.
 
the thing is that I've created a sword (that I will call here customsword) that is just a +2 longsword when wielded, BUT if the custom sword is wielded in the main hand, you get another customsword and wield it in the off-hand, so you have 2 customswords, one in each hand simultaneously, then both swords turn from +2 to +5 holy speed, the weapons are the same so I need just a way that the same weapon hads to be wielded in main and off hand as two weapons.
 
It seems to me that the important thing here is that 2 customswords are equipped, it's not necessary to know which is equipped in which hand, since they both get the same power in either hand. You can create a custom tag to track how many are equipped, for this example I will refer to this new tag as "Custom.SuperSword".

To add a new Custom tag, scroll down to the bottom of any tab in the editor and hit the User Tags button, and choose New Tag at the top.

I'd recommend you have 2 eval scripts.
1) In First have it check if the weapon is equipped, if so assign Custom.SuperSword to the hero.

2) Later, use hero.tagcount to count the Custom.SuperSword tags on the hero, if there are at least 2 then do whatever (modify the enhancement bonus and names, most likely)

Capisch?
 
It seems to me that the important thing here is that 2 customswords are equipped, it's not necessary to know which is equipped in which hand, since they both get the same power in either hand. You can create a custom tag to track how many are equipped, for this example I will refer to this new tag as "Custom.SuperSword".

To add a new Custom tag, scroll down to the bottom of any tab in the editor and hit the User Tags button, and choose New Tag at the top.

I'd recommend you have 2 eval scripts.
1) In First have it check if the weapon is equipped, if so assign Custom.SuperSword to the hero.

2) Later, use hero.tagcount to count the Custom.SuperSword tags on the hero, if there are at least 2 then do whatever (modify the enhancement bonus and names, most likely)

Capisch?

I've got it but, the problem is that, when I equip the "SuperSword" in the main hand, the field[gIsEquip] works perfectly, but on the off hand, this field doesn't fills and I look for a tag that should appear or change when I equip an off hand weapon, but I just can't find it
 
Last edited:
When a weapon is equipped in the main hand, it has the Hero.MainHand tag, and when it is equipped in the off hand it has the Hero.OffHand tag.
 
and how do I use that? I've tried if the tag is on use, or to tagcount looking for that tag and it stills doesn't work... I don't have any more ideas for this...
 
if (tagis[Hero.MainHand] <> 0) then
DO WHATEVER
endif

if (tagis[Hero.OffHand] <> 0) then
DO WHATEVER
endif
 
Maybe its just me but I am wondering if you both are on the same page. My advice would be for FaeruN to post your full code that your having problems with including the timing you are using.
 
I've got it but, the problem is that, when I equip the "SuperSword" in the main hand, the field[gIsEquip] works perfectly, but on the off hand, this field doesn't fills and I look for a tag that should appear or change when I equip an off hand weapon, but I just can't find it
There is an offhand field that gets set to 1 when its equipped in the off-hand. Or at least I remember there being one. Look at the fields on the weapon and then check the off-hand box off/on and see what field is getting set to a 1/0 value.
 
I am using these

Phase: Post Levels Priority: 5000 Index: 1


if (tagis[hero.EquipWep] = 2) then
if (tagis[hero.EquipMain] <> 0) then
if (tagis[hero.EquipOff] <> 0) then
perform hero.assign[Custom.TwiceEquip]
endif
endif
endif
Phase: Final Phase Priority: 10000 Index: 2


if (hero.tagcount[Custom.TwiceEquip] <> 0) then
field[BonEnhance].value = 5
endif

and it sends me an error that says Group -> "Hero" not defined
 
Capitalization matters - tagis[Hero, not tagis[hero

hahahaha thanks for that dude it is a good advice, I didn't noticed that... but it stills not working, this is how I am using it now:

Phase: Final Phase Priority: 10000 Index: 1

if (hero.tagcount[Hero.EquipWep] = 2) then
if (tagis[Hero.EquipMain] <> 0) then
if (tagis[Hero.EquipOff] <> 0) then
field[BonEnhance].value = 5
endif
endif
endif
 
This is why I like indenting if statements - it lets you see how they flow.

This is what you have:

Code:
if (hero.tagcount[Hero.EquipWep] = 2) then
  if (tagis[Hero.EquipMain] <> 0) then
    if (tagis[Hero.EquipOff] <> 0) then
      field[BonEnhance].value = 5
      endif
    endif
  endif

Is that the set of tests you want to use? See how it flows - making the next test only if the previous one is passed?
 
not necessarily, the thing is that the 3 conditions must be met for the bonus to apply, no matter the way really

To both weapons to be wielded at the same time
To wield one of them on the main hand
To wield the other weapon on the off hand (obviusly)

if there is another way to evaluate the conditions that makes it easier and that could work, go ahead, because I think that the logical of the conditions it is correct and you all understand the idea of the weapon
 
hell yeah it is finally working!! thank you Aaron, ShadowChemosh and Mathias :)

here is a copy of the eval script if someone else needs to do some thing like this

Phase: Post-Levels Priority: 5000 Index: 1

if (tagis[Hero.MainHand] <> 0) then
perform hero.assign[Custom.TwiceEquip]
endif

if (tagis[Hero.OffHand] <> 0) then
perform hero.assign[Custom.TwiceEquip]
endif
Phase: Post-Levels Priority: 5001 Index: 2

if (hero.tagcount[Custom.TwiceEquip] = 2) then
field[BonEnhance].value = 5
endif
 
Back
Top