Jump to content
  • 0

Problem with this NPC just works with some players


Question

Posted

Hi.... i've this script

prontera,139,180,5	script	Skull Points	63,{
	.@char_id = getcharid(0);
	.@count = countitem( 7420 ) - countitem2( 7420, 1,0,0, 254, 0, .@char_id, 0 );	// can't exchange his own skull

	mes "Puntos Totales: "+ #skull_points +" Skull points.";
	if ( .@count == 0 ) close;
	mes "¿Deseas intercambiar tus Skulls por Skulls Points?";
	next;
	if ( select( "~ Yes", "~ No" ) -1 ) end;
	.@count = countitem( 7420 ) - countitem2( 7420, 1,0,0, 254, 0, .@char_id, 0 );
	getinventorylist;
	while( .@i < @inventorylist_count && .@j < .@count ) {
		if ( @inventorylist_id[.@i] == 7420 && @inventorylist_card3[.@i] != .@char_id ) {
			delitem2 7420, @inventorylist_amount[.@i],1,0,0, @inventorylist_card1[.@i], 0, @inventorylist_card3[.@i], 0;
			.@j++;
		}
		.@i++;
	}
	#skull_points = #skull_points + .@count;
	mes "Obtuviste "+ .@count +" Skull points. Tienes en total: "+ #skull_points +" Skull points.";
	close;
}

my problem is... just with some player can exchange their skulls for points... but some players cant.... i dont know why and what should i do to fix this... i was thinking on that line

countitem2( 7420, 1,0,0, 254, 0, .@char_id, 0 );

but i dont know if is this.... i gonna add some screens about the problem (no RO atm).

 

 

6 answers to this question

Recommended Posts

  • 1
Posted


prontera,139,180,5 script Skull Points 63,{

.@char_id = getcharid(0);

.@count = countitem( 7420 ) - countitem2( 7420, 1,0,0, 254, 0, (.@char_id & 65535), (.@char_id >> 16) ); // can't exchange his own skull

mes "Puntos Totales: "+ #skull_points +" Skull points.";

if ( .@count == 0 ) close;

mes "¿Deseas intercambiar tus Skulls por Skulls Points?";

next;

if ( select( "~ Yes", "~ No" ) -1 ) end;

.@count = countitem( 7420 ) - countitem2( 7420, 1,0,0, 254, 0, (.@char_id & 65535), (.@char_id >> 16) );

getinventorylist;

while( .@i < @inventorylist_count && .@j < .@count ) {

if ( @inventorylist_id[.@i] == 7420 && @inventorylist_card3[.@i] != .@char_id ) {

delitem2 7420, @inventorylist_amount[.@i],1,0,0, @inventorylist_card1[.@i], 0, @inventorylist_card3[.@i], 0;

.@j++;

}

.@i++;

}

#skull_points = #skull_points + .@count;

mes "Obtuviste "+ .@count +" Skull points. Tienes en total: "+ #skull_points +" Skull points.";

close;

}

  • Upvote 1
Posted

still happen the problem i too some screens about the procces i do and dont happen anything :c , the problem in short words is.... that the npc dont read those skulls with name i mean just can accept skulls created by @item 7420 but no those that are dropped after kill a character.

Posted

the problem is they can't exchange the other's player skulls also their own, they only can the skull with no name i mean the one created just it @item :s i tried with gm account, and 2 users account, others 3~5 players also try it but just can exchange the skull with no name :s atm im trying to find a npc thar exchange those skulls for the skull without name but i can't fiend it yet, anyway if want i can try to paste some screens when i try to exchange the skulls with different names and not happen nothing :/

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...