noobonly Posted April 17, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 04/15/20 Last Seen: August 2, 2020 Share Posted April 17, 2020 Hello, is it possible to script a shop which calls the shop functions that will sell items for example 1 Kafra doll = 1 poring coin, 1 gold coin and 1 mithrill coin. 1 poopoo hat = 1 bronze coin 1 gold coin and 1 mithrill coin. in one npc? if you can give me a sample that would be awesome. Thank you. I have 5 different coins for the said shop some items will be needing 3 of the 5 some will need 2 of the 5 coins, Quote Link to comment Share on other sites More sharing options...
1 Emistry Posted April 19, 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 April 19, 2020 use the quest shop instead. npc/custom/quests/quest_shop.txt 1 Quote Link to comment Share on other sites More sharing options...
0 Chaos92 Posted April 18, 2020 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 3 minutes ago Share Posted April 18, 2020 2 hours ago, noobonly said: Hello, is it possible to script a shop which calls the shop functions that will sell items for example 1 Kafra doll = 1 poring coin, 1 gold coin and 1 mithrill coin. 1 poopoo hat = 1 bronze coin 1 gold coin and 1 mithrill coin. in one npc? if you can give me a sample that would be awesome. Thank you. I have 5 different coins for the said shop some items will be needing 3 of the 5 some will need 2 of the 5 coins, Is this can suit your requirements needed ? Quote Link to comment Share on other sites More sharing options...
0 noobonly Posted April 18, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 04/15/20 Last Seen: August 2, 2020 Author Share Posted April 18, 2020 No that doesn't suit my needs. The request would be 1 shop which uses 5 different coins. Gold Silver Bronze Mithrill and Platinum. Some Items will require Gold and Silver, some will require Bronze and Mithrill at the same time, i know it can be scripted using the simple scripting with delitem and getitem etc, but i want to use the shop function/display. Hello I have this shop wherein you can use poring coin to purchase an item but i want to use different coins - shop custom_merchant -1,501:2000000 prontera,150,150,4 script Poring Coin Shop 100,{ mes "[Poring Coin Shop]"; mes "Hello! " + strcharinfo(0) +"..."; mes "I can sell you items in exchange for your Poring Coins"; callshop "custom_merchant",1; npcshopattach "custom_merchant"; end; OnBuyItem: for(set .@i,0; .@i<getarraysize(.itemsforsale); set .@i,.@i+1) { for(set .@d,0; .@d<getarraysize(@item_nameid); set .@d,.@d+1) { if(@item_nameid[.@d]==.itemsforsale[.@i]) { if(checkweight(@item_nameid[.@d],@item_count[.@d])) { if(countitem(.PriceItemID) >= .Price[.@i]*@item_count[.@d]) { delitem .PriceItemID,.Price[.@i]*@item_count[.@d]; getitem @item_nameid[.@d],@item_count[.@d]; } else dispbottom "You don't have enough "+getitemname(.PriceItemID)+" to buy the item."; } else dispbottom "You are overweight! Get rid of the unnecessary items first."; } } } deletearray @item_count, getarraysize(@item_count); deletearray @item_nameid, getarraysize(@item_nameid); close; OnInit: setarray .itemsforsale[0],501,502,503,504,505,506,507,508,509,510,511; set .PriceItemID,7539; setarray .Price[0],60,80,70,80,120,80,60,70,3,15,1; npcshopitem "custom_merchant",0,0; // Don't touch any coding beyond here for(set .i,0; .itemsforsale[.i]; set .i,.i+1) npcshopadditem "custom_merchant",.itemsforsale[.i],.Price[.i]; end; } How to set it to have 5 different coins as payment, some items may need 2 different coins some will need 4. The thing about Euphy's Quest Shop is you can't have the same item or reward. I want something with the same reward item multiple times. Hi is it possible to make this script allow 3 different coins per shop //===== eAthena Script ======================================= //= Custom-Currency Multi-Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.2 //===== Description: ========================================= //= Allows for better organization in a single shop call. //= Note that there are two configuration areas. //============================================================ // -------------------- Config 1 -------------------- // For each shop added, copy this MSHOPX dummy data. // Write your shop names in the select() function. - shop MSHOP1 -1,512:-1 - shop MSHOP2 -1,512:-1 - shop MSHOP3 -1,512:-1 - shop MSHOP4 -1,512:-1 - shop MSHOP5 -1,512:-1 - shop MSHOP6 -1,512:-1 - shop MSHOP7 -1,512:-1 - shop MSHOP8 -1,512:-1 prontera,163,174,4 script A Shop 984,{ set @s, select("Weapons:Headgears:Armors:Garments:Shoes:Shields:Cards:Misc"); // -------------------------------------------------- message strcharinfo(0),"This shop only accepts "+getitemname(.Currency[@s])+"."; dispbottom "You have "+countitem(.Currency[@s])+" "+getitemname(.Currency[@s])+"."; callshop "MSHOP"+@s,1; npcshopattach "MSHOP"+@s; end; OnBuyItem: set .@i,0; while (.@i < getarraysize(@bought_nameid)) { set .@j, 0; while (.@j < getarraysize(getd(".Shop"+@s))) { if(getd(".Shop"+@s+"["+.@j+"]") == @bought_nameid[.@i]) { set @itemcost, (getd(".Shop"+@s+"["+(.@j+1)+"]") * @bought_quantity[.@i]); set @totalcost, @totalcost + @itemcost; break; } set .@j, .@j+2; } set .@i, .@i+1; } if (@totalcost > countitem(.Currency[@s])) dispbottom "You don't have enough "+getitemname(.Currency[@s])+"."; else { set .@i,0; while (.@i < getarraysize(@bought_nameid)) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"."; set .@i, .@i+1; } delitem .Currency[@s], @totalcost; } set @totalcost, 0; deletearray @bought_nameid[0], 128; deletearray @bought_quantity[0], 128; end; OnInit: // -------------------- Config 2 -------------------- // Currency: The ID of each shop currency, // in the same order as the shops. // Shop order follows that of the select() call, // and is formatted "ID1,Count1,ID2,Count2,..." setarray .Currency[1],513,513,513,513,513,513,513,513; setarray .Shop1[0],1202,5,1229,20; setarray .Shop2[0],5116,15; setarray .Shop3[0],2302,2,2348,30; setarray .Shop4[0],2502,2,2513,15,2523,15; setarray .Shop5[0],2441,15; setarray .Shop6[0],2199,32768; setarray .Shop7[0],4051,3,4285,6; setarray .Shop8[0],513,1,532,2,634,4; // -------------------------------------------------- set .@i,1; while (.@i <= getarraysize(.Currency)) { set .@j,0; while (.@j < getarraysize(getd(".Shop"+.@i))) { npcshopdelitem "MSHOP"+.@i,512; npcshopadditem "MSHOP"+.@i, getd(".Shop"+.@i+"["+.@j+"]"), getd(".Shop"+.@i+"["+(.@j+1)+"]"); set .@j, .@j+2; } set .@i, .@i+1; } end; } Quote Link to comment Share on other sites More sharing options...
Question
noobonly
Hello, is it possible to script a shop which calls the shop functions that will sell items for example
1 Kafra doll = 1 poring coin, 1 gold coin and 1 mithrill coin.
1 poopoo hat = 1 bronze coin 1 gold coin and 1 mithrill coin.
in one npc? if you can give me a sample that would be awesome. Thank you. I have 5 different coins for the said shop some items will be needing 3 of the 5 some will need 2 of the 5 coins,
Link to comment
Share on other sites
3 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.