1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Codeless Save Load v3.0.1.w3x
Variables
Initialization
Map Init
Map Start
Demo
Dialog System
Codeless Save and Load
How to import
Save Init
Helper Libraries
HeroNames
SaveHelper
SyncHelper
SaveFile
Example (GUI)
Save GUI
Load GUI
Load GUI Manual
Core
File IO
PlayerUtils
Pipedream's Save System 0.4
save system
bignum lib
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
HeroXPConstant integer No
HeroXPLevelFactor integer No
HeroXPPrevLevelFactor integer No
HeroXPRequired integer No
LocalFiles_WarningMessage string No
MapName string No
SaveAbilityType abilcode Yes
SaveAbilityTypeMax integer No
SaveCodeColored string No
SaveCount integer No
SaveCurrentSlot integer Yes
SaveHeroName boolean No
SaveItemType itemcode Yes
SaveItemTypeMax integer No
SaveLoad_HeroName boolean No
SaveLoad_Slot integer No
SaveLoad_TriggerName string No
SaveLoadEvent real No
SaveLoadEvent_Code string No
SaveLoadEvent_Player player No
SaveLoadMaxLength integer No
SaveMaxValue integer Yes
SaveNameList string Yes
SaveNameMax integer No
SavePlayerHero unit Yes
SavePlayerLoading boolean Yes
SaveShowCode boolean No
SaveTempInt integer No
SaveTempReal real No
SaveTempString string No
SaveTempUnit unit No
SaveUnitMaxStat integer No
SaveUnitType unitcode Yes
SaveUnitTypeMax integer No
SaveUseGUI boolean No
SaveValue integer Yes
Map Init
  Events
    Map initialization
  Conditions
  Actions
    Visibility - Disable fog of war
    Visibility - Disable black mask
Map Start
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Game - Display to (All players) for 120.00 seconds the text: Press the |cffffcc00ESC|r key to bring up the dialog menu.Optional Commands:|cffffcc00-|rsave|cffffcc00-|rload |cffffcc00<|rslot|cffffcc00>|r or -load |cffffcc00<|rcode|cffffcc00>|r
    -------- Local files check --------
    Custom script: if not (File.ReadEnabled) then
    Custom script: call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000, udg_LocalFiles_WarningMessage)
    Custom script: endif
    -------- Create hero --------
    Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked player) slot status) Equal to Is playing
          Then - Actions
            Player - Set (Picked player).Food max to 100
            Player - Set (Picked player).Food cap to 100
            Custom script: set udg_SaveTempInt = GetRandomInt(1, 7)
            Unit - Create 1.SaveUnitType[SaveTempInt] for (Picked player) at ((Picked player) start location) facing Default building facing degrees
            Custom script: set udg_SavePlayerHero[GetPlayerId(GetEnumPlayer())] = bj_lastCreatedUnit
            Selection - Select (Last created unit) for (Picked player)
          Else - Actions
 
Copy the "Codeless Save and Load" folder to your map.
Save Init
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet SaveLoadMaxLength = 64
    Set VariableSet SaveUseGUI = True
    -------- ------------------- --------
    -------- This willl be the directory the save codes will be saved to. --------
    -------- ------------------- --------
    Set VariableSet MapName = CodelessDemo
    -------- ------------------- --------
    -------- This message will display to players who don't have local files enabled --------
    -------- ------------------- --------
    Set VariableSet LocalFiles_WarningMessage = |cffe53b3bYou need to enable local files to load your character from disk on patches prior to 1.30!
    Custom script: set udg_LocalFiles_WarningMessage = udg_LocalFiles_WarningMessage + "\n\n"
    -------- ------------------- --------
    -------- Show the save code --------
    -------- ------------------- --------
    Set VariableSet SaveShowCode = True
    -------- ------------------- --------
    -------- Save hero name (only works with the save slots, not raw save codes) --------
    -------- Also make sure to set the object editor field "Text - Proper Names Used" to 999 for all of your heroes. --------
    -------- ------------------- --------
    Set VariableSet SaveHeroName = True
    Set VariableSet SaveNameMax = 999
    -------- ------------------- --------
    -------- Set these to the values they are in the Advanced -> Gameplay constants --------
    -------- Allows us to calculate how much XP a hero has --------
    -------- Note: You can also save EXP the easy way but it will generate a longer code. --------
    -------- ------------------- --------
    Set VariableSet HeroXPConstant = 0
    Set VariableSet HeroXPLevelFactor = 100
    Set VariableSet HeroXPPrevLevelFactor = 1
    Set VariableSet HeroXPRequired = 200
    -------- ------------------- --------
    -------- Max STR/AGI/INT --------
    -------- ------------------- --------
    Set VariableSet SaveUnitMaxStat = 999
    -------- Note: Changing max values can cause a code wipe --------
    -------- ------------------- --------
    -------- Store unit types that can be saved here --------
    -------- ------------------- --------
    Set VariableSet SaveUnitType[0] = No unit-type
    Set VariableSet SaveUnitType[1] = Tauren Chieftain
    Set VariableSet SaveUnitType[2] = Lich
    Set VariableSet SaveUnitType[3] = Demon Hunter
    Set VariableSet SaveUnitType[4] = Naga Sea Witch
    Set VariableSet SaveUnitType[5] = Beastmaster
    Set VariableSet SaveUnitType[6] = Blood Mage
    Set VariableSet SaveUnitType[7] = Demon Hunter (Demon Form)
    Set VariableSet SaveUnitTypeMax = 99
    -------- Note: Changing max values can cause a code wipe --------
    -------- ------------------- --------
    -------- Store item types that can be saved here --------
    -------- ------------------- --------
    Set VariableSet SaveItemType[0] = (Item-type of No item)
    Set VariableSet SaveItemType[1] = Crown of Kings +5
    Set VariableSet SaveItemType[2] = Kelen's Dagger of Escape
    Set VariableSet SaveItemType[3] = Mask of Death
    Set VariableSet SaveItemType[4] = Orb of Frost
    Set VariableSet SaveItemType[5] = Ring of Protection +5
    Set VariableSet SaveItemType[6] = Blood Key
    Set VariableSet SaveItemType[7] = Cheese
    Set VariableSet SaveItemType[8] = Claws of Attack +15
    Set VariableSet SaveItemTypeMax = 999
    -------- Note: Changing max values can cause a code wipe --------
    -------- ------------------- --------
    -------- Store ability types that can be saved here --------
    -------- ------------------- --------
    Set VariableSet SaveAbilityType[1] = Endurance Aura
    Set VariableSet SaveAbilityType[2] = Reincarnation
    Set VariableSet SaveAbilityType[3] = War Stomp
    Set VariableSet SaveAbilityType[4] = Frost Nova
    Set VariableSet SaveAbilityType[5] = Frost Armor (Autocast)
    Set VariableSet SaveAbilityType[6] = Dark Ritual
    Set VariableSet SaveAbilityType[7] = Death And Decay
    Set VariableSet SaveAbilityType[8] = Mana Burn
    Set VariableSet SaveAbilityType[9] = Immolation
    Set VariableSet SaveAbilityType[10] = Evasion
    Set VariableSet SaveAbilityType[11] = Metamorphosis
    Set VariableSet SaveAbilityType[12] = Forked Lightning
    Set VariableSet SaveAbilityType[13] = Frost Arrows
    Set VariableSet SaveAbilityType[14] = Mana Shield
    Set VariableSet SaveAbilityType[15] = Tornado
    Set VariableSet SaveAbilityType[16] = Summon Bear
    Set VariableSet SaveAbilityType[17] = Summon Quilbeast
    Set VariableSet SaveAbilityType[18] = Summon Hawk
    Set VariableSet SaveAbilityType[19] = Stampede
    Set VariableSet SaveAbilityType[20] = Flame Strike
    Set VariableSet SaveAbilityType[21] = Banish
    Set VariableSet SaveAbilityType[22] = Siphon Mana
    Set VariableSet SaveAbilityType[23] = Phoenix
    Set VariableSet SaveAbilityType[24] = Shockwave
    Set VariableSet SaveAbilityTypeMax = 199
    -------- Note: Changing max values can cause a code wipe --------
    -------- ------------------- --------
    -------- Automatically copy variables --------
    -------- ------------------- --------
    Set VariableSet SavePlayerLoading[0] = False
    Set VariableSet SaveLoadEvent = -1.00
    Set VariableSet SaveCount = 0
    Set VariableSet SaveValue[0] = 0
    Set VariableSet SaveMaxValue[0] = 0
    Set VariableSet SaveTempInt = 0
    Set VariableSet SavePlayerHero[0] = No unit
    Set VariableSet SaveCurrentSlot[0] = 0
    Set VariableSet SaveLoadEvent_Code =
    Set VariableSet SaveLoadEvent_Player = Player 1 (Red)
    Set VariableSet SaveNameList[0] =
    Set VariableSet SaveCodeColored =
    Trigger - Run HeroNames <gen> (ignoring conditions)
    Custom script: call SaveHelper.Init()
 
 
 
function Trig_HeroNames_Actions takes nothing returns nothing
    set udg_SaveNameList[0] = null
   
    // Blood Mage
    set udg_SaveNameList[72] = "Eldin Sunstrider"
    set udg_SaveNameList[1] = "Tanin Hawkwing"
    set udg_SaveNameList[2] = "Lorn Bloodseeker"
    set udg_SaveNameList[3] = "Aldos Firestar"
    set udg_SaveNameList[4] = "Gilaras Drakeson"
    set udg_SaveNameList[5] = "Hale Magefire"
    set udg_SaveNameList[6] = "Kath'ranis Remar"
    set udg_SaveNameList[7] = "Tyoril Sunchaser"
    set udg_SaveNameList[8] = "Sylvos Windrunner"
    set udg_SaveNameList[9] = "Tenris Mirkblood"
    set udg_SaveNameList[10] = "Marakanis Starfury"
    set udg_SaveNameList[11] = "Geldor Earthfire"
    set udg_SaveNameList[12] = "Halendor Burnkin"
    set udg_SaveNameList[13] = "Kelen the Destroyer"
   
    // Tauren Chieften
    set udg_SaveNameList[14] = "Marn Thunderhorn"
    set udg_SaveNameList[15] = "Tygore Dusthoof"
    set udg_SaveNameList[16] = "Tam Windtotem"
    set udg_SaveNameList[17] = "Durn Harpyslayer"
    set udg_SaveNameList[18] = "Kam Ghoststeer"
    set udg_SaveNameList[19] = "Kel Stonebull"
    set udg_SaveNameList[20] = "Mull Stormhoof"
    set udg_SaveNameList[21] = "Grok Bloodhorn"
    set udg_SaveNameList[22] = "Malar Plainstrider"
    set udg_SaveNameList[23] = "Taur Runetotem"  
   
    // Lich
    set udg_SaveNameList[24] = "Ordin Frostbane"
    set udg_SaveNameList[25] = "Ras Splinterspine"
    set udg_SaveNameList[26] = "Morbent Fell"
    set udg_SaveNameList[27] = "Rage Winterchill"
    set udg_SaveNameList[28] = "Araj the Summoner"
    set udg_SaveNameList[29] = "Kali'naj Dethknell"
    set udg_SaveNameList[30] = "Rak Coldskull"
    set udg_SaveNameList[31] = "Din Frostfire"
    set udg_SaveNameList[32] = "Calis Wraithson"
    set udg_SaveNameList[33] = "Venim Iceblade"
    set udg_SaveNameList[34] = "Naze the Eternal"
    set udg_SaveNameList[35] = "Ras Frostwhisper"
    set udg_SaveNameList[36] = "Coldreaver"
    set udg_SaveNameList[37] = "Cho'Nammoth"
    set udg_SaveNameList[38] = "Kryptikk Soulslayer"
    set udg_SaveNameList[39] = "Alandil Lieng"
   
    // Demon Hunter
    set udg_SaveNameList[40] = "Shadowsong"
    set udg_SaveNameList[41] = "Shadowfury"
    set udg_SaveNameList[42] = "Shadowstalker"
    set udg_SaveNameList[43] = "Flameseeker"
    set udg_SaveNameList[44] = "Darkweaver"
    set udg_SaveNameList[45] = "Darkterror"
    set udg_SaveNameList[46] = "Darksorrow"
    set udg_SaveNameList[47] = "Sindweller"
    set udg_SaveNameList[48] = "Painkiller"
    set udg_SaveNameList[49] = "Hellbourne"
    set udg_SaveNameList[50] = "Wrathbringer"
    set udg_SaveNameList[51] = "Ragerunner"
    set udg_SaveNameList[52] = "Firebrand"
    set udg_SaveNameList[53] = "Bloodwrath"
    set udg_SaveNameList[54] = "Terrorblade"
   
    // Naga Sea Witch
    set udg_SaveNameList[55] = "Anna Kondra"
    set udg_SaveNameList[56] = "Scilla Murkshadow"
    set udg_SaveNameList[57] = "Ursula Snakemane"
    set udg_SaveNameList[58] = "Lady Venomtongue"
    set udg_SaveNameList[59] = "Lady Serpentra"
    set udg_SaveNameList[60] = "Lady Darkscale"
    set udg_SaveNameList[61] = "Serena Scarscale"
    set udg_SaveNameList[62] = "Asprah Serpus"
    set udg_SaveNameList[63] = "Venna Seastorm"
    set udg_SaveNameList[64] = "Charib'dishal"
   
    // Beastmaster
    set udg_SaveNameList[65] = "Mag Bearmaul"
    set udg_SaveNameList[66] = "Tagar Bearclaw"
    set udg_SaveNameList[67] = "Gorsh Talonfang"
    set udg_SaveNameList[68] = "Maxx Rocmane"
    set udg_SaveNameList[69] = "Gaz Boartusk"
    set udg_SaveNameList[70] = "Mok Rocksnout"
    set udg_SaveNameList[71] = "Gish Eagle Eye"
endfunction

//===========================================================================
function InitTrig_HeroNames takes nothing returns nothing
    set gg_trg_HeroNames = CreateTrigger(  )
    call TriggerAddAction( gg_trg_HeroNames, function Trig_HeroNames_Actions )
endfunction
Save GUI
  Events
    Player - Player 1 (Red) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 2 (Blue) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 3 (Teal) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 4 (Purple) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 5 (Yellow) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 6 (Orange) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 7 (Green) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 8 (Pink) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 9 (Gray) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 10 (Light Blue) types a chat message containing -save (stringnoformat) as An exact match
    Player - Player 11 (Dark Green) types a chat message containing -save (stringnoformat) as An exact match
  Conditions
    SaveUseGUI Equal to True
    (SavePlayerHero[((Player number of (Triggering player)) - 1)] is A Hero) Equal to True
  Actions
    -------- ------------------- --------
    -------- NOTE: You must load values in the reverse order you saved them in. This is why we save the unit type last. --------
    -------- ------------------- --------
    Set VariableSet SaveTempUnit = SavePlayerHero[((Player number of (Triggering player)) - 1)]
    Set VariableSet SaveCount = -1
    -------- ------------------- --------
    -------- Save Abilities --------
    -------- ------------------- --------
    For each (Integer SaveTempInt) from 0 to SaveAbilityTypeMax, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Level of SaveAbilityType[SaveTempInt] for SaveTempUnit) Greater than 0
          Then - Actions
            -------- Save level of ability --------
            Set VariableSet SaveCount = (SaveCount + 1)
            Set VariableSet SaveValue[SaveCount] = (Level of SaveAbilityType[SaveTempInt] for SaveTempUnit)
            Set VariableSet SaveMaxValue[SaveCount] = 10
            -------- Save the array index --------
            Set VariableSet SaveCount = (SaveCount + 1)
            Set VariableSet SaveValue[SaveCount] = SaveTempInt
            Set VariableSet SaveMaxValue[SaveCount] = SaveAbilityTypeMax
          Else - Actions
    -------- Save the number of abilities the unit has --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveValue[SaveCount] = (SaveCount / 2)
    Set VariableSet SaveMaxValue[SaveCount] = SaveAbilityTypeMax
    -------- ------------------- --------
    -------- Save Skill Points --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveValue[SaveCount] = (Unspent skill points of SaveTempUnit)
    Set VariableSet SaveMaxValue[SaveCount] = 999
    -------- ------------------- --------
    -------- Save Items --------
    -------- ------------------- --------
    For each (Integer SaveTempInt) from 0 to 5, do (Actions)
      Loop - Actions
        Set VariableSet SaveCount = (SaveCount + 1)
        Custom script: set udg_SaveValue[udg_SaveCount] = SaveHelper.ConvertItemId(GetItemTypeId(UnitItemInSlot(udg_SaveTempUnit, udg_SaveTempInt)))
        Set VariableSet SaveMaxValue[SaveCount] = SaveItemTypeMax
    -------- ------------------- --------
    -------- Save Attributes --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveValue[SaveCount] = (Strength of SaveTempUnit (Exclude bonuses))
    Set VariableSet SaveMaxValue[SaveCount] = 999
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveValue[SaveCount] = (Agility of SaveTempUnit (Exclude bonuses))
    Set VariableSet SaveMaxValue[SaveCount] = 999
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveValue[SaveCount] = (Intelligence of SaveTempUnit (Exclude bonuses))
    Set VariableSet SaveMaxValue[SaveCount] = 999
    -------- ------------------- --------
    -------- Save Experience (%) and Level --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Custom script: set udg_SaveValue[udg_SaveCount] = R2I( (GetHeroXP(udg_SaveTempUnit)) / SaveHelper.GetLevelXP(GetHeroLevel(udg_SaveTempUnit)) * 100) // percentage
    Set VariableSet SaveMaxValue[SaveCount] = 100
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveValue[SaveCount] = (Hero level of SaveTempUnit)
    Set VariableSet SaveMaxValue[SaveCount] = 100
    -------- ------------------- --------
    -------- Save Hero Name --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Custom script: set udg_SaveValue[udg_SaveCount] = SaveHelper.GetHeroNameID(GetHeroProperName(udg_SaveTempUnit))
    Set VariableSet SaveMaxValue[SaveCount] = SaveNameMax
    -------- ------------------- --------
    -------- Save Unit Type --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Custom script: set udg_SaveValue[udg_SaveCount] = SaveHelper.ConvertUnitId(GetUnitTypeId(udg_SaveTempUnit))
    Set VariableSet SaveMaxValue[SaveCount] = SaveUnitTypeMax
    -------- ------------------- --------
    -------- Save to disk --------
    -------- ------------------- --------
    Custom script: set udg_SaveTempInt = Savecode.create()
    For each (Integer A) from 0 to SaveCount, do (Actions)
      Loop - Actions
        Custom script: call Savecode(udg_SaveTempInt).Encode(udg_SaveValue[bj_forLoopAIndex], udg_SaveMaxValue[bj_forLoopAIndex])
    Set VariableSet SaveTempString =
    Custom script: set udg_SaveTempString = Savecode(udg_SaveTempInt).Save(GetTriggerPlayer(), 1)
    Custom script: call SaveFile.create(GetTriggerPlayer(), SaveHelper.GetUnitTitle(udg_SaveTempUnit), -1, udg_SaveTempString)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SaveShowCode Equal to True
      Then - Actions
        Custom script: set udg_SaveCodeColored = Savecode_colorize(udg_SaveTempString)
        Game - Display to (All players) the text: SaveCodeColored
      Else - Actions
Load GUI
  Events
    Game - SaveLoadEvent becomes Equal to 1.00
  Conditions
    SaveUseGUI Equal to True
  Actions
    Set VariableSet SaveCount = 0
    -------- ------------------- --------
    -------- NOTE: You must load values in the reverse order you saved them in --------
    -------- ------------------- --------
    -------- Validate --------
    -------- ------------------- --------
    Custom script: set udg_SaveTempInt = integer(Savecode.create())
    Custom script: if not (Savecode(udg_SaveTempInt).Load(udg_SaveLoadEvent_Player, udg_SaveLoadEvent_Code, 1)) then
    Game - Display to (Player group(SaveLoadEvent_Player)) the text: Invalid load code (check your name).
    Skip remaining actions
    Custom script: endif
    Custom script: call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Loaded " + User[udg_SaveLoadEvent_Player].nameColored + "'s character!")
    Unit - Remove SavePlayerHero[((Player number of SaveLoadEvent_Player) - 1)] from the game
    -------- ------------------- --------
    -------- Load Hero --------
    -------- ------------------- --------
    Set VariableSet SaveMaxValue[SaveCount] = SaveUnitTypeMax
    Custom script: call SaveHelper.GUILoadNext()
    -------- ------------------- --------
    Unit - Create 1.SaveUnitType[SaveValue[SaveCount]] for SaveLoadEvent_Player at (Center of (Playable map area)) facing Default building facing degrees
    Set VariableSet SaveTempUnit = (Last created unit)
    Set VariableSet SavePlayerHero[((Player number of SaveLoadEvent_Player) - 1)] = SaveTempUnit
    Selection - Select SaveTempUnit for SaveLoadEvent_Player
    -------- ------------------- --------
    -------- Load Hero Name --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = SaveNameMax
    Custom script: call SaveHelper.GUILoadNext()
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (SaveUnitType[SaveValue[(SaveCount - 1)]] is A Hero) Equal to True
        SaveHeroName Equal to True
      Then - Actions
        Custom script: set udg_SaveTempString = SaveHelper.GetHeroNameFromID(udg_SaveValue[udg_SaveCount])
        Custom script: call BlzSetHeroProperName(udg_SaveTempUnit, udg_SaveTempString)
      Else - Actions
    -------- ------------------- --------
    -------- Load Experience and Level --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = 100
    Custom script: call SaveHelper.GUILoadNext()
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = 100
    Custom script: call SaveHelper.GUILoadNext()
    -------- ------------------- --------
    Custom script: set udg_SaveTempReal = SaveHelper.GetLevelXP(udg_SaveValue[udg_SaveCount-1])
    Hero - Set SaveTempUnit experience to (Integer((((Real(SaveValue[SaveCount])) / 100.00) x SaveTempReal))), Hide level-up graphics
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Hero level of SaveTempUnit) Not equal to SaveValue[(SaveCount - 1)]
      Then - Actions
        Hero - Set SaveTempUnit Hero-level to SaveValue[(SaveCount - 1)], Hide level-up graphics
      Else - Actions
    -------- ------------------- --------
    -------- Load Attributes --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = 999
    Custom script: call SaveHelper.GUILoadNext()
    Hero - Modify Intelligence of SaveTempUnit: Set to SaveValue[SaveCount].
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = 999
    Custom script: call SaveHelper.GUILoadNext()
    Hero - Modify Agility of SaveTempUnit: Set to SaveValue[SaveCount].
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = 999
    Custom script: call SaveHelper.GUILoadNext()
    Hero - Modify Strength of SaveTempUnit: Set to SaveValue[SaveCount].
    -------- ------------------- --------
    -------- Load Items --------
    -------- ------------------- --------
    For each (Integer A) from 0 to 5, do (Actions)
      Loop - Actions
        Set VariableSet SaveCount = (SaveCount + 1)
        Set VariableSet SaveMaxValue[SaveCount] = SaveItemTypeMax
        Custom script: call SaveHelper.GUILoadNext()
        Hero - Create SaveItemType[SaveValue[SaveCount]] and give it to SaveTempUnit
    -------- ------------------- --------
    -------- Load Skill Points --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = 999
    Custom script: call SaveHelper.GUILoadNext()
    Hero - Modify unspent skill points of SaveTempUnit: Set to 0 points
    Hero - Modify unspent skill points of SaveTempUnit: Set to (SaveValue[SaveCount] - (Unspent skill points of SaveTempUnit)) points
    -------- ------------------- --------
    -------- Load Abilities --------
    -------- ------------------- --------
    Set VariableSet SaveCount = (SaveCount + 1)
    Set VariableSet SaveMaxValue[SaveCount] = SaveAbilityTypeMax
    Custom script: call SaveHelper.GUILoadNext()
    Set VariableSet SaveTempReal = (Real(SaveValue[SaveCount]))
    For each (Integer A) from 0 to (Integer(SaveTempReal)), do (Actions)
      Loop - Actions
        Set VariableSet SaveCount = (SaveCount + 1)
        Set VariableSet SaveMaxValue[SaveCount] = SaveAbilityTypeMax
        Custom script: call SaveHelper.GUILoadNext()
        Unit - Add SaveAbilityType[SaveValue[SaveCount]] to SaveTempUnit
        Set VariableSet SaveCount = (SaveCount + 1)
        Set VariableSet SaveMaxValue[SaveCount] = 10
        Custom script: call SaveHelper.GUILoadNext()
        Unit - Set level of SaveAbilityType[SaveValue[(SaveCount - 1)]] for SaveTempUnit to SaveValue[SaveCount]
    Custom script: call Savecode(udg_SaveTempInt).destroy()
Load GUI Manual
  Events
    Player - Player 1 (Red) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 2 (Blue) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 3 (Teal) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 4 (Purple) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 5 (Yellow) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 6 (Orange) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 7 (Green) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 8 (Pink) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 9 (Gray) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 10 (Light Blue) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 11 (Dark Green) types a chat message containing -load (stringnoformat) as A substring
    Player - Player 12 (Brown) types a chat message containing -load (stringnoformat) as A substring
  Conditions
    SaveUseGUI Equal to True
    (Substring((Entered chat string), 1, 5)) Equal to -load
  Actions
    Set VariableSet SaveTempString = (Substring((Entered chat string), 7, 999))
    Set VariableSet SaveTempInt = (Integer(SaveTempString))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Length of SaveTempString) Equal to 1
      Then - Actions
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Length of SaveTempString) Greater than 1
          Then - Actions
            Set VariableSet SaveLoadEvent_Code = SaveTempString
            Set VariableSet SaveLoadEvent_Player = (Triggering player)
            Set VariableSet SaveLoadEvent = 1.00
            Set VariableSet SaveLoadEvent = 0.00
            Skip remaining actions
          Else - Actions
            Set VariableSet SaveTempInt = -1
    Custom script: if (not File.ReadEnabled) then
    Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,60000, udg_LocalFiles_WarningMessage)
    Custom script: endif
    Custom script: call LoadSaveSlot(GetTriggerPlayer(), udg_SaveTempInt)
 
 
by Pipedream

you can use your own if you want