[CD3.55] help plz something missing :(

smoochy boys on tour

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
am trying to get the keymaker system setup thru sql, but everything i try is in vain.

would someone mind looking see if im missing anything plz?

;;不要删掉此行
[@Main]
{
#IF
#ACT
FormatStr "FLD_nume='%s' " %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume","FLD_NRKM" @LoadKeys
LineMsg [Grobal] "Congratulations <$USERNAME> For Killing NUMARUINS KeyMaker!"
[@LoadKeys()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
#IF
Equal A1 ""
#ACT
MOV A1 %USERNAME
MOV D1 %D1
eventMsg [Grobal] "Congratulations <$USERNAME> For Killing NUMARUINS KeyMaker!"
FormatStr " '%s',%s" %A1 1
Mov A8 %A9
FormatStr "FLD_nume='%s' " %A1
WriteValueSql "TBL_keymaker" %A9 "FLD_nume","FLD_NRKM" %A8
eventMsg [Grobal] "Congratulations <$USERNAME> For Killing NUMARUINS KeyMaker!"
#elseact
INC D1 1
eventMsg "You received 1 NR Key for killing NRKeymaker"
FormatStr "FLD_NRKM='%s'" %D1
Mov A8 %A9
FormatStr "FLD_nume='%s' " %A1
UpdateValueSql "TBL_keymaker" %A9 %A8
break
}
;;不要删掉此行

---------- Post added at 08:31 PM ---------- Previous post was at 08:29 PM ----------

i can get the keymaker to spawn where he should do and after kill him i get the eventmessage on screen but key doesnt go into d-menu where i want it to :(
 

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
I dont know what do you want to do, but try this.

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

[@LoadKeys()]
#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_NRKM" %A8
goto @next

[@next]
#IF
#ACT
     Inc D1 1
     FormatStr "FLD_nume='%s'" %USERNAME
     Mov A8 %A9
     FormatStr "FLD_NRKM='%s'" %D1
     UpdateValueSql "TBL_keymaker" %A8 %A9
goto @next2

[@next2]
#IF
#ACT
eventMsg [Grobal] "Congratulations <$USERNAME> For Killing NUMARUINS KeyMaker!"
sysmsg ""You received 1 NR Key for killing NRKeymaker" 
give NRKey 1
break 
}
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
that would give 1 key in bag..... i dont want it in bag i want it to go onto Dmenu.
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
In any case you can add it to a SQL table
eg: FLD_keys
And put a script in MenuD, you read the number from the table: FLD_Keys


When at home, I do.
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
anyone tell me what data types need to go in TBL_Keymaker for each key plz?

ie fld_nume = data type
fld_key = data type

TIA
 
Upvote 0