Jesky Posted December 16, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 55 Reputation: 3 Joined: 11/29/13 Last Seen: March 4 Share Posted December 16, 2013 (edited) Hi guys, i'm a silent reader in rathena, this is my first post at all. I'm sorry for my bad english grammar. I want to know if in my server there's already player who have a MVP Card or not. I can know it from NPC who have a GM Panel. Option for GM Panel can be like "delete that item from that player", "announce there's a player who have already that item", and many utility function. It's no matter if the MVP Card is already inserted on an equip, on storage, on cart, or if the character is offline, the script still can detect it. The NPC will list all of player who have the MVP card also the list of what card he has, When he get that (in date/month/year clock), how much that card he has. Is there anyone already has a similiar script like my request? or can someone help making this for me? I'll really appreciate it. Thank you Edited December 16, 2013 by Jesky Quote Link to comment Share on other sites More sharing options...
Jesky Posted December 18, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 55 Reputation: 3 Joined: 11/29/13 Last Seen: March 4 Author Share Posted December 18, 2013 anyone? Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 18, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 18, 2013 (edited) this script is possible, but too complex I just did only a very small part of it - check the input player in inventory has mvp card or not and the script already went like this prontera,155,187,5 script kjhdfsdksfjh 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; }so good luck finding someone who has the patience to make for ya ...me get out of here me prefer write event script, not utility script edit ... fixed some typo Edited December 18, 2013 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Jesky Posted December 18, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 55 Reputation: 3 Joined: 11/29/13 Last Seen: March 4 Author Share Posted December 18, 2013 this script is possible, but too complex I just did only a very small part of it - check the input player in inventory has mvp card or not and the script already went like this prontera,155,187,5 script kjhdfsdksfjh 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; }so good luck finding someone who has the patience to make for ya ...me get out of here me prefer write event script, not utility script edit ... fixed some typo Wow, thank you so much for the script Annie. I had try it and it's not work like what i want, but i really appreciate what you did, thank you so much Annie. Can i get permission to modify your script? i hope from your script i can get the script i want Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 18, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 18, 2013 (edited) of course, that's the purpose of script request section, anyone can contribute and share ... the actual reason I'm doing 1/2 ass script like this is because I wanna tell you how time-consuming the script going to be =/ EDIT: actually if you can request to do only parts of it, I might consider do little by little since everything there is possible to do ... I just not in the mood to write this kind of long long script atm Edited December 18, 2013 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Question
Jesky
Hi guys, i'm a silent reader in rathena, this is my first post at all.
I'm sorry for my bad english grammar.
I want to know if in my server there's already player who have a MVP Card or not.
I can know it from NPC who have a GM Panel.
Option for GM Panel can be like
"delete that item from that player", "announce there's a player who have already that item", and many utility function.
It's no matter if the MVP Card is already inserted on an equip, on storage, on cart, or if the character is offline,
the script still can detect it.
The NPC will list all of player who have the MVP card also the list of what card he has,
When he get that (in date/month/year clock), how much that card he has.
Is there anyone already has a similiar script like my request? or can someone help making this for me?
I'll really appreciate it. Thank you
Edited by JeskyLink to comment
Share on other sites
4 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.