Jump to content
  • 0
Timokha

Mass Seller

Question

Hello All,

 

Could you please help me.

 

I'd like to make below script scans and ignores all equiped items on the characters.

Now it deletes all items, including equiped.

I also want to include function to ignore specific item IDs.

 

Might be someone can help me with below or have alternative script with bulk selling, working with Hercules?

 

Thanks in advace,  

 

nss_dojo,209,222,4	script	Bulk_sell	1_M_MERCHANT,{
	disable_items;
	getinventorylist;
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC ) {
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
//		if ( getiteminfo( !@inventorylist_equip[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) {
//		if ( getiteminfo( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) {
		if( !@inventorylist_equip[.@i] && getiteminfo ( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ){
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR ) {
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR ) {
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	if ( !.@c ) {
		mes "nothing to sell";
		close;
	}
	mes "are you sure to sell :";
	for ( .@i = 0; .@i < .@c; ++.@i )
		mes .@amount[.@i] +"x "+ getitemname(.@id[.@i]);
	mes "в сумме за "+ F_InsertComma(.@zeny_total) +" Зени ?";
	next;
	if ( select( "Yes", "No" ) == 2 ) close;
	if ( Zeny + .@zeny_total > MAX_ZENY ) {
		mes "you cannot carry much more zeny.";
		close;
	}
	for ( .@i = 0; .@i < .@c; ++.@i )
		delitem .@id[.@i], .@amount[.@i];
		specialeffect(367, AREA, playerattached());
		specialeffect(10, AREA, playerattached());
	mes "All items have been sold for "+ F_InsertComma(.@zeny_total) +" z";
	Zeny += .@zeny_total;
	close;
OnInit:
	setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24;
	end;
}

 

Edited by Timokha

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
6 hours ago, Timokha said:

 

Thank you.

It works well, but it sells all items including cards and items, that should not (can't) be sold.

That's why I use //ITEMINFO_TYPE ) == IT_WEAPON/ARMOR/ETC// in my script.

I'm looking for a script, which will sell all items, expect for cards, usable, healing items, and some IDs from my list.

Try to put another condition in this part 

if( !@inventorylist_equip[.@i] ){

something like this.

if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC){

i really dont test it. maybe just give it a try.

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, Timokha said:

Hello All,

 

Could you please help me.

 

I'd like to make below script scans and ignores all equiped items on the characters.

Now it deletes all items, including equiped.

I also want to include function to ignore specific item IDs.

 

Might be someone can help me with below or have alternative script with bulk selling, working with Hercules?

 

Thanks in advace,  

 

nss_dojo,209,222,4 script Bulk_sell 1_M_MERCHANT,{ disable_items; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC ) { .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { // if ( getiteminfo( !@inventorylist_equip[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) { // if ( getiteminfo( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) { if( !@inventorylist_equip[.@i] && getiteminfo ( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ){ .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR ) { .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR ) { .@id[.@c] = @inventorylist_id[.@i]; .@amount[.@c] = @inventorylist_amount[.@i]; .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; ++.@c; } } if ( !.@c ) { mes "nothing to sell"; close; } mes "are you sure to sell :"; for ( .@i = 0; .@i < .@c; ++.@i ) mes .@amount[.@i] +"x "+ getitemname(.@id[.@i]); mes "в сумме за "+ F_InsertComma(.@zeny_total) +" Зени ?"; next; if ( select( "Yes", "No" ) == 2 ) close; if ( Zeny + .@zeny_total > MAX_ZENY ) { mes "you cannot carry much more zeny."; close; } for ( .@i = 0; .@i < .@c; ++.@i ) delitem .@id[.@i], .@amount[.@i]; specialeffect(367, AREA, playerattached()); specialeffect(10, AREA, playerattached()); mes "All items have been sold for "+ F_InsertComma(.@zeny_total) +" z"; Zeny += .@zeny_total; close; OnInit: setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24; end; }


nss_dojo,209,222,4	script	Bulk_sell	1_M_MERCHANT,{
	disable_items;
	getinventorylist;
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC ) {
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
//		if ( getiteminfo( !@inventorylist_equip[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) {
//		if ( getiteminfo( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ) {
		if( !@inventorylist_equip[.@i] && getiteminfo ( !@inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ){
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR ) {
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
		if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR ) {
			.@id[.@c] = @inventorylist_id[.@i];
			.@amount[.@c] = @inventorylist_amount[.@i];
			.@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
			++.@c;
		}
	}
	if ( !.@c ) {
		mes "nothing to sell";
		close;
	}
	mes "are you sure to sell :";
	for ( .@i = 0; .@i < .@c; ++.@i )
		mes .@amount[.@i] +"x "+ getitemname(.@id[.@i]);
	mes "в сумме за "+ F_InsertComma(.@zeny_total) +" Зени ?";
	next;
	if ( select( "Yes", "No" ) == 2 ) close;
	if ( Zeny + .@zeny_total > MAX_ZENY ) {
		mes "you cannot carry much more zeny.";
		close;
	}
	for ( .@i = 0; .@i < .@c; ++.@i )
		delitem .@id[.@i], .@amount[.@i];
		specialeffect(367, AREA, playerattached());
		specialeffect(10, AREA, playerattached());
	mes "All items have been sold for "+ F_InsertComma(.@zeny_total) +" z";
	Zeny += .@zeny_total;
	close;
OnInit:
	setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24;
	end;
}

 

Try this one, didnt test it yet.

mapname,100,100,4	script	TestNPC	4_M_MAYOR,{
getinventorylist;
	set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" );
	if( .@overcharge_lv )
	set .@overcharge_rate, 105 + ( 2  * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 );
	while( .@i < @inventorylist_count ){
		if( !@inventorylist_equip[.@i] ){
			set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 );
			if( .@overcharge_lv )
				set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 );
			mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z";
			.@cost += .@item_sell_price * @inventorylist_amount[.@i];
		}
		.@i++;
	}
	if( .@cost ){
		if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){
			.@i = 0;
			while( .@i < @inventorylist_count ){
				if( !@inventorylist_equip[.@i] )
					delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];
				.@i++;
			}
			Zeny += .@cost;
			mes "You received a total cost of "+.@cost+" zeny.";
		}
	}
	else{
		mes "You don't have any items to sell.";
	}
	close;
}

 

Edited by Kuya Jeo

Share this post


Link to post
Share on other sites
  • 0
17 hours ago, Kuya Jeo said:

Try this one, didnt test it yet.

mapname,100,100,4 script TestNPC 4_M_MAYOR,{ getinventorylist; set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" ); if( .@overcharge_lv ) set .@overcharge_rate, 105 + ( 2 * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 ); while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ){ set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 ); if( .@overcharge_lv ) set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 ); mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z"; .@cost += .@item_sell_price * @inventorylist_amount[.@i]; } .@i++; } if( .@cost ){ if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){ .@i = 0; while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] ) delitem @inventorylist_id[.@i],@inventorylist_amount[.@i]; .@i++; } Zeny += .@cost; mes "You received a total cost of "+.@cost+" zeny."; } } else{ mes "You don't have any items to sell."; } close; }


mapname,100,100,4	script	TestNPC	4_M_MAYOR,{
getinventorylist;
	set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" );
	if( .@overcharge_lv )
	set .@overcharge_rate, 105 + ( 2  * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 );
	while( .@i < @inventorylist_count ){
		if( !@inventorylist_equip[.@i] ){
			set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 );
			if( .@overcharge_lv )
				set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 );
			mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z";
			.@cost += .@item_sell_price * @inventorylist_amount[.@i];
		}
		.@i++;
	}
	if( .@cost ){
		if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){
			.@i = 0;
			while( .@i < @inventorylist_count ){
				if( !@inventorylist_equip[.@i] )
					delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];
				.@i++;
			}
			Zeny += .@cost;
			mes "You received a total cost of "+.@cost+" zeny.";
		}
	}
	else{
		mes "You don't have any items to sell.";
	}
	close;
}

 

 

Thank you.

It works well, but it sells all items including cards and items, that should not (can't) be sold.

That's why I use //ITEMINFO_TYPE ) == IT_WEAPON/ARMOR/ETC// in my script.

I'm looking for a script, which will sell all items, expect for cards, usable, healing items, and some IDs from my list.

Edited by Timokha

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, Kuya Jeo said:

Try to put another condition in this part 

if( !@inventorylist_equip[.@i] ){


if( !@inventorylist_equip[.@i] ){

something like this.

if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC){


if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC){

i really dont test it. maybe just give it a try.

Thanks a lot, I highly appreciate your assistance.

May the Gods bless you!!

I've made it works.

 

If someone needs, below share complete script for bulk sell.

It ignores:

x Items with 0z cost (eg. customs items)

x Refined items

x Equiped items

Works only for:

x Junk (ETC)

x Weapon / Armor / Pet armor

 

SOLVED. 

nss_dojo,211,222,4	script	TestNPC	4_M_MAYOR,{
getinventorylist;
	set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" );
	if( .@overcharge_lv )
	set .@overcharge_rate, 105 + ( 2  * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 );
	while( .@i < @inventorylist_count ){
		if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON )) {
			set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 );
			if( .@overcharge_lv )
				set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 );
			mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z";
			.@cost += .@item_sell_price * @inventorylist_amount[.@i];
		}
		.@i++;
	}
	if( .@cost ){
		if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){
			.@i = 0;
			while( .@i < @inventorylist_count ){
		if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ))
					delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];
				.@i++;
			}
			specialeffect(367, AREA, playerattached());
			specialeffect(10, AREA, playerattached());
			Zeny += .@cost;
			mes "You received a total cost of "+.@cost+" zeny.";
		}
	}
	else{
		mes "You don't have any items to sell.";
	}
	close;
}

 

Share this post


Link to post
Share on other sites
  • 0
5 minutes ago, Timokha said:

Thanks a lot, I highly appreciate your assistance.

May the Gods bless you!!

I've made it works.

 

If someone needs, below share complete script for bulk sell.

It ignores:

x Items with 0z cost (eg. customs items)

x Refined items

x Equiped items

Works only for:

x Junk (ETC)

x Weapon / Armor / Pet armor

 

SOLVED. 

nss_dojo,211,222,4 script TestNPC 4_M_MAYOR,{ getinventorylist; set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" ); if( .@overcharge_lv ) set .@overcharge_rate, 105 + ( 2 * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 ); while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON )) { set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 ); if( .@overcharge_lv ) set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 ); mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z"; .@cost += .@item_sell_price * @inventorylist_amount[.@i]; } .@i++; } if( .@cost ){ if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){ .@i = 0; while( .@i < @inventorylist_count ){ if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON )) delitem @inventorylist_id[.@i],@inventorylist_amount[.@i]; .@i++; } specialeffect(367, AREA, playerattached()); specialeffect(10, AREA, playerattached()); Zeny += .@cost; mes "You received a total cost of "+.@cost+" zeny."; } } else{ mes "You don't have any items to sell."; } close; }


nss_dojo,211,222,4	script	TestNPC	4_M_MAYOR,{
getinventorylist;
	set .@overcharge_lv, getskilllv( "MC_OVERCHARGE" );
	if( .@overcharge_lv )
	set .@overcharge_rate, 105 + ( 2  * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 );
	while( .@i < @inventorylist_count ){
		if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON )) {
			set .@item_sell_price, getiteminfo( @inventorylist_id[.@i],1 );
			if( .@overcharge_lv )
				set .@item_sell_price, ( ( .@item_sell_price * .@overcharge_rate ) / 100 );
			mes " > "+@inventorylist_amount[.@i]+ "x " +getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z";
			.@cost += .@item_sell_price * @inventorylist_amount[.@i];
		}
		.@i++;
	}
	if( .@cost ){
		if( select( "Cost for all the Items - "+.@cost+" zeny?","Cancel" ) == 1 ){
			.@i = 0;
			while( .@i < @inventorylist_count ){
		if( !@inventorylist_equip[.@i] && getiteminfo( @inventorylist_id[.@i], ITEMINFO_SELLPRICE ) != 0 && !@inventorylist_refine[.@i] != 0 && (getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_WEAPON ))
					delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];
				.@i++;
			}
			specialeffect(367, AREA, playerattached());
			specialeffect(10, AREA, playerattached());
			Zeny += .@cost;
			mes "You received a total cost of "+.@cost+" zeny.";
		}
	}
	else{
		mes "You don't have any items to sell.";
	}
	close;
}

 

Thank you, im glad that I help you alot :)

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.