ID:938226
 
(See the best response by Kozuma3.)
Problem description:Hi, I have a problem. I have the variables: "onquest1", "onquest2", "onquest3" ........
"disabledquest1" "disabledquest2", "disabledquest3" .........

And it is difficult to save. And here is my question. Can-do list
onquest's disabledquest's and save variables in them? I'm pretty sure you can. So how do you do that?
How to change the value of the variable in the list, etc?

Sorry for my English.

Best response
//
mob/var/list
Quests=list(\
"onquest1"=0,
"onquest2"=0,
"onquest3"=0,
"onquest4"=0,
"onquest5"=0,
"onquest6"=0,
"onquest7"=0
)
//#You could use the value to check for things.
//---------------------------------------------
//0 = You're not on the quest & it's available.
//1 = You've started the quest and have yet to finish it.
//2 = You've completed the quest.
//3 = You can't do this quest right now.

mob/proc
Save()
var/savefile/F=new("Saves/[src.ckey].sav")
F["Quests"]<<src.Quests
Load()
if(fexists("Saves/[src.ckey].sav"))
var/savefile/F=new("Saves/[src.ckey].sav")
F["Quests"]>>src.Quests

mob
Login()
src.Load()
src.Quests["onquest2"]=3
//The above disables quest two.
Logout()
src.Save()
del src

/**/
//Or you could do something like this
/**/

mob/var/list/Quests=list()

mob/Login()
src.Quests.Add(new/Quest/Quest_1)

Quest
var
name
mission
obj/need
ammount
Quest_1
name="Ambush!"
mission="Kill 5 bandits."
need=/obj/stolen_goods
ammount=5
//
Great! Normally very clear. Praise people like you. Thank you.
In response to Barto444 (#2)
Barto444 wrote:
Great! Normally very clear. Praise people like you. Thank you.

No problem (: