Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ant-compile-tab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Setup System Requisites
run: |
sudo apt-get install -y zlib1g
sudo apt-get install -y lib32z1
sudo chmod 777 ${GITHUB_WORKSPACE}/include/DataTableTool

# NOTE: DataTableTool was built and placed in dsrc/include which is called by ant when compile_tab is ran
Expand Down
39 changes: 11 additions & 28 deletions .github/workflows/ant-java.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant

name: Build Java

on:
Expand All @@ -12,34 +9,20 @@ on:
branches: [ master ]
paths:
- '**.java'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: [self-hosted, linux, x64, swg]

steps:
################################
# Setup environment #
################################
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11.0.2'

################################
# Run Linter against code base #
################################
#- name: Lint Code Base
# uses: github/super-linter@v3
# env:
# VALIDATE_ALL_CODEBASE: false
# DEFAULT_BRANCH: master
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

################################
# Compile Java with ANT #
################################
java-version: '11'
distribution: 'temurin'

- name: Build with Ant
run: ant -noinput -buildfile build.xml compile_java

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import script.*;
import script.library.ai_lib;
import script.library.chat;
import script.library.money;
import script.library.utils;

public class heraldtatooine2 extends script.base_script
Expand All @@ -16,58 +15,8 @@ public boolean heraldtatooine2_condition__defaultCondition(obj_id player, obj_id
{
return true;
}
public boolean heraldtatooine2_condition_cashyes50(obj_id player, obj_id npc) throws InterruptedException
{
int cash = getTotalMoney(player);
if (cash >= 50)
{
return true;
}
else
{
return false;
}
}
public boolean heraldtatooine2_condition_cashyes30(obj_id player, obj_id npc) throws InterruptedException
{
int cash = getTotalMoney(player);
if (cash >= 30)
{
return true;
}
else
{
return false;
}
}
public boolean heraldtatooine2_condition_cashyes15(obj_id player, obj_id npc) throws InterruptedException
{
int cash = getTotalMoney(player);
if (cash >= 15)
{
return true;
}
else
{
return false;
}
}
public boolean heraldtatooine2_condition_cashyes60(obj_id player, obj_id npc) throws InterruptedException
{
int cash = getTotalMoney(player);
if (cash >= 60)
{
return true;
}
else
{
return false;
}
}
public void heraldtatooine2_action_getcash50(obj_id player, obj_id npc) throws InterruptedException
{
dictionary params = new dictionary();
money.requestPayment(player, npc, 50, "pass_fail", params, true);
location rebel = new location(-784, 0, -4451);
obj_id waypoint = createWaypointInDatapad(player, rebel);
setWaypointName(waypoint, "Rebel Military Base");
Expand All @@ -77,8 +26,6 @@ public void heraldtatooine2_action_getcash50(obj_id player, obj_id npc) throws I
}
public void heraldtatooine2_action_getcash30(obj_id player, obj_id npc) throws InterruptedException
{
dictionary params = new dictionary();
money.requestPayment(player, npc, 30, "pass_fail", params, true);
location rebel = new location(-1084, 0, -4751);
obj_id waypoint = createWaypointInDatapad(player, rebel);
setWaypointName(waypoint, "Rebel Military Base");
Expand All @@ -88,8 +35,6 @@ public void heraldtatooine2_action_getcash30(obj_id player, obj_id npc) throws I
}
public void heraldtatooine2_action_getcash30a(obj_id player, obj_id npc) throws InterruptedException
{
dictionary params = new dictionary();
money.requestPayment(player, npc, 15, "pass_fail", params, true);
location tusken = new location(-1493, 0, -208);
obj_id waypoint = createWaypointInDatapad(player, tusken);
setWaypointName(waypoint, "Tusken Bunker");
Expand All @@ -99,8 +44,6 @@ public void heraldtatooine2_action_getcash30a(obj_id player, obj_id npc) throws
}
public void heraldtatooine2_action_getcash60(obj_id player, obj_id npc) throws InterruptedException
{
dictionary params = new dictionary();
money.requestPayment(player, npc, 60, "pass_fail", params, true);
location hutt = new location(5021, 0, 547);
obj_id waypoint = createWaypointInDatapad(player, hutt);
setWaypointName(waypoint, "Hutt Hideout");
Expand Down Expand Up @@ -454,21 +397,14 @@ public int heraldtatooine2_handleBranch8(obj_id player, obj_id npc, string_id re
{
if (response.equals("s_c3dbbcab"))
{
if (heraldtatooine2_condition_cashyes60(player, npc))
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_getcash60(player, npc);
string_id message = new string_id(c_stringFile, "s_32a1ecd");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_241afd0a");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_30c59b36"))
{
Expand Down Expand Up @@ -601,45 +537,29 @@ public int heraldtatooine2_handleBranch14(obj_id player, obj_id npc, string_id r
}
if (response.equals("s_81a382e3"))
{
if (heraldtatooine2_condition_cashyes50(player, npc))
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_getcash50(player, npc);
string_id message = new string_id(c_stringFile, "s_c799721b");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_dismiss(player, npc);
string_id message = new string_id(c_stringFile, "s_1c6f5661");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int heraldtatooine2_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_d9903b42"))
{
if (heraldtatooine2_condition_cashyes30(player, npc))
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_getcash30(player, npc);
string_id message = new string_id(c_stringFile, "s_aae6686e");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_dismiss(player, npc);
string_id message = new string_id(c_stringFile, "s_38bef1fe");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_fb859e03"))
{
Expand Down Expand Up @@ -727,22 +647,14 @@ public int heraldtatooine2_handleBranch24(obj_id player, obj_id npc, string_id r
}
if (response.equals("s_177f6371"))
{
if (heraldtatooine2_condition_cashyes30(player, npc))
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_getcash30a(player, npc);
string_id message = new string_id(c_stringFile, "s_5d7da0");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
if (heraldtatooine2_condition__defaultCondition(player, npc))
{
heraldtatooine2_action_dismiss(player, npc);
string_id message = new string_id(c_stringFile, "s_e3dda380");
utils.removeScriptVar(player, "conversation.heraldtatooine2.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
Expand Down
Loading