The only way to edit a flag, is if it is all ready added in a script as this is how flags are used."which then you store either to txt or SQL"
Where? If that is true shouldn't I be able to edit them with notepad or by editing the database manually?
[@myqs]
#if
check [550] 0
#act
set [550] 1
addnamelist acceptedfirstquest.txt
goto @myqsmain
#elseact
goto @myqsmain
[@myqsmain]
#if
check [550] 1
#say
<Kill 5 Hens/@questpart1>\
I still don't quite understand
Here is a example of a script I was testing
Code:[@myqs] #if check [550] 0 #act set [550] 1 addnamelist acceptedfirstquest.txt goto @myqsmain #elseact goto @myqsmain [@myqsmain] #if check [550] 1 #say <Kill 5 Hens/@questpart1>\
(I know this script will work either way even if 550 isn't set to 1 but I removed my character name from acceptedfirstquest.txt and it doesn't add it back)
I've logged out and rebooted the server yet it still remembers the flag 550 is set to 1. Where is that stored? I have not told it to store in a database or text file.
[@joblist]#SAY
Current Jobs:\
#IF
CHECK [381] 0
#SAY
[@MAIN]So why when I log back in the flag is still set? I have also just rebooted...
[@main]
#if
isadmin
#act
goto @gmpart1
#elsesay
You're not a GM...
[@gmpart1]
#if
check [333] 0
#act
SysMsg "333 is turned off"
goto @gmpart2
#elseact
SysMsg "333 is turned on"
goto @gmpart2
[@gmpart2]
#if
check [333] 1
#say
333 is set on.\\
<Set flag 333 to 0/@2>
#elsesay
333 is off.\
<Set flag 333 to 1/@3>
[@2]
#act
set [333] 0
close
[@3]
#act
set [333] 1
close
[@myqs]
#if
check [550] 0
check [551] 0
check [552] 0
check [553] 0
!checknamelist acceptedfirstquest.txt
#act
set [550] 1
goto @myqsmain
addnamelist acceptedfirstquest.txt
#elseact
goto @myqsmain
[@myqsmain]
#if
check [550] 1
#say
<Kill 5 Hens/@questpart1>\
#if
check [551] 1
#say
<Kill 5 Pigs/@questpart2>\
#if
check [552] 1
#say
<Kill 5 Deer/@questpart3>\
#if
check [553] 1
#say
<Kill 5 Scarecrow/@questpart4>\
#elsesay
<reset/@resetmq>
[@resetmq]
#act
set [550] 0
close
[@questpart1]
#if
checknamelist quest1.txt
#say
Well done! Here is your reward of 500 EXP.\\
<Return/@myqs>\
<Exit/@exit>\
#act
actcmd GIVEEXPEX 500
set [551] 1
set [550] 0
#elsesay
Slay 5 Hens for me and we can talk...
#if
check [550] 1
#act
SysMsg "550 is turned on"
#if
check [551] 1
#act
SysMsg "551 is turned on"
Your using checknamelist & addnamelist, this why it's not restarting as you've used a store command. Your using TXT manipulation to store information, so the script will read them first as well as the flags and as you have a On flag for addnamelist it will always read that as being on.This is what I'm currently testing.
Code:[@main] #if isadmin #act goto @gmpart1 #elsesay You're not a GM... [@gmpart1] #if check [333] 0 #act SysMsg "333 is turned off" goto @gmpart2 #elseact SysMsg "333 is turned on" goto @gmpart2 [@gmpart2] #if check [333] 1 #say 333 is set on.\\ <Set flag 333 to 0/@2> #elsesay 333 is off.\ <Set flag 333 to 1/@3> [@2] #act set [333] 0 close [@3] #act set [333] 1 close
I turn it on, log out and reboot the server. Log back in and it still says it's on.
Done the same with it off and it works.
I also tested it with the following
Code:[@myqs] #if check [550] 0 check [551] 0 check [552] 0 check [553] 0 !checknamelist acceptedfirstquest.txt #act set [550] 1 goto @myqsmain addnamelist acceptedfirstquest.txt #elseact goto @myqsmain [@myqsmain] #if check [550] 1 #say <Kill 5 Hens/@questpart1>\ #if check [551] 1 #say <Kill 5 Pigs/@questpart2>\ #if check [552] 1 #say <Kill 5 Deer/@questpart3>\ #if check [553] 1 #say <Kill 5 Scarecrow/@questpart4>\ #elsesay <reset/@resetmq> [@resetmq] #act set [550] 0 close [@questpart1] #if checknamelist quest1.txt #say Well done! Here is your reward of 500 EXP.\\ <Return/@myqs>\ <Exit/@exit>\ #act actcmd GIVEEXPEX 500 set [551] 1 set [550] 0 #elsesay Slay 5 Hens for me and we can talk...
I added the first quest however from what you've posted every time I log out/reboot this script should reset itself starting from the first quest of killing 5 Hens however it keeps going to <Kill 5 Pigs/@questpart2>\
---------- Post Merged at 05:11 PM ---------- Previous Post was at 05:05 PM ----------
Actually I think it would go there either way. The quest does reset 550 back to 0 after the quest is complete and I've added this to another NPC to tell me what flags are set.
Code:#if check [550] 1 #act SysMsg "550 is turned on" #if check [551] 1 #act SysMsg "551 is turned on"
It only says 551 is on
Don't have to be a dick about it and using a plural to describe the act of one person is just plain dumb of you Mick!I can't believe all this crap people are posting about flags.
BoomBoom, flags are set in the SQL and are PERMANENT! They are stored in the table TBL_Quest in the Game3G database (on a 3.55 server).
You cannot edit this table directly in the database but only in game.