mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
66 lines
1.4 KiB
Plaintext
66 lines
1.4 KiB
Plaintext
include library.utils;
|
|
|
|
|
|
trigger OnAttach()
|
|
{
|
|
/*obj_id weapon = aiGetPrimaryWeapon(self);
|
|
setWeaponMinDamage(weapon, 0);
|
|
setWeaponMaxDamage(weapon, 30);
|
|
setWeaponElementalValue(weapon, 0);
|
|
|
|
obj_id weapon2 = aiGetSecondaryWeapon(self);
|
|
setWeaponMinDamage(weapon2, 0);
|
|
setWeaponMaxDamage(weapon2, 30);
|
|
setWeaponElementalValue(weapon2, 0);
|
|
|
|
setMaxAttrib(self, HEALTH, 25);
|
|
setAttrib(self, HEALTH, 25);*/
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnInitialize()
|
|
{
|
|
/*obj_id weapon = aiGetPrimaryWeapon(self);
|
|
setWeaponMinDamage(weapon, 0);
|
|
setWeaponMaxDamage(weapon, 30);
|
|
setWeaponElementalValue(weapon, 0);
|
|
|
|
obj_id weapon2 = aiGetSecondaryWeapon(self);
|
|
setWeaponMinDamage(weapon2, 0);
|
|
setWeaponMaxDamage(weapon2, 30);
|
|
setWeaponElementalValue(weapon2, 0);
|
|
|
|
setMaxAttrib(self, HEALTH, 25);
|
|
setAttrib(self, HEALTH, 25);*/
|
|
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
trigger OnLoiterMoving()
|
|
{
|
|
stop(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
|
|
|
|
trigger OnDeath(obj_id killer, obj_id corpseId)
|
|
{
|
|
obj_id parent = utils.getObjIdScriptVar(self, "objParent");
|
|
|
|
messageTo(parent, "huttMinionDied", null, 0, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnCreatureDamaged(obj_id attacker, obj_id weapon, int[] damage)
|
|
{
|
|
if (utils.hasScriptVar(self, "npe.invuln"))
|
|
{
|
|
int currentHealth = getHealth(self);
|
|
int maxHealth = getMaxHealth(self);
|
|
setHealth(self, maxHealth);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
} |