npc help

xcoolaidx

Dedicated Member
Dedicated Member
Nov 7, 2009
70
3
34
ive goten the npc to show how many keys you have up to redmoonvalley and then after that it displays all to 0,, in SQL i have keys so its not sql problem ive tryed useing P,D,A ect, i need the npc to show all the keys i have any one know how i can get it to work after Mov N4 %ARG(5) -- Thanks in advance


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

[@kms]
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_DVKM,FLD_WTKM,FLD_StoneTemple,FLD_PSCKM,FLD_RMVKM,FLD_ZTKM,FLD_PTKM,FLD_BPKM,FLD_JPKM,FLD_DCKM,FLD_MSKM,FLD_FDKM,FLD_NRKM,FLD_STKM" @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 N10 %ARG(11)
Mov N11 %ARG(12)
Mov N12 %ARG(13)
Mov N13 %ARG(14)
Mov N14 %ARG(15)
Mov N15 %ARG(16)
goto @km12

[@km12]
#SAY
DeathValley keys: <$OUTPUT(N1)>\
WoomaTaurus keys: <$OUTPUT(N2)>\
StoneTemple keys: <$OUTPUT(N3)>\
PrajnaStoneCave keys: <$OUTPUT(N4)>\
RedMoonValley keys: <$OUTPUT(N5)>\
ZumaTaurus keys: <$OUTPUT(N6)>\
Prajna Temple keys: <$OUTPUT(N7)>\
BlackPalace keys: <$OUTPUT(N8)>\
Jinchon Palace keys: <$OUTPUT(N9)>\
Desert City keys: <$OUTPUT(N10)>\
MysterShip keys: <$OUTPUT(N11)>\
FrostPalace keys: <$OUTPUT(N12)>\
NumaRuins keys: <$OUTPUT(N13)>\
SnowTower keys: <$OUTPUT(N14)>\ \ \ \
 

Omikkk

Dedicated Member
Dedicated Member
Jul 20, 2006
232
10
65
Poland
i haven't been doing scripts for some time and i may don't remember things, but i would say that
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_DVKM,FLD_WTKM,FLD_StoneTemple,FLD_PSCKM,FLD_RMVKM,FLD_ZTKM,FLD_PTKM,FLD_BPKM,FLD_JPKM,FLD_DCKM,FLD_MSKM,FLD_FDKM,FLD_NRKM,FLD_STKM" [@LoadKeys] <- here should be []

i'm not sure if you can use so many variables in one function, i would split it into two
 
Upvote 0

xcoolaidx

Dedicated Member
Dedicated Member
Nov 7, 2009
70
3
34
i haven't been doing scripts for some time and i may don't remember things, but i would say that


i'm not sure if you can use so many variables in one function, i would split it into two

added this, doesnt work still stops after redmoonvalley any one else have any ideas?
 
Upvote 0

Omikkk

Dedicated Member
Dedicated Member
Jul 20, 2006
232
10
65
Poland
@test1]
#SAY
<KeyMakers/@kms>\

[@kms]
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_nume,FLD_DVKM,FLD_WTKM,FLD_StoneTemple,FLD_PSCKM,FLD_RMVKM" @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)
goto @kms1

[@kms1]
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_ZTKM,FLD_PTKM,FLD_BPKM,FLD_JPKM,FLD_DCKM,FLD_MSKM" @LoadKeys1

[@LoadKeys1()]
#ACT
Mov N6 %ARG(1)
Mov N7 %ARG(2)
Mov N8 %ARG(3)
Mov N9 %ARG(4)
Mov N10 %ARG(5)
Mov N11 %ARG(6)
Goto @kms2

[@kms2]
#ACT
FormatStr "FLD_nume='%s'" %USERNAME
ReadValueSql "TBL_keymaker" %A9 "FLD_FDKM,FLD_NRKM,FLD_STKM" @LoadKeys2

[@LoadKeys2()]
#ACT
Mov N12 %ARG(1)
Mov N13 %ARG(2)
Mov N14 %ARG(3)
goto @km12

[@km12]
#SAY
DeathValley keys: <$OUTPUT(N1)>\
WoomaTaurus keys: <$OUTPUT(N2)>\
StoneTemple keys: <$OUTPUT(N3)>\
PrajnaStoneCave keys: <$OUTPUT(N4)>\
RedMoonValley keys: <$OUTPUT(N5)>\
ZumaTaurus keys: <$OUTPUT(N6)>\
Prajna Temple keys: <$OUTPUT(N7)>\
BlackPalace keys: <$OUTPUT(N8)>\
Jinchon Palace keys: <$OUTPUT(N9)>\
Desert City keys: <$OUTPUT(N10)>\
MysterShip keys: <$OUTPUT(N11)>\
FrostPalace keys: <$OUTPUT(N12)>\
NumaRuins keys: <$OUTPUT(N13)>\
SnowTower keys: <$OUTPUT(N14)>\ \ \ \
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
try changing the script so it is broken down over several parts. I.E. Have the first part load the first 9 keys (output this on the npc, then have an option to see the next 9), in the next part load the next 9 and so on. If I remember rightly N values can only go from N0-N9. Thats the cause of it not working I'm guessing as your going well over N9. I have a script for this already made, if you want I could send you it and you can adapt it from there to suit your server.
 
Upvote 0

xcoolaidx

Dedicated Member
Dedicated Member
Nov 7, 2009
70
3
34
try changing the script so it is broken down over several parts. I.E. Have the first part load the first 9 keys (output this on the npc, then have an option to see the next 9), in the next part load the next 9 and so on. If I remember rightly N values can only go from N0-N9. Thats the cause of it not working I'm guessing as your going well over N9. I have a script for this already made, if you want I could send you it and you can adapt it from there to suit your server.

if u could pm me the script or post here that would be great :D
 
Upvote 0