KeyMaker System?

Join Discord

GmKinG

Dedicated Member
Dedicated Member
Feb 16, 2010
42
0
32
How can i put a keymaker system on holley server using sql?

i make tbl_keymaker with FLD_zumataurus, FLD_minotaurking, FLD_Boarking, and more FLD

in mapquest i write:

Code:
D503 [0] 0 [MonDie] WTKeyMaker * [MapQuest_Def\wtkm] [@Main]

in MapQuest_Def\wtkm.txt i write:

Code:
[@Main]
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" @LoadKeys

[@LoadKeys()]
#ACT
Mov   A1   %ARG(1)
Mov   D1   %ARG(2)

#IF
Equal  A1  ""
#ACT
Mov  A1  %USERNAME
Mov  D1  1
FormatStr "'%s',%s" %A1 %D1
Mov A8 %A9
FormatStr "FLD_nume='%s'" %A1
WriteValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" %A8

#elseact
Mov  A1  %USERNAME
Inc  D1  1
FormatStr "FLD_WoomaTaurusKeyMaker=%s" %D1
Mov A8 %A9
FormatStr "FLD_nume='%s'" %A1
UpdateValueSql "TBL_keymaker" %A9 %A8

[COLOR=red];;;;;;;I want here add +1 to my FLD_WoomaTaurus;;;;;;;;;;;[/COLOR]

But dont write +1 in FLD_WoomaTaurusKeyMaker.
How can i fix it?
how can i do the script take km to enter in kr?
how can i do list of Keymakers you have in Dmenu?
 

mapadale

Guest
I would suggest that you have a look at Mapquest and figure out why, as I can see the issue straight away from the first part.

Also you need to look at the second part of the quest as you are missing vital hooks from it.
 
Last edited:
Upvote 0

Omega

Dedicated Member
Dedicated Member
Sep 28, 2010
89
2
34
The .txt extention, you could have just posted it. Poor guy. Might have been a typo tho.
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
D503 [0] 0 [MonDie] WTKeyMaker * [MapQuest_Def\wtkm] [@Main] Group ;;;; If you want this to work in groups, you NEED group at the end as so.

Next:

[@Main]
{
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" [@LoadKeys]

[@LoadKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)

#IF
Equal A1 ""
#ACT
FormatStr "'%s',%s" %USERNAME 1 ;;; This is a properly constructed string to enter into SQL.
Mov A8 %A9
FormatStr "FLD_nume='%s'" %USERNAME
Mov A2 %A9
WriteValueSql "TBL_keymaker" %A2 "FLD_nume,FLD_WoomaTaurusKeyMaker" %A8 ;;; When creating a NEW entry into SQL, it should always look like this.
#elseact
INC D1 1
FormatStr "FLD_nume=%s" %USERNAME ;;;NOTE Better to use the %USERNAME for this rather than something like %A1 as it works better.
Mov A8 %A9
FormatStr "FLD_WoomaTaurusKeyMaker='%s'" %D1 ;;;NOTE. You were trying to write to FLD_nume twice.
UpdateValueSql "TBL_keymaker" %A8 %A9 ;;; NOTE: Always need lower value i.e A8 first!
}

thats the script you posted re-written in a format that both CD and SQL will recognise now lol.
 
Last edited:
Upvote 0

mapadale

Guest
The .txt extention, you could have just posted it. Poor guy. Might have been a typo tho.

The whole script is wrong from start to finish, people need to learn these things by looking at them carefully and not just coming on here and asking at the first sign of trouble.

It's a call script so it's missing {} for starters, also the call command for the mon die won't work from MapQuest_Def unless he has this in the Quest folder. Also there is things missing in the script that are not their, so yes I'm correct in telling him to look at how the MONDIE works first.
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
yeah there were a LOT of errors in the script and quite right it won't work unless the file is in MapQuest_Def folder for a start lol.
 
Upvote 0

GmKinG

Dedicated Member
Dedicated Member
Feb 16, 2010
42
0
32
@mapadale

the mondie works but the script dont give me the keymaker

@Zordon

the script don't work :/
 
Upvote 0

mapadale

Guest
The script is missing the following as I pointed out {} which Zordon has added to show you, as you are calling the script from outside of the Market_Def it has to have these in or won't work at all. You might also need to change the folder name within Quest from MapQuest_Def to just MapQuest.
 
Upvote 0

GmKinG

Dedicated Member
Dedicated Member
Feb 16, 2010
42
0
32
@Zordon

your script dont work

@mapadale

I try with

Code:
D503 [0] 0 [MonDie] WTKeyMaker * [MapQuest\wtkm] [@Main]

and in mapquest folder write

[@Main]
{
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" @LoadKeys

[@LoadKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)

#IF
Equal A1 ""
#ACT
FormatStr "'%s',%s" %USERNAME 1
Mov A8 %A9
FormatStr "FLD_nume='%s'" %USERNAME
Mov A2 %A9
WriteValueSql "TBL_keymaker" %A2 "FLD_nume,FLD_WoomaTaurusKeyMaker" %A8

#elseact
INC D1 1
Eventmsg "You get WoomataurusKeyMaker!"
FormatStr "FLD_nume=%s" %USERNAME
Mov A8 %A9
FormatStr "FLD_WoomaTaurusKeyMaker='%s'" %D1
UpdateValueSql "TBL_keymaker" %A8 %A9
}

but if i write { at start and } at finish, when I kill the mob give me mir3 error and client closed
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
[@Main]
{
#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" [@LoadKeys]

[@LoadKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)

#IF
Equal A1 ""
#ACT
FormatStr "'%s',%s" %USERNAME 1
Mov A8 %A9
FormatStr "FLD_nume='%s'" %USERNAME
Mov A2 %A9
WriteValueSql "TBL_keymaker" %A2 "FLD_nume,FLD_WoomaTaurusKeyMaker" %A8
#elseact
INC D1 1
Eventmsg "You get WoomataurusKeyMaker!"
FormatStr "FLD_nume=%s" %USERNAME
Mov A8 %A9
FormatStr "FLD_WoomaTaurusKeyMaker='%s'" %D1
UpdateValueSql "TBL_keymaker" %A8 %A9
}

Look at the text in red. you need that in the script or it won't progress to the next part lol.
 
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
@mapa & zordon when u tell some1 to do something at least check to see if u give some good advise or u just tell them nonsence

in mapquest_def u dont have to use the {} (not sure if it doesnt work with them , but im 100% sure it works without them as thats how my files are , and thats how are all the files ive downloaded from lomcn) , make sure u have the exact FLD names in ur sql (with CAPS and all , it wont work if they are not the same)

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@Main]

#IF
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" @LoadKeys

[@LoadKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)

#IF
Equal A1 ""
#ACT
MOV A1 %USERNAME

FormatStr "'%s',%s" %A1 1
Mov A8 %A9
FormatStr "FLD_nume='%s'" %A1
WriteValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_WoomaTaurusKeyMaker" %A8

#elseact
INC D1 1
Eventmsg "You get WoomataurusKeyMaker!"
FormatStr "FLD_WoomaTaurusKeyMaker=%s" %D1
Mov A8 %A9
FormatStr "FLD_nume=%s" %A1
UpdateValueSql "TBL_keymaker" %A9 %A8

;;;;;;;;;;;;;;;;;;;;;;;;

not 100% sure it will work , but this is how my script (i have it on 2 parts but it should work like this aswell)
 
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
Look at the text in red. you need that in the script or it won't progress to the next part lol.

from were do u keep comeing with this ideeas ?!?!?! did u at least look on ur own scripts to see if u rem right what u say there ?????
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
lol yeah that was my mistake, forgot u don't need that in mapquests although u do for sql scripting for npcs etc. think he's got it sorted anyway. was the FLD_WoomaTaurus on db named diff to what he had in script lol
 
Upvote 0

GmKinG

Dedicated Member
Dedicated Member
Feb 16, 2010
42
0
32
how can i check in Dmenu how many keymakers i have?

i write in a npc

Code:
[@Main]
#SAY
<KeyMakers/@kms>\

[@kms]
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_MinotaurKing,FLD_ZumaTaurus,FLD_JinchonCaptain,FLD_JinchonDevil,FLD_EvilEmperor,FLD_DesertKing,FLD_Tadanga,FLD_EvilDragon,FLD_WoomaTaurus,FLD_BoneLord,FLD_BoarKing,FLD_EvilCentipede,FLD_RedMoonEvil,FLD_IceKing,FLD_EvilFrostQueen" @LoadKeys

[@LoadKeys()]
#ACT
Mov A1 %ARG(1)
Mov N1 %ARG(2)
Mov N2 %ARG(3)
Mov N3 %ARG(4)
Mov N4 %ARG(5)
Mov N5 %ARG(6)
Mov N6 %ARG(7)
Mov N7 %ARG(8)
Mov N8 %ARG(9)
Mov N9 %ARG(10)
Mov D1 %ARG(11)
Mov D2 %ARG(12)
Mov D3 %ARG(13)
Mov D4 %ARG(14)
Mov D5 %ARG(15)
Mov D6 %ARG(16)
goto @decir

[@decir]
#SAY
MinotaurKing keys: <$OUTPUT(N1)>\
ZumaTaurus keys: <$OUTPUT(N2)>\
JinchonCaptain keys: <$OUTPUT(N3)>\
JinchonDevil keys: <$OUTPUT(N4)>\
EvilEmperor keys: <$OUTPUT(N5)>\
DesertKing keys: <$OUTPUT(N6)>\
Tadanga keys: <$OUTPUT(N7)>\
EvilDragon keys: <$OUTPUT(N8)>\
WoomaTaurus keys: <$OUTPUT(N9)>\
BoneLord keys: <$OUTPUT(D1)>\
BoarKing keys: <$OUTPUT(D2)>\
EvilCentipede keys: <$OUTPUT(D3)>\
RedMoonEvil keys: <$OUTPUT(D4)>\
IceKing keys: <$OUTPUT(D5)>\
EvilFrostQueen keys: <$OUTPUT(D6)>\

when i kill one WTKeyMaker mob add me +1 in FLD_WoomaTaurus but in npc say me I have 1 MinotaurKing key and 0 WoomaTaurus key :/
 
Upvote 0

Josiko

LOMCN Veteran
Veteran
Loyal Member
Apr 4, 2010
428
8
44
Spain
gmking :

Try it from 1 to 6 and do it only with several boses as it works .. you getting more monsters and possibly by the variables you've got n1, d1, n9 .. Note that the woomataurus is n9 n1 and is Minotaurus
esque alomejor not accept that n9 and adds it to the first


sorry , is traductor google, if u speak spanish , send private msg
 
Upvote 0