[CD3.55] Keymaker problem

dagras

LOMCN Veteran
Veteran
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?
 

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
got keys being added to sql and in game , same as for removing key when go to enter kr. however i cant get into kr

key goes on character from keymaker. key comes off character when go to enter keyroom, yet can not enter keyroom even tho mapquest is setup for enter.

D20023 [0] 0 [MonDie] Keymaker * [MapQuest_Def\Keymaker] [@DCKM] GROUP ; map where keymaker is spawned
D2004 [0] 0 [Enter] * * [MapQuest_Def\EnterDCKM] [@Main] ; map to enter keyroom


and in EnterDCKM.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
DEC D1 1
FormatStr "FLD_nume='%s'" %USERNAME
Mov A8 %A9
FormatStr "FLD_DCKM='%s'" %D1
UPDATEVALUESQL "TBL_Keymaker" %A8 %A9
goto @enter
#ELSEACT
enter_fail
#ELSESAY
You cannot get in here! Get a Key!\
[@enter]
#IF
#ACT
ENTER_OK


starting to get frustrated, looking at this it shud work. any help please?
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
everything works great until get to this point in script.

goto @enter
#ELSEACT
enter_fail
#ELSESAY
You cannot get in here! Get a Key!\
[@enter]
#IF
#ACT
ENTER_OK
 
Upvote 0

TheDayIDie

Banned
Banned
Dedicated Member
Jul 29, 2011
4,071
97
135
UK
everything works great until get to this point in script.

goto @enter
#ELSEACT
enter_fail
#ELSESAY
You cannot get in here! Get a Key!\
[@enter]
#IF
#ACT
ENTER_OK
yeah same happened to me, everything works but the command "ENTER_OK"
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Can't understand why, is there more than 1 MapQuest for this cave?

Have you tried removing the key part of it and just Enter_Ok?

If that works try..

Code:
[@CheckDCKRKeys]
#IF
   Elarge D1 1
#ACT
   Delaygoto [Grobal] 1 @TakeKey
   Enter_Ok
#ELSEACT
   enter_fail
#ELSESAY
   You cannot get in here! Get a Key!\


[@TakeKey]
#ACT
   DEC D1 1
   FormatStr "FLD_nume='%s'" %USERNAME
   Mov A8 %A9
   FormatStr "FLD_DCKM='%s'" %D1
   UPDATEVALUESQL "TBL_Keymaker" %A8 %A9
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
i dont want this system on an npc. besides i have on an npc that checks how many keys a character has. and the keys are deducted when character goes to the correct kr.

the problem being that no one can get into the kr's due to fault someplace where command in script is enter_ok

goto @enter
#ELSEACT
enter_fail
#ELSESAY
You cannot get in here! Get a Key!\
[@enter]
#IF
#ACT
ENTER_OK

everything in script works fine before this.
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
I think your MapQuest may be wrong, I think it might be looking for an item that you don't have.

D2004 [0] 0 [Enter] * [MapQuest_Def\EnterDCKR] [@Main] group ;;;and key needed to get in boss room

try this

D2004 [0] 0 [Enter] * * [MapQuest_Def\EnterDCKR] [@Main] group ;;;and key needed to get in boss room
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
its same lol

this is where km spawns:
D20023 [0] 0 [MonDie] Keymaker * [MapQuest_Def\Keymaker] [@DCKM]

and this is mapquest for door to kr:
D2004 [0] 0 [Enter] * * [MapQuest_Def\EnterDCKM] [@Main]
 
Upvote 0

TheDayIDie

Banned
Banned
Dedicated Member
Jul 29, 2011
4,071
97
135
UK
its same lol

this is where km spawns:
D20023 [0] 0 [MonDie] Keymaker * [MapQuest_Def\Keymaker] [@DCKM]

and this is mapquest for door to kr:
D2004 [0] 0 [Enter] * * [MapQuest_Def\EnterDCKM] [@Main] Group
that was his edition
 
Upvote 0

TheDayIDie

Banned
Banned
Dedicated Member
Jul 29, 2011
4,071
97
135
UK
There is no errors, the ENTER_OK command just doesn't work.
Unless it's different for you dagras bud
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
no m8 is exactly the same.

---------- Post Merged at 03:51 PM ---------- Previous Post was at 03:50 PM ----------

and the scripts i am using have been suggested on lomcn as working lol. guess what none work...always same error at exactly same place.
 
Upvote 0