mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
68 lines
1.4 KiB
Plaintext
68 lines
1.4 KiB
Plaintext
|
|
include library.sui;
|
|
include library.utils;
|
|
include library.pet_lib;
|
|
include library.jedi;
|
|
include library.craftinglib;
|
|
|
|
inherits item.special.nomove_base
|
|
|
|
trigger OnAttach()
|
|
{
|
|
if ( hasObjVar(self, "notrade") )
|
|
removeObjVar(self, "notrade");
|
|
|
|
if(jedi.isLightsaber(self))
|
|
{
|
|
lightsaberLogging(self);
|
|
}
|
|
|
|
//if the item was created in the players inventory ie quest stuff
|
|
if (utils.isNestedWithinAPlayer(self))
|
|
setObjVar(self, "noTrade", true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnDetach()
|
|
{
|
|
if (hasObjVar(self, "noTrade"))
|
|
removeObjVar(self, "noTrade");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnInitialize()
|
|
{
|
|
if(jedi.isLightsaber(self))
|
|
{
|
|
lightsaberLogging(self);
|
|
}
|
|
|
|
if ( hasObjVar(self, "notrade") )
|
|
removeObjVar(self, "notrade");
|
|
|
|
if (utils.isNestedWithinAPlayer(self))
|
|
setObjVar(self, "noTrade", true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
void lightsaberLogging(obj_id self)
|
|
{
|
|
obj_id owner = getOwner(self);
|
|
|
|
if(!isIdValid(owner))
|
|
return;
|
|
|
|
int minDam = getWeaponMinDamage(self);
|
|
int maxDam = getWeaponMaxDamage(self);
|
|
float attSpeed = getWeaponAttackSpeed(self);
|
|
|
|
CustomerServiceLog("Lightsaber:","%TU: Owns lightsaber: %TT: " + " minDamage: " + minDam + " maxDamage: " + maxDam + " attackSpeed: " + attSpeed, owner, self);
|
|
//LOG("Lightsaber:","%TU: Owns lightsaber: %TT: " + " minDamage: " + minDam + " maxDamage: " + maxDam + " attackSpeed: " + attSpeed, owner, self);
|
|
return;
|
|
}
|
|
|
|
|