• 🏆 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!

Creating a save/load system for LUMMBER

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
Please, I don't know how to use jass, and am not very familiar with variables, so please be extra explanatory. Just paste the trigger here and tell me where each condition/event/variable type is located and I should be able to replicate it. I just want a save load system for lumber.

Thanks

{EDIT}
Help is still required and will be appreciated.
Thanks

-DaL Reborn Team
 
Last edited by a moderator:
Level 12
Joined
Apr 15, 2008
Messages
1,063
What exactly do you mean? A system that saves players lumber amount? That would be simple:
  • Save
    • Player types - save
  • Actions
    • Game - text messgae( (Triggering Player), "Your save code is:"+String(Player Lumber(Triggering Player)))
  • Save
    • Player types - load
  • Actions
    • Player - Set lumber to ( Integer(substring(entered chat message, 7,10)))
 
Level 8
Joined
Mar 12, 2008
Messages
437
What exactly do you mean? A system that saves players lumber amount? That would be simple:
  • Save
    • Player types - save
  • Actions
    • Game - text messgae( (Triggering Player), "Your save code is:"+String(Player Lumber(Triggering Player)))
  • Save
    • Player types - load
  • Actions
    • Player - Set lumber to ( Integer(substring(entered chat message, 7,10)))

That would be incredibly abuseable.

You could generate some code based on the name of the player and how much lumber s/he's got, like if you associate every letter with a number, then "convert" the name of the player to these numbers, and add them together. After that you could do something like (x^2 + 22)^3 where x is the amount of lumber, or something.

Then when someone loads you can check if the name matches.
 
Status
Not open for further replies.
Top