summaryrefslogtreecommitdiff
path: root/npc/kafras
diff options
context:
space:
mode:
authorevera <evera@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-16 04:33:08 +0000
committerevera <evera@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-16 04:33:08 +0000
commit8a854736a84b90fa3cd8cb487d5e6c375c1ef04a (patch)
treed84d49daf15f6299b33cd0953633eedf0acc3a5a /npc/kafras
parentf161d9dbb231bcf1ed0cfda89eeba5589faf3cd2 (diff)
downloadhercules-8a854736a84b90fa3cd8cb487d5e6c375c1ef04a.tar.gz
hercules-8a854736a84b90fa3cd8cb487d5e6c375c1ef04a.tar.bz2
hercules-8a854736a84b90fa3cd8cb487d5e6c375c1ef04a.tar.xz
hercules-8a854736a84b90fa3cd8cb487d5e6c375c1ef04a.zip
fixed dts, changed kafra_pay, kafra_dungeons, and functions_kafra
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6616 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/kafras')
-rw-r--r--npc/kafras/functions_kafras.txt213
-rw-r--r--npc/kafras/kafras_dungeons.txt2
-rw-r--r--npc/kafras/kafras_pay.txt2
3 files changed, 140 insertions, 77 deletions
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index a210e9a53..4b440d9f9 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -5,7 +5,7 @@
//= eAthena Dev Team
//= Darlskies, Darkchild, Syrus22, Lupus, kobra_k88 (2.0)
//===== Current Version: =====================================
-//= 4.0
+//= 5.1
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
@@ -32,6 +32,7 @@
//= Note: You can change '1337' value to another to raise password protection
//= 5.0 Fixed the close2;....close; end; lines. Who let them slip away? =/ [erKURITA]
//= Also, the kafra upon warp was giving back the zeny. Removed. [erKURITA]
+//= 5.1 Optimized a little, added no tele/save arg's [Evera]
//============================================================
@@ -43,80 +44,140 @@
function script F_Kafra {
set @kafPass, 0;
mes "[Kafra]";
- if(getarg(0)==0) mes "Welcome to Kafra Corp. We will stay with you wherever you go.";
- //Niflheim
- if(getarg(0)==1) mes "Welcome... Kafra Services.... Will be with you even if you die.....";
- //Guilds Castles
- if(getarg(0)==2) mes "Welcome, ^5533FF" + GetGuildName(@GID) + "^000000 members. We will stay with you wherever you go";
- //Amatsu
- if(getarg(0)==3) mes "So, have you come from a faraway land to study our culture, or are you just sightseeing?";
- if(getarg(0)==3) mes "In either case, why not stay awhile?";
- if(getarg(0)==3) mes "The air is eternally heavy with the";
- if(getarg(0)==3) mes "scent of pleasant wildflowers.";
- //Louyang, Ayothaya
- if(getarg(0)==4) mes "With our many Kafra";
- if(getarg(0)==4) mes "service locations, you're never";
- if(getarg(0)==4) mes "far from home.";
+ switch(getarg(0)){
+ default:
+ case 0:
+ mes "Welcome to Kafra Corp. We will stay with you wherever you go.";
+ break;
+ //Niflheim
+ case 1:
+ mes "Welcome... Kafra Services.... Will be with you even if you die.....";
+ break;
+ //Guilds Castles
+ case 2:
+ mes "Welcome, ^5533FF" + GetGuildName(@GID) + "^000000 members. We will stay with you wherever you go";
+ break;
+ //Amatsu
+ case 3:
+ mes "So, have you come from a faraway land to study our culture, or are you just sightseeing?";
+ mes "In either case, why not stay awhile?";
+ mes "The air is eternally heavy with the";
+ mes "scent of pleasant wildflowers.";
+ break;
+ //Louyang, Ayothaya
+ case 4:
+ mes "With our many Kafra";
+ mes "service locations, you're never";
+ mes "far from home.";
+ break;
+ }
next;
M_Menu:
-//Guilds Kafra
- if(getarg(0)==2) menu "-Use Storage",M_FStorage, "-Use Guild Storage",M_GStorage, "-Rent a Cart",M_Cart, "-Use Teleport Service",M_Teleport, "-Cancel",M_End;
-//only Save & Storage
- if(getarg(1)==1) menu "-Save",M_Save,"-Use Storage",M_Storage, "-Cancel",M_End;
-//only Storage
- if(getarg(1)==2) menu "-Use Storage",M_Storage, "-Cancel",M_End;
-//Common w/o teleport
- if(getarg(1)==3) menu "-Save",M_Save, "-Use Storage",M_Storage, "-Rent a Cart",M_Cart, "-Kafra Pass",M_Pass,
- "-Other Information Check",M_Info, "-Cancel",M_End;
-//Common Kafra (with Teleport Notice in Einbroch)
- if(getarg(1)==4) menu "-Save",M_Save, "-Use Storage",M_Storage, "-Use Teleport Service",M_NoTeleport, "-Rent a Cart",M_Cart, "-Kafra Pass",M_Pass,
- "-Other Information Check",M_Info, "-Cancel",M_End;
-//Common Kafra
- menu "-Save",M_Save, "-Use Storage",M_Storage, "-Use Teleport Service",M_Teleport, "-Rent a Cart",M_Cart, "-Kafra Pass",M_Pass,
- "-Other Information Check",M_Info, "-Cancel",M_End;
-
- M_Save:
- return;
- M_Storage:
- callfunc "F_KafStor",0;
- next;
- goto M_Menu;
- M_GStorage:
- callfunc "F_KafStor",1;
- next;
- goto M_Menu;
- //Don't charge for a common Kafra Storage in your Castle
- M_FStorage:
- callfunc "F_KafStor",2;
- next;
- goto M_Menu;
- M_Teleport:
- callfunc "F_KafTele",getarg(0);
- goto M_Menu;
- M_Cart:
- if(callfunc("F_KafCart",getarg(0)) == 1) next;
- goto M_Menu;
- M_Pass:
- if(callfunc("F_KafPass") == 1) next;
- goto M_Menu;
- M_Info:
- callfunc "F_KafInfo",getarg(2);
- goto M_Menu;
- M_End:
- callfunc "F_KafEnd",getarg(0),0;
- end;
- M_NoTeleport:
- mes "[Kafra]";
- mes "Because of the ^FF0000Limited Transport Agreement^000000, the Kafra Corporation cannot provide Teleport Services in the Schwarzwald Republic.";
- next;
- mes "[Kafra]";
- mes "We ask that you please";
- mes "use the Airship Service";
- mes "instead. Thank you for your";
- mes "understanding and cooperation.";
- next;
- goto M_Menu;
+ //Guilds Kafra
+ cleararray @K_Menu0$[0],"",7;
+ if(getarg(0)==2) {
+ setarray @K_Menu0$[0],"-Use Storage","-Use Guild Storage","-Rent a Cart","-Use Teleport Service","-Cancel";
+ }
+ switch(getarg(1)){
+ //only Save & Storage
+ case 1:
+ setarray @K_Menu0$[0],"-Save","-Use Storage","-Cancel";
+ break;
+ //only Storage
+ case 2:
+ setarray @K_Menu0$[0],"-Use Storage","-Cancel";
+ break;
+ //Common w/o teleport
+ case 3:
+ setarray @K_Menu0$[0],"-Save","-Use Storage","-Rent a Cart","-Kafra Pass","-Other Information Check","-Cancel";
+ break;
+ //Case 4 is Einbroch no tele message.
+ //Common w/o save and teleport
+ case 5:
+ setarray @K_Menu0$[0],"-Use Storage","-Rent a Cart","-Kafra Pass","-Other Information Check","-Cancel";
+ break;
+ //Only storage and other info check
+ case 6:
+ setarray @K_Menu0$[0],"-Use Storage","-Other Information Check","-Cancel";
+ //Common Kafra
+ default:
+ setarray @K_Menu0$[0],"-Save","-Use Storage","-Use Teleport Service","-Rent a Cart","-Kafra Pass","-Other Information Check","-Cancel";
+ break;
+ }
+ menu @K_Menu0$[0],K_Menu0,@K_Menu0$[1],K_Menu1,@K_Menu0$[2],K_Menu2,
+ @K_Menu0$[3],K_Menu3,@K_Menu0$[4],K_Menu4,@K_Menu0$[5],K_Menu5,
+ @K_Menu0$[6],K_Menu6,@K_Menu0$[7],K_Menu7;
+ K_Menu0:
+ set @num,0;
+ goto K_Menuf;
+ K_Menu1:
+ set @num,1;
+ goto K_Menuf;
+ K_Menu2:
+ set @num,2;
+ goto K_Menuf;
+ K_Menu3:
+ set @num,3;
+ goto K_Menuf;
+ K_Menu4:
+ set @num,4;
+ goto K_Menuf;
+ K_Menu5:
+ set @num,5;
+ goto K_Menuf;
+ K_Menu6:
+ set @num,6;
+ goto K_Menuf;
+ K_Menu7:
+ set @num,7;
+ K_Menuf:
+ if (@K_Menu0$[@num] == "-Save") return;
+ if (@K_Menu0$[@num] == "-Use Storage"){
+ //Don't charge for a common Kafra Storage in your Castle
+ if(getarg(0) == 2) callfunc "F_KafStor",2;
+ else callfunc "F_KafStor",0;
+ next;
+ goto M_Menu;
+ }
+ if (@K_Menu0$[@num] == "-Use Teleport Service"){
+ if(getarg(1) == 4){ //Check for Einbroch Tele notice
+ mes "[Kafra]";
+ mes "Because of the ^FF0000Limited Transport Agreement^000000, the Kafra Corporation cannot provide Teleport Services in the Schwarzwald Republic.";
+ next;
+ mes "[Kafra]";
+ mes "We ask that you please";
+ mes "use the Airship Service";
+ mes "instead. Thank you for your";
+ mes "understanding and cooperation.";
+ next;
+ goto M_Menu;
+ }
+ callfunc "F_KafTele",getarg(0);
+ goto M_Menu;
+ }
+ if (@K_Menu0$[@num] == "-Rent a Cart"){
+ if(callfunc("F_KafCart",getarg(0)) == 1) next;
+ goto M_Menu;
+ }
+ if (@K_Menu0$[@num] == "-Kafra Pass"){
+ if(callfunc("F_KafPass") == 1) next;
+ goto M_Menu;
+ }
+ if (@K_Menu0$[@num] == "-Other Information Check"){
+ callfunc "F_KafInfo",getarg(2);
+ goto M_Menu;
+ }
+ if (@K_Menu0$[@num] == "-Cancel"){
+ callfunc "F_KafEnd",getarg(0),0;
+ end;
+ }
+ if (@K_Menu0$[@num] == "-Use Guild Storage"){
+ callfunc "F_KafStor",1;
+ next;
+ goto M_Menu;
+ }
+
}
@@ -237,13 +298,15 @@ function script F_KafCart {
if(getarg(0) == 2) goto L_Guild;
mes "[Kafra]";
if(@kafPass==0) mes "The Cart Fee is 800 Zeny. Do you want to Rent a Cart?";
- if(@kafPass==1) mes "Since you're using a Kafra Pass, you can rent a cart for free!";
+ else mes "Since you're using a Kafra Pass, you can rent a cart for free!";
next;
menu "-Rent a Cart.",-, "-Cancel.",M_End;
if(Zeny<800 && kafPass==0) goto sL_CartFee;
- if(@kafPass==0) set Zeny,Zeny-800;
- if(@kafPass==0) set RESRVPTS, RESRVPTS + 48;
+ if(@kafPass==0) {
+ set Zeny,Zeny-800;
+ if(@kafPass==0) set RESRVPTS, RESRVPTS + 48;
+ }
L_Guild:
setcart;
mes "[Kafra]";
diff --git a/npc/kafras/kafras_dungeons.txt b/npc/kafras/kafras_dungeons.txt
index e8c8ef2fb..594b6106f 100644
--- a/npc/kafras/kafras_dungeons.txt
+++ b/npc/kafras/kafras_dungeons.txt
@@ -99,7 +99,7 @@ moc_ruins.gat,61,156,5 script Kafra 114,{
gef_fild10.gat,73,340,4 script Kafra 115,{
cutin "kafra_03",2;
callfunc "F_KafSetOrcCoal";
- callfunc "F_Kafra",0,0,1;
+ callfunc "F_Kafra",0,6,1;
M_Save:
savepoint "gef_fild10.gat",54,326;
diff --git a/npc/kafras/kafras_pay.txt b/npc/kafras/kafras_pay.txt
index ce4467544..4375d0e20 100644
--- a/npc/kafras/kafras_pay.txt
+++ b/npc/kafras/kafras_pay.txt
@@ -48,7 +48,7 @@ payon.gat,175,226,4 script Kafra 116,{
pay_arche.gat,55,123,8 script Kafra 115,{
cutin "kafra_03",2;
callfunc "F_KafSetPay";
- callfunc "F_Kafra",0,0,1;
+ callfunc "F_Kafra",0,5,1;
M_Save:
savepoint "pay_arche.gat",49,144;