Increasing SQL number

Join Discord

MasterQ

LOMCN Veteran
Veteran
Loyal Member
Aug 6, 2006
462
0
62
London
Hi,

Recently tried to make a KR like euro mir3(You need to kill a certain amount of mobs for it to entre).

I had problems and asked idabiga and he came up with this.

[@Main]
#IF
#ACT
FormatStr "FLD_Cave ='AN'"
ReadValueSql "TBL_A" %A9 "FLD_Killed" @GetKilledQty

[@GetKilledQty()]
#ACT
Mov D1 %ARG(1)
#IF
Small D1 100
#ACT
Inc D1 1
FormatStr "FLD_Killed=%s" %D1
Mov A8 %A9
FormatStr "FLD_Cave ='AN'"
UpdateValueSql "TBL_A" "FLD_Cave ='AN'" %A9 %A8
Break
#SAY
Kills so far = <$OUTPUT(D1)>\\

#IF
#SAY
You have now killed 100 Things

This works and increases the amount of mobs killed but what i want done is for everyone to be able to increase it toghether. The problem atm is if its set to 100 and a new person kills a mob it resets backdown to 1.

Ive tried the INCVALUESQL command and it doesnt work :(

Think some other people will be intrested in this also, anyone got idears?
 

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
114
dont no if i exactly understand you. but.
you have a field it seems for the amount killed, and the cave, i think you need a field for the user who killed it. to seperate the killstats for each person, rather than just updating the 'total' killstats for everyone.

also the script is a bit faulty..
FormatStr "FLD_Cave ='AN'"
UpdateValueSql "TBL_A" "FLD_Cave ='AN'" %A9 %A8

should be..

FormatStr "FLD_Cave ='AN'"
UpdateValueSql "TBL_A" %A9 %A8
 
Upvote 0

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
You've also got the #act for if the number is less than 100 but where is the #elseact if you've killed 100?

I would use
#IF
Small D1 100
#ACT
goto @increasekills
#ELSEACT
goto @reachedkillrequirement

I would also use a mondie to add to the kill requirement....that way it will increase regardless of who does the kills......you will have to reset it however once it reaches 100.
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
mhh yeah but u can reset it also in sql

if he reached 100 mobs as next

updatevalue (set 0) for the field that it count again with start 0

u often have it with quest if set [208] 1 after u have made 10 quest he make set [208] 0 again

(only example i hope it was understandable what i meaned)
 
Upvote 0

MasterQ

LOMCN Veteran
Veteran
Loyal Member
Aug 6, 2006
462
0
62
London
Ill try what you added but what i want is it for go upto 10,000. I can do that easy with just one person but i want everyone to increase that number. With the script i was using this what the problem(If i got to 3 kills and then someone else got 1 kill it would reset to 1)

Ill try what you lot said and get back to you.
 
Upvote 0