summaryrefslogtreecommitdiff
path: root/npc/008-1/hinnak.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
commitcf18ce071c79ae37e14ea38943e0b1d88da70a7b (patch)
treef9159c9b60b3018300dd22ffba0d797bc5e828e5 /npc/008-1/hinnak.txt
parent8a4bf716002a017de77fe7df301ef8e4aaf00a2e (diff)
downloadserverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.gz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.bz2
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.xz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.zip
Override
Diffstat (limited to 'npc/008-1/hinnak.txt')
-rwxr-xr-x[-rw-r--r--]npc/008-1/hinnak.txt598
1 files changed, 247 insertions, 351 deletions
diff --git a/npc/008-1/hinnak.txt b/npc/008-1/hinnak.txt
index 65d050e7..3672ed93 100644..100755
--- a/npc/008-1/hinnak.txt
+++ b/npc/008-1/hinnak.txt
@@ -1,354 +1,250 @@
-// Evol scripts.
-// Author:
-// gumi, Micksha
-// Quest states:
-// [1] 0 - cannot do the quest
-// [1] 1 - can do the quest
-// [1] 2 - hinnak asked for help
-// [1] 3 - helped hinnak
-// [2] kill counter
-// Description:
-
-// Hinnak needs help to get rid of the same stuff than ever.
-
-008-1,270,74,0 script Hinnak#008-1 NPC_HINNAK,{
-
- if (BaseLevel < .min_level)
- {
- npctalk3 generic(1 | 16 | 64);
- end;
- }
-
- function hinn_new_player
- {
- if(getequipid(EQI_HEAD_TOP) == .bad_hat)
- {
- narrator 4,
- l("The farmer lunges at you with a farming implement.");
- heal -50, 0;
-
- selectd
- l("I'm out of here."),
- l("Whoa, what are you doing?");
-
- if (@menu == 1)
- {
- return;
- }
-
- speech 4 | 1,
- l("Sorry, you look like a pinkie."),
- l("They've been destroying my fields, and I guess I got a bit worked up.");
- }
-
- else
- {
- speech 4,
- l("Argh!"),
- l("I hate them!"),
- l("I @#$% hate them!"),
- l("I @#$% hate these @#$% pinkies!");
-
- selectd
- l("You need some anger control therapy."),
- l("Why do you hate them?");
-
- if (@menu == 1)
- {
- return;
- }
-
- speech 4 | 1,
- l("These @#$% beasts are jumping around in my fields destroying all my harvest."),
- l("But they are too fast."),
- l("I can't catch them.");
- }
-
- selectd
- l("Want me to help you?");
-
- speech 4 | 1,
- l("Yes, you look quite fast."),
- l("Maybe you can catch some of them."),
- l("That will pay them a lesson."),
- l("Slay some of them and bring me %d of their antennae.", .drop_count);
-
- setq .quest, 2, 0;
-
- selectd
- l("How much is this worth to you?");
-
- speech 1,
- l("Well, I can't offer you much."),
- l("But I got an old scythe laying around."),
- l("Maybe you can use it as a weapon.");
-
- close;
- }
-
- function hinn_help
- {
- if (getequipid(EQI_HEAD_TOP) == .bad_hat)
- {
- narrator 4,
- l("The farmer glares at your hat.");
- }
-
- speech 4,
- l("Have you got the %d antennae?", .drop_count);
-
- selectd
- l("Not yet, but I am working on it."),
- rif(countitem(.monster_drop) >= .drop_count, l("Sure, here they are!"));
-
- if (@menu == 1)
- {
- return;
- }
-
- if (getq2(.quest) < .kill_count)
- {
- speech 1,
- l("Don't try to fool me!"),
- l("I know you didn't kill them yourself!"),
- l("Kill at least %d pinkies and come back.", .kill_count);
- close;
- }
-
- speech 1,
- l("Thank you very much"),
- l("As promised, here's my old scythe."),
- l("Maybe you can use it as a weapon."),
- l("It is a bit cumbersome but its strikes are deadly.");
-
- if (countitem(.monster_drop) >= .drop_count)
- {
- delitem .monster_drop, .drop_count;
- getitem .reward_item, 1;
- quest_gp(.maxLevel, .reward_money);
- //getexp .reward_exp, 0;
- setq .quest, 3;
- }
- close;
- }
-
- function hinn_thanks
- {
- if (getequipid(EQI_HEAD_TOP) == .bad_hat)
- {
- speech 4,
- l("That better be a trophy on your head.");
-
- selectd
- l("It is.");
-
- speech 4 | 1,
- l("Good then."),
- l("Thanks for your help with the pinkies.");
- }
-
- else
- {
- speech 4,
- l("Good to see you again."),
- l("Thanks again for helping me with the pinkies!");
- }
-
- selectd
- l("Sure, any time!"),
- l("Anything else you want me to do?"),
- l("You're welcome. Bye!");
-
- if (@menu == 3)
- {
- return;
- }
-
- speech 4 | 1,
- l("Actually, it's been a long day."),
- l("If it's no trouble, could you get me a %s?",
- getitemlink(.drink_item));
-
- selectd
- rif(countitem(.drink_item) >= 1, l("Here you are.")),
- l("Sure, I'll go get one. Bye!"),
- l("You shouldn't drink while working!");
-
- do
- {
- switch (@menu)
- {
- case 2: return;
- case 3:
- speech 1,
- l("Well, I'm done for the day, and I'm quite old enough to decide when I can have a %s, thank you!",
- getitemname(.drink_item));
- selectd
- rif(countitem(.drink_item) >= 1, l("Sorry... here you are.")),
- l("I don't have any.");
- break;
- default:
- if (countitem(.drink_item) < 1)
- {
- return;
- }
- delitem .drink_item, 1;
-
- narrator 4 | 8 | 2 | 1,
- l("%s takes a sip.", .name$);
-
- speech 4,
- l("Aaah!"),
- l("Nothing like a well-deserved %s after a long day of tending the crops!",
- getitemname(.drink_item)),
- l("Thanks, that was very kind of you!");
-
- narrator 4 | 8 | 1 | 2,
- l("He takes another sip.");
-
- speech 4,
- l("Thanks!"),
- l("You know, I had the strangest thing happen to me."),
- l("I had this patch of ground that was really clumpy; lots of clay, you see."),
- l("Right over there."),
- // TODO: move cam to the spot
- l("Looks much better now, doesn't it?"),
- // TODO: restore cam
- l("But how I got there is kind of scary..."),
- l("I'd been trying to break it up for a while, but that kind of work is a pain."),
- l("So my wife said that I should go and see the witch, just in case she knows something."),
- l("And sure enough I ask the witch, and she has a look at it."),
- l("“Nothing I can do”, she says, “but I can ask a friend”."),
- l("So the next day another witch shows up."),
- l("Gorgeous woman, but when she looked at me, the scares went scuttling down my spine..."),
- l("First thing she asked was if I'm a farmer."),
- l("Said her friend had told her that I needed help."),
- l("I show her what the problem is, and she tells me to go inside and wait.");
-
- narrator 4 | 8 | 1 | 2,
- l("%s drains his mug in one long sip, then hesitates.", .name$);
-
- speech 4,
- l("So I go inside."),
- l("I'm barely in when it starts raining outside, pouring cats and mouboos!"),
- l("Not so weird, perhaps, except that it was been bright and sunny just a second before!"),
- l("So I rush out, my wife telling me to leave the witch alone, and I see her standing there in the middle of the rain..."),
- l("None of the raindrops touched her, as if they were afraid!"),
- l("Then she yells out some gobbledygook word, and out of the ground there comes a swarm of maggots, crawling and digging and climbing over each other's backs..."),
- // XXX: maybe here insert a reference to SUSAN?
- l("And then she turns to me!"),
- l("Seeing her gaze, for a moment there I thought she would turn me into a pinkie, for sure..."),
- l("But all she says is, “had you stayed inside, you wouldn't be wet now”.");
-
- selectd
- l("Hahaha!"),
- l("Whoah, scary..."),
- l("What was that gobbledygook word?"),
- l("I better go now. Bye.");
-
- switch (@menu)
- {
- case 1:
- speech 1,
- l("Yeah, funny now..."),
- l("But you should've seen that gaze!"),
- l("Ah, well, never mind.");
- close;
- case 2:
- speech 1,
- l("Yeah, you could say that...");
- close;
- case 3:
- speech 1,
- l("Oh, I can't be sure..."),
- l("But something like “Nanaj princino”, I think."); // this is "Dwarven Princess" translated to Esperanto
- close;
- }
- return;
- }
- } while(true);
- }
-
- // OnTalk:
-
- if (getq(.quest_inspector) == 11)
- {
- selectd
- l("Did you see anyone in a mask come by here at night?"),
- l("Did you see anyone with a large satchel come by here at night?"),
- l("Hello.");
-
- switch (@menu)
- {
- case 1:
- speech
- l("No."),
- l("It tends to be too dark to see a mask.");
- close;
-
- case 2:
- speech
- l("Yes, I saw someone with a large sack on their back go to the mining camp.");
- close;
- }
- }
-
- switch (getq(.quest))
- {
- case 0:
- case 1: hinn_new_player; break;
- case 2: hinn_help; break;
- default: hinn_thanks;
- }
-
- closeclientdialog();
+
+008-1,101,30,0 script Hinnak NPC142,{
+ @inspector = ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
+ if (@inspector == 10) goto L_NohMask;
+ goto L_No_NohMask;
+
+L_No_NohMask:
+ @state = ((QUEST_Hurnscald & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+
+ if (@state == 1) goto L_Exchange;
+ if (@state == 2) goto L_ThanksAgain;
+ if (getequipid(equip_head) == 751) goto L_Intro_Hat;
+
+ mes "[Farmer Hinnak]";
+ mes "\"Argh! I hate them! I @#$% hate them! I @#$% hate these @#$% pinkies!\"";
+ next;
+ menu
+ "You need some anger control therapy.", L_close,
+ "Why do you hate them?", L_Reason;
+
+L_Intro_Hat:
+ mes "The farmer lunges at you with a farming implement.";
+ next;
+ heal -50, 0;
+ menu
+ "I'm out of here.", L_close,
+ "Whoa, what are you doing?", L_Intro_Hat_Explain;
+
+L_Intro_Hat_Explain:
+ mes "[Farmer Hinnak]";
+ mes "\"Sorry, you look like a pinkie. They've been destroying my fields, and I guess I got a bit worked up.\"";
+ next;
+ goto L_Help;
+
+L_Reason:
+ mes "[Farmer Hinnak]";
+ mes "\"These @#$% beasts are jumping around in my fields destroying all my harvest.";
+ mes "But they are too fast. I can't catch them.\"";
+ next;
+ menu
+ "Want me to help you?", L_Help,
+ "Well, life ain't fair.", L_close;
+
+L_Help:
+ mes "[Farmer Hinnak]";
+ mes "\"Yes, you look quite fast. Maybe you can catch some of them. That will pay them a lesson.";
+ mes "Slay some of them and bring me 10 of their antennae.\"";
+ @state = 1;
+ callsub S_Update_Mask;
+ next;
+ menu
+ "Sure, I'm on my way", L_close,
+ "How much is this worth to you?", L_Reward;
+
+L_Reward:
+ mes "[Farmer Hinnak]";
+ mes "\"Well, I can't offer you much. But I got an old scythe laying around. Maybe you can use it as a weapon.\"";
+ goto L_close;
+
+L_Exchange:
+ if (getequipid(equip_head) != 751)
+ goto L_Exchange_Start;
+ mes "The farmer glares at your hat.";
+ next;
+ goto L_Exchange_Start;
+
+L_Exchange_Start:
+ mes "[Farmer Hinnak]";
+ mes "\"Have you got the 10 antennae?\"";
+ next;
+ menu
+ "Not yet, but I am working on it.", L_close,
+ "Sure, here they are!", L_Exchange_Exchange;
+
+L_Exchange_Exchange:
+ if (countitem("PinkAntenna") < 10)
+ goto L_Exchange_Notenough;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("PinkAntenna") > 10)
+ goto L_Exchange_TooMany;
+ delitem "PinkAntenna", 10;
+ getitem "Scythe", 1;
+ @state = 2;
+ callsub S_Update_Mask;
+ mes "[Farmer Hinnak]";
+ mes "\"Thank you very much. I've got something for you. My old scythe. Maybe you can use it as a weapon. It is a bit cumbersome but its strikes are deadly.\"";
+ goto L_close;
+
+L_Exchange_Notenough:
+ mes "[Farmer Hinnak]";
+ mes "\"It doesn't look like you do.\"";
+ goto L_close;
+
+L_Exchange_TooMany:
+ mes "[Farmer Hinnak]";
+ mes "\"Looks like you don't have room for this. Come back later to receive your reward. Hold on to the antennea until then.\"";
+ goto L_close;
+
+L_ThanksAgain:
+ if (getequipid(equip_head) == 751)
+ goto L_ThanksHat;
+ mes "[Farmer Hinnak]";
+ mes "\"Good to see you again, and thanks again for helping me with the pinkies!\"";
+ next;
+ goto L_ThanksMenu;
+
+L_ThanksHat:
+ mes "[Farmer Hinnak]";
+ mes "\"That better be a trophy on your head.\"";
+ menu
+ "It is.", L_Next;
+
+L_Next:
+ mes "[Farmer Hinnak]";
+ mes "\"Good then. Thanks for your help with the pinkies.\"";
+ goto L_ThanksMenu;
+
+L_ThanksMenu:
+ menu
+ "Sure, any time!", L_Next1,
+ "Anything else you want me to do?", L_Next1,
+ "You're welcome. Bye!", L_Bye;
+
+L_Next1:
+ mes "[Farmer Hinnak]";
+ mes "\"Actually, it's been a long day. If it's no trouble, could you get me a beer?\"";
+ next;
+ menu
+ "Here you are.", L_GiveBeer,
+ "Sure, I'll go get one. Bye!", L_Bye,
+ "You shouldn't drink while working!", L_Next2;
+
+L_Next2:
+ mes "[Farmer Hinnak]";
+ mes "\"Well, I'm done for the day, and I'm quite old enough to decide when I can have a beer, thank you!\"";
+ next;
+ menu
+ "Sorry... here you are.", L_GiveBeer,
+ "I don't have any.", L_NoBeer;
+
+L_GiveBeer:
+ if (countitem("Beer") < 1)
+ goto L_NoBeer;
+ delitem "Beer", 1;
+ mes "[Farmer Hinnak]";
+ mes "Hinnak takes a sip.";
+ mes "\"Aaah! Nothing like a well-deserved beer after a long day of tending the crops!\"";
+ mes "\"Thanks, that was very kind of you!\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "He takes another sip.";
+ mes "\"Thanks! You know, I had the strangest thing happen to me. I had this patch of ground that was really clumpy; lots of clay, you see.\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"Right over there.\"";
+ mes "He points to a stretch of soft, raked ground.";
+ mes "\"Looks much better now, doesn't it? But how I got there is kind-a scary...\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"I'd been trying to break it up for a while, but that kind of work is a pain. So my wife said that I should go and see the witch, just in case she knows something.\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"And sure enough I ask the witch, and she has a look at it. 'Nothing I can do', she says, 'but I can ask a friend'.\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"So the next day another witch shows up. Gorgeous woman, but when she looked at me, the scares went scuttling down my spine....\"";
+ mes "\"First thing she asked was if I'm a farmer. Said her friend had told her that I needed help.\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"I show her what the problem is, and she tells me to go inside and wait.\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"Hinnak drains his beer in one long sip, then hesitates.";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"So I go inside. I'm barely in when it starts raining outside, pouring cats and mouboos!\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"Not so weird, perhaps, except that it was been bright and sunny just a second before! So I rush out, my wife telling me to leave the witch alone, and I see her standing there in the middle of the rain...\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"None of the raindrops touched her, as if they was afraid!\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"Then she yells out some gobbledygook word, and out of the ground there comes a swarm of maggots, crawling and digging and climbing over each other's backs...\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"And then she turns to me! Seeing her stare, for a moment there I think that she'll turn me into a pinkie, for sure...\"";
+ next;
+ mes "[Farmer Hinnak]";
+ mes "\"But all she says is, 'if you'd stayed inside, you wouldn't be wet now'.\"";
+ next;
+ menu
+ "Hahaha!", L_Sagatha_hahaha,
+ "Whoah, scary...", L_Sagatha_scary,
+ "What was that gobbledygook word?", L_Sagatha_word,
+ "I better go now.", L_Bye;
+
+L_Sagatha_hahaha:
+ mes "[Farmer Hinnak]";
+ mes "\"Yeah, funny now... But you should've seen that stare! Ah, well, never mind.\"";
+ goto L_close;
+
+L_Sagatha_scary:
+ mes "[Farmer Hinnak]";
+ mes "\"Yeah, you could say that...\"";
+ mes "He stares into his empty beer jug, as if wishing it weren't empty yet.";
+ goto L_close;
+
+L_Sagatha_word:
+ mes "[Farmer Hinnak]";
+ mes "\"Oh, I can't be sure... but something like '" + get(.invocation$, "summon-maggots") + "', I think.\"";
+ goto L_close;
+
+L_NoBeer:
+ mes "[Farmer Hinnak]";
+ mes "\"Ah... no beer? Oh well.\"";
+ goto L_close;
+
+L_Bye:
+ mes "[Farmer Hinnak]";
+ mes "\"Bye!\"";
+ goto L_close;
+
+L_NohMask:
+ menu
+ "Did you see anyone in a mask come by here at night?", L_NohMask_Mask,
+ "Did you see anyone with a large satchel come by here at night?", L_NohMask_Satchel,
+ "Hello.", L_No_NohMask;
+
+L_NohMask_Mask:
+ mes "[Farmer Hinnak]";
+ mes "\"No. It tends to be too dark to see a mask.\"";
+ goto L_close;
+
+L_NohMask_Satchel:
+ mes "[Farmer Hinnak]";
+ mes "\"Yes, I saw someone with a large sack on their back go to the mining camp.\"";
+ goto L_close;
+
+L_close:
+ @state = 0;
+ @inspector = 0;
close;
-OnNPCKillEvent:
- // XXX: maybe have a OnTakeScript on the pinky antena item so we count pickups instead of kills
- if (killedrid == .monster_id && getq(.quest) == 2 &&
- getq2(.quest) < .kill_count && strcharinfo(PC_MAP) == .map$)
- {
- setq .quest, 2, getq2(.quest) + 1;
- }
- end;
-
-OnPCLoginEvent:
-OnPCBaseLvUpEvent:
- if (BaseLevel >= .min_level && getq(.quest) < 1)
- {
- setq .quest, 1; // allow the player to do the quest
- dispbottom l("New quest available: %s (level %d+)",
- getquestlink(.quest), .min_level); // XXX: requires new manaplus versions, maybe show a different message for old versions?
- }
- end;
-
-OnInit:
- .min_level = 15; // min level to do the quest
- .maxLevel = getiteminfo(Scythe, ITEMINFO_ELV) + 20;
- .monster_id = Pinkie; // monster to kill
- .monster_drop = PinkAntennae; // monster drop to collect
- .drop_count = 10; // amount of that drop needed
- .kill_count = 10; // min number of kills
- .reward_item = Scythe; // reward item
- .reward_money = 0; // reward money
- .reward_exp = 0; // reward exp
- .bad_hat = PinkieHat; // hinnak attacks you when you wear this hat
- .drink_item = Beer; // the item hinnak asks to drink
-
- .quest = HurnscaldQuests_Hinnak;
- .quest_inspector = HurnscaldQuests_Inspector;
- .quest_debug = .quest;
- .distance = 3;
-
-////////// UNFINISHED //////////
-////////////////////////////////
-// REMOVE THIS CODE WHEN THIS //
-// NPC IS NO LONGER A WIP //////
-////////////////////////////////
-//if (!debug) disablenpc(.name$);
-///////// UNFINISHED ///////////
-
- end;
+S_Update_Mask:
+ QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_1_MASK)) | (@state << NIBBLE_1_SHIFT);
+ return;
}
-