NameList system...

turboshandy

ur a smacktard!
VIP
May 11, 2005
335
0
103
Great Yarmouth/Cambridge
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;Quest Rank System - NPC Bit;;; Provided by CheekyVimto - Xtreme Servers ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[@Main]
#ACT
FormatStr "FLD_CHARACTER='%s'" %USERNAME
ReadValueSql "TBL_RANKSYSTEM" %A9 "FLD_CHARACTER,FLD_RANK" [@AddRank1]
[@AddRank1()]
#IF
#ACT
mov A0 %ARG(1) ; Put Characer name in variable A0
mov D1 %ARG(2) ; Put Quest Rank in variable D1
; The Above is just reading information straight from your tableTBL_RANKSYSTEM
#IF
EQUAL D1 0 ; If Quest Rank equals 0
#SAY
<$USERNAME>, your QuestRank is {FCOLOR/5}<OUTPUT(D1)>{FCOLOR/12}\
These Quests are available to you at this time.
;--- List quests for Rank '0'---
<Exit/@Exit>
#ACT
break
; Below will only be added if Quest Rank is 1 or above.
#IF
LARGE D1 1
#SAY
#INCLUDE
;--- List quests for Rank '1'---
<Exit/@Exit>
#ACT
break

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;Quest Scripts bit;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;Use the Mapquest.txt [MonDie] trigger to load a script on monster death
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; This script will set the quest rank in the table TBL_QUESTRANK to whatever is set in variable D5
#IF
#ACT
mov D5 1 ;this sets variable D5 to 1
mov A1 "%USERNAME" ;this stores character name in A1
#IF
#ACT
FormatStr "FLD_CHARACTER='%s'" %USERNAME ; Gets characters name
mov A8 %A9 ; Puts above string in variable A8
FormatStr "FLD_RANK='%s'" %D5 ; Remember FormatStr always stores to A9
UPDATEVALUESQL "TBL_QUESTRANK" %A8 %A9 ; Update sets FLD_CHARACTER to %USERNAME, and FLD_RANK to %D5
#IF
#SAY
Well Done your Quest Rank has increased to {FCOLOR/10}<$OUTPUT(D5)>{FCOLOR/12}\
Please goto the Quest NPC to see newly available quests!\
<Exit/@Exit>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Last edited:
Upvote 0

DayWalker™

Golden Oldie
Golden Oldie
Dec 11, 2004
761
1
123
Middlesbrough ! Smoggy!
Great stuff.

Just what i was lookinf for ill test it out and get back to you.

/Stan
EDI:

Got this in EiServer.exe ill check wether it effects the actual scripting.

4:29:35 PM:Script error, load fail: -
4:29:35 PM:Script error, load fail: -
4:29:35 PM:Script error, load fail: -
4:29:35 PM:Script error, load fail: -
 
Last edited:
Upvote 0

turboshandy

ur a smacktard!
VIP
May 11, 2005
335
0
103
Great Yarmouth/Cambridge
just to double check, have you made the table structure?

-TBL_RANKSYSTEM
----FLD_CHARACTER (set to char - no nulls)
----FLD_RANK (set to int - no nulls - default data '0')

Add your character to this table manually add set your rank at 0, just to test it.
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
@turboshandy

^^ D0 .. D9 Digit Global
If you use Variables in one function then work with P0..P9 Local Vaiables.
is better :)
 
Upvote 0

Azura

Mir3 Coder & Adviser
Legendary
Mar 12, 2005
3,249
111
300
i always thought %P9 was fame value or can you set it to anything?
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
Ok here is a list :

N0 - N9 Integer Value = -2147483648..2147483647 (Server Global)
S0 - S1 Singel Value = -255..255 (Script Global)
D0 - D9 Digit Value = -2147483648..2147483647 (Script Global)
P0 - P9 Integer Value = -2147483648..2147483647 (Function Local)
A0 - A9 ASCII Value = A..Z (Script Global)
B0 - B9 ASCII Value = A..Z (Server Global)

P9 P0 A0 A9 D0 D9 = Command Use <-->
You can use all !!
The Most Problem I have see with the Scripts N and B Variables Uset for some
thinks in the most used Scripts, Problem : Player_A Use eg. the Integral Sys
and Player_B same to the same Time, both use the same. The Effect is
Player_A overwrite the Value from Player_B, Player_B has the Value from
Player_A ! You understand this ? I belive now some will unite clearly. ^^

Regards Coly
 
Upvote 0