From 755cbff12b641ad3384f993ec8802c63e433794d Mon Sep 17 00:00:00 2001 From: b5635 Date: Mon, 11 Sep 2023 23:25:00 -0700 Subject: [PATCH] fixed luskan warden scripts --- src/git/luskan_south.git.json | 4 ++-- src/nss/area_enter.nss | 2 +- src/nss/hb_warden.nss | 2 +- src/nss/luskan_enter.nss | 9 --------- src/nss/luskan_hb.nss | 15 +++++++++++++++ 5 files changed, 19 insertions(+), 13 deletions(-) delete mode 100644 src/nss/luskan_enter.nss create mode 100644 src/nss/luskan_hb.nss diff --git a/src/git/luskan_south.git.json b/src/git/luskan_south.git.json index 450d5607..6f8ea7dd 100644 --- a/src/git/luskan_south.git.json +++ b/src/git/luskan_south.git.json @@ -724278,7 +724278,7 @@ "__struct_id": 0, "Name": { "type": "cexostring", - "value": "enter_script" + "value": "heartbeat_script" }, "Type": { "type": "dword", @@ -724286,7 +724286,7 @@ }, "Value": { "type": "cexostring", - "value": "luskan_enter" + "value": "luskan_hb" } } ] diff --git a/src/nss/area_enter.nss b/src/nss/area_enter.nss index 028ed806..2e9d4761 100644 --- a/src/nss/area_enter.nss +++ b/src/nss/area_enter.nss @@ -44,7 +44,7 @@ void main() if (!GetIsPC(oPC)) return; // always reset this on a new area, this will be added in a delay in the luskan area - DeleteLocalInt(oPC, "warden_interrogation"); + DeleteLocalInt(oPC, "warden_interrogate"); string sResRef = GetStringLeft(GetResRef(OBJECT_SELF), 4); if (sResRef != "acad") DelayCommand(0.5, WarningMessage(oPC)); diff --git a/src/nss/hb_warden.nss b/src/nss/hb_warden.nss index c758750f..9afe89e8 100644 --- a/src/nss/hb_warden.nss +++ b/src/nss/hb_warden.nss @@ -13,7 +13,7 @@ void ScanTarget(object oTarget, object oScanner) if (GetIsDead(oTarget)) return; - if (GetLocalInt(oTarget, "warden_interrogate") != 1) return; + if (GetLocalInt(oTarget, "warden_interrogate") < 2) return; // don't interrogate while in conversation if (IsInConversation(oScanner)) return; diff --git a/src/nss/luskan_enter.nss b/src/nss/luskan_enter.nss deleted file mode 100644 index 670d80e8..00000000 --- a/src/nss/luskan_enter.nss +++ /dev/null @@ -1,9 +0,0 @@ -void main() -{ - object oPC = GetEnteringObject(); - - if (GetIsPC(oPC)) - { - DelayCommand(10.0, SetLocalInt(oPC, "warden_interrogation", 1)); - } -} diff --git a/src/nss/luskan_hb.nss b/src/nss/luskan_hb.nss new file mode 100644 index 00000000..396d9452 --- /dev/null +++ b/src/nss/luskan_hb.nss @@ -0,0 +1,15 @@ +void main() +{ + object oPC = GetFirstPC(); + + while (GetIsObjectValid(oPC)) + { + if (GetArea(oPC) == OBJECT_SELF) + { + SetLocalInt(oPC, "luskan_interrogate", GetLocalInt(oPC, "luskan_interrogate") + 1); + } + + oPC = GetNextPC(); + } +} +