2025-04-03 19:00:46 -04:00
|
|
|
#include "horse_include"
|
|
|
|
#include "nwnx_webhook"
|
|
|
|
|
|
|
|
//:: AmonBot Webhook
|
|
|
|
const string NWNX_DISCORD_URL = "/api/webhooks/1187525263693725706/oRFVnrx9qq7mxmpwOaslNgaQoaVAchTlK-NGFOHv4_2fJMdl-AIAVfpid8L_Lm3gs3Qq/slack";
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
//:: Declare Major Variables
|
|
|
|
object oPC = GetExitingObject();
|
|
|
|
|
|
|
|
string sPlayerName = GetName(oPC);
|
|
|
|
|
2025-09-24 16:04:25 -04:00
|
|
|
int bNWNxEE = NWNXGetIsAvailable();
|
2025-04-03 19:00:46 -04:00
|
|
|
|
|
|
|
GPA_HorseOCL(oPC);
|
|
|
|
// Mark down how low the player is in hitpoints, and whether or not they are
|
|
|
|
// in combat when they vanished.
|
|
|
|
|
|
|
|
SetLocalInt(GetModule(),"HPOff_"+GetName(oPC),GetMaxHitPoints(oPC) - GetCurrentHitPoints(oPC));
|
|
|
|
SetLocalInt(GetModule(),"CMBT_"+GetName(oPC),GetIsInCombat(oPC));
|
|
|
|
object oArea = GetLocalObject(oPC, "leaveArea");
|
|
|
|
SetLocalInt(oArea, "playerCount", GetLocalInt(oArea, "playerCount") - 1);
|
|
|
|
|
|
|
|
//:: AmonBot Player Announce
|
2025-09-24 16:04:25 -04:00
|
|
|
if (bNWNxEE) NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, sPlayerName+ " has left the World of Amon.", "AmonBot");
|
2025-04-03 19:00:46 -04:00
|
|
|
}
|