Loot table

1337Elite

New Member
Reaction score
14
I'm trying to make an easy to use loot table, but I simply can't figure out how to do it.

What I'm trying to do is something like this:
Code:
LootUnitType[1] = Gnoll
LootItem[LootUnitType,1] = Dagger
LootItem[LootUnitType,2] = Leather Armour
Or simply:
Code:
LootUnitType[1] = Gnoll
LootItem[1,1] = Dagger
LootItem[1,2] = Leather Armour
LootUnitType[2] = Fish
LootItem[2,1] = Intestines
LootItem[2,2] = Fish Scales
I just can't figure out how to do something like that in a simple way.

Edit: Alright. I've got a bunch of problems that I've bumped into.

I'm creating a map where the minimum damage and maximum damage depends on the weapon/item. I just can't figure out how to do it, or if it's possible.
If it's not, I was think of something like changing the primary attribute to get a damage perk. That would require precision calculation and edit of gameplay constants, unit editing and attribute modification. Trying to come up with something else if the min/max damage can't be changed.
 

1337Elite

New Member
Reaction score
14
You mean like Random-groups? Is that the inbuilt item drop system or something else?

Well, now when I'm on it, I've got yet another problem! I've got this class dependant item system and a system that restricts the use of two of the same item. These are the triggers:
Code:
Item Init
    Events
        Map initialization
    Conditions
    Actions
        -------- Weapons --------
        Set ItemWeaponID[1] = Dagger
        Set ItemWeaponID[2] = |cFF004080Dagger of Estle|r
        Set ItemWeaponID[3] = |cFF00FF00Enchanted Hatchet|r
        Set ItemWeaponID[4] = |cFF00FF00Recruit Rogue's Axe|r
        -------- Potions --------
        Set ItemPotionsID[1] = Greater Health Potion
        Set ItemPotionsID[2] = Greater Mana Potion
        Set ItemPotionsID[3] = Major Health Potion
        Set ItemPotionsID[4] = Major Mana Potion
        Set ItemPotionsID[5] = Minor Health Potion
        Set ItemPotionsID[6] = Minor Mana Potion
        -------- Armour --------
        Set ItemtArmourID[1] = Cloth Cape
        Set ItemtArmourID[2] = Leather Armor
Code:
Class Items Init
    Events
        Map initialization
    Conditions
    Actions
        -------- Rogue Items --------
        Set RogueClass[1] = ItemWeaponID[1]
        Set RogueClass[2] = ItemWeaponID[2]
        Set RogueClassCur = 2
        -------- Brawler Items --------
        Set BrawlerClass[1] = ItemWeaponID[3]
        Set RogueClass[2] = ItemWeaponID[4]
        Set BrawlerClassCur = 2
        -------- Spellcaster Items --------
        Set SpellcasterClassCur = 0
Code:
ItemOnce Weapon
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-type of (Item being manipulated)) Equal to ItemWeaponID[1]
                (Item-type of (Item being manipulated)) Equal to ItemWeaponID[2]
                (Item-type of (Item being manipulated)) Equal to ItemWeaponID[3]
                (Item-type of (Item being manipulated)) Equal to ItemWeaponID[4]
    Actions
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - 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 (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[1]
                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[2]
                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[3]
                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[4]
                    Then - Actions
                        For each (Integer B) from ((Integer A) + 1) to 6, do (Actions)
                            Loop - 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 (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[1]
                                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[2]
                                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[3]
                                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemWeaponID[4]
                                    Then - Actions
                                        Hero - Drop the item from slot (Integer B) of (Hero manipulating item)
                                    Else - Actions
                    Else - Actions
Code:
ItemOnce Armour
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-type of (Item being manipulated)) Equal to ItemtArmourID[1]
                (Item-type of (Item being manipulated)) Equal to ItemtArmourID[2]
    Actions
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - 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 (Hero manipulating item) in slot (Integer A))) Equal to ItemtArmourID[1]
                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemtArmourID[2]
                    Then - Actions
                        For each (Integer B) from ((Integer A) + 1) to 6, do (Actions)
                            Loop - 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 (Hero manipulating item) in slot (Integer A))) Equal to ItemtArmourID[1]
                                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to ItemtArmourID[2]
                                    Then - Actions
                                        Hero - Drop the item from slot (Integer B) of (Hero manipulating item)
                                    Else - Actions
                    Else - Actions
Code:
Class Items Brawler
    Events
        Unit - A unit Acquires an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Unit-type of (Hero manipulating item)) Equal to Human Brawler (Brawler)
                (Unit-type of (Hero manipulating item)) Equal to Elf Brawler (Brawler)
        And - All (Conditions) are true
            Conditions
    Actions
        Game - Display to (All players) the text: Brawler
        Set ClassBool = False
        For each (Integer A) from 1 to BrawlerClassCur, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-type of (Item being manipulated)) Equal to BrawlerClass[(Integer A)]
                    Then - Actions
                        Set ClassBool = True
                        Custom script:   exitwhen true
                    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ClassBool Equal to False
            Then - Actions
                Hero - Drop (Item being manipulated) from (Hero manipulating item)
                Game - Display to (Player group((Owner of (Triggering unit)))) for 3.00 seconds the text: Only for Brawlers
            Else - Actions
The rest of the classes are the same in the trigger directly above this sentence. I've been trying all night to get this to work, but no prevail! I really need this to work, so if someone is willing to help, please do! ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top