Ruby Isnewhuman/Flags

smoochy boys on tour

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
64
104
Yes.
Is the above command in the files?

Cant get it to work and want to use it in an npc...
 

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
64
104
Yes.
Re: Isnewhuman

Yeah, couldnt see it on that list but wasnt sure if it had been added later =/

Must be something, its a hugely useful feature!!
 
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,354
52
305
England
Re: Isnewhuman

Yeah good for @logon.

Errr, I'm no good with these files but perhaps ask lcd to see if there's anything similar or to code one in?
 
Upvote 0

boothy

LOMCN Veteran
Veteran
Mar 23, 2007
458
12
65
Re: Isnewhuman

Well you could always try something like:

[@OnLogin]
#IF
checknamelist newuser.txt
#ACT
break
#ELSEACT
SENDALLMSG "<$USERNAME> joined the server. Welcome!"
addnamelist newuser.txt

Dunno... never used ruby files
 
Upvote 0

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
64
104
Yes.
Re: Isnewhuman

So it doesnt matter where i put the namelist, it will find it when i reference it? Or do i need to give its fullpath when i reference it?
 
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,354
52
305
England
Re: Isnewhuman

Full path, when you do the command "addnamelist" and wherever you specify the file is where it creates it.

Then to check the namelist make sure its pointed to the same path.
 
Upvote 0

boothy

LOMCN Veteran
Veteran
Mar 23, 2007
458
12
65
Re: Isnewhuman

If you have the namelist in the same folder then you don't need to specify the path. If you wanted it in a different location you would need to put like:

ADDNAMELIST ..\Npc_Def\Namelists\newuser.txt

CHECKNAMELIST ..\Npc_Def\Namelists\newuser.txt

which would mean you store it in envir\npc_def\namelists folder
 
Upvote 0

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
64
104
Yes.
Thanks for all of you help so far...except maybe tai!

Another thing I wanted to know about was flags. How do they work and where are they stored?

I get the whole 'check flag 501 1' part, but where is flag 501 created and stored?

Thanks again

---------- Post added at 12:46 PM ---------- Previous post was at 06:49 AM ----------

Bummmmp!
 
Upvote 0

boothy

LOMCN Veteran
Veteran
Mar 23, 2007
458
12
65
Sorry, I have no idea. Never really thought about it to be honest lol. Just looked around the files but I can't find anywhere where the flags would be stored. Same on 2.3, looked through all files / database can't find anything so I don't think it's possible to see where they are created/stored on 2.3, dunno about Ruby. Like I said I don't know much about Ruby files as I've never used them, so maybe IceMan or someone else who's had experience with the files could reply to help you, or give him a PM.

Edit:

You could always combine namelists with flags I suppose, for example:

[@OnLogin]
#IF
CHECK [150] 1
#ACT
break
#ELSEACT
SENDALLMSG "<$USERNAME> joined the server. Welcome!"
SET [150] 1
addnamelist ..\Npc_Def\FlagLists\150.txt



so it sets your flag [150] on and also adds your name to the namelist in npc_def\flaglists folder so you can see if you have the flag on or not, but it would mean creating a lot of text files if you use flags alot lol. Other than that I dunno sorry.
 
Last edited:
  • Like
Reactions: Shank
Upvote 0

Robert

Actual Jesus
VIP
Jan 1, 1970
4,609
64
104
Yes.
Hmmm...its more for quests...for example:

[QUESTS]
;ID Level Flag Start Finish Class
1 1 0 1 1 *

I'm assuming that the flag being 0 means the quest hasn't been completed, but I'm wondering whether after the quest has been completely it automatically updates that flag to 1, to say that a user has completed it.

I just dont get the flag business and how it is consistently applied, i think i need someone to explain it concisely!!

Thanks for your help so far boothy, its much appreciated!
 
Upvote 0

boothy

LOMCN Veteran
Veteran
Mar 23, 2007
458
12
65
Oh, no clue about that never seen that before, must be new to Ruby files lol I've only used 2.3. IceMans probably the best person to ask about that.
 
Upvote 0

Lilcooldoode

LOMCN Developer
Developer
May 10, 2003
2,235
754
360
Yes
[QUESTS]
;ID Level Flag Start Finish Class
1 1 0 1 1 *


ID = Quest ID in QuestDiary folder
Level = Level required to start quest
Flag = If a seperate quest has to be completed first enter its ID here (0 = no other quests need to be completed)
Start: (0 = quest can not be started at this NPC) (1 = quest can be started at this NPC)
Finish: (0 = quest can not be finished at this NPC) (1 = quest can be finished at this NPC)
Class: (0 = war, 1 = wiz, 2 = tao, 3 = sin, * = all)
 
Upvote 0

Hazuki

VIP
VIP
Apr 14, 2004
3,459
38
285
United Kingdom
Could use qfunction

Code:
[@Levelup]
#IF
CHECKLEVEL = 51
#ACT
GMEXECUTE ADJUSTLEVEL SELF 50
GMEXECUTE ADJUSTEXP SELF 0
sendmsg "The max level is 50!" 1
break
 
Upvote 0