• 🏆 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!

[Trigger] Spells in hidden spellbook

Status
Not open for further replies.
Level 4
Joined
May 23, 2010
Messages
83
I'm working on an orpg, as some people know from my other posts. my current problem is that i can't increase (or set) the level of an ability in a spellbook (that is "hidden").

  • Spellbook Levelup
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Greater than or equal to 10
          • (Hero level of (Triggering unit)) Less than 20
        • Then - Actions
          • Player - Enable Rogue: Shuriken for (Owner of (Triggering unit))
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 2
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 2
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Greater than or equal to 20
          • (Hero level of (Triggering unit)) Less than 30
        • Then - Actions
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 3
          • Unit - Set level of Rogue: Shuriken for (Triggering unit) to 2
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 3
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 3
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Greater than or equal to 30
          • (Hero level of (Triggering unit)) Less than 40
        • Then - Actions
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 4
          • Unit - Set level of Rogue: Shuriken for (Triggering unit) to 3
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 4
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 4
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Greater than or equal to 40
          • (Hero level of (Triggering unit)) Less than 50
        • Then - Actions
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 5
          • Unit - Set level of Rogue: Shuriken for (Triggering unit) to 4
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 5
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 5
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Greater than or equal to 50
          • (Hero level of (Triggering unit)) Less than 60
        • Then - Actions
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 6
          • Unit - Set level of Rogue: Shuriken for (Triggering unit) to 5
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 6
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 6
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Greater than or equal to 60
          • (Hero level of (Triggering unit)) Less than 70
        • Then - Actions
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 7
          • Unit - Set level of Rogue: Shuriken for (Triggering unit) to 6
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 7
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 7
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Triggering unit)) Equal to 80
        • Then - Actions
          • Unit - Set level of Rogue: Silence of the Shadows for (Triggering unit) to 8
          • Unit - Set level of Rogue: Shuriken for (Triggering unit) to 7
          • Unit - Set level of Rogue: Wind Walk for (Triggering unit) to 8
          • Unit - Set level of Rogue (Passive): Agile for (Triggering unit) to 8
        • Else - Actions
the hidden spellbook is that thing some people know (you get 2 spellbooks with the same order and hide one of them with the player - disable spell action) the abilities are made with respectively, 7, 8 and 8 levels, so its not abilities problem. something with triggers. thnx in advance

quick edit: if there is any solution, i can try using a not-hidden spellbook but it will give me a lot of work to do. there is only one spell that actually works, its the silence of the shadows. the others don't work.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Why do the spellbooks have to have the same order ID?

Your trigger should look like this I believe:

  • Untitled Trigger 002
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set u1 = (Triggering unit)
      • Set i1 = (Level of u1)
      • Set i2 = (i1 / 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i2 Equal to 1
        • Then - Actions
          • Player - Enable Aerial Shackles for (Owner of u1)
        • Else - Actions
          • Unit - Set level of Aerial Shackles for u1 to i2
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (i1 mod 10) Equal to 0
        • Then - Actions
          • Set i2 = (i2 + 1)
          • Unit - Set level of Cloud for u1 to i2
          • Unit - Set level of Command Aura for u1 to i2
          • Unit - Set level of Polymorph for u1 to i2
        • Else - Actions
You get a bumb in the ability levels at unit level 10, 20, 30...
 
Level 4
Joined
May 23, 2010
Messages
83
the reason i got 2 books with the same ID is to hide one and show the abilities in the other one. i'll try to do as i told, with a bit of work it can work. this issues are a pain in the ass, i know but i need this, it is the game engine, so its not optional :/

sorry for the flood

edit: i got it working, thank you all for helping, i used a bit of each suggestion, and now its working. tnx
edit2: + rep to everyone!
 
Last edited:
Status
Not open for further replies.
Top