summaryrefslogtreecommitdiff
path: root/npc/merchants/manuk.txt
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-20 21:21:00 +0000
committereuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-20 21:21:00 +0000
commit830076271d4c670008744fa56951818757816a37 (patch)
tree225e897882a7b238af8d04f6343e4e5ac6740511 /npc/merchants/manuk.txt
parent2b83db91561ffe24b75fa66ed9c4e4c9cfbd50f7 (diff)
downloadhercules-830076271d4c670008744fa56951818757816a37.tar.gz
hercules-830076271d4c670008744fa56951818757816a37.tar.bz2
hercules-830076271d4c670008744fa56951818757816a37.tar.xz
hercules-830076271d4c670008744fa56951818757816a37.zip
* Optimized "Elemental Stone Trader" (merchants\elemental_trader.txt)
* Optimized "Armor Enchanter" (merchants\enchan_arm.txt) * Optimized "Manuk Merchant" (merchants\manuk.txt) * Fixed an incorrect variable in "Thanatos Tower" script, as per bugreport:6073 (quests\thana_quest.txt) * Reverted quests_morocc edit, encoding error? - bugreport:6067 (quests\quests_morocc.txt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16325 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/merchants/manuk.txt')
-rw-r--r--npc/merchants/manuk.txt89
1 files changed, 20 insertions, 69 deletions
diff --git a/npc/merchants/manuk.txt b/npc/merchants/manuk.txt
index e08034d4a..9500a7eb2 100644
--- a/npc/merchants/manuk.txt
+++ b/npc/merchants/manuk.txt
@@ -1,9 +1,9 @@
//===== rAthena Script =======================================
//= Manuk Merchant
//===== By: ==================================================
-//= rAthena dev team
+//= rAthena Dev Team
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -12,84 +12,39 @@
//===== Additional Comments: =================================
//= 1.0 First version
//= 1.1 Fixed checkweight. [Gepard]
+//= 1.2 Optimized. [Euphy]
//============================================================
man_in01,286,16,1 script Merchant of Manuk 454,{
+ mes "[Merchant of Manuk]";
if ((isequipped(2782) == 1) && (ep13_2_rhea == 100)) {
- if (checkweight(1201,1) == 0) {
- mes "[Merchant of Manuk]";
+ if (!checkweight(1201,1)) {
mes "It looks like you're carrying too many things.";
mes "Why not put some of your items in storage and come back?";
close;
}
- mes "[Merchant of Manuk]";
mes "Hello.";
mes "What are you looking for?";
next;
- switch(select("View item description:Manuk's Opportunity:Manuk's Courage:Manuk's Faith:Cancel")) {
- case 1:
- mes "[Merchant of Manuk]";
+ setarray .@Items[2],12342,12343,12348;
+ set .@i, select("View item description:Manuk's Opportunity:Manuk's Courage:Manuk's Faith:Cancel");
+ mes "[Merchant of Manuk]";
+ if (.@i == 1) {
mes "Here are the item descriptions.";
close2;
ReadBook 11019,1;
end;
- case 2:
- mes "[Merchant of Manuk]";
- mes "I can sell you 3 Manuk's Opportunity for^3131FF 1 coin^000000";
- next;
- switch(select("Purchase:Do not purchase.")) {
- case 1:
- if (countitem(6080) > 0) {
- mes "[Merchant of Manuk]";
- mes "Thank you for coming.";
- delitem 6080,1; //Manuk_Coin
- getitem 12342,3; //Manuk's_Opportunity
- close;
- }
- else {
- mes "[Merchant of Manuk]";
- mes "You don't have enough coins.";
- close;
- }
- case 2:
- mes "[Merchant of Manuk]";
- mes "Come again if you change your mind.";
- close;
- }
- case 3:
- mes "[Merchant of Manuk]";
- mes "I can sell you 3 Manuk's Courage for^3131FF 1 coin^000000";
- next;
- switch(select("Purchase:Do not purchase.")) {
- case 1:
- if (countitem(6080) > 0) {
- mes "[Merchant of Manuk]";
- mes "Thank you for coming.";
- delitem 6080,1; //Manuk_Coin
- getitem 12343,3; //Manuk's_Courage
- close;
- }
- else {
- mes "[Merchant of Manuk]";
- mes "You don't have enough coins.";
- close;
- }
- case 2:
- mes "[Merchant of Manuk]";
- mes "Come again if you change your mind.";
- close;
- }
- case 4:
- mes "[Merchant of Manuk]";
- mes "I can sell you 3 Manuk's Faith for^3131FF 1 coin^000000";
+ }
+ else if (.@i < 5) {
+ mes "I can sell you 3 "+getitemname(.@Items[.@i])+" for^3131FF 1 coin^000000.";
next;
- switch(select("Purchase:Do not purchase.")) {
+ switch(select("Purchase:Do not purchase")) {
case 1:
- if (countitem(6080) > 0) {
+ if (countitem(6080)) {
mes "[Merchant of Manuk]";
mes "Thank you for coming.";
- delitem 6080,1; //Manuk_Coin
- getitem 12348,3; //Manuk's_Faith
+ delitem 6080,1;
+ getitem .@Items[.@i],3;
close;
}
else {
@@ -99,19 +54,15 @@ man_in01,286,16,1 script Merchant of Manuk 454,{
}
case 2:
mes "[Merchant of Manuk]";
- mes "Come again if you change your mind.";
- close;
+ break;
}
- case 5:
- mes "[Merchant of Manuk]";
- mes "Come again if you change your mind.";
- close;
}
+ mes "Come again if you change your mind.";
+ close;
}
else {
- mes "[Merchant of Manuk]";
mes "Rtt od d";
mes "Qwo hd is d irr";
close;
}
-}
+} \ No newline at end of file