summaryrefslogtreecommitdiff
path: root/npc/re/merchants
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-27 20:37:19 +0000
committereuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-27 20:37:19 +0000
commita6df2a0d43963aaeeae2458c08280b9246d085be (patch)
tree5e3bafa4bdaa0f7d698e6fb6a8ba2d166a0975e4 /npc/re/merchants
parent6596b003679c0990d026b0cea82ba8c616d2b8ce (diff)
downloadhercules-a6df2a0d43963aaeeae2458c08280b9246d085be.tar.gz
hercules-a6df2a0d43963aaeeae2458c08280b9246d085be.tar.bz2
hercules-a6df2a0d43963aaeeae2458c08280b9246d085be.tar.xz
hercules-a6df2a0d43963aaeeae2458c08280b9246d085be.zip
* Optimized "3rd Item Seller" script (re\merchants\3rd_trader.txt)
* Optimized Eden Quest lv. 71-85 (re\quests\eden\) * Deleted a duplicate NPC, bugreport:6564 (re\quests\quests_dicastes.txt) * Other small fixes git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16715 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/re/merchants')
-rw-r--r--npc/re/merchants/3rd_trader.txt560
1 files changed, 133 insertions, 427 deletions
diff --git a/npc/re/merchants/3rd_trader.txt b/npc/re/merchants/3rd_trader.txt
index 908bc7ad6..1fac05c49 100644
--- a/npc/re/merchants/3rd_trader.txt
+++ b/npc/re/merchants/3rd_trader.txt
@@ -1,356 +1,179 @@
//===== rAthena Script =======================================
//= 3rd Item Seller
//===== By: ==================================================
-//= Masao
-//= Mercurial
+//= Masao, Mercurial
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= [Aegis Conversion]
-//= Sells some 3rd Job related Items.
+//= Sells some 3rd Job related items.
//===== Additional Comments: =================================
-//= v1.1 Optimized Poison Herb Salesman NPC
-//= v1.0 First Version.
+//= 1.0 First Version.
+//= 1.1 Optimized Poison Herb Salesman NPC
+//= 1.2 Optimized and standardized. [Euphy]
//============================================================
-
job3_guil01,79,96,3 script Poison Herb Salesman::PHS 877,{
-
- // We are unsure about agis script command equivalent please refer to 3rd_trader.sc line 3
- //if( (countitem(1201)>=30000) || checkweight() )
-
- for(set .x,0; .x<getarraysize(.herbs); set .x,.x+1)
- {
- if(!checkweight(.herbs[.x],.maxHerbs))
- {
- mes "- Wait a minute !! -";
- mes "- Currently you're carrying -";
- mes "- too many items with you. -";
- mes "- Please try again -";
- mes "- after you loose some weight. -";
- close;
- }
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 20000) {
+ mes "- Wait a minute !! -";
+ mes "- Currently you're carrying -";
+ mes "- too many items with you. -";
+ mes "- Please try again -";
+ mes "- after you lose some weight. -";
+ close;
}
-
- mes .npcName$;
+ mes "[Poison Herb Salesman]";
mes "I am the professional";
mes "poison herb seller.";
mes "Which one do you want?";
- mes "They cost "+.herbCost[0]+" zeny each!";
- set .herbType,select("Nerium:Rantana:Makulata:Seratum:Scopolia:Amoena:Poison Kit")-1;
+ mes "They cost 4,000 zeny each!";
+ set .@i, select("Nerium:Rantana:Makulata:Seratum:Scopolia:Amoena:Poison Kit")-1;
next;
- if(.herbType==(getarraysize(.herbs)-1))
- {
- mes .npcName$;
- mes "You can only buy";
- mes "1 Poison Kit and it costs "+.herbCost[(getarraysize(.herbs)-1)]+" zeny.";
- mes "Will you buy it?";
-
- switch(select("Yes, I will.:No, I won't."))
- {
- case 1:
- if(Zeny < .poisHerbCost)
- {
- next;
- mes .npcName$;
- mes "Please check the money you have.";
- mes "It doesn't seem like you have enough money.";
- close;
- }
- else
- {
- set Zeny,Zeny-.poisHerbCost;
- getitem .herbs[getarraysize(.herbs)-1],1;
- next;
- mes .npcName$;
- mes "Thank you. See you~!";
- close;
- }
- break;
- case 2:
- next;
- mes "[Poison Herb Salesman]";
- mes "Well, I see. See you~!";
- close;
- break;
- }
- }
- else
- {
- mes .npcName$;
+ if (.@i < 6) {
+ mes "[Poison Herb Salesman]";
mes "How many do you want? You can";
- mes "only buy a maximum of "+.maxHerbs+" ea";
+ mes "only buy a maximum of 2000 ea";
mes "and if you want to cancel, enter '0'.";
- input .herbsCount;
- if(.herbsCount<=0) // check if player canceled herb purchase
- {
- next;
- mes .npcName$;
+ next;
+ input .@amount;
+ mes "[Poison Herb Salesman]";
+ if (.@amount == 0) {
mes "You've cancelled the trade.";
close;
}
- else if(.herbsCount>.maxHerbs) // checks if herbs count exceeds maxHerbs limit
- {
- next;
- mes .npcName$;
+ if (.@amount > 2000) {
mes "Please check the maximum";
mes "amount and then try again.";
close;
}
- else if(.herbsCount+countitem(.herbs[.herbType]) > .maxItemStack) // Check item stack according to Aegis script
- {
- mes "- Wait a minute !! -";
- mes "- Currently you're carrying -";
- mes "- too many items with you. -";
- mes "- Please try again -";
- mes "- after you loose some weight. -";
+ if (Zeny < .@amount*4000) {
+ mes "Please check the money you have.";
+ mes "It doesn't seem like you have enough money.";
close;
}
- else
- {
- if(Zeny<(.herbsCount*.herbCost)) // Check if Zeny is enough
- {
- next;
- mes .npcName$;
- mes "Please check the money you have.";
- mes "It doesn't seem like you have enough money.";
- close;
- }
- else // all requirements are met give the item
- {
- set Zeny,Zeny-(.herbsCount*.herbCost);
- getitem .herbs[.herbType],.herbsCount;
- next;
- mes .npcName$;
- mes "Thank you. See you~!";
- close;
- }
+ set Zeny, Zeny-(.@amount*4000);
+ getitem 7932+.@i,.@amount;
+ mes "Thank you. See you~!";
+ close;
+ } else {
+ mes "[Poison Herb Salesman]";
+ mes "You can only buy";
+ mes "1 Poison Kit and it costs 5,000 zeny.";
+ mes "Will you buy it?";
+ next;
+ if(select("Yes, I will.:No, I won't.") == 2) {
+ mes "[Poison Herb Salesman]";
+ mes "Well, I see. See you~!";
+ close;
}
+ mes "[Poison Herb Salesman]";
+ if (Zeny < 5000) {
+ mes "Please check the money you have.";
+ mes "It doesn't seem like you have enough money.";
+ close;
+ }
+ set Zeny, Zeny-5000;
+ getitem 7931,1;
+ mes "[Poison Herb Salesman]";
+ mes "Thank you. See you~!";
+ close;
}
-OnInit:
-// Initialize Item Id's on script engine Init Event
- set .npcName$,"[Poison Herb Salesman]";
- setarray .herbs[0],7932,7933,7934,7935,7936,7937,7931;
- setarray .herbCost[0],4000,4000,4000,4000,4000,4000,5000;
- set .maxHerbs,2000;
- set .poisHerbCost,5000;
- set .maxItemStack,30000;
}
-
+morocc,190,96,4 duplicate(PHS) Poison Herb Salesman#moc 877
+lhz_in02,16,205,4 duplicate(PHS) Poison Herb Salesman#lhz 877
job3_rune01,90,62,3 script Rune Salesman::runesale 853,{
-
- if(checkweight(1201,1) == 0 || MaxWeight - Weight < 20000)
- {
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 20000) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
mes "- too many items with you. -";
mes "- Please try again -";
- mes "- after you loose some weight. -";
+ mes "- after you lose some weight. -";
close;
}
-
mes "[Rune Salesman]";
mes "Hey, do you need Runes?!";
mes "I sell all kinds of Rune Stones!";
mes "What kind of Rune do you want?";
next;
- switch(select("Buy high-quality Rune Stones.:Buy ordinary Rune Stones."))
- {
- case 1:
- mes "[Rune Salesman]";
+ set .@i, select("Buy high-quality Rune Stones.:Buy ordinary Rune Stones.");
+ mes "[Rune Salesman]";
+ if (.@i == 1) {
mes "High-quality Runes!";
mes "They cost 2,500 zeny each!";
- mes "Tell me how many you want to buy";
- mes "and remember, you can only";
- mes "buy a maximum amount of 2000 ea!";
- next;
- input .@amount;
- if(.@amount == 0)
- {
- mes "[Rune Salesman]";
- mes "You're not buying? Go away!";
- close;
- }
- else if(.@amount > 2000)
- {
- mes "[Rune Salesman]";
- mes "Please check the maximum";
- mes "amount and then come back to me again!";
- close;
- }
- else if(Zeny < .@amount * 2500)
- {
- mes "[Rune Salesman]";
- mes "Money! Money!";
- mes "You are short of money!";
- mes "Check the amount of money you have!!";
- close;
- }
- set .@checkweight,.@amount * 100;
- if (MaxWeight < .@checkweight)
- {
- mes "[Rune Salesman]";
- mes "You're not able to carry it, so why are you trying to buy it?!";
- close;
- }
- set Zeny,Zeny - .@amount * 2500;
- getitem 12734,.@amount;
- mes "[Rune Salesman]";
- mes "You can buy more again.";
- mes "So, see you later.";
- close;
- case 2:
- mes "[Rune Salesman]";
+ setarray .@rune[0],12734,2500;
+ } else {
mes "Ordinary Rune Stones?";
mes "They cost 1,000 zeny each!";
- mes "Tell me how many you want to buy";
- mes "and remember, you can only";
- mes "buy a maximum amount of 2000 ea!";
- next;
- input .@amount;
- if(.@amount == 0)
- {
- mes "[Rune Salesman]";
- mes "You're not buying? Go away!";
- close;
- }
- else if(.@amount > 2000)
- {
- mes "[Rune Salesman]";
- mes "Please check the maximum";
- mes "amount and then come back to me again!";
- close;
- }
- else if(Zeny < .@amount * 1000)
- {
- mes "[Rune Salesman]";
- mes "Money! Money!";
- mes "You are short of money!";
- mes "Check the amount of money you have!!";
- close;
- }
- set .@checkweight,.@amount * 100;
- if (MaxWeight < .@checkweight)
- {
- mes "[Rune Salesman]";
- mes "You're not able to carry it, so why are you trying to buy it?!";
- close;
- }
- set Zeny,Zeny - .@amount * 1000;
- getitem 12737,.@amount;
- mes "[Rune Salesman]";
- mes "You can buy more again.";
- mes "So, see you later.";
+ setarray .@rune[0],12737,1000;
+ }
+ mes "Tell me how many you want to buy";
+ mes "and remember, you can only";
+ mes "buy a maximum amount of 2000 ea!";
+ next;
+ input .@amount;
+ mes "[Rune Salesman]";
+ if (.@amount == 0) {
+ mes "You're not buying? Go away!";
+ close;
+ }
+ if (.@amount > 2000) {
+ mes "Please check the maximum";
+ mes "amount and then come back to me again!";
+ close;
+ }
+ if (Zeny < .@amount*.@rune[1]) {
+ mes "Money! Money!";
+ mes "You are short of money!";
+ mes "Check the amount of money you have!!";
+ close;
+ }
+ if (!checkweight(.@rune[0],.@amount)) {
+ mes "You're not able to carry it, so why are you trying to buy it?!";
close;
}
+ set Zeny, Zeny-(.@amount*.@rune[1]);
+ getitem .@rune[0],.@amount;
+ mes "You can buy more again.";
+ mes "So, see you later.";
+ close;
}
+prontera,168,228,3 duplicate(runesale) Rune Salesman#1 853
job3_guil01,91,93,3 script Rare Herb Collector 49,{
-
- if(checkweight(1201,1) == 0 || MaxWeight - Weight < 20000)
- {
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 20000) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
mes "- too many items with you. -";
mes "- Please try again -";
- mes "- after you loose some weight. -";
+ mes "- after you lose some weight. -";
close;
}
-
- if (Class == 4059 || Class == 4065)
- {
+ if (Class == Job_Guillotine_Cross || Class == Job_Guillotine_Cross_T || Class == Job_Baby_Cross) {
mes "[Rare Poison Herb Collector]";
mes "I wander around the world and collect rare poison herbs. Recently, I am dealing in the herb called Izidor. If you are interested, you can buy them.";
next;
- switch(select("How can I buy them?:Exchange it with Animal Blood:Exchange it with a Bitter Herb:Exchange it with a Deadly Noxious Herb:Exchange it with a Frozen Rose:Exchange it with Ment:Exchange it with Hinalle"))
- {
- case 1:
+ set .@i, select("How can I buy them?:Exchange it with Animal Blood:Exchange it with a Bitter Herb:Exchange it with a Deadly Noxious Herb:Exchange it with a Frozen Rose:Exchange it with Ment:Exchange it with Hinalle")-1;
+ if (.@i == 0) {
mes "[Rare Poison Herb Collector]";
mes "You can buy any of those items for 10,000 zeny: Animal Blood, Bitter Herb, Deadly Noxious Herb, Frozen Rose, Ment or Hinalle. ";
next;
mes "[Rare Poison Herb Collector]";
mes "Why I ask for money? That is just to pay a little respect to a collector like me. Ha ha ha...";
close;
- case 2:
- if ((countitem(702) > 0) && (Zeny > 9999))
- {
- mes "[Rare Poison Herb Collector]";
- mes "Thank you. I've received your payment.";
- delitem 702,1;
- set Zeny,Zeny - 10000;
- getitem 709,1;
- close;
- }
- mes "[Rare Poison Herb Collector]";
- mes "Hey, try again after you've prepared all the requirements for the exchange.";
- close;
- case 3:
- if ((countitem(621) > 0) && (Zeny > 9999))
- {
- mes "[Rare Poison Herb Collector]";
- mes "Thank you. I've received your payment.";
- delitem 621,1;
- set Zeny,Zeny - 10000;
- getitem 709,1;
- close;
- }
- mes "[Rare Poison Herb Collector]";
- mes "Hey, try again after you've prepared all the requirements for the exchange.";
- close;
- case 4:
- if ((countitem(631) > 0) && (Zeny > 9999))
- {
- mes "[Rare Poison Herb Collector]";
- mes "Thank you. I've received your payment.";
- delitem 631,1;
- set Zeny,Zeny - 10000;
- getitem 709,1;
- close;
- }
- mes "[Rare Poison Herb Collector]";
- mes "Hey, try again after you've prepared all the requirements for the exchange.";
- close;
- case 5:
- if ((countitem(749) > 0) && (Zeny > 9999))
- {
- mes "[Rare Poison Herb Collector]";
- mes "Thank you. I've received your payment.";
- delitem 749,1;
- set Zeny,Zeny - 10000;
- getitem 709,1;
- close;
- }
- mes "[Rare Poison Herb Collector]";
- mes "Hey, try again after you've prepared all the requirements for the exchange.";
- close;
- case 6:
- if ((countitem(605) > 0) && (Zeny > 9999))
- {
- mes "[Rare Poison Herb Collector]";
- mes "Thank you. I've received your payment.";
- delitem 605,1;
- set Zeny,Zeny - 10000;
- getitem 709,1;
- close;
- }
+ } else {
+ setarray .@exchange[1],702,621,631,749,605,703;
mes "[Rare Poison Herb Collector]";
- mes "Hey, try again after you've prepared all the requirements for the exchange.";
- close;
- case 7:
- if ((countitem(703) > 0) && (Zeny > 9999))
- {
- mes "[Rare Poison Herb Collector]";
- mes "Thank you. I've received your payment.";
- delitem 703,1;
- set Zeny,Zeny - 10000;
- getitem 709,1;
+ if (!countitem(.@exchange[.@i]) || Zeny < 10000) {
+ mes "Hey, try again after you've prepared all the requirements for the exchange.";
close;
}
- mes "[Rare Poison Herb Collector]";
- mes "Hey, try again after you've prepared all the requirements for the exchange.";
+ mes "Thank you. I've received your payment.";
+ delitem .@exchange[.@i],1;
+ set Zeny, Zeny-10000;
+ getitem 709,1;
close;
}
}
@@ -360,165 +183,48 @@ job3_guil01,91,93,3 script Rare Herb Collector 49,{
}
gef_tower,105,172,5 script Point Salesman#Sorcerer::pss 700,{
-
- if(checkweight(1201,1) == 0 || MaxWeight - Weight < 20000)
- {
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 20000) {
mes "- Wait a minute !! -";
mes "- Currently you're carrying -";
mes "- too many items with you. -";
mes "- Please try again -";
- mes "- after you loose some weight. -";
+ mes "- after you lose some weight. -";
close;
}
-
- mes "[Point Salesman]";
- mes "Hello. I'm selling a catalyst that are called ^FF0000Points^000000 for Sorcerers. What would you like?";
+ mes "[Point Salesman]";
+ mes "Hello. I'm selling a catalyst called ^FF0000Points^000000 for Sorcerers. What would you like?";
next;
- switch(select("Scarlet Points - 200z:Lime Green Points - 200z:Indigo Points - 200z:Yellow Wish Points - 200z:Cancel"))
- {
- case 1:
- mes "[Point Salesman]";
- mes "You have chosen Scarlet Points.";
- mes "How many do you want?";
- mes "If you want to cancel, enter 0.";
- next;
- input .@amount;
- if (.@amount == 0)
- {
- mes "[Point Salesman]";
- mes "You've cancelled the trade.";
- close;
- }
- set .@po_weight,.@amount * 10;
- set .@tt_weight,MaxWeight - .@po_weight;
- set .@po_money,.@amount * 200;
- if (.@tt_weight > 0)
- {
- if (Zeny >= .@po_money)
- {
- set Zeny,Zeny - .@po_money;
- getitem 6360,.@amount;
- mes "[Point Salesman]";
- mes "Thank you very much. See you~!";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't seem to have enough money.";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't have enough space in your inventory to buy this amount.";
+ set .@i, select("Scarlet Points - 200z:Lime Green Points - 200z:Indigo Points - 200z:Yellow Wish Points - 200z:Cancel")-1;
+ mes "[Point Salesman]";
+ if (.@i == 4) {
+ mes "You can't find the stuff you need?";
close;
- case 2:
- mes "[Point Salesman]";
- mes "You have chosen Lime Green Points.";
- mes "How many do you want?";
- mes "If you want to cancel, enter 0.";
- next;
- input .@amount;
- if (.@amount == 0)
- {
- mes "[Point Salesman]";
- mes "You've cancelled the trade.";
- close;
- }
- set .@po_weight,.@amount * 10;
- set .@tt_weight,MaxWeight - .@po_weight;
- set .@po_money,.@amount * 200;
- if (.@tt_weight > 0)
- {
- if (Zeny >= .@po_money)
- {
- set Zeny,Zeny - .@po_money;
- getitem 6363,.@amount;
- mes "[Point Salesman]";
- mes "Thank you very much. See you~!";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't seem to have enough money.";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't have enough space in your inventory to buy this amount.";
+ }
+ setarray .@itemid[0],6360,6363,6361,6362;
+ setarray .@color$[0],"Scarlet","Lime Green","Indigo","Yellow Wish";
+ mes "You have chosen "+.@color$[.@i]+" Points.";
+ mes "How many do you want?";
+ mes "If you want to cancel, enter 0.";
+ next;
+ input .@amount;
+ mes "[Point Salesman]";
+ if (.@amount == 0) {
+ mes "You've cancelled the trade.";
close;
- case 3:
- mes "[Point Salesman]";
- mes "You have chosen Indigo Points.";
- mes "How many do you want?";
- mes "If you want to cancel, enter 0.";
- next;
- input .@amount;
- if (.@amount == 0)
- {
- mes "[Point Salesman]";
- mes "You've cancelled the trade.";
- close;
- }
- set .@po_weight,.@amount * 10;
- set .@tt_weight,MaxWeight - .@po_weight;
- set .@po_money,.@amount * 200;
- if (.@tt_weight > 0)
- {
- if (Zeny >= .@po_money)
- {
- set Zeny,Zeny - .@po_money;
- getitem 6361,.@amount;
- mes "[Point Salesman]";
- mes "Thank you very much. See you~!";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't seem to have enough money.";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't have enough space in your inventory to buy this amount.";
+ }
+ if (Zeny < .@amount*200) {
+ mes "You don't seem to have enough money.";
close;
- case 4:
- mes "[Point Salesman]";
- mes "You have chosen Yellow Wish Points.";
- mes "How many do you want?";
- mes "If you want to cancel, enter 0.";
- next;
- input .@amount;
- if (.@amount == 0)
- {
- mes "[Point Salesman]";
- mes "You've cancelled the trade.";
- close;
- }
- set .@po_weight,.@amount * 10;
- set .@tt_weight,MaxWeight - .@po_weight;
- set .@po_money,.@amount * 200;
- if (.@tt_weight > 0)
- {
- if (Zeny >= .@po_money)
- {
- set Zeny,Zeny - .@po_money;
- getitem 6362,.@amount;
- mes "[Point Salesman]";
- mes "Thank you very much. See you~!";
- close;
- }
- mes "[Point Salesman]";
- mes "You don't seem to have enough money.";
- close;
- }
- mes "[Point Salesman]";
+ }
+ if (!checkweight(.@itemid[.@i],.@amount)) {
mes "You don't have enough space in your inventory to buy this amount.";
close;
- case 5:
- mes "[Point Salesman]";
- mes "You can't find the stuff you need?";
- close;
}
+ set Zeny, Zeny-(.@amount*200);
+ getitem .@itemid[.@i],.@amount;
+ mes "Thank you very much. See you~!";
+ close;
}
-
-
-morocc,190,96,4 duplicate(PHS) Poison Herb Salesman#moc 877
-lhz_in02,16,205,4 duplicate(PHS) Poison Herb Salesman#lhz 877
-prontera,168,228,3 duplicate(runesale) Rune Salesman#1 853
comodo,241,103,6 duplicate(pss) Point Salesman#1 700
alberta,105,52,7 duplicate(pss) Point Salesman#2 700
veins,202,128,6 duplicate(pss) Point Salesman#3 700 \ No newline at end of file