• 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

doneif class skill

Spyderbane

Well-known member
How can I perform an action if a skill is a class skill?
I was looking at adding this directly in a custom skill

Code:
doneif (field[kClass].value <> 0)
but this throws an error
attachment.php


Any suggestions? I'm trying to add bonus points if it is a class skill.

Full code
Code:
doneif (field[kClass].value <> 0)
var nPoints as number
nPoints = (#totallevelcount[] * 5)
field[Bonus].value += nPoints
 

Attachments

  • Screenshot 2023-11-16 094210.png
    Screenshot 2023-11-16 094210.png
    151.7 KB · Views: 13
Class skills are determined by the class, not by the skill or even the hero. So, you'll need to look at all the classes to determine if it's a class skill.

Do you want it to be a class skill for a specific class or for any class? For any class, you might try something like this:

Code:
var classskill as number
foreach pick in hero from BaseClHelp where "BaseSkill.nen2"
  classskill += 1
nexteach
doneif (classskill = 0)

I assumed "nen2" is the thingid of your skill based on the error message. If not, put the thingid of the skill in question in its place.
 
Back
Top