ajaytrix Posted September 22, 2013 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 84 Reputation: 0 Joined: 03/29/12 Last Seen: February 15, 2017 Share Posted September 22, 2013 Request for 'Item checker/scanner/trace' Features: NPC, will ask you for an item number. Traces an item for each character. NPC will scan ALL characters that has that item number. Includes ( Inventory, storage, cart ) . Only GMs with this level or more can use the NPC. Example: NPC: "Hello GM __ " NPC: Input item number. -- if no id number, close. [ no # or incorrect ] ..... This is the list of players who has item 607: 1. Player 1 Storage, Cart, Inventory, ( can also read a card inside a weapon/shield/armor/footgear/headgear/acce) 2. Player 2 3, PLayer 3... so on... Thank you. Quote Link to comment Share on other sites More sharing options...
Jelly Posted September 22, 2013 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 186 Reputation: 0 Joined: 01/08/12 Last Seen: November 12, 2014 Share Posted September 22, 2013 Better add this to GM panel on CP Quote Link to comment Share on other sites More sharing options...
karazu Posted September 22, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 374 Reputation: 5 Joined: 03/09/12 Last Seen: June 19, 2018 Share Posted September 22, 2013 up for this. Quote Link to comment Share on other sites More sharing options...
Capuche Posted September 24, 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 September 24, 2013 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$; .@item_id = atoi( .@tmp$ ); if ( .@item_id == 0 && getstrlen( .@tmp$ ) > 2 ) {// item name, eventually .@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 ) { .@menu$ = .@menu$ + getitemname( .@tmp_array[.@i] ) +" (ID "+ .@tmp_array[.@i] +"):"; .@i++; } .@s = select( .@menu$ ) -1; .@item_id = .@tmp_array[.@s]; } else if ( .@item_id == 0 || getiteminfo( .@item_id,2 ) == -1 ) { mes "Wrong item id"; close; } .@search$ = "`nameid` = "+ .@item_id +" or `card0` = "+ .@item_id +" or `card1` = "+ .@item_id +" or `card2` = "+ .@item_id +" or `card3` = "+ .@item_id; while(1) { .@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 ( .@i = 0; .@i < .@count && .@name$[.@i] != ""; .@i += 20 ) { mes "^ff0000<player>^000000 <inv>,^00ff00<cart>,^0000ff<sto>,^006600<gsto>"; for ( .@j = 0; .@j < 20 && .@name$[ (.@i+.@j) ] != ""; .@j++ ) { .@tmp = .@i + .@j; if ( ( .@inventory[.@tmp] + .@cart[.@tmp] + .@storage[.@tmp] + .@gstorage[.@tmp] ) == 0 ) { next; goto L_end;// XP! } .@num++; mes .@num +"/ ^ff0000"+ .@name$[.@tmp] +"^000000 : < "+ .@inventory[.@tmp] +", ^00ff00"+ .@cart[.@tmp] +", ^0000ff"+ .@storage[.@tmp] +", ^006600"+ .@gstorage[.@tmp] +"^000000 >"; } next; } .@page++; } L_end: mes "*end of the list*"; close; } Quote Link to comment Share on other sites More sharing options...
Question
ajaytrix
Request for 'Item checker/scanner/trace'
Features:
Example:
NPC: "Hello GM __ "
NPC: Input item number.
-- if no id number, close. [ no # or incorrect ]
.....
This is the list of players who has item 607:
1. Player 1 Storage, Cart, Inventory, ( can also read a card inside a weapon/shield/armor/footgear/headgear/acce)
2. Player 2
3, PLayer 3... so on...
Thank you.
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.