mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-27 16:56:48 -04:00
37 lines
941 B
Plaintext
37 lines
941 B
Plaintext
|
|
|
|
include holocron.newbie_handoff;
|
|
|
|
|
|
trigger OnObjectMenuSelect(obj_id player, int item)
|
|
{
|
|
if (item == menu_info_types.ITEM_USE)
|
|
{
|
|
obj_id target = getLookAtTarget(player);
|
|
|
|
if (target == null)
|
|
{
|
|
LOG ("newbie_handoff_heal", "Need target to use medicine.");
|
|
sendSystemMessage (self, newbie_handoff.SID_NEWBIE_MISSION_HEAL_NEED_TARGET);
|
|
}
|
|
else if (target == getObjIdObjVar(player, "newbie_handoff.mission.heal.npc_id"))
|
|
{
|
|
destroyObject(self);
|
|
|
|
string missionType = getStringObjVar( self, "newbie_handoff.mission.type" );
|
|
dictionary params = new dictionary();
|
|
params.put("type", missionType);
|
|
|
|
LOG ("newbie_handoff_heal", "Target NPC has been healed.");
|
|
messageTo (player, "missionHealComplete", params, 1, true);
|
|
}
|
|
else
|
|
{
|
|
LOG ("newbie_handoff_heal", "Incorrect heal target.");
|
|
sendSystemMessage (self, newbie_handoff.SID_NEWBIE_MISSION_HEAL_WRONG_TARGET);
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|