Blue Jem Posted November 10, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Share Posted November 10, 2013 (edited) example who have this item 7227 or TCG show the name of player have the tcg item . um using eathena Edited November 10, 2013 by Blue Jem Quote Link to comment Share on other sites More sharing options...
Capuche Posted November 10, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted November 10, 2013 Try prontera,166,185,6 script ghjkl 56,{ if ( getgmlevel() < 99 ) end; mes "Enter an item id or item name. Display a list order by max amount found."; input .@tmp$; set .@item_id, atoi( .@tmp$ ); if ( .@item_id == 0 && getstrlen( .@tmp$ ) > 2 ) {// item name, eventually set .@count, searchitem( .@tmp_array, .@tmp$ ); if ( .@count == 0 ) {// none item found mes "None item found."; close; } mes "I found the following items: "; next; while( .@i < .@count ) { set .@menu$, .@menu$ + getitemname( .@tmp_array[.@i] ) +" (ID "+ .@tmp_array[.@i] +"):"; set .@i, .@i +1; } set .@s, select( .@menu$ ) -1; set .@item_id, .@tmp_array[.@s]; } else if ( .@item_id == 0 || getiteminfo( .@item_id,2 ) == -1 ) { mes "Wrong item id"; close; } set .@search$, "`nameid` = "+ .@item_id +" or `card0` = "+ .@item_id +" or `card1` = "+ .@item_id +" or `card2` = "+ .@item_id +" or `card3` = "+ .@item_id; while(1) { set .@count, query_sql( "SELECT `char`.`name`, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `inventory` WHERE `char`.`char_id` = `inventory`.`char_id` and ( "+ .@search$ +" ) ) AS inv, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `cart_inventory` WHERE `char`.`char_id` = `cart_inventory`.`char_id` and ( "+ .@search$ +" ) ) AS cart, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `storage` WHERE `storage`.`account_id` = `char`.`account_id` and ( "+ .@search$ +" ) ) AS sto, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `guild_storage` WHERE `guild_storage`.`guild_id` = `char`.`guild_id` and ( "+ .@search$ +" ) ) AS gsto "+ "FROM `char` order by ( inv + cart + sto + gsto ) desc limit "+ ( .@page * 100 ) +", 100", .@name$, .@inventory, .@cart, .@storage, .@gstorage ); if ( .@count == 0 ) break; for ( set .@i, 0; .@i < .@count && .@name$[.@i] != ""; set .@i, .@i +20 ) { mes "^ff0000<player>^000000 <inv>,^00ff00<cart>,^0000ff<sto>,^006600<gsto>"; for ( set .@j, 0; .@j < 20 && .@name$[ (.@i+.@j) ] != ""; set .@j, .@j +1 ) { set .@tmp, .@i + .@j; if ( ( .@inventory[.@tmp] + .@cart[.@tmp] + .@storage[.@tmp] + .@gstorage[.@tmp] ) == 0 ) { next; goto L_end;// XP! } set .@num, .@num +1; mes .@num +"/ ^ff0000"+ .@name$[.@tmp] +"^000000 : < "+ .@inventory[.@tmp] +", ^00ff00"+ .@cart[.@tmp] +", ^0000ff"+ .@storage[.@tmp] +", ^006600"+ .@gstorage[.@tmp] +"^000000 >"; } next; } set .@page, .@page +1; } L_end: mes "*end of the list*"; close; } It use data sql, the update is not intantaneous. Quote Link to comment Share on other sites More sharing options...
Blue Jem Posted November 11, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Author Share Posted November 11, 2013 why i got this? Quote Link to comment Share on other sites More sharing options...
Kido Posted November 11, 2013 Group: Members Topic Count: 127 Topics Per Day: 0.03 Content Count: 1445 Reputation: 164 Joined: 08/17/13 Last Seen: July 11, 2019 Share Posted November 11, 2013 why i got this? <player> Nick of the player who has the item <inv> # of the item in invetories <cart> # of the item in carts <sto> # of the item in storages <gsto> # of the item in guild storages @Capuche Does it detects if the item is equiped on a weapon or on a armor, or in the mere player? Quote Link to comment Share on other sites More sharing options...
Capuche Posted November 11, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted November 11, 2013 Does it detects if the item is equiped on a weapon or on a armor, or in the mere player? It checks the specific item id in inventory database, item equipped or not. The script is more accurate if the players are offline. 1 Quote Link to comment Share on other sites More sharing options...
Kido Posted November 19, 2013 Group: Members Topic Count: 127 Topics Per Day: 0.03 Content Count: 1445 Reputation: 164 Joined: 08/17/13 Last Seen: July 11, 2019 Share Posted November 19, 2013 cool o: that should solve the question, thanks ! Quote Link to comment Share on other sites More sharing options...
Question
Blue Jem
example who have this item 7227 or TCG show the name of player have the tcg item .
um using eathena
Edited by Blue JemLink to comment
Share on other sites
5 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.