NameList system...

smoochy boys on tour

Demonic

LOMCN VIP
VIP
Dec 1, 2003
1,806
2
185
I presume its the same as the Mir2 way. Did you have any ideas why you want to use this, maybe if you have a plan, we could write something for you.
 
Upvote 0

DayWalker™

Golden Oldie
Golden Oldie
Dec 11, 2004
761
1
123
Middlesbrough ! Smoggy!
Well bascially ive rebuilt the whole quest system ive got xx many quest for rank1 and xx for rank 2 up to rank 4.

When a player complete's a rank1 quest they recieve 1 rank point and are then added to a rank1 namelist if they complete a second rank1 quest they are checked for on the rank1 namelists if they exist are then moved to the rank2 namelist and so on.

If they complete a rank1 quest then a rank4 quest they should be on the rank5 namelist.

Is this possible?

/Stan
 
Upvote 0

Demonic

LOMCN VIP
VIP
Dec 1, 2003
1,806
2
185
You have the power in the files to read and write to ANY SQL Database (well inside game3G Anyhow), why limit yourself to something as low level as namelist? Can I at least as why you have stripped out all the quest and trying to re-write the sytem? As it stands you press D and it can tell you what quests you are upto, which part and so forth. Many server owners re-wrote the entire Quests system so instead of Euromir3 Quests - they had there own.

Maybe the Xtreme/Illusion guys can point you in a better direction as they have done this very thing.
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
Better is, make a New Table in Game3G callet TBL_QuestRank, then set it up with your thinks like Character or UserID and a Field Namet Rank in this you
save the Quest Rank if this done. It is better as NameList, the Name list has
a Limit. @Demonic ;-) I Control the Sabuk Gates in Hero3G over Script DB function ^^, with a Trick you can Control all DBs. It Need SQL BrainPower.
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
lol? make a NPC or MapQuest or other for this. ;) it give many thinks to make
your owen Quest System.
 
Upvote 0

Azura

Mir3 Coder & Adviser
Legendary
Mar 12, 2005
3,249
111
300
Cant you use the DB Arg feature, I use it to do quests and rewards I'm sure you can use it for anything really.

Make a new table called summin like TBL_NAMELIST add a feild called FLD_CHAR


[@Namelist]
{
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
ReadValueSql "TBL_NAMELIST" %A9 "FLD_CHAR" [@NameList2]

[@NameList2]
#IF
#ACT
mov A0 %ARG(1)

#IF
Equal A0 %USERNAME

[Add your stuff here]
 
Last edited:
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
see the function from Lyncus, this is a way.
with LS or CD you can control the other DB ... Hero3G or other DB
all with ReadValueSql and a bit SQL know.

@Lyncus the #IF statement whitout checks don't need

[@Namelist]
{
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
ReadValueSql "TBL_NAMELIST" %A9 "FLD_CHAR" [@NameList2]

[@NameList2()]
#ACT
mov A0 %ARG(1)
 
Upvote 0

turboshandy

ur a smacktard!
VIP
May 11, 2005
335
0
103
Great Yarmouth/Cambridge
make a new table as stated above by coly and lyncus, ex. tbl_ranksystem

grab your information from tbl_character (fld_character) and set the appropiate rank level that character has achieved.

--------------------------------------------------------------
[@Main]
#ACT
FormatStr "FLD_CHARACTER='%s'" %USERNAME
ReadValueSql "TBL_CHARACTER" %A9 "FLD_CHARACTER" [@GetCharaName]

[@GetCharaName()]
#ACT
MOV A0 %ARG(1) ; stores username in A0 after checking that it is correct in the characters table.
--------------------------------------------------------------
Depending on how you want to do your scores, below is the script for updating that ranksystem table.
[@AddRank]
FormatStr "FLD_CHARACTER='%s'" %A0
UPDATEVALUESQL "TBL_RANKSYSTEM" %A9
---------------------------------------------------------------
depending on what fields you have in that table you could have a fld_rank1, fld)rank2 etc, and set it to either 1 or 0.
or you could have fld_rank and set it from 0-X (X being the maximum rank you want to use) that, all you have to do then is add the check in the quest script to make sure the fld_rank is at the correct level to comtinue the script.


sorry i havent explained things in a while so this might be a little rusty, but it looked you were really trying to learn the scripts. so i thought i'd offer some help, since its been a while since i have :)

/cheekyvimto
 
Last edited:
Upvote 0

DayWalker™

Golden Oldie
Golden Oldie
Dec 11, 2004
761
1
123
Middlesbrough ! Smoggy!
Thanks for the help turbo i know your a bit rusty and all but you've lost me.....I need a bit more explaination if possible please.

FormatStr "FLD_CHARACTER='%s'" %USERNAME

whats this doing exactly?

ReadValueSql "TBL_CHARACTER" %A9 "FLD_CHARACTER" [@GetCharaName]

what is the %A9 doing why is it reading the tbl char when i need it to read the tbl ranksystem ? why is there a getcharname?

MOV A0 %ARG(1) ; stores username in A0 after checking that it is correct in the characters table.

this makes no sense to me what so ever i thought a char name was stored in a Table? i dont see no table name...? whats the A0? %ARG(1) all about?

I really am interested in getting this working as it will develop my skills and make my server as good as it already is...

Thanks

/Stan
 
Upvote 0

Jesterhead

Dedicated Member
Dedicated Member
Jan 12, 2006
44
0
53
FormatStr "FLD_CHARACTER='%s'" %USERNAME

%username replaces %S, the '' are used because %Username is a String variable.

This command is used for creating Strings with a variable inside.

ReadValueSql "TBL_CHARACTER" %A9 "FLD_CHARACTER" [@GetCharaName]
Formatstring puts his Output always in A9.
In this Example the ReadvalueSQl returns a Value from the Field FLD_Character where the Field has the Username inside.

Getcharname
ReadvalueSQL can only give Values to another Function.
In this Example Shandy called it Getcharname ;)


MOV A0 %Arg(1)

the ReadvalueSQL Command gives the Function (in this Example Getcharaname) only one Value back (up to 6 are possible).
To use this variable you must move the Values (%ARG(1) until %Arg(6) into normal Variables, in this case he used A0)

for Example you can read more Variables.

ReadValueSql "TBL_CHARACTER" %A9 "FLD_CHARACTER,FLD_Info1, FLD_Info 2" [@GetCharaName]

[@GetCharaName]
#ACT
MOV A0 %Arg(1)
MOV A1 %Arg(2)
MOV A2 %Arg(3)

You can read up to 6 values from the DB with one ReadvalieSQL call.
 
Upvote 0

DayWalker™

Golden Oldie
Golden Oldie
Dec 11, 2004
761
1
123
Middlesbrough ! Smoggy!
thanks could you give me a simple example of how exactly that system would work.

As ive got it now i get this error in eiserver.exe

12:51:52 PM:Exception) TFrmSql.UpdateSqlValue -> ExecSQL 1
12:51:52 PM: :update TBL_RANKSYSTEM set where FLD_CHARACTER='GMCode'


/Stan
 
Last edited:
Upvote 0