Jump to content

Timokha

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Timokha

    Mass Seller

    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 [email protected]_lv, getskilllv( "MC_OVERCHARGE" ); if( [email protected]_lv ) set [email protected]_rate, 105 + ( 2 * [email protected]_lv ) - ( ( [email protected]_lv >= 10 )? 1:0 ); while( [email protected] < @inventorylist_count ){ if( [email protected]_equip[[email protected]] && getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_SELLPRICE ) != 0 && [email protected]_refine[[email protected]] != 0 && (getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_WEAPON )) { set [email protected]_sell_price, getiteminfo( @inventorylist_id[[email protected]],1 ); if( [email protected]_lv ) set [email protected]_sell_price, ( ( [email protected]_sell_price * [email protected]_rate ) / 100 ); mes " > "[email protected]_amount[[email protected]]+ "x " +getitemname( @inventorylist_id[[email protected]] )+" : "[email protected]_sell_price+"z"; [email protected] += [email protected]_sell_price * @inventorylist_amount[[email protected]]; } [email protected]++; } if( [email protected] ){ if( select( "Cost for all the Items - "[email protected]+" zeny?","Cancel" ) == 1 ){ [email protected] = 0; while( [email protected] < @inventorylist_count ){ if( [email protected]_equip[[email protected]] && getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_SELLPRICE ) != 0 && [email protected]_refine[[email protected]] != 0 && (getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_ETC || getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_ARMOR || getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_PETARMOR || getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_WEAPON )) delitem @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]]; [email protected]++; } specialeffect(367, AREA, playerattached()); specialeffect(10, AREA, playerattached()); Zeny += [email protected]; mes "You received a total cost of "[email protected]+" zeny."; } } else{ mes "You don't have any items to sell."; } close; }
  2. Timokha

    Mass Seller

    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.
  3. Timokha

    Mass Seller

    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 ( [email protected] = 0; [email protected] < @inventorylist_count; [email protected] ) { if ( getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_ETC ) { [email protected][[email protected]] = @inventorylist_id[[email protected]]; [email protected][[email protected]] = @inventorylist_amount[[email protected]]; [email protected]_total += getiteminfo( [email protected][[email protected]], ITEMINFO_SELLPRICE ) * [email protected][[email protected]] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; [email protected]; } } for ( [email protected] = 0; [email protected] < @inventorylist_count; [email protected] ) { // if ( getiteminfo( [email protected]_equip[[email protected]], ITEMINFO_TYPE ) == IT_WEAPON ) { // if ( getiteminfo( [email protected]_id[[email protected]], ITEMINFO_TYPE ) == IT_WEAPON ) { if( [email protected]_equip[[email protected]] && getiteminfo ( [email protected]_id[[email protected]], ITEMINFO_TYPE ) == IT_WEAPON ){ [email protected][[email protected]] = @inventorylist_id[[email protected]]; [email protected][[email protected]] = @inventorylist_amount[[email protected]]; [email protected]_total += getiteminfo( [email protected][[email protected]], ITEMINFO_SELLPRICE ) * [email protected][[email protected]] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; [email protected]; } } for ( [email protected] = 0; [email protected] < @inventorylist_count; [email protected] ) { if ( getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_PETARMOR ) { [email protected][[email protected]] = @inventorylist_id[[email protected]]; [email protected][[email protected]] = @inventorylist_amount[[email protected]]; [email protected]_total += getiteminfo( [email protected][[email protected]], ITEMINFO_SELLPRICE ) * [email protected][[email protected]] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; [email protected]; } } for ( [email protected] = 0; [email protected] < @inventorylist_count; [email protected] ) { if ( getiteminfo( @inventorylist_id[[email protected]], ITEMINFO_TYPE ) == IT_ARMOR ) { [email protected][[email protected]] = @inventorylist_id[[email protected]]; [email protected][[email protected]] = @inventorylist_amount[[email protected]]; [email protected]_total += getiteminfo( [email protected][[email protected]], ITEMINFO_SELLPRICE ) * [email protected][[email protected]] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100; [email protected]; } } if ( [email protected] ) { mes "nothing to sell"; close; } mes "are you sure to sell :"; for ( [email protected] = 0; [email protected] < [email protected]; [email protected] ) mes [email protected][[email protected]] +"x "+ getitemname([email protected][[email protected]]); mes "в сумме за "+ F_InsertComma([email protected]_total) +" Зени ?"; next; if ( select( "Yes", "No" ) == 2 ) close; if ( Zeny + [email protected]_total > MAX_ZENY ) { mes "you cannot carry much more zeny."; close; } for ( [email protected] = 0; [email protected] < [email protected]; [email protected] ) delitem [email protected][[email protected]], [email protected][[email protected]]; specialeffect(367, AREA, playerattached()); specialeffect(10, AREA, playerattached()); mes "All items have been sold for "+ F_InsertComma([email protected]_total) +" z"; Zeny += [email protected]_total; close; OnInit: setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24; end; }
×
×
  • Create New...

Important Information

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