27 lines
942 B
Plaintext
27 lines
942 B
Plaintext
#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);
|
|
|
|
|
|
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
|
|
NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, sPlayerName+ " has left the World of Amon.", "AmonBot");
|
|
}
|