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

[Trigger] Can this POSSIBLE?

Status
Not open for further replies.
Level 4
Joined
Dec 4, 2010
Messages
63
Can this Possible to make this work at the same time,

what i mean? this ..

can this trigger work with a pet?/another unit that saves together,

yes, i already tried to do,, but it doesn't work properly......

heres the trigger that i used..


  • SaveLoad Init Copy
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Some configurables --------
      • Set SaveLoad_Alphabet = aA5bB0cCdDeE9fFgGhH8iIj1JkK4lLmMn7NoOp3PqQrRsStTu2UvV6wWxXyYzZ
      • Set SaveLoad_CheckName = True
      • Set SaveLoad_HyphenSpace = 4
      • Set SaveLoad_Lower = |c002a4580
      • Set SaveLoad_Number = |cffffcc00
      • Set SaveLoad_Upper = |cff1142aa
      • -------- Store all the items you want to be able to be saved below. --------
      • Set SaveLoad_Item[1] = Claws of Attack +15
      • Set SaveLoad_Item[2] = Crown of Kings +5
      • Set SaveLoad_Item[3] = Kelen's Dagger of Escape
      • Set SaveLoad_Item[4] = Mask of Death
      • Set SaveLoad_Item[5] = Orb of Frost
      • Set SaveLoad_Item[6] = Ring of Protection +5
      • Set SaveLoad_Item[7] = Potion of Healing
      • Set SaveLoad_ItemCount = 7
      • -------- Store all the heroes you want to be able to be saved below. --------
      • Set SaveLoad_Hero[1] = Blood Mage
      • Set SaveLoad_HeroCount = 1
      • -------- Save pet --------
      • Set SaveLoad_Pet[1] = Rifleman
      • Set SaveLoad_PetCount = 1
      • -------- Don't modify below this line. --------
      • Set SaveLoad_Base = (Length of SaveLoad_Alphabet)
      • Set SaveLoad_Char = <Empty String>
      • Set Load[0] = 0
      • Set LoadCount = 0
      • Custom script: call CodeGen_Init()
  • SaveLoad Save Rnjm
    • Events
      • Player - Player 1 (Red) types a chat message containing -save as An exact match
      • Player - Player 2 (Blue) types a chat message containing -save as An exact match
      • Player - Player 3 (Teal) types a chat message containing -save as An exact match
      • Player - Player 4 (Purple) types a chat message containing -save as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -save as An exact match
      • Player - Player 6 (Orange) types a chat message containing -save as An exact match
      • Player - Player 7 (Green) types a chat message containing -save as An exact match
      • Player - Player 8 (Pink) types a chat message containing -save as An exact match
    • Conditions
    • Actions
      • -------- Find the players hero, and save it. I realize it leaks but it's just for demonstration. --------
      • Set SaveCount = 0
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Set Hero = (Picked unit))
      • Custom script: set udg_Save[udg_SaveCount] = CodeGen_ConvertUnit(GetUnitTypeId(udg_Hero))
      • Set SaveCount = (SaveCount + 1)
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A ground unit) Equal to True)) and do (Set Pet = (Picked unit))
      • Custom script: set udg_Save[udg_SaveCount] = CodeGen_ConvertUnit(GetUnitTypeId(udg_Pet))
      • -------- Save players gold. --------
      • Set Save[SaveCount] = ((Triggering player) Current gold)
      • Set SaveCount = (SaveCount + 1)
      • -------- Save players lumber. --------
      • Set Save[SaveCount] = ((Triggering player) Current lumber)
      • Set SaveCount = (SaveCount + 1)
      • -------- Save heroes EXP. --------
      • Set Save[SaveCount] = (Hero experience of Hero)
      • Set SaveCount = (SaveCount + 1)
      • -------- Save heroes items. --------
      • Set Save[SaveCount] = (Number of items carried by Hero)
      • For each (Integer Integer_A_Replacement) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by Hero in slot Integer_A_Replacement)) Not equal to (Item-type of No item)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Charges remaining in (Item carried by Hero in slot Integer_A_Replacement)) Greater than 0
                • Then - Actions
                  • Set SaveCount = (SaveCount + 1)
                  • Set Save[SaveCount] = 1
                  • Set SaveCount = (SaveCount + 1)
                  • Set Item = (Item carried by Hero in slot Integer_A_Replacement)
                  • Custom script: set udg_Save[udg_SaveCount] = CodeGen_ConvertItem(GetItemTypeId(udg_Item))
                  • Set SaveCount = (SaveCount + 1)
                  • Set Save[SaveCount] = (Charges remaining in (Item carried by Hero in slot Integer_A_Replacement))
                • Else - Actions
                  • Set SaveCount = (SaveCount + 1)
                  • Set Save[SaveCount] = 2
                  • Set SaveCount = (SaveCount + 1)
                  • Set Item = (Item carried by Hero in slot Integer_A_Replacement)
                  • Custom script: set udg_Save[udg_SaveCount] = CodeGen_ConvertItem(GetItemTypeId(udg_Item))
                  • Set SaveCount = (SaveCount + 1)
            • Else - Actions
              • Set SaveCount = (SaveCount + 1)
              • Set Save[SaveCount] = 0
              • Set SaveCount = (SaveCount + 2)
      • Set SaveCount = (SaveCount + 1)
      • -------- Show Code --------
      • Custom script: set udg_Code = CodeGen_Compile()
      • Game - Display to (Player group((Triggering player))) for 60.00 seconds the text: Code
  • SaveLoad Load Rnjm
    • Events
      • Player - Player 1 (Red) types a chat message containing -load as A substring
      • Player - Player 2 (Blue) types a chat message containing -load as A substring
      • Player - Player 3 (Teal) types a chat message containing -load as A substring
      • Player - Player 4 (Purple) types a chat message containing -load as A substring
      • Player - Player 5 (Yellow) types a chat message containing -load as A substring
      • Player - Player 6 (Orange) types a chat message containing -load as A substring
      • Player - Player 7 (Green) types a chat message containing -load as A substring
      • Player - Player 8 (Pink) types a chat message containing -load as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -load
    • Actions
      • -------- Check if load is valid --------
      • Set Code = (Substring((Entered chat string), 7, 999))
      • Custom script: call CodeGen_Load(udg_Code)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SaveLoad_Valid Equal to False
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: Invalid code.
          • Skip remaining actions
        • Else - Actions
      • -------- Start loading, load the hero first. --------
      • Set LoadCount = 0
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Remove (Picked unit) from the game)
      • Unit - Create 1 SaveLoad_Hero[Load[LoadCount]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set Hero = (Last created unit)
      • Set PETOwner = (Last created unit)
      • Set PETOwnerLoc = (Position of PETOwner)
      • Selection - Select (Last created unit) for (Triggering player)
      • Unit - Create 1 SaveLoad_Pet[Load[LoadCount]] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set PETDummy[(Player number of (Owner of PETOwner))] = (Last created unit)
      • Unit - Order PETDummy[(Player number of (Owner of PETOwner))] to Right-Click PETOwner
      • -------- Now load players gold --------
      • Set LoadCount = (LoadCount + 1)
      • Player - Set (Triggering player) Current gold to Load[LoadCount]
      • -------- Now load players Lumber --------
      • Set LoadCount = (LoadCount + 1)
      • Player - Set (Triggering player) Current lumber to Load[LoadCount]
      • -------- Load heroes EXP --------
      • Set LoadCount = (LoadCount + 1)
      • Hero - Set Hero experience to Load[LoadCount], Hide level-up graphics
      • -------- Now items --------
      • Set LoadCount = (LoadCount + 1)
      • For each (Integer Integer_A_Replacement) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set LoadCount = (LoadCount + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Load[LoadCount] Not equal to 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Load[LoadCount] Equal to 1
                • Then - Actions
                  • Set LoadCount = (LoadCount + 1)
                  • Hero - Create SaveLoad_Item[Load[LoadCount]] and give it to Hero
                  • Set LoadCount = (LoadCount + 1)
                  • Item - Set charges remaining in (Last created item) to Load[LoadCount]
                • Else - Actions
                  • Set LoadCount = (LoadCount + 1)
                  • Hero - Create SaveLoad_Item[Load[LoadCount]] and give it to Hero
                  • Set LoadCount = (LoadCount + 1)
            • Else - Actions
              • Set LoadCount = (LoadCount + 2)

Anyone can help ,, just make it possible.... i know its possible but i cant ,, so i need a big help from you guy ,,,
 
Status
Not open for further replies.
Top