mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-01-17 00:05:07 -05:00
GU 16.9 - No Trade Removable
This commit is contained in:
75
sku.0/sys.server/compiled/game/datatables/no_trade/no_trade_removable.tab
Executable file
75
sku.0/sys.server/compiled/game/datatables/no_trade/no_trade_removable.tab
Executable file
@@ -0,0 +1,75 @@
|
||||
Object Template Comment
|
||||
s c
|
||||
item_pgc_planet_hologram_dantooine
|
||||
item_pgc_planet_hologram_dathomir
|
||||
item_pgc_planet_hologram_endor
|
||||
item_pgc_planet_hologram_lok
|
||||
item_pgc_planet_hologram_naboo
|
||||
item_pgc_planet_hologram_rori
|
||||
item_pgc_planet_hologram_talus
|
||||
item_pgc_planet_hologram_tatooine
|
||||
item_pgc_planet_hologram_yavin4
|
||||
item_pgc_planet_hologram_corellia_02
|
||||
item_pgc_planet_hologram_dantooine_02
|
||||
item_pgc_planet_hologram_dathomir_02
|
||||
item_pgc_planet_hologram_endor_02
|
||||
item_pgc_planet_hologram_lok_02
|
||||
item_pgc_planet_hologram_naboo_02
|
||||
item_pgc_planet_hologram_rori_02
|
||||
item_pgc_planet_hologram_talus_02
|
||||
item_pgc_planet_hologram_tatooine_02
|
||||
item_pgc_planet_hologram_yavin4_02
|
||||
item_deed_landspeeder_usv5_s02
|
||||
item_deed_podracer_anakin
|
||||
item_pgc_chronicle_master_robe
|
||||
item_pgc_chronicle_master_sign
|
||||
item_pgc_chronicle_master_sign_02
|
||||
item_pgc_chronicle_master_statuette
|
||||
item_pgc_monitorscreen
|
||||
item_pgc_monitorscreen_sm
|
||||
item_pgc_glass_pane_01
|
||||
item_pgc_glass_pane_02
|
||||
item_pgc_jabba_chandelier
|
||||
item_pgc_jabba_drapes
|
||||
item_pgc_jabba_fancyrug
|
||||
item_pgc_jabba_gargoyle
|
||||
item_pgc_jabba_generator
|
||||
item_pgc_jabba_table
|
||||
item_pgc_jabba_tassels
|
||||
item_pgc_jabba_windchime
|
||||
item_pgc_decal_pgc_s01
|
||||
item_pgc_decal_pgc_s02
|
||||
item_pgc_decal_pgc_s03
|
||||
item_pgc_decal_pgc_s04
|
||||
item_pgc_decal_pgc_s05
|
||||
item_pgc_decal_pgc_s06
|
||||
item_pgc_booster_pack
|
||||
item_pgc_booster_pack_goto
|
||||
item_pgc_booster_pack_comm
|
||||
item_pgc_starter_kit
|
||||
item_pgc_fireplace
|
||||
item_pgc_starship_storage_device_01
|
||||
item_pgc_sandcrawler_house_deed
|
||||
item_pgc_chronicler_tent_deed
|
||||
item_costume_chiss_01
|
||||
item_costume_exar_kun_cultist
|
||||
item_npe_sparky_droid_02_01
|
||||
col_reward_buddy_painting_01
|
||||
col_reward_buddy_painting_02
|
||||
col_reward_buddy_painting_03
|
||||
item_tow_schematic_saber_03_01
|
||||
item_tow_schematic_saber_03_02
|
||||
weapon_smuggler_reward_pistol_04_01
|
||||
weapon_smuggler_reward_pistol_dl44_04_01
|
||||
weapon_content_pistol_commando_pistol_03_01
|
||||
weapon_content_heavy_commando_03_01
|
||||
item_tow_schematic_vehicle_02_02
|
||||
item_deed_light_bend_barc_06_01
|
||||
item_publish_gift_27_04_01
|
||||
item_tow_cystal_buff_drained_05_01
|
||||
item_tow_schematic_psg_05_01
|
||||
item_content_binocs_detection_03_02
|
||||
item_content_click_health_02_01
|
||||
item_tow_schematic_jedi_statue_02_01
|
||||
heroic_minder_creature_knowledge_gloves_02_01
|
||||
item_outbreak_cornburr_brain
|
||||
@@ -0,0 +1,46 @@
|
||||
package script.item.special;
|
||||
|
||||
import script.obj_id;
|
||||
import script.string_id;
|
||||
import script.menu_info;
|
||||
import script.menu_info_types;
|
||||
|
||||
/**
|
||||
* Allows items that previously had the "noTrade" flag to be made tradeable by
|
||||
* their original owner.
|
||||
*
|
||||
* Automatically attached to objects in no_trade_removable.tab
|
||||
*/
|
||||
public class no_trade_removable extends script.base_script {
|
||||
public no_trade_removable() {
|
||||
}
|
||||
|
||||
// Using one of the unused reserved entries.
|
||||
public static final int RADIAL_MENU_ENTRY = menu_info_types.SERVER_MENU47;
|
||||
public static final string_id REMOVE_NO_TRADE = new string_id("ui_radial", "no_trade_removable");
|
||||
|
||||
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException {
|
||||
if (hasObjVar(self, "noTrade") && (getOwner(self) == player || isGod(player))) {
|
||||
mi.addRootMenu(RADIAL_MENU_ENTRY, REMOVE_NO_TRADE);
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
public int OnObjectMenuSelect(obj_id self, obj_id player, int selectedMenuItem) throws InterruptedException {
|
||||
if (selectedMenuItem == RADIAL_MENU_ENTRY) {
|
||||
if (!hasObjVar(self, "noTrade")) {
|
||||
sendSystemMessage(player, "This item is already tradeable.", null);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
if (getOwner(self) != player && !isGod(player)) {
|
||||
sendSystemMessage(player, "This item does not belong to you.", null);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
removeObjVar(self, "noTrade");
|
||||
sendSystemMessage(player, "This item is now tradable.", null);
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user