- Feb 6, 2011
- 282
- 3
- 44
i have Keymaker in game.
mapquest_def=
D20023 [0] 0 [MonDie] Keymaker * [MapQuest_Def\Keymaker] [@DCKM] group ;;;where km is spawned
D2004 [0] 0 [Enter] * [MapQuest_Def\EnterDCKR] [@Main] group ;;;and key needed to get in boss room
In DCKR.txt=
[@Main]
#IF
#ACT
Sysmsg "You received 1 DesertCity Key for killing Keymaker"
goto @GiveDCKMKey
[@GiveDCKMKey]
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_Keymaker" %A9 "FLD_nume,FLD_DCKM" [@LoadDCKMKeys]
[@LoadDCKMKeys()]
#ACT
mov A1 %ARG(1)
mov D1 %ARG(2)
#IF
Equal A1 ""
#ACT
FormatStr "'%s',%s" %USERNAME 0
Mov A8 %A9
FormatStr "FLD_nume='%s'" %USERNAME
Mov A2 %A9
WriteValueSql "TBL_Keymaker" %A2 "FLD_nume,FLD_DCKM" %A8
goto @AddDCKMKey
#ELSEACT
goto @AddDCKMKey
[@AddDCKMKey]
#IF
#ACT
Inc D1 1
FormatStr "FLD_nume='%s'" %USERNAME
Mov A8 %A9
FormatStr "FLD_DCKM='%s'" %D1
UpdateValueSql "TBL_Keymaker" %A8 %A9
And in EnterDCKR.txt =
[@Main]
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_Keymaker" %A9 "FLD_nume,FLD_DCKM" [@ReadDCKRKeys]
[@ReadDCKRKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
goto @CheckDCKRKeys
[@CheckDCKRKeys]
#IF
Elarge D1 1
#ACT
enter_ok
DEC D1 1
FormatStr "FLD_nume='%s'" %USERNAME
Mov A8 %A9
FormatStr "FLD_DCKM='%s'" %D1
UPDATEVALUESQL "TBL_Keymaker" %A8 %A9
#ELSEACT
enter_fail
#ELSESAY
You cannot get in here! Get a Key!\
Now the key is added to sql and on D menu for every player when tested solo and in group.
now the problem lies ion 2 parts.
1, it either deducts the key and wont let players into boss room, or
2, allows players into the bossroom but dont take key.........
In sql TBL_Keymaker=
i have FLD_nume which is set at data type nvarchar and the FLD_DCKM is set at data type tinyint.
could this be the reason why i have problems?
mapquest_def=
D20023 [0] 0 [MonDie] Keymaker * [MapQuest_Def\Keymaker] [@DCKM] group ;;;where km is spawned
D2004 [0] 0 [Enter] * [MapQuest_Def\EnterDCKR] [@Main] group ;;;and key needed to get in boss room
In DCKR.txt=
[@Main]
#IF
#ACT
Sysmsg "You received 1 DesertCity Key for killing Keymaker"
goto @GiveDCKMKey
[@GiveDCKMKey]
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_Keymaker" %A9 "FLD_nume,FLD_DCKM" [@LoadDCKMKeys]
[@LoadDCKMKeys()]
#ACT
mov A1 %ARG(1)
mov D1 %ARG(2)
#IF
Equal A1 ""
#ACT
FormatStr "'%s',%s" %USERNAME 0
Mov A8 %A9
FormatStr "FLD_nume='%s'" %USERNAME
Mov A2 %A9
WriteValueSql "TBL_Keymaker" %A2 "FLD_nume,FLD_DCKM" %A8
goto @AddDCKMKey
#ELSEACT
goto @AddDCKMKey
[@AddDCKMKey]
#IF
#ACT
Inc D1 1
FormatStr "FLD_nume='%s'" %USERNAME
Mov A8 %A9
FormatStr "FLD_DCKM='%s'" %D1
UpdateValueSql "TBL_Keymaker" %A8 %A9
And in EnterDCKR.txt =
[@Main]
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_Keymaker" %A9 "FLD_nume,FLD_DCKM" [@ReadDCKRKeys]
[@ReadDCKRKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
goto @CheckDCKRKeys
[@CheckDCKRKeys]
#IF
Elarge D1 1
#ACT
enter_ok
DEC D1 1
FormatStr "FLD_nume='%s'" %USERNAME
Mov A8 %A9
FormatStr "FLD_DCKM='%s'" %D1
UPDATEVALUESQL "TBL_Keymaker" %A8 %A9
#ELSEACT
enter_fail
#ELSESAY
You cannot get in here! Get a Key!\
Now the key is added to sql and on D menu for every player when tested solo and in group.
now the problem lies ion 2 parts.
1, it either deducts the key and wont let players into boss room, or
2, allows players into the bossroom but dont take key.........
In sql TBL_Keymaker=
i have FLD_nume which is set at data type nvarchar and the FLD_DCKM is set at data type tinyint.
could this be the reason why i have problems?