Skip to content

Test merc AutoEquip#109

Open
jaenster wants to merge 2 commits intojaenster/autoplayfrom
mercAutoEquip
Open

Test merc AutoEquip#109
jaenster wants to merge 2 commits intojaenster/autoplayfrom
mercAutoEquip

Conversation

@jaenster
Copy link
Owner

@jaenster jaenster commented Sep 7, 2020

No description provided.

@jaenster jaenster marked this pull request as draft September 7, 2020 21:05
@jaenster jaenster marked this pull request as ready for review September 7, 2020 21:05
@jaenster jaenster marked this pull request as draft September 7, 2020 21:05
@jaenster jaenster marked this pull request as ready for review September 7, 2020 21:05
@jaenster
Copy link
Owner Author

jaenster commented Sep 7, 2020

@dzik87 / @ryancrunchi

Please review, i got this idea to convert the AutoEquip and make a separated merc and player one.

Do not merge


// no point in wanting items we cant equip
if (item.getStat(sdk.stats.Levelreq) > me.getStat(sdk.stats.Level) || item.dexreq > me.getStat(sdk.stats.Dexterity) || item.strreq > me.getStat(sdk.stats.Strength)) {
if (item.getStat(sdk.stats.Levelreq) > this.reference.getStat(sdk.stats.Level) || item.dexreq > this.reference.getStat(sdk.stats.Dexterity) || item.strreq > this.reference.getStat(sdk.stats.Strength)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we need to add extra check if item what we want replace doesn't give us bonus str/dex so we end up beign unable to equip new item.

When extra bonus stats from items are super handy i suggest to go with raw stats.


// no quest items
if (['msf','vip'].includes(item.code)) return false;
if (['msf', 'vip'].includes(item.code)) return false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we might also want to add Khalims Will

}

if (hasDependency(item)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can check do we have dependency item before excluding it ?


// Not an item, or unidentified, or not enough stats
if (this.type !== 4 || !this.getFlag(0x10) || this.getStat(sdk.stats.Levelreq) > me.getStat(sdk.stats.Level) || this.dexreq > me.getStat(sdk.stats.Dexterity) || this.strreq > me.getStat(sdk.stats.Strength)) {
if (this.type !== 4 || !this.getFlag(0x10) || this.getStat(sdk.stats.Levelreq) > onWho.getStat(sdk.stats.Level) || this.dexreq > onWho.getStat(sdk.stats.Dexterity) || this.strreq > onWho.getStat(sdk.stats.Strength)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: check vs raw stats or take into consideration bonuses from item we want to replace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants