mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
/**********************************************************************
|
|
* Title: terminal_wound.script
|
|
* Description: script for the beta wound terminal. Ow!
|
|
**********************************************************************/
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
const string_id SID_INFLICT_DAMAGE = new string_id("wound_terminal", "inflict_damage");
|
|
const string_id SID_INFLICT_WOUND = new string_id("wound_terminal", "inflict_wound");
|
|
const string_id SID_INFLICT_WOUND_HEALTH = new string_id("wound_terminal", "heal_wound_health");
|
|
const string_id SID_HEAL_BATTLE = new string_id("wound_terminal", "heal_battle_fatigue");
|
|
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
|
|
{
|
|
mi.addRootMenu(menu_info_types.SERVER_MENU1, SID_INFLICT_DAMAGE);
|
|
mi.addRootMenu(menu_info_types.SERVER_MENU2, SID_INFLICT_WOUND);
|
|
mi.addRootMenu(menu_info_types.SERVER_MENU3, SID_INFLICT_WOUND_HEALTH);
|
|
mi.addRootMenu(menu_info_types.SERVER_MENU4, SID_HEAL_BATTLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuSelect(obj_id player, int item)
|
|
{
|
|
|
|
if (isGod(player) || hasObjVar(player, "beta.terminal_ok"))
|
|
{
|
|
|
|
if (item == menu_info_types.SERVER_MENU1)
|
|
{
|
|
addAttribModifier(player, HEALTH, -500, 0.0f, 0.0f, MOD_POOL);
|
|
}
|
|
|
|
if (item == menu_info_types.SERVER_MENU4)
|
|
{
|
|
healShockWound(player, 1000);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
else
|
|
{
|
|
sendSystemMessageTestingOnly(player, "Only authorized users may access this terminal.");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|