• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger Request] Multiple Inventar Sys.

Status
Not open for further replies.
Level 12
Joined
Apr 26, 2008
Messages
830
Hi guys,
Since my old system has some problems, like it creates 2 items when changing inventory, the system should have 3 inventories, like a backpack system to have more items:

All items of class [X] go to backpack 1
All items of class [Y] go to backpack 2
All items of class [Y] go to backpack 3

basically 1 backpack for special items, and 2 other ones for normal items.

Basically a backpack system.

GUI MUI PLS
 
Last edited:
Level 12
Joined
Apr 26, 2008
Messages
830
Can you write on your own language and use google translator ?
This is not an insult, but an order.

:eekani:, what did you not understand from it?

EDIT:Alright I edited it, take a look at it now.

EDIT2: Somehow my old trigger only shows no mistakes when i play it alone, when i play it with other people it creates 2 items. here is the trigger.

  • Inventory Init
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • Hashtabelle - Create a hashtable
      • Set Inv_Hash = (Last created hashtable)
  • Inventory Pick
    • Ereignisse
      • Einheit - A unit Erwirbt einen Gegenstand
    • Bedingungen
      • Inv_Active Gleich True
      • ((Triggering unit) is Ein Urtum) Gleich False
    • Aktionen
      • -------- Find hero index --------
      • Set j = ((Player number of (Owner of (Triggering unit))) x (6 x Inv_Pages))
      • -------- Now j contains the first slot of the hero's inventory. --------
      • -------- lZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZl --------
      • -------- Item is pokeball - Slots 0-5 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Dauerhaft
        • 'THEN'-Aktionen
          • For each (Integer tmpSlot) from j to (j + 5), do (Actions)
            • Schleifen - Aktionen
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Bedingungen
                  • Inv_Used[tmpSlot] Gleich False
                • 'THEN'-Aktionen
                  • Set Inv_Items[tmpSlot] = (Item-type of (Item being manipulated))
                  • Set Inv_Used[tmpSlot] = True
                  • Set Inv_Charges[tmpSlot] = (Charges remaining in (Item being manipulated))
                  • Set Inv_Temp_Item = (Item being manipulated)
                  • Set Inv_Temp_Page = 1
                  • Set Inv_Temp_Slot = tmpSlot
                  • Countdown-Timer - Start Inv_PickTimer as a Einmalig timer that will expire in 0.00 seconds
                  • Skip remaining actions
                • 'ELSE'-Aktionen
          • Set Inv_Temp_Hero = (Triggering unit)
          • Set Inv_Temp_Item = (Item being manipulated)
          • Countdown-Timer - Start Inv_DropTimer as a Einmalig timer that will expire in 0.00 seconds
        • 'ELSE'-Aktionen
      • -------- Item goes to backpack - Slots 6-11 --------
      • Set j = (j + 6)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Käuflich
        • 'THEN'-Aktionen
          • For each (Integer tmpSlot) from j to (j + 5), do (Actions)
            • Schleifen - Aktionen
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Bedingungen
                  • Inv_Used[tmpSlot] Gleich False
                • 'THEN'-Aktionen
                  • Set Inv_Items[tmpSlot] = (Item-type of (Item being manipulated))
                  • Set Inv_Used[tmpSlot] = True
                  • Set Inv_Charges[tmpSlot] = (Charges remaining in (Item being manipulated))
                  • Set Inv_Temp_Item = (Item being manipulated)
                  • Set Inv_Temp_Page = 2
                  • Set Inv_Temp_Slot = tmpSlot
                  • Countdown-Timer - Start Inv_PickTimer as a Einmalig timer that will expire in 0.00 seconds
                  • Skip remaining actions
                • 'ELSE'-Aktionen
          • Set Inv_Temp_Hero = (Triggering unit)
          • Set Inv_Temp_Item = (Item being manipulated)
          • Countdown-Timer - Start Inv_DropTimer as a Einmalig timer that will expire in 0.00 seconds
        • 'ELSE'-Aktionen
      • -------- Item is badge - Slots 12-18 --------
      • Set j = (j + 6)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Artefakt
        • 'THEN'-Aktionen
          • For each (Integer tmpSlot) from j to (j + 5), do (Actions)
            • Schleifen - Aktionen
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Bedingungen
                  • Inv_Used[tmpSlot] Gleich False
                • 'THEN'-Aktionen
                  • Set Inv_Items[tmpSlot] = (Item-type of (Item being manipulated))
                  • Set Inv_Used[tmpSlot] = True
                  • Set Inv_Charges[tmpSlot] = (Charges remaining in (Item being manipulated))
                  • Set Inv_Temp_Item = (Item being manipulated)
                  • Set Inv_Temp_Page = 3
                  • Set Inv_Temp_Slot = tmpSlot
                  • Countdown-Timer - Start Inv_PickTimer as a Einmalig timer that will expire in 0.00 seconds
                  • Skip remaining actions
                • 'ELSE'-Aktionen
          • Set Inv_Temp_Hero = (Triggering unit)
          • Set Inv_Temp_Item = (Item being manipulated)
          • Countdown-Timer - Start Inv_DropTimer as a Einmalig timer that will expire in 0.00 seconds
        • 'ELSE'-Aktionen
  • Inventory Remove Item
    • Ereignisse
      • Zeit - Inv_PickTimer expires
    • Bedingungen
    • Aktionen
      • Set Inv_Data[Inv_Temp_Slot] = (Custom value of Inv_Temp_Item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • Inv_Current[(Player number of (Owner of (Triggering unit)))] Ungleich Inv_Temp_Page
        • 'THEN'-Aktionen
          • Set Inv_Active = False
          • Gegenstand - Remove Inv_Temp_Item
          • Countdown-Timer - Start Inv_ReactivateTimer as a Einmalig timer that will expire in 0.00 seconds
        • 'ELSE'-Aktionen
  • Inventory Drop Item
    • Ereignisse
      • Zeit - Inv_DropTimer expires
    • Bedingungen
    • Aktionen
      • Set Inv_Active = False
      • Held - Drop Inv_Temp_Item from Inv_Temp_Hero
      • Countdown-Timer - Start Inv_ReactivateTimer as a Einmalig timer that will expire in 0.00 seconds
  • Inventory Update Charges
    • Ereignisse
      • Einheit - A unit Benutzt einen Gegenstand
    • Bedingungen
      • Inv_Active Gleich True
      • ((Triggering unit) is Ein Urtum) Gleich False
    • Aktionen
      • -------- Find hero index --------
      • Set j = ((Player number of (Owner of (Triggering unit))) x (6 x Inv_Pages))
      • -------- Now j contains the first slot of the hero's inventory. --------
      • -------- lZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZl --------
      • -------- Item is pokeball - Slots 0-5 --------
      • -------- Item is in backpack - Slots 6-11 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Käuflich
        • 'THEN'-Aktionen
          • Set j = (j + 6)
        • 'ELSE'-Aktionen
      • -------- Item is badge - Slots 12-18 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Kampagne
        • 'THEN'-Aktionen
          • Set j = (j + 12)
        • 'ELSE'-Aktionen
      • -------- Unregister item --------
      • For each (Integer tmpSlot) from 1 to 6, do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Item carried by tmpTrainer in slot tmpSlot) Gleich (Item being manipulated)
            • 'THEN'-Aktionen
              • Set Inv_Charges[((tmpSlot + j) - 1)] = (Charges remaining in (Item being manipulated))
            • 'ELSE'-Aktionen
  • Inventory Move Item
    • Ereignisse
      • Einheit - A unit Erhält einen auf ein Objekt zielenden Befehl
    • Bedingungen
      • Inv_Active Gleich True
    • Aktionen
      • -------- This will get the target inventory slot to tmpOtherSlot (believe me) --------
      • Custom script: set udg_tmpOtherSlot = GetIssuedOrderId() - 852002
      • Custom script: if udg_tmpOtherSlot < 0 or udg_tmpOtherSlot > 5 then
      • Custom script: return
      • Custom script: endif
      • -------- Find moving item slot to tmpSlot --------
      • For each (Integer j) from 1 to 6, do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Item carried by (Triggering unit) in slot j) Gleich (Target item of issued order)
            • 'THEN'-Aktionen
              • Set tmpSlot = (j - 1)
              • Set j = 7
            • 'ELSE'-Aktionen
      • -------- Find hero index --------
      • Set j = ((Player number of (Owner of (Triggering unit))) x (6 x Inv_Pages))
      • -------- Now j contains the first slot of the hero's inventory. --------
      • -------- lZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZl --------
      • -------- Item is in backpack - Slots 6-11 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Target item of issued order)) Gleich Käuflich
        • 'THEN'-Aktionen
          • Set j = (j + 6)
        • 'ELSE'-Aktionen
      • -------- Item is badge - Slots 12-18 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Target item of issued order)) Gleich Kampagne
        • 'THEN'-Aktionen
          • Set j = (j + 12)
        • 'ELSE'-Aktionen
      • -------- Now swap items in tmpSlot and tmpOtherSlot --------
      • Set tmpOtherSlot = (tmpOtherSlot + j)
      • Set tmpSlot = (tmpSlot + j)
      • Set Inv_Items[tmpOtherSlot] = Inv_Items[tmpSlot]
      • Set Inv_Charges[tmpOtherSlot] = Inv_Charges[tmpSlot]
      • Set Inv_Data[tmpOtherSlot] = Inv_Data[tmpSlot]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • Inv_Used[tmpOtherSlot] Gleich True
        • 'THEN'-Aktionen
          • Set tmpOtherSlot = ((tmpOtherSlot - j) + 1)
          • Set Inv_Temp_Item = (Item carried by (Triggering unit) in slot tmpOtherSlot)
          • Set Inv_Items[tmpSlot] = (Item-type of Inv_Temp_Item)
          • Set Inv_Charges[tmpSlot] = (Charges remaining in Inv_Temp_Item)
          • Set Inv_Data[tmpSlot] = (Custom value of Inv_Temp_Item)
        • 'ELSE'-Aktionen
          • Set Inv_Used[tmpOtherSlot] = True
          • Set Inv_Used[tmpSlot] = False
  • Inventory Lose
    • Ereignisse
      • Einheit - A unit Verliert einen Gegenstand
    • Bedingungen
      • Inv_Active Gleich True
      • ((Triggering unit) is Ein Urtum) Gleich False
    • Aktionen
      • -------- Find hero index --------
      • Set j = ((Player number of (Owner of (Triggering unit))) x (6 x Inv_Pages))
      • -------- Now j contains the first slot of the hero's inventory. --------
      • -------- lZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZl --------
      • -------- Item is pokeball - Slots 0-5 --------
      • -------- Item is in backpack - Slots 6-11 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Käuflich
        • 'THEN'-Aktionen
          • Set j = (j + 6)
        • 'ELSE'-Aktionen
      • -------- Item is badge - Slots 12-18 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-class of (Item being manipulated)) Gleich Kampagne
        • 'THEN'-Aktionen
          • Set j = (j + 12)
        • 'ELSE'-Aktionen
      • -------- Unregister item --------
      • For each (Integer tmpSlot) from 1 to 6, do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Item carried by tmpTrainer in slot tmpSlot) Gleich (Item being manipulated)
            • 'THEN'-Aktionen
              • Set Inv_Used[((tmpSlot + j) - 1)] = False
            • 'ELSE'-Aktionen
  • Inventory See Pokeballs
    • Ereignisse
      • Einheit - A unit Startet den Effekt einer Fähigkeit
    • Bedingungen
      • (Ability being cast) Gleich Pokeballs
    • Aktionen
      • Set tmpTrainer = (Triggering unit)
      • -------- Find hero index --------
      • Set j = ((Player number of (Owner of (Triggering unit))) x (6 x Inv_Pages))
      • -------- Now j contains the first slot of the hero's inventory. --------
      • -------- lZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZl --------
      • Set Inv_Active = False
      • Set Inv_Current[(Player number of (Owner of tmpTrainer))] = 1
      • For each (Integer tmpSlot) from j to (j + 5), do (Actions)
        • Schleifen - Aktionen
          • Gegenstand - Remove (Item carried by tmpTrainer in slot ((tmpSlot - j) + 1))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • Inv_Used[tmpSlot] Gleich True
            • 'THEN'-Aktionen
              • Held - Create Inv_Items[tmpSlot] and give it to tmpTrainer
              • Einheit - Order tmpTrainer to move (Last created item) to inventory slot ((tmpSlot - j) + 1)
              • Gegenstand - Set the custom value of (Last created item) to Inv_Data[tmpSlot]
            • 'ELSE'-Aktionen
      • Countdown-Timer - Start Inv_ReactivateTimer as a Einmalig timer that will expire in 0.00 seconds
  • Inventory See Backpack
    • Ereignisse
      • Einheit - A unit Startet den Effekt einer Fähigkeit
    • Bedingungen
      • (Ability being cast) Gleich Backpack
    • Aktionen
      • Set tmpTrainer = (Triggering unit)
      • -------- Find hero index --------
      • Set j = ((Player number of (Owner of (Triggering unit))) x (6 x Inv_Pages))
      • Set j = (j + 6)
      • -------- Now j contains the first slot of the hero's inventory. --------
      • -------- lZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZl --------
      • Set Inv_Active = False
      • Set Inv_Current[(Player number of (Owner of tmpTrainer))] = 2
      • For each (Integer tmpSlot) from j to (j + 5), do (Actions)
        • Schleifen - Aktionen
          • Gegenstand - Remove (Item carried by tmpTrainer in slot ((tmpSlot - j) + 1))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • Inv_Used[tmpSlot] Gleich True
            • 'THEN'-Aktionen
              • Held - Create Inv_Items[tmpSlot] and give it to tmpTrainer
              • Einheit - Order tmpTrainer to move (Last created item) to inventory slot ((tmpSlot - j) + 1)
              • Gegenstand - Set the custom value of (Last created item) to Inv_Data[tmpSlot]
              • Gegenstand - Set charges remaining in (Last created item) to Inv_Charges[tmpSlot]
            • 'ELSE'-Aktionen
      • Countdown-Timer - Start Inv_ReactivateTimer as a Einmalig timer that will expire in 0.00 seconds
  • Inventory Reactivate
    • Ereignisse
      • Zeit - Inv_ReactivateTimer expires
    • Bedingungen
    • Aktionen
      • Set Inv_Active = True
 
Last edited:
Level 12
Joined
Apr 26, 2008
Messages
830
How do you distinguish which item is either special item or normal item ?
Item-class ?



Well items have a class don't they, durable, sellable and so on, all special items have the class durable, and all normal items are sellable class, i don't know the classes in english so im just trying to translate it from my language.. tell me if it doesn't match
 
Last edited:
Status
Not open for further replies.
Top