• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] _Evo Hardcore Multiboard Save_Load System @ Jass HELP!

Status
Not open for further replies.
Level 5
Joined
Jul 4, 2005
Messages
54
We need a save_Load system for both the Leaderboard, and multiboard.
we want YOU! to make a Jass Script that when player leaves, or victory, or defeat. that nextime they join a map. they would have their scores from leaderboard and a multiboard again, such of our map.

Thank you.
Jack_Sparrow_evo
Kenny_evo
Oloma_evo
 
its ok,
we're fixed it
we just forgort the Xloop set function 5 reset 50 return 10000000 else nothing.

if the point is between 1-10000000 in the kills and deaths and famousness value, it saves automatic.

we dont need it so..... we delete this post tomorrow
 
... I did never look at things like "boards" as I never wanted to create such a kind of game, but...

It should work similar to this:

JASS:
globals
 force udg_AllPlayers = CreateForce()
 gamecache udg_Cache = InitGameCache(" <- Map Name -> .w3v")
 trigger gg_trg_Initialisation = CreateTrigger()
 trigger gg_trg_Save = CreateTrigger()
endglobals

Trigger "Initialisation"
JASS:
function Trig_Initialisation_FindSavedPlayer takes nothing returns nothing
  local player pickedPlayer = GetEnumPlayer()
  if GetStoredInteger(udg_Cache,GetPlayerName(pickedPlayer),"Leaderboard") != 0 then
    <- Set Leaderboard Value (GetStoredInteger(udg_Cache,GetPlayerName(pickedPlayer),"Leaderboard")) ->
    <- Set Multiboard Value (GetStoredInteger(udg_Cache,GetPlayerName(pickedPlayer),"Multiboard")) ->
  endif
  set pickedPlayer = null
endfunction

function Trig_Initialisation_Actions takes nothing returns nothing
  call ForceEnumPlayers(udg_AllPlayers,null)
  call ForForce(udg_AllPlayers,function Trig_Initialisation_FindSavedPlayer)
endfunction

function InitTrig_Initialisation takes nothing returns nothing
  set gg_trg_Initialisation = CreateTrigger()
  call TriggerAddAction(gg_trg_Initialisation,function Trig_Initialisation_Actions)
endfunction

Trigger "Save"
JASS:
function Trig_Save_EventRegistration takes nothing returns nothing
  local player pickedPlayer = GetEnumPlayer()
  call TriggerRegisterPlayerEvent(gg_trg_Save,pickedPlayer,EVENT_PLAYER_VICTORY)
  call TriggerRegisterPlayerEvent(gg_trg_Save,pickedPlayer,EVENT_PLAYER_DEFEAT)
  set pickedPlayer = null
endfunction

function Trig_Save_Actions takes nothing returns nothing
  local player triggerPlayer = GetTriggerPlayer()
  call StoreInteger(udg_Cache,GetPlayerName(triggerPlayer),"Leaderboard", <- Value in Leaderboard -> )
  call StoreInteger(udg_Cache,GetPlayerName(triggerPlayer),"Multiboard", <- Value in Multiboard -> )
  set triggerPlayer = null
endfunction

function InitTrig_Save takes nothing returns nothing
  set gg_trg_Save = CreateTrigger()
  call ForForce(udg_AllPlayers,function Trig_Save_EventRegistration)
  call TriggerAddAction(gg_trg_Save,function Trig_Speicher_Save)
endfunction
 
... There is another kind of saving/loading system implemented in many multiplayer maps of aeon kind...

It allows to save and restore heros, items, integers...
That should be enough, should not it?

If it does not work with game caches, I have no idea how it may do, but it works at last...

All that would have to be done is the replacement of a random loading code with the actual player name and the automatical Try to restore a player's statistics at the beginning of a game.
Or am I wrong with that?
 
Exactly, it's flushed after the game ends.
What he wants is to "save" the statistics of a game in order to use them in a new one.
Example: John has "10-0", game ends. Later in a new game, John starts with "10-0".
For anyone who reads this, this is not possible to do unless, like SnaKy said, you use loadstrings...which is ...uh...
 
Status
Not open for further replies.
Back
Top