From 1e334415e133227831b6a7572c950dc4fcfeb516 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 22 May 2018 11:11:59 -0300 Subject: Marriage stuff, Wedding ring HP bonus only triggers if married. --- npc/009-1/Luanna.txt | 30 ++++++++++++++++++++++++++++++ npc/009-1/_import.txt | 1 + npc/functions/marriage.txt | 17 ++++++++++------- 3 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 npc/009-1/Luanna.txt (limited to 'npc') diff --git a/npc/009-1/Luanna.txt b/npc/009-1/Luanna.txt new file mode 100644 index 000000000..94e6d5b70 --- /dev/null +++ b/npc/009-1/Luanna.txt @@ -0,0 +1,30 @@ +// TMW2 Script +// Author: +// Jesusalva, 4144 +// Description: +// Luanna is responsible for marriage. Temporary location. Subject to change stuff later. + +009-1,107,32,0 script Luanna NPC_PLAYER_F,{ + marriagemain(); + close; + +OnTimer30000: + marriagecheck(); + end; + +OnInit: + .@npcId = getnpcid(0, .name$); + setunitdata(.@npcId, UDT_HEADTOP, NPCEyes); + setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper); + setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers); + setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots + setunitdata(.@npcId, UDT_HAIRSTYLE, 10); + setunitdata(.@npcId, UDT_HAIRCOLOR, 5); + + .sex = G_FEMALE; + .distance = 5; + initnpctimer; + + end; + +} diff --git a/npc/009-1/_import.txt b/npc/009-1/_import.txt index 3d92f071c..dea903394 100644 --- a/npc/009-1/_import.txt +++ b/npc/009-1/_import.txt @@ -1,5 +1,6 @@ // Map 009-1: Halinarzo // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/009-1/Luanna.txt", "npc/009-1/_mobs.txt", "npc/009-1/_warps.txt", "npc/009-1/barzil.txt", diff --git a/npc/functions/marriage.txt b/npc/functions/marriage.txt index 4d4ae2737..0bd9e9c59 100644 --- a/npc/functions/marriage.txt +++ b/npc/functions/marriage.txt @@ -1,6 +1,8 @@ +// TMW-2 Script // Evol functions. // Author: // 4144 +// Jesusalva // Description: // Functions for marriage @@ -99,7 +101,7 @@ function script ismarriagepartneraccepted { if (.@partner$ == "") return false; if (readparam(Sex, strcharinfo(0)) == readparam(Sex, .@partner$)) { - // Blame Jesusalva + // Blame Jesusalva. I am sensing various other possible bugs. Let's play safe. return false; } .@name$ = getmarriagepartneraccepted(); @@ -140,7 +142,7 @@ function script marriageregister { marriageregisterself(); next; speech lg("Now wait for your partner, then talk to me again."); - npctalk l("@@ registered for marriage. Waiting for partner...", strcharinfo(0)); + npctalk l("@@ waits for their loved one.", strcharinfo(0)); close; } else @@ -149,8 +151,8 @@ function script marriageregister { { marriageregisterself(); marriageacceptpartner(.@partner$); - npctalk l("@@ registered for marriage and accepted partner @@!", strcharinfo(0), .@partner$); - npctalk l("Waiting for @@...", .@partner$); + npctalk3 l("@@ registered for marriage and accepted partner @@!", strcharinfo(0), .@partner$); + npctalk3 l("Waiting for @@...", .@partner$); close; } else @@ -177,11 +179,12 @@ function script domarriage { if (marriage(.@partner$)) { speech l("You got married to @@!", .@partner$); - npctalk l("@@ and @@ just got married!", .@name$, .@partner$); + mapannounce "009-1", l("@@ and @@ just got married!", .@name$, .@partner$), bc_map; + specialeffect 6; } else { - npctalk l("Marriage failed."); + speech l("Marriage failed."); } marriageclear(); return; @@ -264,7 +267,7 @@ function script marriagedivorce { function script marriagemain { if (Sex > 1) { - speech l("Sorry i can't help you. Go away!"); + speech l("Sorry, I can't help you. Go away!"); close; } -- cgit v1.2.3-70-g09d2