mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
/**********************************************************************
|
|
* Copyright (c)2000-2002 Sony Online Entertainment Inc.
|
|
* All Rights Reserved
|
|
*
|
|
* Title: faction_item
|
|
* Description: script that goes on all faction items that can only
|
|
* be used while declared.
|
|
* @author $Author:$
|
|
* @version $Revision:$
|
|
**********************************************************************/
|
|
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
include library.prose;
|
|
include library.factions;
|
|
include library.battlefield;
|
|
include library.utils;
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
const string VAR_FACTION = "faction_recruiter.faction";
|
|
const string VAR_DECLARED = "faction_recruiter.declared";
|
|
|
|
const string_id SID_MUST_BE_DECLARED = new string_id("faction_recruiter", "must_be_declared");
|
|
const string_id SID_MUST_BE_FACTION_MEMBER = new string_id("faction_recruiter", "must_be_faction_member");
|
|
const string_id SID_MUST_BE_DECLARED_USE = new string_id("faction_recruiter", "must_be_declared_use");
|
|
const string_id SID_MUST_BE_FACTION_MEMBER_USE = new string_id("faction_recruiter", "must_be_faction_member_use");
|
|
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
trigger OnAboutToBeTransferred(obj_id destContainer, obj_id transferer)
|
|
{
|
|
// LOG("LOG_CHANNEL", "transferer ->" + transferer + " destContainer ->" + destContainer);
|
|
|
|
obj_id appearanceInventory = getAppearanceInventory(transferer);
|
|
boolean appearanceInventoryEquip = (isIdValid(appearanceInventory) && destContainer == appearanceInventory);
|
|
|
|
if (destContainer == transferer || appearanceInventoryEquip)
|
|
{
|
|
if (!utils.hasSpecialSkills(transferer))
|
|
{
|
|
string_id specialItem = new string_id ("error_message", "mandalorian_armor_restriction");
|
|
sendSystemMessage (transferer, specialItem);
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|