Drinna Posted July 1, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 33 Reputation: 1 Joined: 06/07/17 Last Seen: April 18, 2023 Share Posted July 1, 2018 Hi ! I am using Euphy's script for a pod shop but the items that it sells repeats. here's an example from below and also the script I edited for my server. hourly.txt Here's how it looks like. I just don't understand why anymore Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted July 2, 2018 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 38 minutes ago Share Posted July 2, 2018 (edited) 12 hours ago, Drinna said: Hi ! I am using Euphy's script for a pod shop but the items that it sells repeats. here's an example from below and also the script I edited for my server. hourly.txt Here's how it looks like. I just don't understand why anymore can't download your script, could you put in here in code box. Edited July 2, 2018 by hendra814 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted July 2, 2018 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 July 2, 2018 that's because you duplicated the main script that generate the shop. prontera,143,99,5 duplicate(Rewards) Rewards#prt 114 alberta,139,71,5 duplicate(Rewards) Rewards#alb 114 morocc,127,77,5 duplicate(Rewards) Rewards#mrc 114 geffen,97,71,5 duplicate(Rewards) Rewards#gef 114 you can fix it by adding this line under the OnInit label.. OnInit: if (strnpcinfo(1) != "") end; Quote Link to comment Share on other sites More sharing options...
0 Drinna Posted July 2, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 33 Reputation: 1 Joined: 06/07/17 Last Seen: April 18, 2023 Author Share Posted July 2, 2018 (edited) On 7/1/2018 at 10:29 PM, Drinna said: Hi ! I am using Euphy's script for a pod shop but the items that it sells repeats. here's an example from below and also the script I edited for my server. hourly.txt Here's how it looks like. I just don't understand why anymore //===== 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,19544:-1 - shop MSHOP2 -1,19522:-1 payon,166,111,5 script Rewards 114 ,{ set @s, select("Upper Headgears:Mid & Lower Headgears"); // -------------------------------------------------- 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],32020,32020; setarray .Shop1[0],19544,30,20273,80,19513,5,19507,5,19517,10; setarray .Shop2[0],19522,10,19537,20,19539,200,19613,300; // 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,32020; npcshopadditem "MSHOP"+.@i, getd(".Shop"+.@i+"["+.@j+"]"), getd(".Shop"+.@i+"["+(.@j+1)+"]"); set .@j, .@j+2; } set .@i, .@i+1; } end; } // ----------------Duplicate-------------------- prontera,143,99,5 duplicate(Rewards) Rewards#prt 114 alberta,139,71,5 duplicate(Rewards) Rewards#alb 114 morocc,127,77,5 duplicate(Rewards) Rewards#mrc 114 geffen,97,71,5 duplicate(Rewards) Rewards#gef 114 Edited July 2, 2018 by Emistry Please use codebox. Quote Link to comment Share on other sites More sharing options...
0 Drinna Posted July 2, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 33 Reputation: 1 Joined: 06/07/17 Last Seen: April 18, 2023 Author Share Posted July 2, 2018 4 hours ago, Emistry said: that's because you duplicated the main script that generate the shop. prontera,143,99,5 duplicate(Rewards) Rewards#prt 114 alberta,139,71,5 duplicate(Rewards) Rewards#alb 114 morocc,127,77,5 duplicate(Rewards) Rewards#mrc 114 geffen,97,71,5 duplicate(Rewards) Rewards#gef 114 you can fix it by adding this line under the OnInit label.. OnInit: if (strnpcinfo(1) != "") end; Okay thanks ! I will try this for now let's see if it will work Quote Link to comment Share on other sites More sharing options...
0 Drinna Posted July 2, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 33 Reputation: 1 Joined: 06/07/17 Last Seen: April 18, 2023 Author Share Posted July 2, 2018 5 hours ago, Emistry said: that's because you duplicated the main script that generate the shop. prontera,143,99,5 duplicate(Rewards) Rewards#prt 114 alberta,139,71,5 duplicate(Rewards) Rewards#alb 114 morocc,127,77,5 duplicate(Rewards) Rewards#mrc 114 geffen,97,71,5 duplicate(Rewards) Rewards#gef 114 you can fix it by adding this line under the OnInit label.. OnInit: if (strnpcinfo(1) != "") end; Now I know that it is because of the duplicates. I did not know that but when I put the if (strnpcinfo(1) != "") end; what happens now is that it only shows this below : I can see it's because of this : - shop MSHOP1 -1,19544:-1- shop MSHOP2 -1,19522:-1 But it wasn't doing that before Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted July 2, 2018 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 July 2, 2018 OnInit: if (strnpcinfo(2) != "") end; Quote Link to comment Share on other sites More sharing options...
Question
Drinna
Hi !
I am using Euphy's script for a pod shop but the items that it sells repeats. here's an example from below and also the script I edited for my server.
hourly.txt
Here's how it looks like.
I just don't understand why anymore
Link to comment
Share on other sites
6 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.