Jump to content
  • 0

NPC SHOP for +7 or + 10 items


Question

Posted
prontera,156,181,5    script    jfhdksfjhs    100,{
   mes "select an item to buy";
   next;
   .@s = select( .menu$ ) -1;
   if ( countitem( .itemuse ) < .sellcost[.@s] ) {
       mes "not enough "+ getitemname( .itemuse );
       close;
   }
   delitem .itemuse, .sellcost[.@s];
   getitem2 .sellitem[.@s], 1,1,10,0, 0,0,0,0;
   close;
OnInit:
   setarray .sellitem, 1101, 1201, 1301;
   setarray .sellcost, 10, 20, 30;
   set .itemuse, 674;
   .@size = getarraysize( .sellitem );
   for ( .@i = 0; .@i < .@size; .@i++ )
    .menu$ = .menu$ + getitemname( .sellitem[.@i] )+" +10 [Cost -> "+ .sellcost[.@i] +"]:";
   end;
}
prontera,156,172,5    script    market    100,{
   dispbottom "You currently have "+ countitem(.itemuse) +" "+ getitemname(.itemuse);
   callshop "market2#hidden", 1;
   end;
OnBuyItem:
   if ( !@bought_quantity ) end;
   .@size = getarraysize( @bought_nameid );
   while ( .@i < .@size ) {
       .@j = 0;
       while ( @bought_nameid[.@i] != .itemid[.@j] && .@j < .shop_size ) .@j++;
       .@itemcost = .@itemcost + .itemcost[.@j] * @bought_quantity[.@i];
       .@i++;
   }
   if ( .@itemcost > countitem(.itemuse) ) {
       mes "you don't have enough "+ getitemname(.itemuse);
       close;
   }
   delitem .itemuse, .@itemcost;
   for ( set .@i,0; .@i < .@size; set .@i, .@i +1 )
       getitem @bought_nameid[.@i], @bought_quantity[.@i];
   deletearray @bought_nameid;
   deletearray @bought_quantity;
   end;
OnInit:
   setarray .itemid,1101,1201,1301,1501,1601;
   setarray .itemcost,10,20,30,40,50;
   set .itemuse, 674;

   .shop_size = getarraysize(.itemid);
   npcshopdelitem "market2#hidden", 512;
   for ( .@i = 0; .@i < .shop_size; .@i++ )
       npcshopadditem "market2#hidden", .itemid[.@i], .itemcost[.@i];
   npcshopattach "market2#hidden";
   end;
}

-    shop    market2#hidden    -1,512:10000

how will i combine this two scripts?? my goal is to have a NPC that sells Refined Equipments for Coins .. but it will open a shop where you can see like +7 pole axe,+8 Shield Etc.

thanks in advance..

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

got some part of it..

but is there a way to see the +10 sword on the opened shop?

also.. can you join +10 and +8 or +7 in this shop? like +10 sword +8 axe +7 club + 5 rod

like

  setarray .itemid,+7(1101),+8(1201),+9(1301),+10(1501),1601

refine shop.PNG

Edited by celeron0134
  • 0
Posted
12 hours ago, HD Scripts said:

maybe command "additem2" ?

ill try this one thanks

On 2/15/2020 at 5:22 PM, Litro Endemic said:

short answer: no, because client limitation!, or you can make mod by using vending system, google this word "Selling Refined Item by NPC as Vending List"

tried but didn't work open_vending i think this script is not supported on rathena

  • 0
Posted

as far as I know, by default shop doesn't support refined items.

the only one who I have seen manage to make this mod in the past was @Epoque back in eathena, and the link is no longer available .

or perhaps you could try ask him to update it if he ever have time or interested to do it.

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