Initial upload
Initial upload.
This commit is contained in:
24
_module/nss/sellox.nss
Normal file
24
_module/nss/sellox.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
void main()
|
||||
{
|
||||
location lSpawn = GetLocation(GetPCSpeaker());
|
||||
int iGold = GetGold(GetPCSpeaker());
|
||||
object oPackAnimal;
|
||||
object oPackStore;
|
||||
if(GetLocalInt(GetPCSpeaker(), "ownOx") != 1)
|
||||
{
|
||||
if(iGold > 1000)
|
||||
{
|
||||
TakeGoldFromCreature(1000, GetPCSpeaker(), FALSE);
|
||||
SetLocalInt(GetPCSpeaker(), "ownOx", 1);
|
||||
oPackAnimal = CreateObject(OBJECT_TYPE_CREATURE, "packox", lSpawn, TRUE);
|
||||
oPackStore = CreateObject(OBJECT_TYPE_STORE, "oxpack", lSpawn);
|
||||
SetLocalObject(GetPCSpeaker(), "PackAnimal", oPackAnimal);
|
||||
SetLocalObject(GetPCSpeaker(), "PackStore", oPackStore);
|
||||
SetLocalObject(oPackAnimal, "Owner", GetPCSpeaker());
|
||||
}
|
||||
else
|
||||
SpeakString("You do not have enough gold!");
|
||||
}
|
||||
else
|
||||
SpeakString("You already own a pack animal!");
|
||||
}
|
||||
Reference in New Issue
Block a user