KyD13
Members-
Posts
8 -
Joined
-
Last visited
Profile Information
-
Gender
Male
-
Location
Izlude
KyD13's Achievements
Poring (1/15)
0
Reputation
-
//===== 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 paradise_asshole,75,51,0 script Voting Rewards 446,{ set @s, select("Headgears:Usables:Misc"); // -------------------------------------------------- message strcharinfo(0),"This shop only accepts "+getitemname(.Currency[@s])+"."; dispbottom "You have "+countitem(.Currency[@s])+" "+getitemname(.Currency[@s])+"."; callshop "MSHOP"[email protected],1; npcshopattach "MSHOP"[email protected]; end; OnBuyItem: set [email protected],0; while ([email protected] < getarraysize(@bought_nameid)) { set [email protected], 0; while ([email protected] < getarraysize(getd(".Shop"[email protected]))) { if(getd(".Shop"[email protected]+"["[email protected]+"]") == @bought_nameid[[email protected]]) { set @itemcost, (getd(".Shop"[email protected]+"["+([email protected]+1)+"]") * @bought_quantity[[email protected]]); set @totalcost, @totalcost + @itemcost; break; } set [email protected], [email protected]+2; } set [email protected], [email protected]+1; } if (@totalcost > countitem(.Currency[@s])) dispbottom "You don't have enough "+getitemname(.Currency[@s])+"."; else { set [email protected],0; while ([email protected] < getarraysize(@bought_nameid)) { getitem @bought_nameid[[email protected]], @bought_quantity[[email protected]]; dispbottom "Purchased "[email protected]_quantity[[email protected]]+"x "+getitemname(@bought_nameid[[email protected]])+"."; set [email protected], [email protected]+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],677,677,677; setarray .Shop1[0],1202,5,1229,20; setarray .Shop2[0],5116,15; setarray .Shop3[0],2302,2,2348,30; // -------------------------------------------------- set [email protected],1; while ([email protected] <= getarraysize(.Currency)) { set [email protected],0; while ([email protected] < getarraysize(getd(".Shop"[email protected]))) { npcshopdelitem "MSHOP"[email protected],512; npcshopadditem "MSHOP"[email protected], getd(".Shop"[email protected]+"["[email protected]+"]"), getd(".Shop"[email protected]+"["+([email protected]+1)+"]"); set [email protected], [email protected]+2; } set [email protected], [email protected]+1; } end; } there
-
try to re compile ur svn then re compile again then delete the logs. there you go,
-
just gonna ask how to remove the selections? like when i click the npc it will go straight to the shop. thanks
-
Hey guys i need yer help! For some reason my kafra doesn't work. whenever i click the npc this error comes up in the server... [Error]: script:callfunc: function not found! [F_ClearGarbage] [Debug]: Source (NPC): Kafra Employee at prontera (162,186) [Error]: script:callfunc: function not found! [F_ClearGarbage] [Debug]: Source (NPC): Kafra Employee at prontera (146,89) [Error]: script:callfunc: function not found! [F_ClearGarbage] [Debug]: Source (NPC): Kafra Employee at prontera (151,29)