celeron0134 Posted February 15, 2020 Posted February 15, 2020 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.. Quote
0 celeron0134 Posted February 15, 2020 Author Posted February 15, 2020 (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 Edited February 15, 2020 by celeron0134 Quote
0 Litro Endemic Posted February 15, 2020 Posted February 15, 2020 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" 1 Quote
0 celeron0134 Posted February 16, 2020 Author Posted February 16, 2020 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 Quote
0 Emistry Posted February 29, 2020 Posted February 29, 2020 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. Quote
Question
celeron0134
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.