include library.create; trigger OnAttach() { debugSpeakMsg (self, "attached"); detachScript (self, "ai.ai"); detachScript (self, "ai.creature_combat"); detachScript (self, "skeleton.humanoid"); detachScript (self, "systems.combat.combat_actions"); detachScript (self, "systems.combat.credit_for_kills"); stop (self); setName (self, "Stormtrooper Transport"); setPosture(self, POSTURE_PRONE); messageTo(self, "spawnSts", null, 17, true); queueCommand(self, ##"stand", self, "", COMMAND_PRIORITY_FRONT); return SCRIPT_CONTINUE; } messageHandler changePosture() { debugSpeakMsg (self, "upright"); setPosture(self, POSTURE_UPRIGHT); return SCRIPT_CONTINUE; } messageHandler spawnSts() { location spawnLoc = getLocation( self ); create.createCreature("stormtrooper", spawnLoc, true); create.createCreature("stormtrooper", spawnLoc, true); create.createCreature("stormtrooper", spawnLoc, true); create.createCreature("stormtrooper", spawnLoc, true); create.createCreature("stormtrooper", spawnLoc, true); messageTo (self, "changePosture", null, 5, false); return SCRIPT_CONTINUE; }