summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/etc/market.txt39
-rw-r--r--npc/custom/events/kings_items.txt213
-rw-r--r--npc/custom/events/p_track.txt67
-rw-r--r--npc/custom/events/p_track/p_track_core.txt44
-rw-r--r--npc/custom/events/p_track/p_track_warpers.txt72
-rw-r--r--npc/custom/item_signer.txt273
-rw-r--r--npc/custom/quests/valhallen.txt227
7 files changed, 260 insertions, 675 deletions
diff --git a/npc/custom/etc/market.txt b/npc/custom/etc/market.txt
deleted file mode 100644
index d07eabac8..000000000
--- a/npc/custom/etc/market.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-//===== rAthena Script =======================================
-//= Market Place
-//===== By: ==================================================
-//= Lupus
-//===== Current Version: =====================================
-//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
-//= This script should move vending crowds from Prontera
-//= streets to a suitable market place. Save your traffic 8)
-//===== Additional Comments: =================================
-//= 1.1 Optimized it, Removed labels. [Spre]
-//============================================================
-
-prontera,144,174,3 script Market Place 722,{
- mes"[Market Place]";
- mes"Tristan III's order: ^FF0000Move all the private shops to a special Market Place^000000.";
- next;
- if (select("Yes Please:No") == 2) {
- close;
- }
- // I didn't see the need to check and show venders.... Since it didnt even work
- warp "gon_test",27+rand(5),98;
- end;
-}
-
-gon_test,73,103,0 script MarketExit 45,1,2,{
- warp "prontera",155,177-rand(10);
- end;
-}
-
-//disable vending in Prontera
-prontera mapflag novending
-prt_in mapflag novending
-//Market Place settings
-gon_test mapflag noteleport
-gon_test mapflag nomemo
-gon_test mapflag nobranch
diff --git a/npc/custom/events/kings_items.txt b/npc/custom/events/kings_items.txt
index a706e037c..8140827c1 100644
--- a/npc/custom/events/kings_items.txt
+++ b/npc/custom/events/kings_items.txt
@@ -3,176 +3,77 @@
//===== By: ==================================================
//= $ephiroth
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Grand Circlet Quest combined with Excalibur Quest.
-//= Converted to rAthena format from Fusion.
+//===== Additional Comments: =================================
//= 2006/09/27: 1.0 Release and fully working. [$ephiroth]
+//= 1.1 Optimized. [Euphy]
//============================================================
prt_castle,80,170,4 script King of Prontera 108,{
- set @npcname$,"[King of Prontera]";
-
- mes @npcname$;
- mes "Hello can you help me?";
- next;
- menu "Sure, what can I do?",L_Sure,"No sorry I'm busy",L_Quit;
-
-L_Sure:
- mes @npcname$;
- mes "Thank you.";
- mes "Well, my daughter next to me is a little rowdy";
- mes "if you got her these items I'm sure she would calm down.";
- mes "If you bring me these items I'll give you my crown or my sword";
- mes "Both are very special.";
- next;
- menu "Ok what do you need?",L_Req,"I have the items",L_Have,"Forget it",L_Quit;
-
-L_Req:
- mes @npcname$;
- mes "If you could get me:";
- mes "^00B6FF30 Chonchon doll^000000";
- mes "^D5A50050 Poring doll^000000";
- mes "^0080FF20 Yoyo doll^000000";
- mes "^CC66331 3carat diamond^000000";
- mes "^3131FF20 Illusion Flowers^000000";
- mes "^AA00AA20 Singing Flowers^000000";
- mes "I'll give you my crown.";
- next;
- mes @npcname$;
- mes "If you could get me:";
- mes "^0000881 Angel Band^000000";
- mes "^4422FF1 Heaven Ring^000000";
- mes "^AA00AA1 Emperium^000000";
- mes "I'll give my sword.";
- mes "Once you find those, come back to me.";
- close;
-
-L_Have:
- mes @npcname$;
- mes "What item you want?";
- next;
- menu "Crown",L_crown,"Sword",L_sword;
-
-L_crown:
- if(countitem(742)<30) goto L_Error;
- if(countitem(741)<50) goto L_Error1;
- if(countitem(753)<20) goto L_Error2;
- if(countitem(732)<1) goto L_Error3;
- if(countitem(710)<20) goto L_Error4;
- if(countitem(629)<20) goto L_Error5;
- delitem 742,30;
- delitem 741,50;
- delitem 753,20;
- delitem 732,1;
- delitem 710,20;
- delitem 629,20;
- mes @npcname$;
- mes "THANK YOU SOO MUCH!!";
- mes "This will surely calm her down.";
- mes "Let me just take the items from you.";
+ mes "[King of Prontera]";
+ mes "Hello, can you help me?";
next;
- mes @npcname$;
- mes "As I promised here is my crown.";
- getitem 5007,1;
+ if(select("Sure, what can I do?:Sorry, I'm busy.")==2) {
+ mes "[King of Prontera]";
+ mes "Ok, that's fine, I'm sure someone else will help.";
+ close; }
+ mes "[King of Prontera]";
+ mes "Thank you. Well, my daughter next to me is a little rowdy...";
+ mes "If you get her these items I'm sure she'll calm down.";
+ mes "I'll give you my crown or my sword as a reward.";
next;
- mes @npcname$;
- mes "Well, I have to calm her down now.";
- mes "Thanks again!";
- close;
-L_sword:
- if(countitem(2254)<1) goto L_NoAngel;
- if(countitem(2282)<1) goto L_NoHeaven;
- if(countitem(714)<1) goto L_NoEmp;
- delitem 2254,1;
- delitem 2282,1;
- delitem 714,1;
- mes @npcname$;
- mes "THANK YOU SOO MUCH!!";
- mes "This will surely calm her down.";
- mes "Let me just take the items from you.";
- next;
- mes @npcname$;
- mes "As I promised here is my sword.";
- getitem 1137,1;
- next;
- mes @npcname$;
- mes "Well, I have to calm her down now.";
- mes "Thanks again!";
- close;
-
-L_NoAngel:
- mes @npcname$;
- mes "Sorry but you must have at least one Angel Band.";
- mes "Come back after you get ALL the items.";
- close;
-
-L_NoHeaven:
- mes @npcname$;
- mes "Sorry but you must have at least one Heaven Ring.";
- mes "Come back after you get ALL the items.";
- close;
-
-L_NoEmp:
- mes @npcname$;
- mes "Sorry but you must have at least one Emperium.";
- mes "Come back after you get ALL the items.";
- close;
-
-L_Error:
- mes @npcname$;
- mes "Oh darn, you need 30 Chonchon Dolls.";
- close;
-
-L_Error1:
- mes @npcname$;
- mes "Oh darn, you need 50 Poring dolls.";
- close;
-
-L_Error2:
- mes @npcname$;
- mes "Oh darn, you need 20 Yoyo dolls.";
- close;
-
-L_Error3:
- mes @npcname$;
- mes "Oh darn, you need one 3 Carat Diamond.";
- close;
-
-L_Error4:
- mes @npcname$;
- mes "Oh darn, you need 20 Illusion Flowers.";
- close;
-
-L_Error5:
- mes @npcname$;
- mes "Oh darn, you need 20 Singing Flowers.";
- close;
-
-L_Quit:
- mes @npcname$;
- mes "Ok, that's fine, I'm sure someone else will help.";
- close;
+ setarray .@Items1[0],5007,742,30,741,50,753,20,732,1,710,20,629,20;
+ setarray .@Items2[0],1137,2254,1,2282,1,714,1;
+ switch(select("What do you need?:I have the items!:Forget it.")) {
+ case 1:
+ for(set .@i,1; .@i<3; set .@i,.@i+1) {
+ mes "[King of Prontera]";
+ mes "If you could get me:";
+ for(set .@j,1; .@j<getarraysize(getd(".@Items"+.@i)); set .@j,.@j+2)
+ mes " ~ ^0055FF"+getd(".@Items"+.@i+"["+(.@j+1)+"]")+"^000000x "+getitemname(getd(".@Items"+.@i+"["+.@j+"]"));
+ mes "I'll give my "+((.@i)?"sword.":"crown.");
+ if (.@i==2) close;
+ next; }
+ case 2:
+ mes "[King of Prontera]";
+ mes "What item do you want?";
+ next;
+ set .@i, select("Crown:Sword");
+ for(set .@j,1; .@j<getarraysize(getd(".@Items"+.@i)); set .@j,.@j+2)
+ if (countitem(getd(".@Items"+.@i+"["+.@j+"]")) < getd(".@Items"+.@i+"["+(.@j+1)+"]")) set .@nr,1;
+ mes "[King of Prontera]";
+ if (.@nr) {
+ mes "You're missing something.";
+ mes "Come back after you get ALL the items.";
+ close; }
+ for(set .@j,1; .@j<getarraysize(getd(".@Items"+.@i)); set .@j,.@j+2)
+ delitem getd(".@Items"+.@i+"["+.@j+"]"), getd(".@Items"+.@i+"["+(.@j+1)+"]");
+ getitem getd(".@Items"+.@i+"[0]"),1;
+ mes "THANK YOU SOO MUCH!!";
+ mes "This will surely calm her down.";
+ mes "As promised, here is my "+((.@i==1)?"crown.":"sword.");
+ close;
+ case 3:
+ mes "[King of Prontera]";
+ mes "Ok, that's fine, I'm sure someone else will help.";
+ close;
+ }
}
prt_castle,84,170,4 script King's Daughter 62,{
- set @npcname$,"[King's Daughter]";
-
- mes @npcname$;
+ mes "[King's Daughter]";
mes "Hmph, I hate my dad right now!!";
next;
- menu "Why?",L_Why,"Ok...Whatever..",L_Quit;
-
-L_Why:
- mes @npcname$;
+ if(select("Why?:Whatever...")==2) {
+ mes "[King's Daughter]";
+ mes "FINE THEN! Hmph!!";
+ close; }
+ mes "[King's Daughter]";
mes "Well, he won't give me what I want!!";
- mes "He's the King of Prontera, he should be able to get me ANYTHING!!!";
- close;
-
-L_Quit:
- mes @npcname$;
- mes "FINE THEN Hmph!!";
+ mes "He's the King of Prontera. He should be able to get me ANYTHING!!!";
close;
-}
+} \ No newline at end of file
diff --git a/npc/custom/events/p_track.txt b/npc/custom/events/p_track.txt
new file mode 100644
index 000000000..87794ac28
--- /dev/null
+++ b/npc/custom/events/p_track.txt
@@ -0,0 +1,67 @@
+//===== rAthena Script =======================================
+//= Poring Track Main NPCs
+//===== By: ==================================================
+//= erKURITA
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Poring Track core NPCs and warpers.
+//===== Additional Comments: =================================
+//= 1.2 Removed Duplicates [Silent]
+//= 1.3 Merged and cleaned. [Euphy]
+//============================================================
+
+hugel,58,72,5 script Yan#track1 86,{
+ callfunc "P_TrackEnt","[Yan]","p_track01";
+ end;
+}
+hugel,62,68,1 script Yalmire#track1 86,{
+ callfunc "P_TrackEnt","[Yalmire]","p_track02";
+ end;
+}
+
+function script P_TrackEnt {
+ mes getarg(0);
+ mes "Hi "+strcharinfo(0)+", welcome to the Poring Track!";
+ next;
+ switch(select("Information:I want to try it!:Not today.")) {
+ case 1:
+ mes getarg(0);
+ mes "Well... it's quite fun, that's all I can say. Try it!";
+ close;
+ case 2:
+ mes getarg(0);
+ mes "The entrance fee is 500z. would you like to go in?";
+ next;
+ if(select("Yes, please!:No thanks.")==2) {
+ mes getarg(0);
+ mes "You're missing out!";
+ close; }
+ mes getarg(0);
+ if (Zeny < 500) {
+ mes "You can't enter without paying."; close; }
+ mes "Here we go!";
+ close2;
+ set Zeny, Zeny-500;
+ warp getarg(1),75,41;
+ end;
+ case 3:
+ mes getarg(0);
+ mes "See you later!";
+ close;
+ }
+}
+
+p_track01,76,36,2 script Yan#track2 86,{ end; }
+p_track01,41,57,5 script Lady#track1::P_track 845,{ end; }
+p_track01,67,34,6 script Erudite::P_Spectator1 107,{ end; }
+p_track01,44,49,3 script Edward 881,{ end; }
+p_track01,27,47,3 script Yuri#P_track 853,{ end; }
+
+p_track02,76,36,2 script Yalmire#track2 86,{ end; }
+p_track02,30,45,3 script Nagya 755,{ end; }
+p_track02,42,49,3 script Asgahrd 733,{ end; }
+p_track02,67,33,1 script Blacksmith#track1 726,{ end; }
+p_track02,41,57,5 duplicate(P_track) Lady#track2 845 \ No newline at end of file
diff --git a/npc/custom/events/p_track/p_track_core.txt b/npc/custom/events/p_track/p_track_core.txt
deleted file mode 100644
index 9b483fbf6..000000000
--- a/npc/custom/events/p_track/p_track_core.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-//===== rAthena Script =======================================
-//= Poring Track Main NPCs
-//===== By: ==================================================
-//= erKURITA
-//===== Current Version: =====================================
-//= 1.2
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
-//= NPCs that has nothing to do with the race itself, but
-//= has important functions on the race itself.
-//===== Additional Comments: =================================
-//= 1.2 Removed Duplicates [Silent]
-//============================================================
-
-p_track01,41,57,5 script Lady#track1::P_track 845,{
-end;
-}
-
-p_track01,67,34,6 script Erudite::P_Spectator1 107,{
-end;
-}
-
-p_track01,44,49,3 script Edward 881,{
-end;
-}
-
-p_track01,27,47,3 script Yuri#P_track 853,{
-end;
-}
-
-p_track02,30,45,3 script Nagya 755,{
-end;
-}
-
-p_track02,42,49,3 script Asgahrd 733,{
-end;
-}
-
-p_track02,67,33,1 script Blacksmith#track1 726,{
-end;
-}
-
-p_track02,41,57,5 duplicate(P_track) Lady#track2 845
diff --git a/npc/custom/events/p_track/p_track_warpers.txt b/npc/custom/events/p_track/p_track_warpers.txt
deleted file mode 100644
index e3942cbe6..000000000
--- a/npc/custom/events/p_track/p_track_warpers.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-//===== rAthena Script =======================================
-//= Poring Track Warpers
-//===== By: ==================================================
-//= erKURITA
-//===== Current Version: =====================================
-//= 1.2
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
-//= NPC's for the City of Hugel.
-//===== Additional Comments: =================================
-//= 1.2 Removed Duplicates [Silent]
-//============================================================
-
-// Warp-in npcs
-hugel,58,72,5 script Yan#track1 86,{
- //callfunc "P_TrackEnt",npcname,map name;
- callfunc "P_TrackEnt","[Yan]","p_track01";
- end;
-}
-hugel,62,68,1 script Yalmire#track1 86,{
- //callfunc "P_TrackEnt",npcname,map name;
- callfunc "P_TrackEnt","[Yalmire]","p_track02";
- end;
-}
-
-// Warp-out npcs
-p_track01,76,36,2 script Yan#track2 86,{
- end;
-}
-
-p_track02,76,36,2 script Yalmire#track2 86,{
- end;
-}
-
-function script P_TrackEnt {
- mes getarg(0);
- mes "Hi "+strcharinfo(0)+", Welcome to the Poring Track!";
- menu "Information",-,"I want to try it",L_Try,"Not today thanks",L_End;
- next;
- mes getarg(0);
- mes "Bla blah, so fun";
- close;
-L_Try:
- next;
- mes getarg(0);
- mes "Ok, the entrance fee is 500z, would you like to go in?";
- menu "Yes Please",-,"No Thanks",L_End2;
- if (Zeny < 500) {
- next;
- mes getarg(0);
- mes "Sorry but you ain't got 500z, you can't enter";
- close;
- } else
- next;
- mes getarg(0);
- mes "Here we go!";
- close2;
- set Zeny,Zeny-500;
- warp getarg(1),75,41;
- end;
-L_End2:
- next;
- mes getarg(0);
- mes "Oh well, you miss it";
- close;
-L_End:
- next;
- mes getarg(0);
- mes "Ok, see you later!";
- close;
-}
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt
index 99ea97b70..a65e86873 100644
--- a/npc/custom/item_signer.txt
+++ b/npc/custom/item_signer.txt
@@ -3,221 +3,122 @@
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Write you name on your rare equipment or weapon ^_-
//= Original X-Mas mini-quest(could be used as a permanent one)
//===== Additional Comments: =================================
-//=
+//= 1.1 Cleaned and edited for general use. [Euphy]
//============================================================
prt_in,24,61,7 script Perchik 47,{
+
+ setarray .@Item[0],644,3; // Item requirements: <ID>,<Count>{,...} (0 to disable)
+ setarray .@Cost[0],0,5000; // Zeny requirements: <base price>,<price per refine>
+
mes "[Perchik]";
- if(BaseJob==Job_Novice || BaseLevel<50) {
- mes "Sorry, I don't help newbies. Go kill more Porings.";
- emotion e_sry;
- close;
- }
- mes "Hi, I can ^000090sign your name^000000 on almost any rare item you can hold.";
- next;
- menu "Tell me more...",-, "Sign my items, please",M_DO;
-
- mes "[Perchik]";
- mes "I can put your name on any slotless equipment or weapon.";
- emotion e_ic;
+ mes "I can ^0055FFsign your name^000000 on almost any rare item you hold.";
next;
- mes "[Perchik]";
- mes "A week ago, my BOSS told me to send away newbies. I dunno why.";
- next;
- mes "[Perchik]";
- mes "For my work I accept ^0000803 Gift Box^000000es (gray one)";
- mes "plus ^FF00005000z^000000 per each refine of your item.";
- next;
- emotion e_cry;
- mes "[Perchik]";
- mes "Alas, I have 12 hungry children";
- mes "and a very angry wife.";
- next;
- mes "[Perchik]";
- mes "Or it was... 12 angry children";
- mes "and a very hungry wife...";
- emotion e_hmm;
- close;
-
-M_DO:
+ if(select("Tell me more...:Sign my items, please!")==1) {
+ mes "[Perchik]";
+ mes "I can put your name on any slotless equipment or weapon.";
+ emotion e_ic;
+ next;
+ mes "[Perchik]";
+ if (getarraysize(.@Item) || getarraysize(.@Cost)) {
+ mes "For my work I accept:";
+ if (getarraysize(.@Item))
+ for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2)
+ mes " ~ "+.@Item[.@i+1]+"x "+getitemname(.@Item[.@i]);
+ if (.@Cost[0]) mes " ~ "+.@Cost[0]+" Zeny";
+ if (.@Cost[1]) mes " ~ "+.@Cost[1]+" Zeny per refine"; }
+ else mes "I work for free, but...";
+ next;
+ emotion e_cry;
+ mes "[Perchik]";
+ mes "Alas, I have 12 hungry children";
+ mes "and a very angry wife.";
+ next;
+ mes "[Perchik]";
+ mes "Or it was 12 angry children";
+ mes "and a very hungry wife...";
+ emotion e_hmm;
+ close; }
mes "[Perchik]";
mes "Show me your items to sign...";
-M_MENU:
next;
- menu getequipname(1),M_PART1,getequipname(9),M_PART9,getequipname(10),M_PART10,getequipname(2),M_PART2,getequipname(4),M_PART4,
- getequipname(3),M_PART3,getequipname(5),M_PART5,getequipname(6),M_PART6,getequipname(7),M_PART7,getequipname(8),M_PART8;
-
- //Head Gear
-M_PART1:
- set @part,1;
- if (getequipisequiped(1)) goto L_CHECK1;
- mes "[Perchik]";
- mes "A bald head under a cheap wig... There's nothing worthy to sign.";
- emotion 6;
- goto M_MENU;
-M_PART9:
- set @part,9;
- if (getequipisequiped(9)) goto L_CHECK1;
- mes "[Perchik]";
- mes "Glasses... I can't see any glasses...";
- emotion 20;
- goto M_MENU;
-M_PART10:
- set @part,10;
- if (getequipisequiped(10)) goto L_CHECK1;
- mes "[Perchik]";
- mes "I don't see any mask here.";
- emotion 20;
- goto M_MENU;
- //Armor
-M_PART2:
- set @part,2;
- if (getequipisequiped(2)) goto L_CHECK1;
- mes "[Perchik]";
- mes "Your belly...? Yes, it's rather fat.";
- emotion 6;
- goto M_MENU;
- //Left Hand
-M_PART3:
- set @part,3;
- if (getequipisequiped(3)) goto L_CHECK1;
- mes "[Perchik]";
- mes "Sign your left hand? I'm not a celebrity, you know...";
- emotion 4;
- goto M_MENU;
- //Right Hand
-M_PART4:
- set @part,4;
- if (getequipisequiped(4)) goto L_CHECK1;
- mes "[Perchik]";
- mes "It isn't an armor... It's a mud!!! Wash your hands more often.";
- emotion 4;
- goto M_MENU;
- //Garment
-M_PART5:
- set @part,5;
- if (getequipisequiped(5)) goto L_CHECK1;
- mes "[Perchik]";
- mes "Look... It's empty...";
- goto M_MENU;
- //Foot Gear
-M_PART6:
- set @part,6;
- if (getequipisequiped(6)) goto L_CHECK1;
- mes "[Perchik]";
- mes "Aw!! I don't like stinky feet.";
- emotion 16;
- goto M_MENU;
- //Accessory1
-M_PART7:
- set @part,7;
- if (getequipisequiped(7)) goto L_CHECK1;
- mes "[Perchik]";
- mes "Yep... a pocket with a huge hole...";
- emotion 20;
- goto M_MENU;
- //Accessory2
-M_PART8:
- set @part,8;
- if (getequipisequiped(8)) goto L_CHECK1;
- mes "[Perchik]";
- mes "I see your fat belly...";
- emotion 20;
- goto M_MENU;
-
-L_CHECK1:
- set @ref,0;
- set @id,getequipid(@part);
- if(getequipisidentify(@part)) goto L_CHECK2;
- mes "[Perchik]";
- mes "How could you equip such unknown item?";
- npctalk "What a sneaky cheater!";
- emotion e_wah;
- close;
-
-L_CHECK2:
- set @ref,getequiprefinerycnt(@part);
- mes "[Perchik]";
- mes "You want me to sign your "+getitemname(@id)+"...";
- if(BaseJob==Job_Novice) {
- mes "But you're a Novice. My BOSS told me to send such weaklings away.";
- emotion e_sry;
- goto M_MENU;
- }
- set @slot0,getequipcardid(@part,0);
- set @slot1,getequipcardid(@part,1);
- set @slot2,getequipcardid(@part,2);
- set @slot3,getequipcardid(@part,3);
-
- if(@slot0==255 || @slot0==254 || @slot0<0) {
+ setarray .@pos$[1],"Upper Headgear","Armor","Left hand","Right hand","Garment","Footgear","Left Accessory","Right Accessory","Mid Headgear","Lower Headgear";
+ set .@menu$,"";
+ for (set .@i,1; .@i<=10; set .@i,.@i+1) {
+ if (getequipisequiped(.@i))
+ set .@menu$, .@menu$+.@pos$[.@i]+" [^0055FF"+getequipname(.@i)+"^000000]";
+ set .@menu$, .@menu$+":"; }
+ set .@part, select(.@menu$);
+ set .@id, getequipid(.@part);
+ set .@ref, getequiprefinerycnt(.@part);
+ mes "[Perchik]";
+ if (!getequipisequiped(.@part)) {
+ mes "Nothing is equipped there!";
+ emotion e_wah;
+ close; }
+ for(set .@i,0; .@i<4; set .@i,.@i+1)
+ set .@slot[.@i], getequipcardid(.@part,.@i);
+ if (.@slot[0]==255 || .@slot[0]==254 || .@slot[0]<0) {
mes "Alas, this item's already signed.";
- mes "I would never touch masters work.";
+ mes "I would never touch a master's work.";
emotion e_hmm;
- goto M_MENU;
- }
- if(@slot0>4000 && @slot0<5000) {
+ close; }
+ if (.@slot[0]>4000 && .@slot[0]<5000) {
mes "A card? Here?!";
mes "As I said before, I don't sign items with cards.";
emotion e_hmm;
- goto M_MENU;
- }
- if(getiteminfo(@id,10)) {
- mes "Sorry. I don't sign slotted items.";
+ close; }
+ if (getiteminfo(.@id,10)) {
+ mes "Sorry, I don't sign slotted items.";
emotion e_sry;
- goto M_MENU;
- }
+ close; }
getinventorylist;
- for (set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){
- if(@inventorylist_expire[.@i] != 0) {
+ for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)
+ if (@inventorylist_expire[.@i] != 0) {
mes "Sorry, I don't sign rental items!";
emotion e_hmm;
- goto M_MENU;
- }
- }
-
- if(@ref)mes "It has been refined "+@ref+" times... Adding ^FF00005000z^000000 per time.";
- mes "Give me ^0000803 gray Gift Boxes^000000";
- if(@ref)mes "and ^FF0000"+(5000*@ref)+"z^000000.";
+ close; }
+ set .@price, .@Cost[0]+(.@Cost[1]*.@ref);
+ if (getarraysize(.@Item) || .@price) {
+ mes "I will need:";
+ if (getarraysize(.@Item))
+ for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2) {
+ mes " ~ "+.@Item[.@i+1]+"x "+getitemname(.@Item[.@i]);
+ if (countitem(.@Item[.@i]) < .@Item[.@i+1]) set .@nr,1; }
+ if (.@price) mes " ~ "+.@price+" Zeny"; }
+ mes "Shall I sign your ^0055FF"+getitemname(.@id)+"^000000?";
next;
- menu "Ok!",-, "Leave",M_END;
- if(Zeny>=(5000*@ref) && countitem(644)>=3) {
- delitem 644,3;
- set Zeny,Zeny-(5000*@ref);
- goto L_MAKE;
- }
- mes "[Perchik]";
- mes "I don't work for 'thanks'.";
- emotion e_sry;
- close;
-
-L_MAKE:
- if(countitem2(@id,1,@ref,0,@slot0,@slot1,@slot2,@slot3)==0) {
+ if(select("Ok!:Leave")==2) {
mes "[Perchik]";
- mes "Where is... "+getitemname(@id)+"?";
+ mes "See you...";
+ emotion e_yawn;
+ close; }
+ mes "[Perchik]";
+ if (Zeny < .@price || .@nr) {
+ mes "I don't work for 'thanks'.";
+ emotion e_sry;
+ close; }
+ if (!countitem2(.@id,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3])) {
+ mes "Where is "+getitemname(@id)+"...?";
npctalk "You're a snoozy cheater!";
logmes "CHEATER: Tried to sign an item not having it: "+getitemname(@id);
emotion e_wah;
- close;
- }
- delitem2 @id,1,1,@ref,0,@slot0,@slot1,@slot2,@slot3;
-
- mes "[Perchik]";
+ close; }
+ if (.@price) set Zeny, Zeny-.@price;
+ if (getarraysize(.@Item))
+ for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2)
+ delitem .@Item[.@i], .@Item[.@i+1];
+ delitem2 .@id,1,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3];
mes "Done!";
emotion e_proud;
-
- getitem2 @id,1,1,@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
- close;
-
-M_END:
- mes "[Perchik]";
- mes "See you...";
- emotion e_yawn;
+ getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
+ equip .@id;
close;
}
diff --git a/npc/custom/quests/valhallen.txt b/npc/custom/quests/valhallen.txt
index e976640cc..19480b105 100644
--- a/npc/custom/quests/valhallen.txt
+++ b/npc/custom/quests/valhallen.txt
@@ -1,197 +1,68 @@
//===== rAthena Script =======================================
-//= Valhallen items Quests NPC
+//= Valhallen Items Quests NPC
//===== By: ==================================================
//= Avaji
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
-//= All-in-one: Mjollnir,Sleipnir,Brisingammen,Gleipnir,Megingjard
-//===== Additional Comments: =================================
+//= All-in-one: Mjolnir,Sleipnir,Brisingamen,Gleipnir,Megingjard
//= Custom quest, ingredients based on official RO FAQ
+//===== Additional Comments: =================================
+//= 1.1 Optimized. [Euphy]
//============================================================
prontera,147,171,5 script Lenneth 811,{
mes "[Lenneth]";
mes "I come from Valhalla to aid you.";
- mes "I can transmute for you many of the Valhallen items.";
- mes "Although they require many rare elements to make.";
- next;
- mes "[Lenneth]";
- mes "What would you like?";
- next;
- menu "Mjollnir",-,"Sleipnir",L_SLE,"Brisingammen",L_BRI,"Gleipnir",L_GLE,"Megingjard",L_MEG;
-
- mes "[Lenneth]";
- mes "^3355FFMjollnir^000000 is the mighty Hammer of Thor.";
- mes "The items I need to transmute 2 ^3355FFSpanners^000000 into ^3355FFMjollnir^000000 are as follows:";
- mes "20 ^3355FFOridecon^000000 5 ^3355FFElunium^000000 and 40 ^3355FFGold^000000";
- mes "I also need the following essences:";
- mes "2 ^3355FFThor's Guntlet^000000";
- mes "4 ^3355FFIron Maiden^000000";
- mes "5 ^3355FFWrath of Valkyrie^000000";
- mes "5 ^3355FFBreath of Soul^000000";
- mes "5 ^3355FFOmen of tempest^000000";
- next;
- mes "[Lenneth]";
- mes "Do you desire ^3355FFMjollnir^000000?";
- next;
- menu "Yes",-,"No",L_OUT;
-
- if(countitem(984) < 20 || countitem(985) < 5 || countitem(969) < 40 || countitem(1531) < 2 || countitem(7089) < 5
- || countitem(7074) < 2 || countitem(7075) < 4 || countitem(7078) < 5 || countitem(7087) < 5) goto L_NOTENOUGH;
-
- delitem 984,20;
- delitem 985,5;
- delitem 969,40;
- delitem 1531,2;
- delitem 7074,2;
- delitem 7075,4;
- delitem 7078,5;
- delitem 7087,5;
- delitem 7089,5;
-
- getitem 1530,1;
-
- mes "[Lenneth]";
- mes "Here is your ^3355FFMjollnir^000000, may it serve you well.";
- close;
-L_SLE:
-
- mes "[Lenneth]";
- mes "^3355FFSleipnir^000000 are boots made after Odin's War Horse.";
- mes "To be able to transmute 2 ^3355FFBoots^000000 into ^3355FFSleipnir^000000 I will need:";
- mes "1 ^3355FFOridecon^000000 10 ^3355FFElunium^000000 and 20 ^3355FFGold^000000";
- mes "I also need the following essences:";
- mes "3 ^3355FFWheel of the Unknown^000000";
- mes "5 ^3355FFFeather of Angel^000000";
- mes "3 ^3355FFSprirt of Fish^000000";
- mes "3 ^3355FFEmblem of the Sun God^000000";
+ mes "I can transmute for you many of the Valhallen items,";
+ mes "although they require many rare elements to make.";
next;
- mes "[Lenneth]";
- mes "Do you desire ^3355FFSleipnir^000000?";
+ switch(select("Mjolnir:Sleipnir:Brisingamen:Gleipnir:Megingjard")) {
+ case 1:
+ mes "[Lenneth]";
+ mes "^3355FFMjolnir^000000 is the mighty Hammer of Thor.";
+ setarray .@Items[0],1530,1531,2,984,20,985,5,969,40,7074,2,7075,4,7078,5,7087,5,7089,5;
+ break;
+ case 2:
+ mes "[Lenneth]";
+ mes "^3355FFSleipnir^000000 are boots made after Odin's War Horse.";
+ setarray .@Items[0],2410,2406,2,984,1,969,20,985,10,7076,3,7079,5,7083,3,7086,3;
+ break;
+ case 3:
+ mes "[Lenneth]";
+ mes "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty.";
+ setarray .@Items[0],2630,2603,1,726,2,722,3,727,10,723,5,969,20,7073,4,7077,4,7088,3,7090,3,7092,3;
+ break;
+ case 4:
+ mes "[Lenneth]";
+ mes "The ^3355FFGleipnir^000000 is a light yet strong rope required to make ^3355FFMegingjard^000000";
+ setarray .@Items[0],7058,7080,4,7081,5,7082,4,7084,3,7085,3;
+ break;
+ case 5:
+ mes "[Lenneth]";
+ mes "The ^3355FFMegingjard^000000 is the powerful Belt of Thor.";
+ setarray .@Items[0],2629,7058,1,2627,1,969,10,726,10,984,5;
+ break; }
+ mes "^FF0000The items I need are as follows:^000000";
+ for(set .@i,1; .@i<getarraysize(.@Items[0]); set .@i,.@i+2) {
+ mes " ~ "+.@Items[.@i+1]+"x ^3355FF"+getitemname(.@Items[.@i])+"^000000";
+ if (countitem(.@Items[.@i]) < .@Items[.@i+1]) set .@nr,1; }
+ if (.@nr) close;
next;
- menu "Yes",-,"No",L_OUT;
-
- if(countitem(969) < 20 || countitem(985) < 10 || countitem(984) < 1 || countitem(2406) < 2 || countitem(7076) < 3
- || countitem(7079) < 5 || countitem(7083) < 3 || countitem(7086) < 3) goto L_NOTENOUGH;
-
- delitem 969,20;
- delitem 985,10;
- delitem 984,1;
- delitem 2406,2;
- delitem 7076,3;
- delitem 7079,5;
- delitem 7083,3;
- delitem 7086,3;
-
- getitem 2410,1;
-
mes "[Lenneth]";
- mes "Here is your ^3355FFSleipnir^000000, may they help you.";
- close;
-L_BRI:
-
- mes "[Lenneth]";
- mes "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty.";
- mes "The items I need to transmute a ^3355FFNecklace^000000 into ^3355FFBrisingammen^000000 are as follows:";
- mes "2 ^3355FFSapphire^000000 3 ^3355FFPearl^000000 10 ^3355FFOpal^000000";
- mes "5 ^3355FFRuby^000000 and 20 ^3355FFGold^000000";
- mes "I also need the following essences:";
- mes "4 ^3355FFFreya's Jewel^000000";
- mes "4 ^3355FFSilver Ornament^000000";
- mes "3 ^3355FFSnow Crystal^000000";
- mes "3 ^3355FFQuiet Wave^000000";
- mes "3 ^3355FFDrifting Air^000000";
+ mes "Do you desire ^3355FF"+getitemname(.@Items[0])+"^000000?";
next;
- mes "[Lenneth]";
- mes "Do you desire ^3355FFBrisingammen^000000?";
- next;
- menu "Yes",-,"No",L_OUT;
-
- if(countitem(969) < 20 || countitem(723) < 5 || countitem(727) < 10 || countitem(722) < 3 || countitem(726) < 2
- || countitem(7090) < 3 || countitem(7088) < 3 || countitem(7077) < 4 || countitem(7073) < 4 || countitem(2603) < 1
- || countitem(7092) < 3) goto L_NOTENOUGH;
-
- delitem 726,2;
- delitem 722,3;
- delitem 727,10;
- delitem 723,5;
- delitem 969,20;
- delitem 2603,1;
- delitem 7073,4;
- delitem 7077,4;
- delitem 7088,3;
- delitem 7090,3;
- delitem 7092,3;
-
- getitem 2630,1;
-
- mes "[Lenneth]";
- mes "Here is ^3355FFBrisingammen^000000, may it serve you well.";
- close;
-L_GLE:
-
- mes "[Lenneth]";
- mes "The ^3355FFGleipnir^000000 is a light yet strong rope required to make ^3355FFMegingjard^000000";
- mes "I will need the following essences to transmute ^3355FFGleipnir^000000:";
- mes "4 ^3355FFTread of Cat^000000";
- mes "5 ^3355FFWoman's Moustache^000000";
- mes "4 ^3355FFStone Fragment^000000";
- mes "3 ^3355FFSaliva of Bird^000000";
- mes "3 ^3355FFSinew of Bear^000000";
- next;
- mes "[Lenneth]";
- mes "Do you desire ^3355FFGleipnir^000000?";
- next;
- menu "Yes",-,"No",L_OUT;
-
- if(countitem(7085) < 3 || countitem(7084) < 3 || countitem(7082) < 4 || countitem(7081) < 5 || countitem(7080) < 4) goto L_NOTENOUGH;
-
- delitem 7080,4;
- delitem 7081,5;
- delitem 7082,4;
- delitem 7084,3;
- delitem 7085,3;
-
- getitem 7058,1;
-
- mes "[Lenneth]";
- mes "Here is your ^3355FFGleipnir^000000.";
- close;
-L_MEG:
-
- mes "[Lenneth]";
- mes "The ^3355FFMegingjard^000000 is the powerful Belt of Thor.";
- mes "To transmute a ^3355FFBelt^000000 into ^3355FFMegingjard^000000 I will need the following:";
- mes "10 ^3355FFGold^000000 10 ^3355FFSapphire^000000";
- mes "5 ^3355FFOridecon^000000 and 1 ^3355FFGleipnir^000000";
- next;
- mes "[Lenneth]";
- mes "Do you desire ^3355FFMegingjard^000000?";
- next;
- menu "Yes",-,"No",L_OUT;
-
- if(countitem(2627) < 1 || countitem(984) < 5 || countitem(726) < 10 || countitem(969) < 10 || countitem(7058) < 1) goto L_NOTENOUGH;
-
- delitem 7058,1;
- delitem 969,10;
- delitem 726,10;
- delitem 984,5;
- delitem 2627,1;
-
- getitem 2629,1;
-
- mes "[Lenneth]";
- mes "Here is ^3355FFMegingjard^000000, may it serve you well.";
- close;
-L_NOTENOUGH:
- mes "[Lenneth]";
- mes "You are lacking a few items, please return when you have them.";
- close;
-L_OUT:
- mes "[Lenneth]";
- mes "Please return when you change your mind.";
+ if(select("Yes:No")==2) {
+ mes "[Lenneth]";
+ mes "Please return if you change your mind.";
+ close; }
+ mes "[Lenneth]";
+ mes "Here is your ^3355FF"+getitemname(.@Items[0])+"^000000.";
+ mes "May it serve you well.";
+ for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2)
+ delitem .@Items[.@i], .@Items[.@i+1];
+ getitem .@Items[0],1;
close;
}