• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] Advanced Equipment system ain't working on my map

Status
Not open for further replies.
Level 6
Joined
Dec 6, 2009
Messages
168
Hi, I have downloaded and done exactly everything from this map: http://www.hiveworkshop.com/forums/spells-569/mui-advanced-equipment-system-save-load-event-133727/?prev=of%3Ddownloads_month%26order%3DDESC

I got the right World editor and followed every step on ''How to use''

The only thing I have changed is the Item ID Numbers, but those I also changed in the trigger so I think that should be working. Here my Trigger is:

JASS:
library AdvancedEquipmentSystem requires LinkedListModule, RegisterPlayerUnitEvent

    // The_Witcher's Equipment System
    //
    // This is my easy to use equipment system, which adds an equipment screen to any unit you want.
    //  equipped items can give up abilities to the owner and can change the animations of him...
    //
    //
    //       To learn how to use this system please read the "How To Use" delivered in the demo map
    //
    //
    // Requirements:
    //    JASS knowledge
    //    LinkedList ([url]http://www.hiveworkshop.com/forums/jass-resources-412/snippet-linkedlistmodule-206552/[/url])
    //    RegisterPlayerUnitEvent ([url]http://www.hiveworkshop.com/forums/jass-resources-412/snippet-registerplayerunitevent-203338/[/url])
    //
    // have fun^^

    //**************************************************
    //********************SETUP PART********************
    //**************************************************

    globals
        // this is the rawcode of the unit which works as inventory
        public constant integer INVENTORY_DUMMY = 'h007'
     
        // this is the class you selected as mainhand class
        public constant integer MAINHAND_CLASS = 0
     
        // this is the class you selected as offhand class
        public constant integer OFFHAND_CLASS = 1
        
        // this is the amount of total classes you have
        public constant integer CLASSES = 9
     
        // this is the ability to close the inventory
        public constant integer EXIT_ABILITY = 'AExi'
     
        // this is the ability to open the inventory
        public constant integer OPEN_ABILITY = 'A003'
        
        // this is the ability which gives the dummy the same inventory as your hero has
        public constant integer INVENTORY_ABILITY = 'AInv'
     
        // this is the icon ability shown in the offhand slot when a twhoanded weapon is equipeed
        public constant integer TWOHAND_ABILITY = 'A00Z'
        public constant boolean SHOW_TWOHAND_ABILITY = true
     
        // this is the text shown when a unit is trying to equip an item which it isnt allowed to
        // example: " can't equip " becomes ingame something like   Soldier can't equip Giant Sword
        public constant string UNABLE_TO_EQUIP_STRING = " can't equip "
    endglobals

    //************************************************************
    //********************SETUP PART ENDS HERE********************
    //************************************************************
    //*****************Don't edit anything below******************
    //************************************************************

and like it says I haven't edited anything from the trigger below.

JASS:
scope SetupAdvancedEquipmentSystem initializer Initialize

    globals
        integer AMULET_CLASS = 2
        integer ARMOR_CLASS = 3
        integer BOOTS_CLASS = 4
        integer GLOVES_CLASS = 5
        integer RING_CLASS = 6
        integer HELMET_CLASS = 7
        integer SPECIAL_CLASS = 8
    endglobals

    private function Initialize takes nothing returns nothing
        // here you have to give an icon ability for every empty slot
        // this is my setup for the testmap


        // WARNING: class 0 and 1 are taken as main and offhand slots! start with 2 for new indexes
        call AdvancedEquipmentSystem_RegisterNewClass('AMin', AdvancedEquipmentSystem_MAINHAND_CLASS)//Mainhand
        call AdvancedEquipmentSystem_RegisterNewClass('Aoff', AdvancedEquipmentSystem_OFFHAND_CLASS)//Offhand
        call AdvancedEquipmentSystem_RegisterNewClass('AMul', AMULET_CLASS)//Amulet
        call AdvancedEquipmentSystem_RegisterNewClass('Armo', ARMOR_CLASS)//Armor
        call AdvancedEquipmentSystem_RegisterNewClass('Abts', BOOTS_CLASS)//Boots
        call AdvancedEquipmentSystem_RegisterNewClass('AGlv', GLOVES_CLASS)//Gloves
        call AdvancedEquipmentSystem_RegisterNewClass('ARng', RING_CLASS)//Ring
        call AdvancedEquipmentSystem_RegisterNewClass('AHlm', HELMET_CLASS)//Helmet
        call AdvancedEquipmentSystem_RegisterNewClass('ASPC', SPECIAL_CLASS)//Special
        

    //in this part set up the items
    //you can do this anytime in your map (may cause bugs if not at initialization) by using
    //call AdvancedEquipmentSystem_RegisterItem(itemid, abilities, icon, class, twohanded, animation)
    // look into the HowToUse for further information
    
    //                                       itemid |  icon | class | twohanded? | animationtag
    //Silversword
        call AdvancedEquipmentSystem_RegisterItem('I0B4', 'A09S', AdvancedEquipmentSystem_MAINHAND_CLASS, false, "Alternate")
        call AdvancedEquipmentSystem_AddItemAbility('I0B4', 'AB02')
        call EnableItemEquip('I0B4','H001',false)
    //sacred stone        
        call AdvancedEquipmentSystem_RegisterItem('I0B0', 'A09K', SPECIAL_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I0B0', 'ABBB')
        call AdvancedEquipmentSystem_AddItemAbility('I0B0', 'A09Y')
    //Slizer
        call AdvancedEquipmentSystem_RegisterItem('I0B5' , 'A08H', AdvancedEquipmentSystem_MAINHAND_CLASS, false, "Alternate")
        call AdvancedEquipmentSystem_AddItemAbility('I0B5', 'AB05')
    //Razor
        call AdvancedEquipmentSystem_RegisterItem('I0B6', 'A09J', AdvancedEquipmentSystem_MAINHAND_CLASS, true, "Channel")
        call AdvancedEquipmentSystem_AddItemAbility('I0B6', 'A09I')
    //shield 
        call AdvancedEquipmentSystem_RegisterItem('I0B1', 'A0B9', AdvancedEquipmentSystem_OFFHAND_CLASS, false, "defend")
        call AdvancedEquipmentSystem_AddItemAbility('I0B1', 'AB06')
    //Amulet of darkness 
        call AdvancedEquipmentSystem_RegisterItem('I09A', 'A0BB', AMULET_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I09A', 'A07S')
    //Golems Skin
        call AdvancedEquipmentSystem_RegisterItem('I0B3', 'A09N', ARMOR_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I0B3', 'A09U')
    //Windwalkers
        call AdvancedEquipmentSystem_RegisterItem('I0B2', 'A09O', BOOTS_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I0B2', 'A09X')
    //Stonefists
        call AdvancedEquipmentSystem_RegisterItem('I0B7', 'A09P', GLOVES_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I0B7', 'A09W')
    //Arthuriel  
        call AdvancedEquipmentSystem_RegisterItem('I0A8', 'A09Q', RING_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I0A8', 'A09T')
    //Mask of Horror      
        call AdvancedEquipmentSystem_RegisterItem('I0B9', 'A09R', HELMET_CLASS, false, "")
        call AdvancedEquipmentSystem_AddItemAbility('I0B9', 'A09V')
    //Axe
        call AdvancedEquipmentSystem_RegisterItem('I010', 'A012', AdvancedEquipmentSystem_MAINHAND_CLASS, true, "Channel")
        call AdvancedEquipmentSystem_AddItemAbility('I010', 'A011')
        
    endfunction

endscope



And here I have only changed the Item Id numbers aswell. The Reason I changed the id's was that I already had some of the id's on other items.

I got the requiered systems aswell and I have chosen the hero I want to give the ''Equipment''

  • init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set u = Adventurer 0257 <gen>
      • Custom script: call InitEquipment(udg_u)
I don't see what's wrong so plx help me! +rep
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
I told you that I followed every step on the ''How to use'' and every ''How to import'' Description...

And even if I give the abilitie to a hero or something it doesn't open..

are you sure your trying to do it on Adventerer 0257?
 
Level 6
Joined
Dec 6, 2009
Messages
168
are you sure your trying to do it on Adventerer 0257?

Yes, I have tried to make it on a specific unit and with a
  • Player 1 Human
    • Events
      • Map initialization
    • Conditions
      • (Player 1 (Red) slot status) Equal to Is playing
    • Actions
      • Unit - Create 1 Adventurer for Player 1 (Red) at (Center of Human Player 1 <gen>) facing Default building facing degrees
      • Set Player1_Villager = (Last created unit)
      • Custom script: call InitEquipment(udg_Player1_Villager)
      • Hero - Create Health Stone and give it to Player1_Villager
      • Player Group - Make (All allies of Player 1 (Red)) treat (All allies of Player 1 (Red)) as an Ally with shared vision
 
Status
Not open for further replies.
Top