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

M-FIS v1.8

[M]ulti-[F]unction tem ystem v1.8
by LeoNguyen112


Features
  • Combine different types of item. Max is 5 types.
  • Combine many same-type items. Max items is 6 same-type items.
  • Combine charges of charged items.
  • Combine charged items with charged items.
  • Can buy/combine items even hero's inventory is full (but still has the warning test).
  • Have ownership system: unit can't pick up item which doesn't belong to it
  • Have Disassemble ability to disassemble items into their material.
  • Have Gather items ability to pick up all items which belongs to caster.
  • Have Drop items ability to drop all items which is being carried by caster.
Instanllation
  1. Open your map with JNGP, go to File -> Preferences -> and check
    Automatically create unknown variables while pasting trigger data
  2. Copy the category named "System" into your map.
  3. Copy the category named "Ability" into your map (this is optional).
  4. Edit these actions in trigger "Item Registry":
    o Item_Fake[Number] = the type of items which are in shops, their item-classes
    are power up and they have no ability.
    o Item_Real[Number] = the type of item which will be given to heroes when they
    buy the Item_Fake above.
    o Item_Max = Number of fake or real items you have.
    o Item_DisassembleEffect = the effect which will be displayed when finish disassemble.
    o Item_DisassembleAbility = the ability that will be used for disassembling
    items. Here is some advices for ability Disassemble:
    "Base skill": channel.
    "Target type": unit.
    "Target allow": item.
    "Cast range": 999999.​
    o Item_DisassemblePoint[Number] = the point that item will spawn at when finish
    disassemble.
    Item_DisassemblePoint[1] for player 1
    Item_DisassemblePoint[2] for player 2
    ...
    Item_DisassemblePoint[12] for player 12​
    In this map, I have 1 Circle of Power which is the place for disassembled
    items, so all player will have the same point.
    o Item_EnableOS = True/False = Enable/disable ownership system.
    o Item_OwnershipException = the group of units that will not be affected by
    ownership system. Ex: couriers.
  5. Edit these actions in trigger "Item Recipe Registry":
    o Item_Effect = the effect will be displayed when successfully combine items.
    o Item_RecipeMax = the number of maximum recipe that you have.
    o Item_Mat1[array] = Item Type
    Item_Mat2[array] = Item Type
    Item_Mat3[array] = Item Type
    Item_Mat4[array] = Item Type
    Item_Mat5[array] = Item Type
    The material for your recipes. If the recipe don't need 5 materials, you needn't
    to set all of them.
    o Item_Result[array] = item that hero/unit will have when successfully combine
    o Item_Mat1Amount[array] = Number
    Item_Mat2Amount[array] = Number
    Item_Mat3Amount[array] = Number
    Item_Mat4Amount[array] = Number
    Item_Mat5Amount[array] = Number
    If the materials have the quantities, you need to set these variables into number
    of material that you need. If a material need 1 item, you needn't to set it. For
    charged items, these variables mean charges of item that you need.
    o Item_CanBeDisassemble[array] = True/False = Allow or not allow the item to be
    disassembled.

    Note:
    • The variables of 1 recipe must be had the same array.
    • The full-slot-pick-up-item system is only activated if the item is within 150 range
      of hero/unit.
    • The item-classes of fake-charged items are charged. Don't change it into power
      up or it won't work.
    • Charged items aren't affected by ownership system.
    • Category named Ability is optional, you can copy it to your map or not
  6. Click Test button.

Please give me credit if you use this system in your map.
Thanks to
- btvinh and Abenthy for requested me.
- Ngoc LeO (from forum GameVN) for informing me the bugs.
  • Ver 1.8
    - Refixed the bug didn't remove TempItem in first combination.
    - From now, system will not stop hero/unit's order when it buys item.
    - Made the code tidier.
  • Ver 1.7
    - Fixed a bug didn't remove TempItem in first combination.
    - Fixed a bug in combine charged item.
  • Ver 1.6
    - Added Gather items ability.
    - Added Drop items ability.
  • Ver 1.5
    - Added ownership system.
    - Changed Disassemble's target type from instant to item.
    - Changed system name from "Item Combination System" to "Multi-Function
    Item System".
    - Fix bug that creates charged item with 1140 charges on blacksmith.
  • Ver 1.4
    - Added disassemble items function..
    - From this version, you don't need to set the variables Item_MatMax.
  • Ver 1.3
    - Added combine-item-with-charge function
    - Renamed some variables
  • Ver 1.2
    - Allowed units/heroes to buy items when inventory is full.
    - Fix some bugs in trigger Item Charged Combine
  • Ver 1.1
    - Allowed units/heroes to combine items when inventory is full.
    - Changed a little in trigger Item Combine.
  • Ver 1.0
    First uploaded

Keywords:
item, combine, combination, full slot, LeoNguyen112, ownership, recipe, disassemble, M-FIS
Contents

System - M-FIS (Map)

Reviews
09:55, 3ndth Sep 2015 This resource has been re-approved by BPower. Moderator comment: I agree with Bribe about the rating of 3/5, which means useful. I didn't find basic mistakes in the code and the system appears to work as intended by...

Moderator

M

Moderator

09:55, 3ndth Sep 2015

This resource has been re-approved by BPower.

Moderator comment:
I agree with Bribe about the rating of 3/5, which means useful. I didn't find basic mistakes in the code
and the system appears to work as intended by leonguyen112.

From moderator to user:
If you tackle any problems in-game, feel free to make a post here in the thread.

Previous review:
30 Jan 2012
Bribe: I will approve this on grounds it's one of the better GUI item systems I've seen. 3/5.
 
Level 1
Joined
Feb 8, 2012
Messages
3
im having a problem... my game crashes when i try to buy an item which is not part of the first 7 items. i put my 100 items to Item init correctly and set item_max=100.. it works perfect for the first 6-7 items ( like
in your map) but afterwards... need help! :)
Edit: i fixed that issue, but the next problem is that,if i buy any item it automatically turns into my first "Item_Result" item...i mean even items which are not supposed to be combined at all. for example i buy bos = turns into battleaxe, i buy goh = turns into battleaxe etc..
 
Last edited:
im having a problem... my game crashes when i try to buy an item which is not part of the first 7 items. i put my 100 items to Item init correctly and set item_max=100.. it works perfect for the first 6-7 items ( like
in your map) but afterwards... need help! :)
Edit: i fixed that issue, but the next problem is that,if i buy any item it automatically turns into my first "Item_Result" item...i mean even items which are not supposed to be combined at all. for example i buy bos = turns into battleaxe, i buy goh = turns into battleaxe etc..

Can you post your trigger in this topic? I'll check this.
 
Level 1
Joined
Feb 8, 2012
Messages
3
i cant enable "Item Pick Up 1" at all, because then the game wont even load the map. when i enable "Item Pick Up 2" i get a crash, once i buy any item which is not in the item init first 8. when i disable it, i always get the first Item_Result, whatever i buy... but here you can check that thing yourself:
http://www.mediafire.com/?exxut1x6m53luir
 
Level 1
Joined
Feb 8, 2012
Messages
3
ok thank you very much!
now i have only one question remaining, what do i have to add to Item Combine when i want to create an item which needs 6 items? i just have to replace the Item_Material4[Item_LoopA] for example with Item_Material6[Item_LoopA]? i tried that but for some reason i cant select item_loopa behind item material6^^
 
Level 1
Joined
Feb 4, 2012
Messages
1
Nice man! charge combination is just perfect for my map :D and there are no charge combi system away... I'll test it now!! +Rep!
 
Level 9
Joined
Apr 23, 2011
Messages
460
Having problems with Pick Item 1. Transferred to my map, and now in conditions it's saying Issued Order Type == Unknown and compiling to Error. Using JNPG. I thought to load your original map up, same. Any Ideas. Trig's posted below.

  • Item Pick Up 1
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to Unknown
      • (Number of items carried by (Triggering unit)) Equal to 6
    • Actions
      • Set TempItem = (Target item of issued order)
      • Set TempUnit = (Triggering unit)
      • Set Item_Point[1] = (Position of (Triggering unit))
      • Set Item_Point[2] = (Position of (Target item of issued order))
      • Set Item_Check = 0
      • For each (Integer Item_LoopC) from 1 to Item_CustomValue, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Item_OwneredItem[Item_LoopC] Equal to (Target item of issued order)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Triggering unit)) Not equal to Item_Owner[Item_LoopC]
                  • Item_EnableOS Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Triggering unit) is in Item_OwnershipException) Equal to True
                    • Then - Actions
                      • Do nothing
                    • Else - Actions
                      • Game - Display to (All players) the text: Can not pick up ite...
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between Item_Point[1] and Item_Point[2]) Less than or equal to 150.00
                    • Then - Actions
                      • If ((Item-class of TempItem) Equal to Charged) then do (Trigger - Run Item Charged Combine <gen> (ignoring conditions)) else do (Trigger - Run Item Combine <gen> (ignoring conditions))
                    • Else - Actions
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Item_Point[1])
      • Custom script: call RemoveLocation(udg_Item_Point[2])
 
Level 3
Joined
Oct 16, 2011
Messages
39
Same error here.
errorcxp.jpg

I tried to edit it like this, but it didn't help
  • (Issued order) Equal to (Order(Right-Click))
Please fix your system.
 
Level 13
Joined
May 10, 2009
Messages
868
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Owner of (Triggering unit)) Not equal to Item_Owner[Item_LoopC]
      • Item_EnableOS Equal to True
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in Item_OwnershipException) Equal to True
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit)
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Can not pick up ite...
    • Else - Actions
      • Set TempItem = (Item being manipulated)
      • Set TempUnit = (Triggering unit)
      • Trigger - Run Item Combine <gen> (ignoring conditions)
JASS:
call DoNothing( )

You: Hey, processor!
Processor: Yes?
You: Nothing.
Processor: ...
 
Level 3
Joined
Feb 9, 2008
Messages
63
nice system one question if ever my charged items are not in the "charged" class and they are all "miscellaneous" how do i change the settings to make them stack? thanks in advance
 
^ You need to change all conditions like:
  • (Item-class of (Item being manipulated)) Not equal to Charged
  • (Item-class of TempItem) Equal to Charged
into
  • (Item-class of (Item being manipulated)) Not equal to Miscellaneous.
  • (Item-class of TempItem) Equal to Miscellaneous.
In detail, there're 3 conditions like that:
  1. In trigger "Item Pick Up 1", the 4th row from the bottom.
  2. In trigger "Item Pick Up 2", the 1st If function's condition.
  3. In trigger "Item Buying", the 5th row from the bottom.
Give me a PM if it won't work.
 
Level 1
Joined
Aug 10, 2015
Messages
1
i've some problem with this one for example i have a recipe that needs 2x claws of attack and a recipe scroll. The bug comes whenever i purchase 3 of claws of attack and then buy the recipe scroll the resulting item wont come out. Anyone experienced this?
 
Level 2
Joined
Jul 15, 2016
Messages
26
OMG !!! THIS IS THE EXACTLY FUNCTION THAT I ALWAYS WANT!!! THIS ITEM SYSTEM HAVE MORE FUNCTION AND DETAILS THAN DOTA 1. GOOD JOB MAN ! I LIKE IT SO MUCH 5/5 ^^ THANKS leonguyen112 !!!
 
Level 2
Joined
Jul 15, 2016
Messages
26
I have a problem here. It is like when i add new item into the item registry trigger and it is charge type item, i have create 2 potion of Invulnerable one is fake and one is original. When i go into the game i buy it then it show give me two item one is original potion of vulnerable and one is potion of vulnerable(FAKE). Can anyone help me pls.
 
Top