• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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
 
Level 5
Joined
Jul 4, 2005
Messages
54
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
 
Level 5
Joined
May 22, 2006
Messages
150
... 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
 
Level 5
Joined
May 22, 2006
Messages
150
... 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?
 
Level 11
Joined
Jul 15, 2004
Messages
333
It could work because gamecache do work in multiplayer just it's cleared when the game ends.

If you wanna "test" (but there is nothing to test as it does not work anyways) it you have to save GC, exit the game, start another and load it.

I really don't get what you want, but how about save/load codes?
 
Level 5
Joined
Feb 16, 2006
Messages
151
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.
Top