Sammy Dedicated Member Dedicated Member Sep 9, 2007 66 1 54 Feb 8, 2008 #1 how can i say pull numbers from a db in my sql and display it on an npc for instance if i wanted to show users how much Silver they had i made that up btw lol i not gonna use silver on me server :P thanks in advance
how can i say pull numbers from a db in my sql and display it on an npc for instance if i wanted to show users how much Silver they had i made that up btw lol i not gonna use silver on me server :P thanks in advance
chimera LOMCN VIP VIP Jul 30, 2003 1,054 23 235 UK Feb 8, 2008 #2 Here is an example: #IF #ACT mov a8 %USERNAME mov D4 1 formatstr "FLD_CHARACTER='%s' AND FLD_TYPE='%s'" %A8 %D4 ReadValueSql "TBL_ITEM" %A9 "FLD_DESC3" [@luckvalue] #ELSEACT sysmsg "read fail" break [@luckvalue()] #ACT mov D6 %ARG(1) goto @say break [@say] #say luck is <$output(d6)> break Upvote 0
Here is an example: #IF #ACT mov a8 %USERNAME mov D4 1 formatstr "FLD_CHARACTER='%s' AND FLD_TYPE='%s'" %A8 %D4 ReadValueSql "TBL_ITEM" %A9 "FLD_DESC3" [@luckvalue] #ELSEACT sysmsg "read fail" break [@luckvalue()] #ACT mov D6 %ARG(1) goto @say break [@say] #say luck is <$output(d6)> break
Sammy Dedicated Member Dedicated Member Sep 9, 2007 66 1 54 Feb 9, 2008 #3 ok ive used that code but it only ever returns 0 :S only things i have changed are the bits below in the read value line ReadValueSql "TBL_CHARACTER" %A9 "FLD_LEVELBONUS" [@luckvalue] i dont see were i gone wrong :S my code is almost exactly same as yours m8 Upvote 0
ok ive used that code but it only ever returns 0 :S only things i have changed are the bits below in the read value line ReadValueSql "TBL_CHARACTER" %A9 "FLD_LEVELBONUS" [@luckvalue] i dont see were i gone wrong :S my code is almost exactly same as yours m8
Inflikted LOMCN Veteran Veteran Aug 4, 2003 256 7 114 Feb 10, 2008 #4 sammy, if thats what you changed, keep an eye on the arg values you are pulling aswell, i believe you have to use arg(2) Upvote 0
sammy, if thats what you changed, keep an eye on the arg values you are pulling aswell, i believe you have to use arg(2)
Sammy Dedicated Member Dedicated Member Sep 9, 2007 66 1 54 Feb 10, 2008 #5 Erm just outta interest were does it say which DB it is pulling info from :S NVM got my answer from infliks tutorial post Last edited: Feb 10, 2008 Upvote 0
Erm just outta interest were does it say which DB it is pulling info from :S NVM got my answer from infliks tutorial post