Jump to content
  • 0

R> MVP CARD MONITORING


koloridjo

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  01/07/12
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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;
}

 

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  01/07/12
  • Last Seen:  

thank you cyro i will check it letter :) 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  01/07/12
  • Last Seen:  

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

 

 

rathena.jpg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  01/07/12
  • Last Seen:  

Work Perfectly Thank you Cyro

screenrAthena001.jpg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  01/07/12
  • Last Seen:  

i am sorry cyro, this script can't search mvp card on storage and cart ? and i can't use search via Card ID

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  01/07/12
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...