My Ranking System [with errors]

smoochy boys on tour

mStation

Golden Oldie
Golden Oldie
Oct 29, 2003
2,042
69
255
♫♪♫ ♦♥♠♣ ♀♂♀
[Server 2.3]

Hello..

since i've been working on this for a while and i can't see where the error is i thought to write here what i'm working on..

i'm using QFunction and QManage at the same time.. in the first file i have:

[@levelUp]
#IF
CHECKLEVELEX = 20
#ACT
give gold 200000
SET [200] 1
SETRANKLEVELNAME %s\LvL20
LineMSG 6 "Congratulations! You Just Got To LeveL 20 & Won 200K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 20"
BREAK
#IF
CHECKLEVELEX = 30
#ACT
give gold 500000
SET [200] 0
SET [201] 1
SETRANKLEVELNAME %s\LvL30
LineMSG 6 "Congratulations! You Just Got To LeveL 30 & Won 500K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 30"
BREAK
#IF
CHECKLEVELEX = 40
#ACT
give GoldBar 1
SET [201] 0
SET [202] 1
SETRANKLEVELNAME %s\LvL40
LineMSG 6 "Congratulations! You Just Got To LeveL 40 & Won 1GoldBar"
SendMSG 0 "Congratulations! <$USERNAME> is now level 40"
BREAK...


(continues to level 100 btw but the code is always the same)

and in QManage i have this:
[@Login]

#IF
CHECK [200] 1
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK

#IF
CHECK [201] 1
#ACT
SETRANKLEVELNAME %s\LvL30
BREAK

#IF
CHECK [202] 1
#ACT
SETRANKLEVELNAME %s\LvL40
BREAK


same here continues to lvl 100 but as the piece before it always the same code..

The code should allow the player to get a specific ranking when he gets to a determinated level.. for example if u get to lvl 20 u get ranking saying LvL20 but at the same time u set a questflag which is [200] 1.. if u log out and then back in.. qmanage at login checks the active flag on your username and puts again the correct ranking lvl according to the flag..

now the code seems correct to me but im surely making something wrong because if i get to lvl 20 i set 200 1.. and i get ranking LvL20 and if i log out and in qmanage works alright..but if i get to lvl 30 i set 200 to 0 and 201 to 1.. i get in that instant LvL30 but if i log out and in i get again LvL20..

i dont understand why.. can anyone help?

do i have to write simply qmanage backwords? like this:
[@Login]
#IF
CHECK [202] 1
#ACT
SETRANKLEVELNAME %s\LvL40
BREAK

#IF
CHECK [201] 1
#ACT
SETRANKLEVELNAME %s\LvL30
BREAK

#IF
CHECK [200] 1
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK



thanks in advance
 
Last edited:

Adamsy

LOMCN Veteran
Veteran
Oct 2, 2004
345
0
63
Peterlee, CountyDurham (UK)
To get your ranking after you log out your gonna need to add players name to a .txt file m8. Like below:

[@levelUp]
#IF
CHECKLEVELEX = 20
#ACT
give gold 200000
SET [200] 1
SETRANKLEVELNAME %s\LvL20
ADDNAMELIST lvl20.txt
LineMSG 6 "Congratulations! You Just Got To LeveL 20 & Won 200K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 20"
BREAK
[@Login]
#IF
CHECK [200] 1
CHECKNAMELIST lvl20.txt
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK

.txt files will go in your mapquest_def folder
 
Last edited:
Upvote 0

Spoon666

LOMCN Veteran
Veteran
Feb 12, 2005
292
0
63
South West Wales
to put a txt file anywhere use ..\path to file.txt - the .. represents the envir folder

eg

[@levelUp]
#IF
CHECKLEVELEX = 20
#ACT
give gold 200000
SET [200] 1
SETRANKLEVELNAME %s\LvL20
ADDNAMELIST ..\Quest_Diary\RankNameLists\lvl20.txt
LineMSG 6 "Congratulations! You Just Got To LeveL 20 & Won 200K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 20"
BREAK

the txt file will now be in a folder called RankNameLists inside the quest diary folder.

Makes life easier than having them all in one folder with npc scripts

Edit: remember that when you call this file you need to use:-

CheckNameList ..\Quest_Diary\RankNameLists\lvl20.txt
 
Last edited:
Upvote 0

Spoon666

LOMCN Veteran
Veteran
Feb 12, 2005
292
0
63
South West Wales
i don't use flags for ranks mert, i just use namelists

[@levelUp]
#IF
CHECKLEVELEX = 20
#ACT
give gold 200000
ADDNAMELIST ..\Quest_Diary\RankNameLists\lvl20.txt
SETRANKLEVELNAME %s\LvL20
LineMSG 6 "Congratulations! You Just Got To LeveL 20 & Won 200K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 20"
BREAK

#IF
CHECKLEVELEX = 30
#ACT
give gold 500000
DELNAMELIST ..\Quest_Diary\RankNameLists\lvl20.txt
ADDNAMELIST ..\Quest_Diary\RankNameLists\lvl30.txt
SETRANKLEVELNAME %s\LvL30
LineMSG 6 "Congratulations! You Just Got To LeveL 30 & Won 500K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 30"
BREAK



[@Login]

#IF
CHECKNAMELIST ..\Quest_Diary\RankNameLists\lvl20.txt
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK
 
Last edited:
Upvote 0

jewjewbee

Dedicated Member
Dedicated Member
May 5, 2007
99
2
55
[Server 2.3]

Hello..

since i've been working on this for a while and i can't see where the error is i thought to write here what i'm working on..

i'm using QFunction and QManage at the same time.. in the first file i have:

[@levelUp]
#IF
CHECKLEVELEX = 20
#ACT
give gold 200000
SET [200] 1
SETRANKLEVELNAME %s\LvL20
LineMSG 6 "Congratulations! You Just Got To LeveL 20 & Won 200K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 20"
BREAK
#IF
CHECKLEVELEX = 30
#ACT
give gold 500000
SET [200] 0
SET [201] 1
SETRANKLEVELNAME %s\LvL30
LineMSG 6 "Congratulations! You Just Got To LeveL 30 & Won 500K"
SendMSG 0 "Congratulations! <$USERNAME> is now level 30"
BREAK
#IF
CHECKLEVELEX = 40
#ACT
give GoldBar 1
SET [201] 0
SET [202] 1
SETRANKLEVELNAME %s\LvL40
LineMSG 6 "Congratulations! You Just Got To LeveL 40 & Won 1GoldBar"
SendMSG 0 "Congratulations! <$USERNAME> is now level 40"
BREAK...

(continues to level 100 btw but the code is always the same)

and in QManage i have this:
[@Login]

#IF
CHECK [200] 1
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK

#IF
CHECK [201] 1
#ACT
SETRANKLEVELNAME %s\LvL30
BREAK

#IF
CHECK [202] 1
#ACT
SETRANKLEVELNAME %s\LvL40
BREAK

same here continues to lvl 100 but as the piece before it always the same code..

The code should allow the player to get a specific ranking when he gets to a determinated level.. for example if u get to lvl 20 u get ranking saying LvL20 but at the same time u set a questflag which is [200] 1.. if u log out and then back in.. qmanage at login checks the active flag on your username and puts again the correct ranking lvl according to the flag..

now the code seems correct to me but im surely making something wrong because if i get to lvl 20 i set 200 1.. and i get ranking LvL20 and if i log out and in qmanage works alright..but if i get to lvl 30 i set 200 to 0 and 201 to 1.. i get in that instant LvL30 but if i log out and in i get again LvL20..

i dont understand why.. can anyone help?

do i have to write simply qmanage backwords? like this:
[@Login]
#IF
CHECK [202] 1
#ACT
SETRANKLEVELNAME %s\LvL40
BREAK

#IF
CHECK [201] 1
#ACT
SETRANKLEVELNAME %s\LvL30
BREAK

#IF
CHECK [200] 1
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK


thanks in advance

Take out all the break commands in red.
The only break command needed would be after the last one.
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
i do mine the otehr way around and use breaks

ill start with highest level 1st, then go down to the lowest

#IF
level 100
#act
w/e
break

#if
level 90
#act
w/e
break

etc etc
 
Upvote 0