[help] Flags

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
Namelists are miles better than flags, but;


Code:
#ACT
SET [001] 1

This will set flag 001 on(1)

Code:
#ACT
SET [001] 0

This will set flag 001 off(0)

Code:
#IF
CHECK [001] 1

This will check if the flag 001 is set(1)

Code:
#IF
CHECK [001] 0

This will check if the flag 001 isn't set(0)
 
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
Oh and make sure to use random numbers but keep on top of them or you'll end up using the same one twice, which is why Namelists are better :]

EDIT - Sorry for doublepostage.
 
Upvote 0

Lone

LOMCN Veteran
Veteran
Mar 15, 2007
278
12
44
Flags can be used for just about anything - normally they are used for Quests to make sure you have completed a certian part of it.

so it would be something like

[@Main]
#IF
CHECK [001] 0
#SAY
<start quest/@Quest1>
<close/@exit>
#ELSESAY
<I have the ticket!/@Quest2>
<close/@exit>

[@Quest1]
#SAY
Im looking for a quest ticket go find it by killing Omas
#ACT
Set [001] 1
Break

[@Quest2]
#IF
CHECK [001] 1
CHECKITEM QuestTicket1
#ACT
Set [002] 1
#SAY
Congratulations you've found it Now go find Ticket2 for my friend Barry.
<close/@exit>
#ELSESAY
You havent found the Ticket yet please go and search for it.
<close/@exit>

[@exit]
#ACT
Break


so all the flags do is define if something has been done before or not so you can pretty much use them for anything ;)

im pretty sure thats right - im sure if i missed bits out people will correct me ;)

all best
 
Upvote 0

TravisW

LOMCN Veteran
Veteran
Sep 4, 2007
737
17
105
imo, flags are WAY better so you don't end up with loads of extra text files.
Any server owner shouldn't find it hard to be orderly and keep a little notebook of flag numbers used, and what they've been used for.

#IF
CHECKNAMELIST quest1.txt
ADDNAMELIST quest1.txt
DELNAMELIST quest1.txt

check [300] 1
set [300] 0
set [300] 1

65 keystrokes for lists versus 29 for flags =P

No need to flame, just stating my opinion.
 
Upvote 0

evildan

LOMCN Veteran
Veteran
Aug 8, 2004
310
3
45
Dartford/Kent
imo, flags are WAY better so you don't end up with loads of extra text files.
Any server owner shouldn't find it hard to be orderly and keep a little notebook of flag numbers used, and what they've been used for.

#IF
CHECKNAMELIST quest1.txt
ADDNAMELIST quest1.txt
DELNAMELIST quest1.txt

check [300] 1
set [300] 0
set [300] 1

65 keystrokes for lists versus 29 for flags =P

No need to flame, just stating my opinion.

Totally agree 100% Im a big fan of using flags also, pwns them addnamelist :P
 
Upvote 0

Lucafer

LOMCN Veteran
Veteran
May 15, 2008
419
1
45
Newbury,Berks
i wud use flags tbh but very uncertain of how to.
do i just use the flags in script or do i have to put them in a serperate file aswell?
 
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
As it seems everyone is against name lists i'll be their support ^^


My point:


  • Afaik. Flags aren't unlimited! ;)
  • You can't rename a flag (less effort!)
etc. I know it's just personal oppinion but I'm keeping the thread rolling :D
 
Upvote 0