mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
39 lines
918 B
Plaintext
39 lines
918 B
Plaintext
include library.groundquests;
|
|
|
|
const string STF = "som/som_quest";
|
|
const string_id EXAMINE = new string_id(STF, "jundak_skull_examine");
|
|
const string_id ALREADY = new string_id(STF, "jundak_skull_already");
|
|
|
|
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
|
|
{
|
|
int menu = mi.addRootMenu( menu_info_types.ITEM_USE, EXAMINE );
|
|
|
|
menu_info_data mid = mi.getMenuItemByType(menu_info_types.ITEM_USE);
|
|
if ( mid == null )
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
mid.setServerNotify(true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuSelect( obj_id player, int item )
|
|
{
|
|
if ( item == menu_info_types.ITEM_USE )
|
|
{
|
|
if( !groundquests.isQuestActiveOrComplete(player, "som_jundak_skull"))
|
|
{
|
|
groundquests.grantQuest ( player, "som_jundak_skull" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
else
|
|
{
|
|
sendSystemMessage(player, ALREADY);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
} |