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

Simple spell system request GUI

Status
Not open for further replies.
Level 9
Joined
Dec 15, 2009
Messages
523
Hello guys,
i need help,can anyone with good knowledge of GUI help me create a system template
because i am not that good with triggering and still learning (Cant do the complicated stuffs yet)
so if anybody is willing to create a leak-less system for me i'm sure i will credit you in the future.

The system i want is to let player purchase spells in the shop

*leveling up the spells by just re purchasing it in the vendor

*and also a reset all learned spells in vendor.

Thanks in advance and ill + Rep.



*NOTE*: i actually already have this system created for me long time ago by icemanBo but my PC was formatted and i lost all my files including the system.
 

Deleted member 219079

D

Deleted member 219079

There is beginner friendly tutorial on this on hive.
 
Level 9
Joined
Dec 15, 2009
Messages
523
There is beginner friendly tutorial on this on hive.

i know that,i have searched and even tried to make it myself
like i mentioned I'm not good with triggering i have failed many times

that's why i request a template here in the request section.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
If you haven't already, you might try asking Iceman if they still have it. If not, I'm sure I can put something together for you in the next day or so.


Edit: Just went ahead and did it since its pretty simple. I'll post the triggers just in case someone might spot an error I missed. The setup should be pretty self explanatory. Let me know if you have a problem or question.

Edit2: Fixed removing the item when it shouldn't be handled by this

  • Ability SetUp
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ItemsInShop[0] = Reset Abilities
      • Set ItemsInShop[1] = Unholy Aura
      • Set ItemsInShop[2] = Endurance Aura
      • Set AbilitiesForSale[1] = Unholy Aura
      • Set AbilitiesForSale[2] = Endurance Aura
      • Set MaxLevelOfAbility[1] = 2
      • Set MaxLevelOfAbility[2] = 3
      • Set TotalNumberOfAbilities = 2
  • Purchase
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • Set TempUnit = (Buying unit)
      • Set TempItem = (Sold Item)
      • Set TempForce = (Player group((Owner of TempUnit)))
      • For each (Integer TempInteger) from 0 to TotalNumberOfAbilities, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of TempItem) Equal to ItemsInShop[TempInteger]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of TempItem) Equal to ItemsInShop[0]
                • Then - Actions
                  • For each (Integer TempInteger2) from 1 to TotalNumberOfAbilities, do (Actions)
                    • Loop - Actions
                      • Unit - Remove AbilitiesForSale[TempInteger2] from TempUnit
                  • Game - Display to TempForce the text: Removed all purchas...
                  • Item - Remove TempItem
                  • Custom script: call DestroyForce(udg_TempForce)
                  • Skip remaining actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of AbilitiesForSale[TempInteger] for TempUnit) Equal to 0
                • Then - Actions
                  • Unit - Add AbilitiesForSale[TempInteger] to TempUnit
                  • Game - Display to TempForce the text: (Purchased + (Name of TempItem))
                • Else - Actions
                  • Set TempInteger3 = ((Level of AbilitiesForSale[TempInteger] for TempUnit) + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempInteger3 Greater than MaxLevelOfAbility[TempInteger]
                    • Then - Actions
                      • Game - Display to TempForce the text: (Could not increase level of + ((Name of TempItem) + because it is already at the max level.))
                    • Else - Actions
                      • Unit - Set level of AbilitiesForSale[TempInteger] for TempUnit to TempInteger3
                      • Game - Display to TempForce the text: (Increased level of + ((Name of TempItem) + ( to + (String(TempInteger3)))))
              • Item - Remove TempItem
            • Else - Actions
      • Custom script: call DestroyForce(udg_TempForce)
 

Attachments

  • Purchase Abilities.w3x
    18.7 KB · Views: 55
Last edited:
Level 9
Joined
Dec 15, 2009
Messages
523
Poke thank you for your time and effort.
by the way, does triggered spell can be reset too? or is just a tome of retraining..
+rep
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
I'm not sure I entirely understand what you mean.

As long as you go and make an item with the name of the spell so ItemsInShop[3] = TriggeredSpell
Then you go and set AbilitiesForSale[3] = TriggeredSpell (Ability ID for your triggered spell)
Also give it a MaxLevelOfAbility[3] = 10
This will allow it to be bought and removed.

As it pertains to resetting. Tome of Retraining is not used at all it's just an icon that I picked. When the item that looks like tome of retraining is bought the trigger loops through all possible sold abilities and removes the one's the unit has purchased. So if a unit has a skill like storm bolt by default and so long as they cannot buy that exact same storm bolt it wont be removed when reset is called.
 
Status
Not open for further replies.
Top