Adding Record Raid scout.
This commit is contained in:
@@ -80,9 +80,9 @@ public class RaidsOverlay extends Overlay
|
|||||||
"SCPFC.CSPCF - #NEEESW#WWNEEE",
|
"SCPFC.CSPCF - #NEEESW#WWNEEE",
|
||||||
"SCSPF.CCSPF - #ESWWNW#ESENES",
|
"SCSPF.CCSPF - #ESWWNW#ESENES",
|
||||||
"SPCFC.CSPCF - #WWNEEE#WSWNWS",
|
"SPCFC.CSPCF - #WWNEEE#WSWNWS",
|
||||||
"SCPFC.PCSCF - #WNEEES#NWSWNW",
|
"SCPFC.PCSCF - #WNEEES#NWSWNW", //rare crabs first bad crabs second
|
||||||
"SFCCPC.PCSCPF - #WSEENES#WWWNEEE",
|
"SFCCPC.PCSCPF - #WSEENES#WWWNEEE", //good crabs first rare crabs second rare crabs third
|
||||||
"SCPFC.CCSSF - #NEESEN#WSWWNE"
|
"SCPFC.CCSSF - #NEESEN#WSWWNE" //good crabs
|
||||||
);
|
);
|
||||||
private static final ImmutableList<String> goodCrabsSecond = ImmutableList.of(
|
private static final ImmutableList<String> goodCrabsSecond = ImmutableList.of(
|
||||||
"FSCCP.PCSCF - #WNWSWN#ESEENW",
|
"FSCCP.PCSCF - #WNWSWN#ESEENW",
|
||||||
@@ -101,10 +101,10 @@ public class RaidsOverlay extends Overlay
|
|||||||
"SFCCS.PCPSF - #ENWWSW#ENESEN",
|
"SFCCS.PCPSF - #ENWWSW#ENESEN",
|
||||||
"SPCFC.CSPCF - #WWNEEE#WSWNWS",
|
"SPCFC.CSPCF - #WWNEEE#WSWNWS",
|
||||||
"SPCFC.SCCPF - #ESENES#WWWNEE",
|
"SPCFC.SCCPF - #ESENES#WWWNEE",
|
||||||
"SPSFP.CCCSF - #NWSWWN#ESEENW",
|
"SPSFP.CCCSF - #NWSWWN#ESEENW", //bad crabs first good crabs second
|
||||||
"SFCCPC.PCSCPF - #WSEENES#WWWNEEE",
|
"SFCCPC.PCSCPF - #WSEENES#WWWNEEE", //good crabs first rare crabs second rare crabs third
|
||||||
"FSCCP.PCSCF - #ENWWWS#NEESEN",
|
"FSCCP.PCSCF - #ENWWWS#NEESEN", //bad crabs first good crabs second
|
||||||
"SCPFC.CCSSF - #NEESEN#WSWWNE"
|
"SCPFC.CCSSF - #NEESEN#WSWWNE" //good crabs
|
||||||
);
|
);
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private final PanelComponent panelComponent = new PanelComponent();
|
||||||
private final ItemManager itemManager;
|
private final ItemManager itemManager;
|
||||||
@@ -164,6 +164,8 @@ public class RaidsOverlay extends Overlay
|
|||||||
return panelComponent.render(graphics);
|
return panelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println(plugin.getRaid().getRotationString());
|
||||||
|
|
||||||
Color color = Color.WHITE;
|
Color color = Color.WHITE;
|
||||||
String layout = plugin.getRaid().getLayout().toCodeString();
|
String layout = plugin.getRaid().getLayout().toCodeString();
|
||||||
String displayLayout;
|
String displayLayout;
|
||||||
@@ -279,10 +281,20 @@ public class RaidsOverlay extends Overlay
|
|||||||
scavsBeforeIceRooms.add(prev);
|
scavsBeforeIceRooms.add(prev);
|
||||||
}
|
}
|
||||||
int lastScavs = scavRooms.get(scavRooms.size() - 1);
|
int lastScavs = scavRooms.get(scavRooms.size() - 1);
|
||||||
panelComponent.getChildren().add(TitleComponent.builder()
|
if (!recordRaid())
|
||||||
.text(displayLayout)
|
{
|
||||||
.color(color)
|
panelComponent.getChildren().add(TitleComponent.builder()
|
||||||
.build());
|
.text(displayLayout)
|
||||||
|
.color(color)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panelComponent.getChildren().add(TitleComponent.builder()
|
||||||
|
.text("Record Raid")
|
||||||
|
.color(Color.GREEN)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
TableComponent tableComponent = new TableComponent();
|
TableComponent tableComponent = new TableComponent();
|
||||||
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
@@ -480,16 +492,23 @@ public class RaidsOverlay extends Overlay
|
|||||||
|
|
||||||
private boolean crabHandler(String firstHalf, String secondHalf)
|
private boolean crabHandler(String firstHalf, String secondHalf)
|
||||||
{
|
{
|
||||||
if (firstHalf.contains("Crabs") && goodCrabsFirst.contains(plugin.getLayoutFullCode()))
|
return (firstHalf.contains("Crabs") && goodCrabsFirst.contains(plugin.getLayoutFullCode()))
|
||||||
{
|
|| (secondHalf.contains("Crabs") && goodCrabsSecond.contains(plugin.getLayoutFullCode()));
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (secondHalf.contains("Crabs") && goodCrabsSecond.contains(plugin.getLayoutFullCode()))
|
boolean recordRaid()
|
||||||
|
{
|
||||||
|
Matcher firstMatcher = FIRST_HALF.matcher(plugin.getRaid().getFullRotationString());
|
||||||
|
Matcher secondMatcher = SECOND_HALF.matcher(plugin.getRaid().getFullRotationString());
|
||||||
|
if (plugin.getRaid().getRotationString().toLowerCase().equals("vasa,tekton,vespula")
|
||||||
|
&& plugin.getRaid().getFullRotationString().toLowerCase().contains("crabs")
|
||||||
|
&& plugin.getRaid().getFullRotationString().toLowerCase().contains("tightrope"))
|
||||||
{
|
{
|
||||||
return true;
|
if (firstMatcher.find() && secondMatcher.find())
|
||||||
|
{
|
||||||
|
return (crabHandler(firstMatcher.group(1), secondMatcher.group(1)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -617,6 +617,25 @@ public class RaidsPlugin extends Plugin
|
|||||||
.append(raidData)
|
.append(raidData)
|
||||||
.build())
|
.build())
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
if (overlay.recordRaid())
|
||||||
|
{
|
||||||
|
chatMessageManager.queue(QueuedMessage.builder()
|
||||||
|
.type(ChatMessageType.FRIENDSCHATNOTIFICATION)
|
||||||
|
.runeLiteFormattedMessage(new ChatMessageBuilder()
|
||||||
|
.append(ChatColorType.HIGHLIGHT)
|
||||||
|
.append("You have scouted a record raid, whilst this is a very good raid to do you will probably end up profiting more by selling this raid to a team looking for it.")
|
||||||
|
.build())
|
||||||
|
.build());
|
||||||
|
|
||||||
|
chatMessageManager.queue(QueuedMessage.builder()
|
||||||
|
.type(ChatMessageType.FRIENDSCHATNOTIFICATION)
|
||||||
|
.runeLiteFormattedMessage(new ChatMessageBuilder()
|
||||||
|
.append(ChatColorType.HIGHLIGHT)
|
||||||
|
.append("The following are some places you can sell this raid: Scout Trading in We do Raids discord, and Buying Cox Rotations in Oblivion discord")
|
||||||
|
.build())
|
||||||
|
.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateInfoBoxState()
|
private void updateInfoBoxState()
|
||||||
|
|||||||
Reference in New Issue
Block a user