celeron0134 Posted February 15, 2020 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Share 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 Link to comment Share on other sites More sharing options...
0 celeron0134 Posted February 15, 2020 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
0 Litro Endemic Posted February 15, 2020 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 283 Reputation: 79 Joined: 06/13/13 Last Seen: June 7, 2023 Share 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 Link to comment Share on other sites More sharing options...
0 HD Scripts Posted February 15, 2020 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 184 Reputation: 15 Joined: 06/10/12 Last Seen: 11 hours ago Share Posted February 15, 2020 maybe command "additem2" ? Quote Link to comment Share on other sites More sharing options...
0 celeron0134 Posted February 16, 2020 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted February 29, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share 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 Link to comment Share on other sites More sharing options...
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..
Link to comment
Share on other sites
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.