Greatblade of the Entwined Eclipse and Celestial Temple Forge Merge scripts#92
Open
Greatblade of the Entwined Eclipse and Celestial Temple Forge Merge scripts#92
Conversation
Reviewer's GuideAdds a reusable CoreEclipse helper plus two scripts to automate farming and purchasing the Greatblade of the Entwined Eclipse and related Celestial Temple Forge merge items via coordinated 4‑account dungeon runs with Scroll of Enrage handling and party management. Sequence diagram for Greatblade farming and dungeon run with enrage handlingsequenceDiagram
actor User
participant GreatbladeScript as GreatbladeoftheEntwinedEclipse
participant TempleMerge as CelestialTempleForgeMerge
participant Eclipse as CoreEclipse
participant Army as CoreArmyLite
participant Game as AQW_Server
User->>GreatbladeScript: run ScriptMain
GreatbladeScript->>Army: subscribe PartyManagement
GreatbladeScript->>Game: enable_party_join_pref
loop wait_for_4_party_members
GreatbladeScript->>Eclipse: SetupParty()
Eclipse->>Army: PartyInvite(player2..4)
Army-->>GreatbladeScript: PartyMemberArray()
end
GreatbladeScript->>Game: disable_party_join_pref
GreatbladeScript->>Eclipse: EquipWait(Scroll_of_Enrage)
GreatbladeScript->>Eclipse: EquipClasses(autoEnhance=true)
Note over GreatbladeScript,TempleMerge: Purchase Greatblade of the Entwined Eclipse
GreatbladeScript->>TempleMerge: BuyAllMerge(Greatblade_of_the_Entwined_Eclipse)
loop merge_requirements
TempleMerge->>TempleMerge: findIngredients()
alt needs Sliver_of_Moonlight
TempleMerge->>Eclipse: GetSliverOfMoonlight(count)
Eclipse->>Eclipse: new SolsticeMoon(this, count)
else needs Sliver_of_Sunlight
TempleMerge->>Eclipse: GetSliverOfSunlight(count)
Eclipse->>Eclipse: new MidnightSun(this, count)
else needs Ecliptic_Offering
TempleMerge->>Eclipse: GetEclipticOffering(count)
Eclipse->>Eclipse: new AscendEclipse(this, count)
end
end
Note over Eclipse,Game: Inside SolsticeMoon/MidnightSun/AscendEclipse dungeon loop
loop dungeon_farming
Eclipse->>Game: dungeonQueue_packet
Game-->>Eclipse: map_load(solsticemoon/midnightsun/ascendeclipse)
Eclipse->>Game: Attack or EclipseBossHandler()
rect rgba(200,200,255,0.2)
Game-->>Eclipse: boss_chat_or_aura_packets
Eclipse->>Eclipse: Listener() parse_packets
alt enrage_trigger_detected
Eclipse->>Eclipse: needsEnrage=true
Eclipse->>Game: pause_skill_rotation
Eclipse->>Game: use Scroll_of_Enrage
Game-->>Eclipse: target_aura_Focus_or_Reckless
Eclipse->>Eclipse: usedEnrage=true
end
end
Game-->>Eclipse: reward_item_drops
end
TempleMerge-->>GreatbladeScript: merge_complete
GreatbladeScript->>Army: PartyLeave()
GreatbladeScript->>Game: restore_gear_and_options
GreatbladeScript-->>User: Greatblade_of_the_Entwined_Eclipse obtained
Class diagram for CoreEclipse helpers and farming scriptsclassDiagram
class CoreEclipse {
- IScriptInterface Bot
- CoreBots C
- CoreEngine Core
- CoreUltra Ultra
- CoreAdvanced Adv
- CoreArmyLite sArmy
- bool needsEnrage
- bool usedEnrage
- bool usedLastEnrage
- DateTimeOffset tauntTime
- int deathCount
+ void EquipWait(string item)
+ void SetupParty()
+ void EquipClasses(bool autoEnhance)
+ void GetScrollOfEnrage(int count)
+ void GetSliverOfMoonlight(int count)
+ void GetSliverOfSunlight(int count)
+ void GetEclipticOffering(int count)
+ void EclipseBossHandler(string startingEnragePlayer, string bossName, string enrageMessage, bool alternateEnrage, string bossCell, int tauntOffset, int deathResetCount, string[] deathMessages)
}
class EclipseBase {
# CoreEclipse Eclipse
# IScriptInterface Bot
# CoreBots C
# CoreUltra Ultra
# bool doGetEnrage
# EclipseBase(CoreEclipse eclipse)
# void Restart(string packet)
# void Move(string packet)
}
class SolsticeMoon {
+ SolsticeMoon(CoreEclipse eclipse, int count)
- bool IsTaunter()
- void Kill()
}
class MidnightSun {
+ MidnightSun(CoreEclipse eclipse, int count)
- bool IsTaunter()
- void Kill()
}
class AscendEclipse {
+ AscendEclipse(CoreEclipse eclipse, int count)
- bool IsTeamSun()
- void Kill()
}
class CelestialTempleForgeMerge {
- IScriptInterface Bot
- CoreBots Core
- CoreFarms Farm
- CoreAdvanced Adv
- CoreAdvanced sAdv
+ CoreEclipse coreEclipse
- CoreArmyLite sArmy
- VictorMatsuri VictorMatsuri
+ bool DontPreconfigure
+ List~IOption~ Generic
+ string[] MultiOptions
+ string OptionsStorage
- bool dontStopMissingIng
+ List~IOption~ Options
+ void ScriptMain(IScriptInterface Bot)
+ void BuyAllMerge(string buyOnlyThis, mergeOptionsEnum buyMode)
- bool OnBotStopped(Exception exception)
}
class GreatbladeoftheEntwinedEclipse {
- IScriptInterface Bot
+ CoreBots C
- CoreAdvanced Adv
+ CoreUltra Ultra
- CoreArmyLite sArmy
+ CoreEclipse coreEclipse
+ CelestialTempleForgeMerge templeMerge
+ bool DontPreconfigure
+ string OptionsStorage
+ List~IOption~ Options
+ void ScriptMain(IScriptInterface Bot)
- bool OnBotStopped(Exception exception)
}
CoreEclipse <|-- EclipseBase
EclipseBase <|-- SolsticeMoon
EclipseBase <|-- MidnightSun
EclipseBase <|-- AscendEclipse
CelestialTempleForgeMerge --> CoreEclipse : uses
CelestialTempleForgeMerge --> CoreArmyLite : partyManagement
GreatbladeoftheEntwinedEclipse --> CoreEclipse : uses
GreatbladeoftheEntwinedEclipse --> CelestialTempleForgeMerge : delegatesMerge
GreatbladeoftheEntwinedEclipse --> CoreArmyLite : partyManagement
Flow diagram for Celestial Temple Forge merge ingredient acquisitionflowchart TD
A_Start[Start CelestialTempleForgeMerge ScriptMain] --> B_Setup[SetOptions and enable party join]
B_Setup --> C_WaitParty[Wait until PartyMemberArray length is 4]
C_WaitParty --> D_SetupParty[coreEclipse.SetupParty on leader]
D_SetupParty --> E_DisableParty[Disable party join preference]
E_DisableParty --> F_GearStore[Store gear and auto enhance]
F_GearStore --> G_Equip[coreEclipse.EquipWait and EquipClasses]
G_Equip --> H_BuyAll[BuyAllMerge]
subgraph MergeLoop[BuyAllMerge findIngredients loop]
H_BuyAll --> I_GetReq[Determine required ingredient]
I_GetReq --> J{Ingredient type}
J -->|Sliver of Moonlight| K_Moon[coreEclipse.GetSliverOfMoonlight]
J -->|Sliver of Sunlight| L_Sun[coreEclipse.GetSliverOfSunlight]
J -->|Victor of the Festival| M_Victor[Run VictorMatsuri.Storyline]
J -->|Ecliptic Offering| N_Offering[Ensure Rite of Ascension then coreEclipse.GetEclipticOffering]
J -->|Unknown| O_Unknown[Log not implemented and possibly stop]
K_Moon --> P_NextReq[Next ingredient]
L_Sun --> P_NextReq
M_Victor --> P_NextReq
N_Offering --> P_NextReq
O_Unknown --> P_NextReq
P_NextReq --> Q{More items to buy?}
end
Q -->|Yes| I_GetReq
Q -->|No| R_DoneMerge[All merge items purchased]
R_DoneMerge --> S_PartyLeave[Leave party]
S_PartyLeave --> T_RestoreGear[Restore gear from GearStore]
T_RestoreGear --> U_ResetOptions[Reset options and unsubscribe events]
U_ResetOptions --> V_End[End script]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The player configuration (player1–player4, autoclass) and party setup logic are duplicated between
CelestialTempleForgeMergeandGreatbladeoftheEntwinedEclipse; consider centralizing this inCoreEclipse(or a shared helper) so that party configuration and auto-class behavior are defined in one place. - Several snippets for the “potions bug” workaround (
Unbank("Healer"),Equip("Healer"), thenEquipClasses(false)) are repeated in multiple spots; extracting this into a single helper method inCoreEclipseor a utility class would make the behavior easier to maintain and adjust. - Many calls to
Bot.Config!.Get<string>(...)!.ToLower()assume non-null config values; adding validation and caching of normalized usernames early (e.g., in a small configuration object) would make the code more robust and avoid repeatedToLower()calls throughout the flow.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The player configuration (player1–player4, autoclass) and party setup logic are duplicated between `CelestialTempleForgeMerge` and `GreatbladeoftheEntwinedEclipse`; consider centralizing this in `CoreEclipse` (or a shared helper) so that party configuration and auto-class behavior are defined in one place.
- Several snippets for the “potions bug” workaround (`Unbank("Healer")`, `Equip("Healer")`, then `EquipClasses(false)`) are repeated in multiple spots; extracting this into a single helper method in `CoreEclipse` or a utility class would make the behavior easier to maintain and adjust.
- Many calls to `Bot.Config!.Get<string>(...)!.ToLower()` assume non-null config values; adding validation and caching of normalized usernames early (e.g., in a small configuration object) would make the code more robust and avoid repeated `ToLower()` calls throughout the flow.
## Individual Comments
### Comment 1
<location path="Dungeons/EclipseAscent/CoreEclipse.cs" line_range="198-199" />
<code_context>
+ C.UsePotion();
+ C.Sleep(200); // Small delay to allow scroll to apply
+
+ if (Bot.Player.HasTarget && (Bot.Target.Auras.Any(x => x.Name.Equals("Focus", StringComparison.OrdinalIgnoreCase) && x.RemainingTime > 4)) ||
+ Bot.Target.Auras.Any(x => x.Name.Equals("Reckless", StringComparison.OrdinalIgnoreCase) && x.RemainingTime > 4))
+ {
+ usedEnrage = true;
</code_context>
<issue_to_address>
**issue (bug_risk):** The aura check mixes && and || without full parentheses, which can cause incorrect logic and possible null access on Bot.Target.
Because `&&` binds tighter than `||`, this is evaluated as `(Bot.Player.HasTarget && focusAura) || recklessAura`. That allows the second `Bot.Target.Auras.Any(...)` to run even when `Bot.Player.HasTarget` is false, which can both change the intended logic and risk a null `Bot.Target`. Wrapping both aura checks in a single parenthesized group under the `HasTarget` check avoids this:
```csharp
if (Bot.Player.HasTarget && (
Bot.Target.Auras.Any(x => x.Name.Equals("Focus", StringComparison.OrdinalIgnoreCase) && x.RemainingTime > 4) ||
Bot.Target.Auras.Any(x => x.Name.Equals("Reckless", StringComparison.OrdinalIgnoreCase) && x.RemainingTime > 4)
))
{
...
}
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will get the sword in about 3 days. Does not implement the dailies to speed it up. Code might be a bit scuffed, but it did successfully get me the sword. Code has been auto formatted to match repo style.
Summary by Sourcery
Add automation scripts to farm Eclipse Ascent dungeons and Celestial Temple Forge merge items to obtain Greatblade of the Entwined Eclipse in a coordinated 4‑account party.
New Features:
Enhancements: