Xan_Kriegor
I can change this now in User CP.
- Reaction score
- 12
I'm trying to use Baka-Ranger's system for buying items that teach heroes skills via Engineering Upgrade tricks. His guide is here.
Here's my code:
The only change I've made is that my heroes can only get 3 abilities instead of 4. However, when I buy the item it doesn't disable the spellbook properly (I can still see the spellbook). Also, if I have an item in my first slot so the learn item goes to my second slot, it takes up both the first and second ability slots.
Anyone think they can help?
Here's my code:
Trigger:
- Learn Blink
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Learn Skill - Blink
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- ((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to (Item-type of (Item being manipulated))) and ((Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to (Item-type of (Item being manipulated)))
- ((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to (Item-type of (Item being manipulated))) and ((Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to (Item-type of (Item being manipulated)))
- ((Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to (Item-type of (Item being manipulated))) and ((Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to (Item-type of (Item being manipulated)))
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) for 6.00 seconds the text: |cffff0000You canno...
- Item - Remove (Item being manipulated)
- Else - Actions
- Unit - Add SB - Blink to (Triggering unit)
- For each (Integer A) from 1 to 3, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item carried by (Triggering unit) in slot (Integer A)) Equal to (Item being manipulated)
- Then - Actions
- Unit - Set level of EU - Blink for (Triggering unit) to (Integer A)
- Player - Disable SB - Blink for (Owner of (Triggering unit))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Anyone think they can help?