• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] How to create level up shop on unit?

Status
Not open for further replies.
Level 12
Joined
Feb 5, 2018
Messages
521
Hello,

basically what I want is to have ability called "level up" on unit and it can be opened and it sells 6 different tomes for 1 lumber each.

It doesn't matter if the unit has the ability all the time, since the items cost statpoins anyway. :)

I am giving my unit 2 statpoints for level up and then the idea is that the player can choose what stats to improve when he gains levels.

I tried to search, found only 8 threads and none of them are what I wanted :(

EDIT: I've done it.

  • Stat points
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Agility
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Charisma
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Focus
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Intelligence
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Strength
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Toughness
      • ((Owner of (Triggering unit)) Current lumber) Greater than 0
    • Actions
      • Player - Set (Owner of (Triggering unit)).Current lumber to (((Owner of (Triggering unit)) Current lumber) - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Agility
        • Then - Actions
          • Hero - Create Increase Agility and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Charisma
        • Then - Actions
          • Hero - Create Increase Charisma and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Focus
        • Then - Actions
          • Hero - Create Increase Focus and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Intelligence
        • Then - Actions
          • Hero - Create Increase Intelligence and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Strength
        • Then - Actions
          • Hero - Create Increase Strength and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Cost: |cff00ffff1 Stat point|r|nIncrease Toughness
        • Then - Actions
          • Hero - Create Increase Toughness and give it to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current lumber) Less than or equal to 0
        • Then - Actions
          • Player - Disable Level Up for (Owner of (Triggering unit))
        • Else - Actions

The purchase abilities are made out of channel and are in a spell book unit ability.

The ability is disabled and enabled when the unit gains level. And is disabled again when the player runs out of lumber (stat points).
 
Last edited:
Status
Not open for further replies.
Top