• 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

Interesting thing coming up with changing weapon damage

AndrewD2

Well-known member
I've got a class ability that alters the damage of a selected weapon like unarmed strike. I've got it all scripted out but for some reason it's showing a different value that what the assigned tag is.

For example, no matter what tag is assigned a greatsword changed to 3d4 even when the tag for 2d10 is assigned.

While some items don't change at all (Longsword, No Dachi)

My code is:
Code:
doneif (tagis[Helper.SpcDisable] <> 0)
doneif (tagis[Helper.ShowSpec] <> 1)

perform hero.findchild[BaseWep, "Custom.LivingKi"].setfocus
doneif (state.isfocus = 0)

var LWStarDam as number
var LWLevDam as number

if (focus.tagis[wMain.1_1] <> 0) then
  LWStarDam = 1
elseif (focus.tagis[wMain.1d2_2] <> 0) then
  LWStarDam = 2
elseif (focus.tagis[wMain.1d3_3] <> 0) then
  LWStarDam = 3
elseif (focus.tagis[wMain.1d4_4] <> 0) then
  LWStarDam = 4
elseif (focus.tagis[wMain.1d6_5] <> 0) then
  LWStarDam = 5
elseif (focus.tagis[wMain.1d8_6] <> 0) then
  LWStarDam = 6
elseif (focus.tagis[wMain.2d4_6] <> 0) then
  LWStarDam = 7
elseif (focus.tagis[wMain.1d10_304] <> 0) then
  LWStarDam = 8
elseif (focus.tagis[wMain.1d12_404] <> 0) then
  LWStarDam = 9
elseif (focus.tagis[wMain.2d6_104] <> 0) then
  LWStarDam = 10
endif

debug "LWStarDam: " & LWStarDam

if (field[xAllLev].value >= 20) then
  LWLevDam = 12
elseif (field[xAllLev].value >= 16) then
  LWLevDam = 11
elseif (field[xAllLev].value >= 12) then
  LWLevDam = 10
elseif (field[xAllLev].value >= 8) then
  LWLevDam = 8
elseif (field[xAllLev].value >= 4) then
  LWLevDam = 6
else
  LWLevDam = 5
endif

debug "LWLevDam: " & LWLevDam

~doneif (hero.childfound[abRPKiFocu].field[abilActive].value = 0)

if (LWLevDam > LWStarDam) then
  if (LWLevDam = 5) then
    perform focus.tagreplace[wMain.?,wMain.1d6_5]
  elseif (LWLevDam = 6) then
    perform focus.tagreplace[wMain.?,wMain.1d8_6]
  elseif (LWLevDam = 8) then
    perform focus.tagreplace[wMain.?,wMain.1d10_304]
  elseif (LWLevDam = 10) then
    perform focus.tagreplace[wMain.?,wMain.2d6_104]
  elseif (LWLevDam = 11) then
    perform focus.tagreplace[wMain.?,wMain.2d8_305]
  else
    perform focus.tagreplace[wMain.?,wMain.2d10_205]
  endif
endif

Which should be assigning the greater value of the weapon damage or the level based damage and assigning it to the weapon. I've ran it at Post-Level, Post-Attribute, and Final
5000, 10000, 20000, and 99999999.

I'm not sure why it's doing this maybe another set of eyes will be helpful.

Thanks,
Andrew
 
Anyone have any idea on this? It's been a week and I still don't have it.
I can give it a look tonight. Any other size stuff going on like Enlarge Person or use of the SetSize procedure? The above script is everything and its running on a Class Special?
 
Yep, Class Special, that's everything. There is one other special that is assigning the Custom.LivingKi tag to a specific weapon, which is identified for this special.
 
Back
Top