• 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.

[Trigger] I need a Save&Load trigger And a Script to MilkShape Request

Status
Not open for further replies.
Level 9
Joined
Jan 23, 2008
Messages
384
For Saving :

JASS:
function Trig_SaveGame_Actions takes nothing returns nothing
    local integer save_agi
    local integer save_int
    local integer save_str
    local integer save_xp
    local string save_code = "Here's your code: "
    set save_agi = GetHeroAgi(udg_RedHero , false)
    set save_int = GetHeroInt(udg_RedHero , false)
    set save_str = GetHeroStr(udg_RedHero , false)
    set save_xp = GetHeroXP(udg_RedHero)
    set save_code = save_code + I2S(StringLength(I2S(save_xp)))
    set save_code = save_code + I2S(StringLength(I2S(save_agi)))
    set save_code = save_code + I2S(StringLength(I2S(save_int)))
    set save_code = save_code + I2S(StringLength(I2S(save_str)))
    set save_code = save_code + I2S(save_xp)
    set save_code = save_code + I2S(save_agi)
    set save_code = save_code + I2S(save_int)
    set save_code = save_code + I2S(save_str)
    call DisplayTextToForce( GetPlayersAll() , save_code )
endfunction

For Loading

JASS:
function Trig_LoadGame_Actions takes nothing returns nothing
    local integer xplen
    local integer agilen
    local integer intlen
    local integer strlen
    local integer load_xp
    local integer load_agi
    local integer load_int
    local integer load_str
    local integer strpos = 10
    local string msg = GetEventPlayerChatString()
    set xplen = S2I(SubString(msg,6,7))
    set agilen = S2I(SubString(msg,7,8))
    set intlen = S2I(SubString(msg,8,9))
    set strlen = S2I(SubString(msg,9,10))
    set load_xp = S2I(SubString(msg,strpos,strpos+xplen))
    set strpos = strpos + xplen
    set load_agi = S2I(SubString(msg,strpos,strpos+agilen))
    set strpos = strpos + agilen
    set load_int = S2I(SubString(msg,strpos,strpos+intlen))
    set strpos = strpos + intlen
    set load_str = S2I(SubString(msg,strpos,strpos+strlen))
    call DisplayTextToForce( GetPlayersAll() , "XP: "+I2S(load_xp)+" Agi: "+I2S(load_agi)+" Int: "+I2S(load_int)+" Str: "+I2S(load_str) )
endfunction

Hope i helped you ... ! :thumbs_up::wink:

LOLZ you should search before you post ... i posted tnis yesterday ...
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Did you see this forum say anywhere "Here you ask people to make you a map and they obey to your command!"?

And if you don't know what's a variable (which means you either didn't get past grade 4 or simply don't have a brain)... well, what I wrote in the brackets.
 
No problem with the script other than the fact its insecure... just lots of people are too idiotic to use it... and Upgrade, about that milkshape request,
a) it comes with that script you want anyway
b) this is the Triggers/ JASS scripts forum, it is not the place to ask for scripts for tools. Try the Modelling and Animation forum if you want exporter scripts...
 
Status
Not open for further replies.
Top