koloridjo Posted April 23, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 01/07/12 Last Seen: October 15, 2024 Share Posted April 23, 2017 Excuse me, can i request a npc that can see and monitor all the players that get mvp card, both in storage, inventory and in equip? With sql ?? thank you Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted April 23, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted April 23, 2017 prontera,155,187,5 script cardcheck 100,{ mes "blah"; next; select "search by input player name/ID", "search by card ID"; if ( @menu == 1 ) { switch ( select ( "Char Name", "Account ID", "Char ID" ) ) { case 1: input .@id$; if ( isloggedin( getcharid( 3, .@id$ ) ) ) { .@cid = getcharid( 0, .@id$ ); .@aid = getcharid( 3, .@id$ ); .@name$ = rid2name( getcharid( 3, .@id$ ) ); } else { if ( !query_sql( "select char_id, account_id, name from `char` where name = '"+ escape_sql( .@id$ ) +"'", .@cid, .@aid, .@name$ ) ) { mes "There is no such Character Name exist"; close; } } break; case 2: input .@id; if ( !( .@nb = query_sql( "select char_id, name, char_num, account_id from `char` where account_id = "+ .@id +" order by char_num asc", .@cid, .@name$, .@gid, .@aid ) ) ) { mes "There is no such Account ID"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) { mes ( .@gid[.@i] +1 )+". "+ .@cid[.@i] +" "+ .@name$[.@i]; .@menu$ = .@menu$ +( .@gid[.@i] +1 )+". "+ .@cid[.@i]; } next; .@s = select( .@menu$ ) -1; .@cid = .@cid[.@s]; .@aid = .@aid[.@s]; .@name$ = .@name$[.@s]; break; case 3: input .@id; if ( !query_sql( "select char_id, account_id, name from `char` where char_id = "+ .@id, .@cid, .@aid, .@name$ ) ) { mes "There is no such Character ID exist"; close; } } mes "The player ^0000FF"+ .@name$ +"^000000 is "+( ( isloggedin(.@aid) )?"^00FF00Online":"^FF0000Offline" )+"^000000"; if ( isloggedin( .@aid, .@cid ) ) { .@origin = getcharid(3); attachrid .@aid; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( compare( .mvpcard_compare$, "#"+ @inventorylist_id[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card1[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card2[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card3[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card4[.@i] +"#" ) ) { .@itemid[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@identify[.@c] = @inventorylist_identify[.@i]; .@refine[.@c] = @inventorylist_refine[.@i]; .@broken[.@c] = @inventorylist_attribute[.@i]; .@card1[.@c] = @inventorylist_card1[.@i]; .@card2[.@c] = @inventorylist_card2[.@i]; .@card3[.@c] = @inventorylist_card3[.@i]; .@card4[.@c] = @inventorylist_card4[.@i]; attachrid .@origin; mes @itemname2_info$[0] + callfunc( "getitemname2", .@itemid[.@c], .@identify[.@c], .@refine[.@c], .@broken[.@c], .@card1[.@c], .@card2[.@c], .@card3[.@c], .@card4[.@c] ) +":^000000 "+ .@amount[.@c] +" ea."; attachrid .@aid; .@c++; } } attachrid .@origin; } else { .@nb = query_sql( "select nameid, amount, identify, refine, attribute, card0, card1, card2, card3 from inventory where "+ .query_sql$ +" and char_id = "+ .@cid, .@itemid, .@amount, .@identify, .@refine, .@broken, .@card0, .@card1, .@card2, .@card3 ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes @itemname2_info$[0] + callfunc( "getitemname2", .@itemid[.@i], .@identify[.@i], .@refine[.@i], .@broken[.@i], .@card0[.@i], .@card1[.@i], .@card2[.@i], .@card3[.@i] )+":^000000 "+ .@amount[.@i] +" ea."; } } close; OnInit: query_sql "select dropcardid from mob_db where mexp != 0 and dropcardper = 1", .mvpcard; .mvpcard_size = getarraysize( .mvpcard ); .mvpcard_compare$ = "#"; for ( .@i = 1; .@i < .mvpcard_size; .@i++ ) { .@nameid$ = .@nameid$ +","+ .mvpcard[.@i]; .@card0$ = .@card0$ +","+ .mvpcard[.@i]; .@card1$ = .@card1$ +","+ .mvpcard[.@i]; .@card2$ = .@card2$ +","+ .mvpcard[.@i]; .@card3$ = .@card3$ +","+ .mvpcard[.@i]; .mvpcard_compare$ = .mvpcard_compare$ + .mvpcard[.@i] +"#"; } for ( .@i = 0; .@i < .mvpcard_size; .@i++ ) { } .query_sql$ = "( nameid in ("+ .mvpcard + .@nameid$ +") or card0 in ("+ .mvpcard + .@card0$ +") or card1 in ("+ .mvpcard + .@card1$ +") or card2 in ("+ .mvpcard + .@card2$ +") or card3 in ("+ .mvpcard + .@card3$ +") )"; end; } 2 Quote Link to comment Share on other sites More sharing options...
0 koloridjo Posted April 23, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 01/07/12 Last Seen: October 15, 2024 Author Share Posted April 23, 2017 thank you cyro i will check it letter Quote Link to comment Share on other sites More sharing options...
0 koloridjo Posted June 21, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 01/07/12 Last Seen: October 15, 2024 Author Share Posted June 21, 2017 excuse me cyro, sorry took so long for test this script, i got problem here, when iam search player id i got this error on my console, and if i try search card id always close dialog Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted June 21, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted June 21, 2017 Try adding this function https://rathena.org/board/topic/78269-annieruru-lame-script-collection/#entry177128 Quote Link to comment Share on other sites More sharing options...
0 koloridjo Posted June 22, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 01/07/12 Last Seen: October 15, 2024 Author Share Posted June 22, 2017 Work Perfectly Thank you Cyro Quote Link to comment Share on other sites More sharing options...
0 koloridjo Posted June 22, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 01/07/12 Last Seen: October 15, 2024 Author Share Posted June 22, 2017 i am sorry cyro, this script can't search mvp card on storage and cart ? and i can't use search via Card ID Quote Link to comment Share on other sites More sharing options...
0 koloridjo Posted July 1, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 01/07/12 Last Seen: October 15, 2024 Author Share Posted July 1, 2017 Yesterday I asked for a script to monitor mvp card, and cyro made one for me. Script can work, but this script can not display player which have mvp card in storage, cart, and can not search player through search card id, can i help me to show player that have mvp card through search card id.? thank you aldebaran,128,123,5 script cardcheck 637,{ mes "[MVP Card Monitoring]"; mes "Masukan Nickname Character yang ingin kalian cek"; next; select "search by input player name/ID", "search by card ID"; if ( @menu == 1 ) { switch ( select ( "Char Name", "Account ID", "Char ID" ) ) { case 1: input .@id$; if ( isloggedin( getcharid( 3, .@id$ ) ) ) { .@cid = getcharid( 0, .@id$ ); .@aid = getcharid( 3, .@id$ ); .@name$ = rid2name( getcharid( 3, .@id$ ) ); } else { if ( !query_sql( "select char_id, account_id, name from `char` where name = '"+ escape_sql( .@id$ ) +"'", .@cid, .@aid, .@name$ ) ) { mes "There is no such Character Name exist"; close; } } break; case 2: input .@id; if ( !( .@nb = query_sql( "select char_id, name, char_num, account_id from `char` where account_id = "+ .@id +" order by char_num asc", .@cid, .@name$, .@gid, .@aid ) ) ) { mes "There is no such Account ID"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) { mes ( .@gid[.@i] +1 )+". "+ .@cid[.@i] +" "+ .@name$[.@i]; .@menu$ = .@menu$ +( .@gid[.@i] +1 )+". "+ .@cid[.@i]; } next; .@s = select( .@menu$ ) -1; .@cid = .@cid[.@s]; .@aid = .@aid[.@s]; .@name$ = .@name$[.@s]; break; case 3: input .@id; if ( !query_sql( "select char_id, account_id, name from `char` where char_id = "+ .@id, .@cid, .@aid, .@name$ ) ) { mes "There is no such Character ID exist"; close; } } mes "The player ^0000FF"+ .@name$ +"^000000 is "+( ( isloggedin(.@aid) )?"^00FF00Online":"^FF0000Offline" )+"^000000"; if ( isloggedin( .@aid, .@cid ) ) { .@origin = getcharid(3); attachrid .@aid; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( compare( .mvpcard_compare$, "#"+ @inventorylist_id[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card1[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card2[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card3[.@i] +"#" ) || compare( .mvpcard_compare$, "#"+ @inventorylist_card4[.@i] +"#" ) ) { .@itemid[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@identify[.@c] = @inventorylist_identify[.@i]; .@refine[.@c] = @inventorylist_refine[.@i]; .@broken[.@c] = @inventorylist_attribute[.@i]; .@card1[.@c] = @inventorylist_card1[.@i]; .@card2[.@c] = @inventorylist_card2[.@i]; .@card3[.@c] = @inventorylist_card3[.@i]; .@card4[.@c] = @inventorylist_card4[.@i]; attachrid .@origin; mes @itemname2_info$[0] + callfunc( "getitemname2", .@itemid[.@c], .@identify[.@c], .@refine[.@c], .@broken[.@c], .@card1[.@c], .@card2[.@c], .@card3[.@c], .@card4[.@c] ) +":^000000 "+ .@amount[.@c] +" ea."; attachrid .@aid; .@c++; } } attachrid .@origin; } else { .@nb = query_sql( "select nameid, amount, identify, refine, attribute, card0, card1, card2, card3 from inventory where "+ .query_sql$ +" and char_id = "+ .@cid, .@itemid, .@amount, .@identify, .@refine, .@broken, .@card0, .@card1, .@card2, .@card3 ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes @itemname2_info$[0] + callfunc( "getitemname2", .@itemid[.@i], .@identify[.@i], .@refine[.@i], .@broken[.@i], .@card0[.@i], .@card1[.@i], .@card2[.@i], .@card3[.@i] )+":^000000 "+ .@amount[.@i] +" ea."; } } close; OnInit: query_sql "select dropcardid from mob_db where mexp != 0 and dropcardper = 1", .mvpcard; .mvpcard_size = getarraysize( .mvpcard ); .mvpcard_compare$ = "#"; for ( .@i = 1; .@i < .mvpcard_size; .@i++ ) { .@nameid$ = .@nameid$ +","+ .mvpcard[.@i]; .@card0$ = .@card0$ +","+ .mvpcard[.@i]; .@card1$ = .@card1$ +","+ .mvpcard[.@i]; .@card2$ = .@card2$ +","+ .mvpcard[.@i]; .@card3$ = .@card3$ +","+ .mvpcard[.@i]; .mvpcard_compare$ = .mvpcard_compare$ + .mvpcard[.@i] +"#"; } for ( .@i = 0; .@i < .mvpcard_size; .@i++ ) { } .query_sql$ = "( nameid in ("+ .mvpcard + .@nameid$ +") or card0 in ("+ .mvpcard + .@card0$ +") or card1 in ("+ .mvpcard + .@card1$ +") or card2 in ("+ .mvpcard + .@card2$ +") or card3 in ("+ .mvpcard + .@card3$ +") )"; end; } Quote Link to comment Share on other sites More sharing options...
Question
koloridjo
Excuse me, can i request a npc that can see and monitor all the players that get mvp card, both in storage, inventory and in equip? With sql ?? thank you
Link to comment
Share on other sites
7 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.