Valor Posted April 14, 2017 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 72 Reputation: 29 Joined: 12/21/16 Last Seen: January 5, 2024 Share Posted April 14, 2017 hi, im testing this to check mvp card existence query_sql "SELECT `DropCardid` FROM `mob_db_re` WHERE `MEXP` != 0 ",.@mvpcard$; query_sql "SELECT `char_id` FROM `inventory` WHERE `nameid` = '"+.@mvpcard$+"' OR `card0` = '"+.@mvpcard$+"' OR `card1` = '"+.@mvpcard$+"' OR `card2` = '"+.@mvpcard$+"' OR `card3` = '"+.@mvpcard$+"'",.@mcid$; .@totalmvp = getarraysize(.@mcid$); mes "Total MvP Cards: ^990000" + .@totalmvp +"^000000"; but the result always 0 what did i miss or wrong? thx Quote Link to comment Share on other sites More sharing options...
0 Secrets Posted April 14, 2017 Group: Developer Topic Count: 36 Topics Per Day: 0.01 Content Count: 588 Reputation: 438 Joined: 01/26/16 Last Seen: April 16 Share Posted April 14, 2017 .@rst = query_sql("SELECT inventory.card0, inventory.card1, inventory.card2, inventory.card3 FROM inventory INNER JOIN mob_db_re ON inventory.card0 = mob_db_re.dropcardid OR inventory.card1 = mob_db_re.dropcardid OR inventory.card2 = mob_db_re.dropcardid OR inventory.card3 = mob_db_re.dropcardid WHERE mob_db_re.mexp != 0 AND mob_db_re.dropcardid != 0", .@card0, .@card1, .@card2, .@card3); if(.@rst == -1) { //query error end; } mes "Total items with MVP cards :" + .@rst; // Use .@card0 - .@card4 to do whatever you want 1 Quote Link to comment Share on other sites More sharing options...
0 wonderman Posted April 14, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 21 Reputation: 4 Joined: 10/11/13 Last Seen: March 21, 2019 Share Posted April 14, 2017 (edited) try to join 2 table sir Edited April 14, 2017 by wonderman nvm Quote Link to comment Share on other sites More sharing options...
0 Valor Posted April 14, 2017 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 72 Reputation: 29 Joined: 12/21/16 Last Seen: January 5, 2024 Author Share Posted April 14, 2017 Thanks @Secrets // valor trial: simple query mvp card on gears // thanks to Secrets // command: @mvp - script mvpcardcheck -1,{ OnInIt: bindatcmd "mvp",strnpcinfo(0)+"::OnCommand",99; end; OnCommand: .@rst = query_sql("SELECT inventory.char_id, inventory.nameid, inventory.refine, inventory.card0 FROM inventory INNER JOIN mob_db_re ON inventory.card0 = mob_db_re.dropcardid WHERE mob_db_re.mexp != 0 AND mob_db_re.dropcardid != 0", .@cid, .@itemid, .@refine, .@card0); for ( .@i = 0; .@i < .@rst; .@i++ ){ dispbottom .@i+1+"."+strcharinfo(0,.@cid[.@i])+" has +"+.@refine[.@i]+" "+getitemname(.@itemid[.@i])+" ["+getitemname(.@card0[.@i])+"] "; } end; } maybe someone need 1 Quote Link to comment Share on other sites More sharing options...
Question
Valor
hi, im testing this to check mvp card existence
but the result always 0
what did i miss or wrong? thx
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.