[trigger=]
alphabet
Events
Map initialization
Conditions
Actions
Set tempint = 0
-------- --------
-------- In order from A to Z --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = a
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS65.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = b
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS66.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = c
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS67.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = d
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS68.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = e
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS69.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = f
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS70.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = g
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS71.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = h
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS72.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = i
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS73.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = j
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS74.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = k
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS75.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = l
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS76.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = m
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS77.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = n
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS78.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = o
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS79.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = p
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS80.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = q
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS81.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = r
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS82.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = s
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS83.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = t
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS84.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = u
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS85.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = v
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS86.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = w
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS87.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = x
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS88.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = y
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS89.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = z
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS90.blp
-------- --------
-------- Numbers begin here --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 0
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS48.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 1
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS49.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 2
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS50.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 3
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS51.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 4
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS52.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 5
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS53.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 6
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS54.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 7
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS55.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 8
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS56.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 9
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS57.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = +
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS43.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = -
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS45.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = .
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS46.blp
-------- --------
Hashtable - Create a hashtable
Set mytable = (Last created hashtable)
[/trigger]
[trigger=]
Save GUI
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
Player - Player 9 (Gray) types a chat message containing -save as An exact match
Player - Player 10 (Light Blue) types a chat message containing -save as An exact match
Player - Player 11 (Dark Green) types a chat message containing -save as An exact match
Conditions
(SavePlayerHero[((Player number of (Triggering player)) - 1)] is A Hero) Equal to True
Actions
Game - Display to (All players) the text: (Name of (Triggering player))
-------- ------------------- --------
-------- NOTE: You must load values in the reverse order you saved them in. This is why we save the unit type last. --------
-------- ------------------- --------
Set SaveTempUnit = SavePlayerHero[((Player number of (Triggering player)) - 1)]
Set 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 SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Level of SaveAbilityType[SaveTempInt] for SaveTempUnit)
Set SaveMaxValue[SaveCount] = 10
-------- Save the array index --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = SaveTempInt
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
Else - Actions
-------- Save the number of abilities the unit has --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (SaveCount / 2)
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
-------- ------------------- --------
-------- Save Skill Points --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Unspent skill points of SaveTempUnit)
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
-------- Save Items --------
-------- ------------------- --------
For each (Integer SaveTempInt) from 0 to 5, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Custom script: set udg_SaveValue[udg_SaveCount] = SaveCode_I2I(GetItemTypeId(UnitItemInSlot(udg_SaveTempUnit, udg_SaveTempInt)))
Set SaveMaxValue[SaveCount] = SaveItemTypeMax
-------- ------------------- --------
-------- Save Attributes --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Strength of SaveTempUnit (Exclude bonuses))
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Agility of SaveTempUnit (Exclude bonuses))
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Intelligence of SaveTempUnit (Exclude bonuses))
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
-------- Save Experience (%) and Level --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Custom script: set udg_SaveValue[udg_SaveCount] = R2I( (GetHeroXP(udg_SaveTempUnit)) / FindLevelXP(GetHeroLevel(udg_SaveTempUnit)) * 100) // percentage
Set SaveMaxValue[SaveCount] = 100
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Hero level of SaveTempUnit)
Set SaveMaxValue[SaveCount] = 100
-------- ------------------- --------
-------- Save Unit Type --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Custom script: set udg_SaveValue[udg_SaveCount] = SaveCode_U2I(GetUnitTypeId(udg_SaveTempUnit))
Set SaveMaxValue[SaveCount] = SaveUnitTypeMax
-------- ------------------- --------
-------- Name test --------
Set tempstr = wow
Set tempstr = (String(tempstr) as Lower case)
For each (Integer A) from 1 to (Length of tempstr), do (Actions)
Loop - Actions
For each (Integer B) from 1 to 40, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
alphabetchecker[(Integer B)] Equal to (Substring(tempstr, (Integer A), (Integer A)))
Then - Actions
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Integer B)
Set SaveMaxValue[SaveCount] = 99
Custom script: exitwhen true
Else - Actions
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Length of tempstr)
Set SaveMaxValue[SaveCount] = 99
-------- Save to disk --------
For each (Integer A) from 1 to 37, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Random integer number between 90 and 99)
Set SaveMaxValue[SaveCount] = 99
For each (Integer A) from 1 to 99, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Random integer number between 90 and 99)
Set SaveMaxValue[SaveCount] = 99
-------- ------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SaveLoad_Slot Less than 0
Then - Actions
Set SaveLoad_Slot = 11
Else - Actions
Custom script: call SaveCode_Save(GetTriggerPlayer(), udg_SaveLoad_Slot)
[/trigger]
[trigger=]
Load GUI2
Events
Game - SaveLoadEvent becomes Equal to 1.00
Conditions
Actions
Set SaveCount = -1
-------- ------------------- --------
-------- 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 (...
Skip remaining actions
Custom script: endif
Custom script: call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Loaded " + User[udg_SaveLoadEvent_Player].nameColored + "'s character in " + R2S(udg_SaveTempReal) + " seconds!")
-------- ------------------- --------
Game - Display to (All players) the text: (String((Length of SaveLoadEvent_Code)))
Game - Display to (All players) the text: SaveLoadEvent_Code
Game - Display to (All players) the text: (String((Length of SaveTempString)))
For each (Integer A) from 1 to 99, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Player - Set Player 1 (Red) Current lumber to 0
Player - Add SaveValue[SaveCount] to Player 1 (Red) Current lumber
Game - Display to (All players) the text: (String(SaveValue[SaveCount]))
For each (Integer A) from 1 to 37, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Player - Set Player 1 (Red) Current gold to 0
Player - Add SaveValue[SaveCount] to Player 1 (Red) Current gold
Game - Display to (All players) the text: (String(SaveValue[SaveCount]))
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Game - Display to (All players) the text: (String(SaveValue[SaveCount]))
Set tempint = SaveValue[SaveCount]
-------- ------------------- --------
Set tempstr = <Empty String>
For each (Integer A) from 1 to tempint, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Set tempstr = (tempstr + alphabetchecker[SaveValue[SaveCount]])
Game - Display to (All players) the text: tempstr
-------- Load Hero --------
Game - Display to (All players) the text: tempstr
-------- ------------------- --------
Unit - Remove SavePlayerHero[((Player number of SaveLoadEvent_Player) - 1)] from the game
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveUnitTypeMax
Custom script: call SaveCode_LoadNextValue()
-------- ------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SaveUnitType[SaveValue[SaveCount]] is A Hero) Equal to True
SaveHeroName Equal to True
Then - Actions
Custom script: set udg_SaveTempUnit = SaveCode_LoadHeroWithProperName(udg_SaveLoadEvent_Player, udg_SaveUnitType[udg_SaveValue[udg_SaveCount]], 0, 0, 0)
Else - Actions
Unit - Create 1 SaveUnitType[SaveValue[SaveCount]] for SaveLoadEvent_Player at (Center of (Playable map area)) facing Default building facing degrees
Set SaveTempUnit = (Last created unit)
Set SavePlayerHero[((Player number of SaveLoadEvent_Player) - 1)] = SaveTempUnit
Selection - Select SaveTempUnit for SaveLoadEvent_Player
-------- ------------------- --------
-------- Load Experience and Level --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 100
Custom script: call SaveCode_LoadNextValue()
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 100
Custom script: call SaveCode_LoadNextValue()
Custom script: set udg_SaveTempReal = FindLevelXP(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 SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify Intelligence of SaveTempUnit: Set to SaveValue[SaveCount]
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify Agility of SaveTempUnit: Set to SaveValue[SaveCount]
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify Strength of SaveTempUnit: Set to SaveValue[SaveCount]
-------- ------------------- --------
-------- Load Items --------
-------- ------------------- --------
For each (Integer A) from 0 to 5, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveItemTypeMax
Custom script: call SaveCode_LoadNextValue()
Hero - Create SaveItemType[SaveValue[SaveCount]] and give it to SaveTempUnit
-------- ------------------- --------
-------- Load Skill Points --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
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 SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
Custom script: call SaveCode_LoadNextValue()
Set SaveTempReal = (Real(SaveValue[SaveCount]))
For each (Integer A) from 0 to (Integer(SaveTempReal)), do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
Custom script: call SaveCode_LoadNextValue()
Unit - Add SaveAbilityType[SaveValue[SaveCount]] to SaveTempUnit
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 10
Custom script: call SaveCode_LoadNextValue()
Unit - Set level of SaveAbilityType[SaveValue[(SaveCount - 1)]] for SaveTempUnit to SaveValue[SaveCount]
Custom script: call Savecode(udg_SaveTempInt).destroy()
[/trigger]