generated from Jaysyn/ModuleTemplate
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
//sell a spider pet
|
|
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
object oSpider;
|
|
object oSpawn = GetWaypointByTag("SPIDERSPAWN");
|
|
object oNPC = GetObjectByTag("Acolyte");
|
|
int x = GetLocalInt(oNPC,"x");
|
|
|
|
AssignCommand(oNPC,TakeGoldFromCreature(3,oPC,TRUE));
|
|
SetMaxHenchmen(1);
|
|
|
|
switch (x)
|
|
{
|
|
case 1:
|
|
CreateObject(OBJECT_TYPE_CREATURE,"pcspiderpet",GetLocation(oSpawn),TRUE,"SPIDERPET1");
|
|
oSpider = GetObjectByTag("SPIDERPET1");
|
|
ActionDoCommand(AddHenchman(oPC,oSpider));
|
|
SetLocalInt(oNPC,"x",2);
|
|
break;
|
|
case 2:
|
|
CreateObject(OBJECT_TYPE_CREATURE,"pcspiderpet",GetLocation(oSpawn),TRUE,"SPIDERPET2");
|
|
oSpider = GetObjectByTag("SPIDERPET2");
|
|
ActionDoCommand(AddHenchman(oPC,oSpider));
|
|
SetLocalInt(oNPC,"x",3);
|
|
break;
|
|
case 3:
|
|
CreateObject(OBJECT_TYPE_CREATURE,"pcspiderpet",GetLocation(oSpawn),TRUE,"SPIDERPET3");
|
|
oSpider = GetObjectByTag("SPIDERPET3");
|
|
ActionDoCommand(AddHenchman(oPC,oSpider));
|
|
SetLocalInt(oNPC,"x",4);
|
|
break;
|
|
case 4:
|
|
CreateObject(OBJECT_TYPE_CREATURE,"pcspiderpet",GetLocation(oSpawn),TRUE,"SPIDERPET4");
|
|
oSpider = GetObjectByTag("SPIDERPET4");
|
|
ActionDoCommand(AddHenchman(oPC,oSpider));
|
|
SetLocalInt(oNPC,"x",1);
|
|
break;
|
|
}
|
|
}
|