Skip to content

Commit

Permalink
Vendor Demonstration
Browse files Browse the repository at this point in the history
  • Loading branch information
HeronAlexandria committed Dec 29, 2021
1 parent e562664 commit aa06fbf
Show file tree
Hide file tree
Showing 17 changed files with 1,997 additions and 1,328 deletions.
2,659 changes: 1,331 additions & 1,328 deletions sku.0/sys.server/compiled/game/datatables/buildout/tatooine/tatooine_6_2.tab

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
item count class note
s[none] I[1] i[0] c
item_necklace_set_commando_dps_01_01 1 1 commando
item_bracelet_r_set_commando_dps_01_01 1 1 commando
item_bracelet_l_set_commando_dps_01_01 1 1 commando
item_ring_set_commando_dps_01_01 1 1 commando
item_band_set_commando_dps_01_01 1 1 commando
item_necklace_set_commando_utility_a_01_01 1 1 commando
item_bracelet_r_set_commando_utility_a_01_01 1 1 commando
item_bracelet_l_set_commando_utility_a_01_01 1 1 commando
item_ring_set_commando_utility_a_01_01 1 1 commando
item_band_set_commando_utility_a_01_01 1 1 commando
item_necklace_set_commando_utility_b_01_01 1 1 commando
item_bracelet_r_set_commando_utility_b_01_01 1 1 commando
item_bracelet_l_set_commando_utility_b_01_01 1 1 commando
item_ring_set_commando_utility_b_01_01 1 1 commando
item_band_set_commando_utility_b_01_01 1 1 commando
armor_infiltrator_bicep_l 1 0
armor_infiltrator_bicep_r 1 0
armor_infiltrator_bracer_l 1 0
armor_infiltrator_bracer_r 1 0
armor_infiltrator_helmet 1 0
armor_infiltrator_chest_plate 1 0
armor_infiltrator_leggings 1 0
armor_infiltrator_gloves 1 0
armor_infiltrator_boots 1 0
armor_infiltrator_belt 1 0
item_bracelet_l_set_ent_01_01 1 9 entertainer
item_bracelet_r_set_ent_01_01 1 9 entertainer
item_necklace_set_ent_01_01 1 9 entertainer
item_band_set_ent_01_01 1 9 entertainer
item_ring_set_ent_01_01 1 9 entertainer
Original file line number Diff line number Diff line change
Expand Up @@ -8567,3 +8567,16 @@ armor_infiltrator_gloves_02 object/tangible/wearables/armor/infiltrator/armor_in
armor_infiltrator_boots_02 object/tangible/wearables/armor/infiltrator/armor_infiltrator_s02_boots.iff armor 90 4
armor_infiltrator_belt_02 object/tangible/wearables/armor/infiltrator/armor_infiltrator_s02_belt.iff armor 90 4
item_tauntaun_dna object/tangible/loot/beast/dna_container.iff 4 systems.beast.cs_dna DNA Storage Device (Tauntaun) Device that stores harvested DNA cores.
item_heron_gift_axkva_01_05 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_axkva_01_01:5 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_axkva_01_10 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_axkva_01_01:10 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_tusken_01_05 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_tusken_01_01:5 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_tusken_01_10 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_tusken_01_01:10 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_ig88_01_05 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_ig88_01_01:5 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_ig88_01_10 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_ig88_01_01:10 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_exar_01_05 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_exar_01_01:5 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_exar_01_10 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_exar_01_01:10 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_black_sun_01_05 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_black_sun_01_01:5 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_black_sun_01_10 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_black_sun_01_01:10 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_marauder_01_50 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_heroic_token_marauder_01_01:50 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_pgc_01_10 object/tangible/npe/npe_generic_uniform_box.iff string:items=item_pgc_token_01:10;item_pgc_token_02:10;item_pgc_token_03:10 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
item_heron_gift_test object/tangible/npe/npe_generic_uniform_box.iff string:source=table, string:items=datatables/item/gift_boxes/gift_box_test.iff,string:mode=random 2 item.gift_boxes.generic_gift_box 1 Standard Issue Uniform Package Inside you will find your standard issue uniform.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
item cash token0 token1 token2 token3 token4 class script note
s[none] i[0] i[0] i[0] i[0] i[0] i[0] i[0] s c
item_heron_gift_pgc_01_10 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
item cash token0 token1 token2 class script note
s[none] i[0] i[0] i[0] i[0] i[0] s c
item_heron_gift_marauder_01_50 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
item cash token14 token15 token16 class script note
s[none] i[0] i[0] i[0] i[0] i[0] s c
item_heroic_token_axkva_01_01 1
item_heroic_token_tusken_01_01 1
item_heroic_token_ig88_01_01 1
item_heroic_token_black_sun_01_01 1
item_heroic_token_exar_01_01 1
item_heroic_token_echo_base_01_01 1
item_heron_gift_axkva_01_05 1
item_heron_gift_axkva_01_10 1
item_heron_gift_tusken_01_05 1
item_heron_gift_tusken_01_10 1
item_heron_gift_ig88_01_05 1
item_heron_gift_ig88_01_10 1
item_heron_gift_exar_01_05 1
item_heron_gift_exar_01_10 1
item_heron_gift_black_sun_01_05 1
item_heron_gift_black_sun_01_10 1
3 changes: 3 additions & 0 deletions sku.0/sys.server/compiled/game/datatables/mob/creatures.tab
Original file line number Diff line number Diff line change
Expand Up @@ -6711,3 +6711,6 @@ binjinphant_mount 1 0 0 0 0 NORMAL global binjinphant_mount beast_master/bm_
reptilian_flier_mount 1 0 0 0 0 NORMAL mount tatooine bioengineer beast_master/bm_reptilian_flier_mount.iff 1 1 0 0 0 0 0 0 0 0 0 2 defaultProfile creature/creature_1_10 herbivore 0 2 yes
whisper_bird_mount 1 0 0 0 0 NORMAL mount tatooine bioengineer beast_master/bm_whisper_bird_mount.iff 1 1 0 0 0 0 0 0 0 0 0 2 defaultProfile creature/creature_1_10 herbivore 0 2 yes
snorbal_mount 1 0 0 0 0 NORMAL mount tatooine bioengineer beast_master/bm_snorbal_mount.iff 1 1 0 0 0 0 0 0 0 0 0 2 defaultProfile creature/creature_1_10 herbivore 0 2 yes
vendor_tok_x 100 0 0 0 0 ELITE anywhere jabba vendor_tok_x.iff 1 1 0 0 0 0 0 0 0 0 -1 2 0 0 npc 1 string:item.vendor.vendor_table=token_x_vendor,int:ai.noClap=1 npc.vendor.vendor,conversation.token_x_vendor 0 0
vendor_tok_m 100 0 0 0 0 ELITE anywhere jabba vendor_tok_m.iff 1 1 0 0 0 0 0 0 0 0 -1 2 0 0 npc 1 string:item.vendor.vendor_table=token_m_vendor,int:ai.noClap=1 npc.vendor.vendor,conversation.token_m_vendor 0 0
vendor_tok_c 100 0 0 0 0 ELITE anywhere jabba vendor_tok_c.iff 1 1 0 0 0 0 0 0 0 0 -1 2 0 0 npc 1 string:item.vendor.vendor_table=token_c_vendor,string:item.token.type=item_heroic_token_marauder_01_01,int:ai.noClap=1 npc.vendor.vendor,conversation.token_c_vendor 0 0
7 changes: 7 additions & 0 deletions sku.0/sys.server/compiled/game/object/mobile/vendor_tok_c.tpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@base object/mobile/mobile.iff
@class creature_object_template 2
nameGeneratorType = "human"
@class tangible_object_template 0
@class object_template 0

sharedTemplate = "object/mobile/shared_vendor_tok_c.iff"
7 changes: 7 additions & 0 deletions sku.0/sys.server/compiled/game/object/mobile/vendor_tok_m.tpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@base object/mobile/mobile.iff
@class creature_object_template 2
nameGeneratorType = "human"
@class tangible_object_template 0
@class object_template 0

sharedTemplate = "object/mobile/shared_vendor_tok_m.iff"
7 changes: 7 additions & 0 deletions sku.0/sys.server/compiled/game/object/mobile/vendor_tok_x.tpf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@base object/mobile/mobile.iff
@class creature_object_template 2
nameGeneratorType = "human"
@class tangible_object_template 0
@class object_template 0

sharedTemplate = "object/mobile/shared_vendor_tok_x.iff"
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package script.conversation;


import script.*;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;

public class token_c_vendor extends script.base_script
{
public token_c_vendor()
{
}
public static String c_stringFile = "conversation/token_c_vendor";
public boolean token_c_vendor_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public void token_c_vendor_action_showTokenVendorUI(obj_id player, obj_id npc) throws InterruptedException
{
dictionary d = new dictionary();
d.put("player", player);
messageTo(npc, "showInventorySUI", d, 0, false);
return;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isTangible(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.token_c_vendor");
}
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
{
int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById(menu);
menuInfoData.setServerNotify(false);
setCondition(self, CONDITION_CONVERSABLE);
faceTo(self, player);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
clearCondition(self, CONDITION_CONVERSABLE);
detachScript(self, "conversation.token_c_vendor");
return SCRIPT_CONTINUE;
}
public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException
{
Object[] objects = new Object[responses.length];
System.arraycopy(responses, 0, objects, 0, responses.length);
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
}
public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException
{
obj_id npc = self;
if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player))
{
return SCRIPT_OVERRIDE;
}
if (token_c_vendor_condition__defaultCondition(player, npc))
{
token_c_vendor_action_showTokenVendorUI(player, npc);
string_id message = new string_id(c_stringFile, "s_4");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException
{
if (!conversationId.equals("token_c_vendor"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.token_c_vendor.branchId");
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.token_c_vendor.branchId");
return SCRIPT_CONTINUE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package script.conversation;


import script.*;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;

public class token_m_vendor extends script.base_script
{
public token_m_vendor()
{
}
public static String c_stringFile = "conversation/token_m_vendor";
public boolean token_m_vendor_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public void token_m_vendor_action_showTokenVendorUI(obj_id player, obj_id npc) throws InterruptedException
{
dictionary d = new dictionary();
d.put("player", player);
messageTo(npc, "showInventorySUI", d, 0, false);
return;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isTangible(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.token_m_vendor");
}
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
{
int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById(menu);
menuInfoData.setServerNotify(false);
setCondition(self, CONDITION_CONVERSABLE);
faceTo(self, player);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
clearCondition(self, CONDITION_CONVERSABLE);
detachScript(self, "conversation.token_m_vendor");
return SCRIPT_CONTINUE;
}
public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException
{
Object[] objects = new Object[responses.length];
System.arraycopy(responses, 0, objects, 0, responses.length);
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
}
public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException
{
obj_id npc = self;
if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player))
{
return SCRIPT_OVERRIDE;
}
if (token_m_vendor_condition__defaultCondition(player, npc))
{
token_m_vendor_action_showTokenVendorUI(player, npc);
string_id message = new string_id(c_stringFile, "s_4");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException
{
if (!conversationId.equals("token_m_vendor"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.token_m_vendor.branchId");
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.token_m_vendor.branchId");
return SCRIPT_CONTINUE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package script.conversation;

import script.*;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;

public class token_x_vendor extends script.base_script
{
public token_x_vendor()
{
}
public static String c_stringFile = "conversation/token_x_vendor";
public boolean token_x_vendor_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public void token_x_vendor_action_showTokenVendorUI(obj_id player, obj_id npc) throws InterruptedException
{
dictionary d = new dictionary();
d.put("player", player);
messageTo(npc, "showInventorySUI", d, 0, false);
return;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isTangible(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.token_x_vendor");
}
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
{
int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById(menu);
menuInfoData.setServerNotify(false);
setCondition(self, CONDITION_CONVERSABLE);
faceTo(self, player);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
clearCondition(self, CONDITION_CONVERSABLE);
detachScript(self, "conversation.token_x_vendor");
return SCRIPT_CONTINUE;
}
public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException
{
Object[] objects = new Object[responses.length];
System.arraycopy(responses, 0, objects, 0, responses.length);
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
}
public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException
{
obj_id npc = self;
if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player))
{
return SCRIPT_OVERRIDE;
}
if (token_x_vendor_condition__defaultCondition(player, npc))
{
token_x_vendor_action_showTokenVendorUI(player, npc);
string_id message = new string_id(c_stringFile, "s_4");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException
{
if (!conversationId.equals("token_x_vendor"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.token_x_vendor.branchId");
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.token_x_vendor.branchId");
return SCRIPT_CONTINUE;
}
}
Loading

0 comments on commit aa06fbf

Please sign in to comment.