-
Zilvermoon
- Posts: 104
- Joined: Mon Jan 05, 2009 8:19 am
#1
Post
by Zilvermoon » Sun Jul 26, 2009 5:20 pm
I have noticed that when I move through areas with hostile mobs my character will continue to move even though the player:Battling() flag is activated, this isn't a real issue in most places, but if you farm elites it is a big deal, so here is a fix:
player.lua line 644 - 663
Code: Select all
self:update();
if( self.Battling and not self:haveTarget() ) then
cprintf(cli.green, language[35]);
keyboardRelease( settings.hotkeys.MOVE_FORWARD.key );
local aggroWaitStart = os.time();
while(self.Battling) do
if( player:haveTarget() ) then
break;
end;
if( os.difftime(os.time(), aggroWaitStart) > 3 ) then
cprintf(cli.red, language[34]);
break;
end;
yrest(10);
player:update();
end
end
It's working like a charm for me, but then again i have only had a little bit of testing with it ... so if you wanna use pleases feel free to do so
Zilvermoon
-
d003232
- Posts: 1252
- Joined: Wed Jun 03, 2009 4:27 pm
#2
Post
by d003232 » Sun Jul 26, 2009 5:25 pm
Zilvermoon wrote:I have noticed that when I move through areas with hostile mobs my character will continue to move even though the player:Battling() flag is activated, this isn't a real issue in most places, but if you farm elites it is a big deal, so here is a fix:
Ähm Ähm Ähm, SVN 89 from a couple days before has that function within.
-
Zilvermoon
- Posts: 104
- Joined: Mon Jan 05, 2009 8:19 am
#3
Post
by Zilvermoon » Sun Jul 26, 2009 5:43 pm
d003232 wrote:Zilvermoon wrote:I have noticed that when I move through areas with hostile mobs my character will continue to move even though the player:Battling() flag is activated, this isn't a real issue in most places, but if you farm elites it is a big deal, so here is a fix:
Ähm Ähm Ähm, SVN 89 from a couple days before has that function within.
lol sorry didn't update my version before farming tonight ...
Zilvermoon
-
Zilvermoon
- Posts: 104
- Joined: Mon Jan 05, 2009 8:19 am
#4
Post
by Zilvermoon » Sun Jul 26, 2009 6:53 pm
Ok your code is great, but you didn't take into account that the function also is used for moving towards a mob, which is making a great mess out of it, so to fix that edit line 641 in player.lua to:
code:
new code:
Code: Select all
if( self.Battling and not self:haveTarget() ) then
edit: Naa strike that, this isn't really helping ... but something is up ... with the battling code inside movement ... try moving in TRAVEL waypoints in an hostile area and test what I mean ...
Zilvermoon
Last edited by
Zilvermoon on Sun Jul 26, 2009 6:59 pm, edited 1 time in total.
-
d003232
- Posts: 1252
- Joined: Wed Jun 03, 2009 4:27 pm
#5
Post
by d003232 » Sun Jul 26, 2009 6:57 pm
Zilvermoon wrote:Ok your code is great, but you didn't take into account that the function also is used for moving towards a mob, which is making a great mess out of it, so to fix that edit line 641 in player.lua to:
code:
new code:
Code: Select all
if( self.Battling and not self:haveTarget() ) then
Zilvermoon
Dmnd. I only play casters. They don't need to move while battling.
-
Zilvermoon
- Posts: 104
- Joined: Mon Jan 05, 2009 8:19 am
#6
Post
by Zilvermoon » Sun Jul 26, 2009 7:00 pm
Too quick for me, did an edit of pre-post.
Naa strike that, this isn't really helping ... but something is up ... with the battling code inside movement ... try moving in TRAVEL waypoints in an hostile area and test what I mean ...
Now I think I got it working like it should, if you would please help test this:
Code: Select all
if( self.Battling and ( self.Fighting == false ) ) then
Zilvermoon
-
d003232
- Posts: 1252
- Joined: Wed Jun 03, 2009 4:27 pm
#7
Post
by d003232 » Sun Jul 26, 2009 7:16 pm
Zilvermoon wrote:
Now I think I got it working like it should, if you would please help test this:
Code: Select all
if( self.Battling and ( self.Fighting == false ) ) then
Yes, I think self.Fighting check should be the right thing. Now I understand, what's self.Fighting is for!
Do you make the SVN fix?
-
Zilvermoon
- Posts: 104
- Joined: Mon Jan 05, 2009 8:19 am
#8
Post
by Zilvermoon » Sun Jul 26, 2009 7:27 pm
d003232 wrote:Zilvermoon wrote:
Now I think I got it working like it should, if you would please help test this:
Code: Select all
if( self.Battling and ( self.Fighting == false ) ) then
Yes, I think self.Fighting check should be the right thing. Now I understand, what's self.Fighting is for!
Do you make the SVN fix?
Sure I can do that, just need to pull a few modifications out of my version before SVN update.
Zilvermoon
-
d003232
- Posts: 1252
- Joined: Wed Jun 03, 2009 4:27 pm
#9
Post
by d003232 » Sun Jul 26, 2009 7:30 pm
Zilvermoon wrote:Sure I can do that, just need to pull a few modifications out of my version before SVN update.
No, don't do that. It's better just to copy the 'rom' folder to a new name like 'romsvn'. Delete all content within 'romsvn' and do a SVN update at 'romsvn'. Then you have a parallel clear SVN version.
I can also do it tomorrow morning. I nowhave no go to sleep.
Last edited by
d003232 on Sun Jul 26, 2009 7:36 pm, edited 1 time in total.
-
Zilvermoon
- Posts: 104
- Joined: Mon Jan 05, 2009 8:19 am
#10
Post
by Zilvermoon » Sun Jul 26, 2009 7:33 pm
d003232 wrote:Zilvermoon wrote:Sure I can do that, just need to pull a few modifications out of my version before SVN update.
No, don't do that. It's better just to copy the 'rom' folder to a new name like 'romsvn'. Delete all content within 'romsvn' and do a SVN update at 'romsvn'. Then you have a parallel clear SVN version.
Np, was only one modification, none moving for buff is player.Battling, so I have updated SVN
Zilvermoon
Who is online
Users browsing this forum: Bing [Bot] and 1 guest