Jump to content
  • 0

Shop that item used instead of zeny?


Blazing Spear

Question


  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   1
  • Joined:  01/06/12
  • Last Seen:  

Request Shop that item used instead of zeny

example using bronze coin, silver coin, gold coin, mithril coin

thanks!!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  11/20/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

feels like want to update this script

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,512,513,514,515,516;
   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

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