Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MercAutoEquip #1141

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

MercAutoEquip #1141

wants to merge 12 commits into from

Conversation

aim2kill
Copy link

@noah- as you requested all in one patch

noah- and others added 10 commits January 2, 2019 18:16
add support for account with more than 8 chars
add flash for various move/town tasks to alleviate desync issues
fix item color handling for non-standard string tables
fix bug with runeword base check
GameAction, MuleLogger, Misc
-Add missing var declaration from last commit
Set previous only when result is set. Now checks area id only when result is false for better performance.
Fix Storage.IsLocked error by checking for both parent type and gid
Create MercAutoEquipExample.nip
@aim2kill aim2kill mentioned this pull request Jan 27, 2019
return false;
}

if (typeof bodyLocMerc === "number") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

refactor idea, remove this "number" check and assign as array to begin with:
bodyLocMerc = [5]; etc

Copy link
Author

Choose a reason for hiding this comment

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

This is need it as its need it for player auto equip. Im wrong?

Copy link
Author

@aim2kill aim2kill Jan 31, 2019

Choose a reason for hiding this comment

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

		break;
	default:
		return false;
	}

	if (typeof bodyLoc === "number") {
		bodyLoc = [bodyLoc];
	}

	return bodyLoc;
},

this one is for the player

classid = items[0].classid;

if (this.equipMerc(items[0], bodyLoc[j])) {
Misc.logItem("Equipped Merc", me.getItem(-1, -1, gid));
Copy link
Collaborator

Choose a reason for hiding this comment

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

run the eslint or jslint to fix any formatting issues like this

Copy link
Author

Choose a reason for hiding this comment

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

I fix it


for (i = 0; i < 3; i += 1) {
if (item.toCursor()) {
var gid = item.gid;
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't think this is needed since you commented out logitem, consider removing this code and related comments

Copy link
Author

Choose a reason for hiding this comment

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

I remove the // commented

}
}
}
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

add newline before return

Copy link
Author

Choose a reason for hiding this comment

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

fix it

bodyLocMerc = 3;

break;

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove newline here

Copy link
Author

Choose a reason for hiding this comment

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

fix it

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.

4 participants