Jump to content
Kariton Revolution

Pa help nmn d2 sa SCrip na Pod trader

Recommended Posts

pano ko sya ma duduplicate gusto ko kc gwin bukod bukod eh gagawa aq ng Pods Trader na Weapon ,Pods trader na Wing

kc kada gagawin ko sya na lilipat lang din ung item nung nasa kabila napupunta dun sa wing shop

example

gumawa aq notepad paste ko yan podtrader2.txt pag click ko sxa npc kung ano ung item na nakalagay dun sa podtrader1.txt nandun din sa podtrader2 gusto ko sana gawin ung bukod bukod pano un?

quiz_02,341,63,5 script Donate Trader 403,{

mes .name$;

mes "You currently have "+countitem(.pod_item)+" Proof of Donation.";

mes "Would you like to look at the shop?";

next;

if(select("Yes:No") == 2) {

close;

}

close2;

callshop "Donator_SHOP",1;

npcshopattach "Donator_SHOP";

dispbottom "You currently have "+countitem(.pod_item)+" Proof of Donation.";

end;

OnBuyItem:

for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {

for(set @j,0; @j < getarraysize(.POD_ITEMS); set @j,@j+2) {

if(.POD_ITEMS[@j] == @bought_nameid[@i]) {

set @itemcost,(.POD_ITEMS[(@j+1)]*@bought_quantity[@i]);

set @totalcost,(@[email protected]);

break;

}

}

}

if(@totalcost > countitem(.pod_item)) {

dispbottom "You don't have enough Proof of Donation.";

}

else {

for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {

getitem @bought_nameid[@i],@bought_quantity[@i];

}

delitem .pod_item,@totalcost;

dispbottom "Thank you for shopping.";

dispbottom "You now have "+countitem(.pod_item)+" Proof of Donation left.";

}

set @totalcost,0;

deletearray @bought_nameid[0],128;

deletearray @bought_quantity[0],128;

end;

OnInit:

npcshopdelitem "Donator_SHOP",0;

set .name$,"[POD Trader]";

set .pod_item,7179;

setarray .POD_ITEMS[0],1577,25,1640,25,1281,25,1187,25,1310,25,1641,25,2002,25,13177,25,13042,25,13179,25,1927,25,13418,25,1743,25,1282,25,1486,25,1981,25,13110,25,2774,25,13417,25,13176,25,13178,25,13307,25,1426,25,1576,25,1382,25,1425,30,5518,30,5374,30,5013,50,20212,25,20213,25,20214,25,20215,25,20216,25,20217,25,20400,20,20401,20,20402,20,20403,20,20404,20,20405,20,2383,50,2541,50,2629,10,2630,10,2410,10,1530,25,4128,20,4357,20,4359,20,4399,20,4361,20,4363,20,4365,20,20000,10,20001,10,20002,10,20003,10,20004,10,20005,10,20264,70,20265,50,20266,20,20267,20,20268,20,20269,20,20270,20,20272,20,20273,20; // Input as many items as you want (item::price)

for(set [email protected],0; [email protected] < getarraysize(.POD_ITEMS); set [email protected],[email protected]+2) {

npcshopadditem "Donator_SHOP",.POD_ITEMS[[email protected]],.POD_ITEMS[([email protected]+1)];

}

}

- shop Donator_SHOP 139,909:1

Edited by piso
Link to comment
Share on other sites

prontera,139,182,5 script TCG Mids 793,{
mes .name$;
mes "You currently have "+countitem(.tcg_item)+" TCG.";
mes "Would you like to look at the shop?";
next;
if(select("Yes:No") == 2) {close;}
close2;
callshop "TCG_SHOP2",1;
npcshopattach "TCG_SHOP2";
dispbottom "You currently have "+countitem(.tcg_item)+" TCG.";
end;

OnBuyItem:
for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {
for(set @j,0; @j < getarraysize(.TCG_ITEMS2); set @j,@j+1) {
if(.TCG_ITEMS2[@j] == @bought_nameid[@i]) {
set @itemcost,(.ITEMPRICE2[@j]*@bought_quantity[@i]);
set @totalcost,(@[email protected]);
break;
}
}
}

if(@totalcost > countitem(.tcg_item)) {
dispbottom "You don't have enough TCG.";
} else {
for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {
getitem @bought_nameid[@i],@bought_quantity[@i];
}
delitem .tcg_item,@totalcost;
dispbottom "Thank you for shopping.";
dispbottom "You now have "+countitem(.tcg_item)+" TCG left.";
}
set @totalcost,0;
deletearray @bought_nameid[0],128;
deletearray @bought_quantity[0],128;
end;

OnInit:
npcshopdelitem "TCG_SHOP2",909; // Leave this alone
set .name$,"[TCG Mids]";
set .tcg_item,7227; // Input TCG ID
setarray .TCG_ITEMS2[0],20000; // Item IDs - 128 max
setarray .ITEMPRICE2[0],25 // Item prices - Should followe ID's order

for(set [email protected],0; [email protected] < getarraysize(.TCG_ITEMS2); set [email protected],[email protected]+1) {
npcshopadditem "TCG_SHOP2",.TCG_ITEMS2[[email protected]],.ITEMPRICE2[[email protected]];
}
end;
}

- shop TCG_SHOP2 -1,909:20

Oh ito, change mo ng iyong script sa ito, kasi ng setarray pwede mag put only 128 values. to add more:

change mo ng "TCG_SHOP2" -> "TCG_SHOP3" , and changing the numbers to add. (sorry tagalog is bad D:)

Edited by iFoxkun
Link to comment
Share on other sites

prontera,139,182,5 script TCG Mids 793,{
mes .name$;
mes "You currently have "+countitem(.tcg_item)+" TCG.";
mes "Would you like to look at the shop?";
next;
if(select("Yes:No") == 2) {close;}
close2;
callshop "TCG_SHOP2",1;
npcshopattach "TCG_SHOP2";
dispbottom "You currently have "+countitem(.tcg_item)+" TCG.";
end;

OnBuyItem:
for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {
for(set @j,0; @j < getarraysize(.TCG_ITEMS2); set @j,@j+1) {
if(.TCG_ITEMS2[@j] == @bought_nameid[@i]) {
set @itemcost,(.ITEMPRICE2[@j]*@bought_quantity[@i]);
set @totalcost,(@[email protected]);
break;
}
}
}

if(@totalcost > countitem(.tcg_item)) {
dispbottom "You don't have enough TCG.";
} else {
for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {
getitem @bought_nameid[@i],@bought_quantity[@i];
}
delitem .tcg_item,@totalcost;
dispbottom "Thank you for shopping.";
dispbottom "You now have "+countitem(.tcg_item)+" TCG left.";
}
set @totalcost,0;
deletearray @bought_nameid[0],128;
deletearray @bought_quantity[0],128;
end;

OnInit:
npcshopdelitem "TCG_SHOP2",909; // Leave this alone
set .name$,"[TCG Mids]";
set .tcg_item,7227; // Input TCG ID
setarray .TCG_ITEMS2[0],20000; // Item IDs - 128 max
setarray .ITEMPRICE2[0],25 // Item prices - Should followe ID's order

for(set [email protected],0; [email protected] < getarraysize(.TCG_ITEMS2); set [email protected],[email protected]+1) {
npcshopadditem "TCG_SHOP2",.TCG_ITEMS2[[email protected]],.ITEMPRICE2[[email protected]];
}
end;
}

- shop TCG_SHOP2 -1,909:20

Oh ito, change mo ng iyong script sa ito, kasi ng setarray pwede mag put only 128 values. to add more:

change mo ng "TCG_SHOP2" -> "TCG_SHOP3" , and changing the numbers to add. (sorry tagalog is bad D:)

Okay sige~ Change your script to this~ it can old up to 128 items compared to yours which is only 64 due to only 1 array. this has 2 arrays. 1 for price & 1 for item id. To make a another same npc. Change "TCG_SHOP2" to "TCG_SHOP3", change the number only to make it easier.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.