include library.groundquests; include library.create; include library.trial; include library.utils; const string STF = "som/som_quest"; const string_id BLEACH_SKULL = new string_id(STF, "jundak_skull_bleach"); const string_id GET_SKULL = new string_id(STF, "jundak_skull_retrieve"); const string_id BLEACH_DONE = new string_id(STF, "jundak_skull_bleach_done"); const string_id SKULL_VAT = new string_id(STF, "jundak_skull_vat"); const string_id REMOVE_SKULL = new string_id(STF, "jundak_skull_remove"); trigger OnObjectMenuRequest(obj_id player, menu_info mi) { if( groundquests.isTaskActive(player, "som_jundak_skull", "jundak_skull_two")) { int menu = mi.addRootMenu( menu_info_types.ITEM_USE, BLEACH_SKULL ); menu_info_data mid = mi.getMenuItemByType(menu_info_types.ITEM_USE); if ( mid == null ) { return SCRIPT_CONTINUE; } mid.setServerNotify(true); } if( groundquests.isTaskActive(player, "som_jundak_skull", "jundak_skull_three")) { int menu = mi.addRootMenu( menu_info_types.ITEM_USE, GET_SKULL ); 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.isTaskActive(player, "som_jundak_skull", "jundak_skull_two")) { sendSystemMessage(player, SKULL_VAT); dictionary dict = new dictionary(); dict.put("target", player); messageTo(self, "handleBleachSkull", dict, 10, false); playClientEffectObj(self, "clienteffect/must_bleach_vat.cef", self, ""); return SCRIPT_CONTINUE; } if( groundquests.isTaskActive(player, "som_jundak_skull", "jundak_skull_three")) { sendSystemMessage(player, REMOVE_SKULL); groundquests.sendSignal(player, "jundak_skull_signal_two"); return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } messageHandler handleBleachSkull () { obj_id player = params.getObjId("target"); sendSystemMessage(player, BLEACH_DONE); groundquests.sendSignal(player, "jundak_skull_signal_one"); return SCRIPT_CONTINUE; }