Files
dsrc/sku.0/sys.server/compiled/game/script/holocron/heal_medicine.script
T
2013-09-10 23:17:15 -07:00

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;
}