Ancordia_PRC8/_module/nss/su_whitesaddle.nss

26 lines
712 B
Plaintext
Raw Permalink Normal View History

2023-09-21 19:51:32 -04:00
#include "x4_inc_functions"
#include "x3_inc_horse"
//Put this on action taken in the conversation editor
void main()
{
// Important system variables
string sChainTag = "ch_whitesaddle";
string sHorseResRef = "horse_whsaddle";
object oPC = GetPCSpeaker();
location lTarget = GetLocation (oPC);
if (GetItemPossessedBy(oPC, sChainTag)!= OBJECT_INVALID)
{
object oSteed = CreateObject (OBJECT_TYPE_CREATURE, sHorseResRef, lTarget);
SetLocalString(oSteed, "sOwner", CharacterDB(oPC));
// Assigns the mount to oPC.
HorseSetOwner(oSteed, oPC, TRUE);
}
else
{
SendMessageToPC(oPC, "You don't have the required chain anymore!");
}
}