Rock5's ToDo list

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#41 Post by rock5 » Thu Mar 24, 2011 4:52 am

This has been suggested before as onWaypoint. I believe Administrator never liked the idea or didn't see the need. A solution was proposed to create a timed event. Escentially you would create and start the timed event in the onload section on the waypoint and it would fire after every x number of seconds.

Check out the wiki
http://www.solarstrike.net/wiki/index.p ... isterTimer
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Tsutomu
Posts: 77
Joined: Thu Mar 24, 2011 1:50 am

Re: Rock5's ToDo list

#42 Post by Tsutomu » Thu Mar 24, 2011 5:04 am

Yes, that's an idea, but isn't nowhere near quality of implementation of OnWaypoint-OnArrive whatever, as it fires up somewhere we don't know where, it is different every time it's used, what we need is an Event based on position not time.
We can fire that time based event every 0.5 seconds and it'd be good enough but there's a chance it'll be too cpu consuming, and ending up bringing us stuck if launched at wrong places.
But never mind, really just thought of it as a good option if it was implementable quickly, skip looting few mobs isn't that much of a waste is it. ;)
Thanks.

User avatar
Tsutomu
Posts: 77
Joined: Thu Mar 24, 2011 1:50 am

Re: Rock5's ToDo list

#43 Post by Tsutomu » Fri Mar 25, 2011 6:19 pm

-------
I would like to sugges few ideas.
(not concerning hacks ;) something else)

I think that a screenshot on death is good option, but also, screnshot on stuck, or stuck+10failed attempts unstucking would be very usefull in finding out what went wrong with waypoint file.

Also i think it might be good to implement a function to load a script if bot is stuck
That way we could for ex. Leave party, then load up a waypoint that starts from ressurection point.

Just making it more stuck-proof and troubleshooting waypoint files (screenshot on stuck option).

If those are time-consuming to implement i offer to try it myself, just would need an instruction which files should i look in. I think that if we manage to get this working it would be a nice addition to it's functions, i think it would be very usefull to all of us.

I had one more thing in mind but forgot, too late for deep thoughts i guess. :D

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's ToDo list

#44 Post by lisa » Fri Mar 25, 2011 8:18 pm

Tsutomu wrote:-------
I would like to sugges few ideas.
(not concerning hacks ;) something else)

I think that a screenshot on death is good option, but also, screnshot on stuck, or stuck+10failed attempts unstucking would be very usefull in finding out what went wrong with waypoint file.

Also i think it might be good to implement a function to load a script if bot is stuck
That way we could for ex. Leave party, then load up a waypoint that starts from ressurection point.

Just making it more stuck-proof and troubleshooting waypoint files (screenshot on stuck option).

If those are time-consuming to implement i offer to try it myself, just would need an instruction which files should i look in. I think that if we manage to get this working it would be a nice addition to it's functions, i think it would be very usefull to all of us.

I had one more thing in mind but forgot, too late for deep thoughts i guess. :D
There is a profile section for stuck code

Code: Select all

	<onUnstickFailure><![CDATA[
		-- Lua code to execute when MAX_UNSTICK_TRIALS is reached.
	]]></onUnstickFailure>
When the bot reaches max number of unstuck tries, 10 by default, it will then load what ever code you put in this section.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#45 Post by rock5 » Sat Mar 26, 2011 1:02 am

Buy the way, this thread is not for making feature requests. It's only to discuss my current list and the items already on it.

Please create your own thread for feature requests.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Tsutomu
Posts: 77
Joined: Thu Mar 24, 2011 1:50 am

Re: Rock5's ToDo list

#46 Post by Tsutomu » Sat Mar 26, 2011 2:12 am

ok sorry

thx

vietales
Posts: 48
Joined: Sun Apr 17, 2011 12:57 pm

Re: Rock5's ToDo list

#47 Post by vietales » Sun Apr 17, 2011 1:22 pm

Increase range of inventory to include transmutor and item shop. Progress Complete
Have u published it?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#48 Post by rock5 » Mon Apr 18, 2011 12:01 am

vietales wrote:
Increase range of inventory to include transmutor and item shop. Progress Complete
Have u published it?
Yeh, long time ago, in December I think. If my list say 'Progress Complete' then it means it was committed. Check out the wiki for how to use the updated inventory functions.
http://www.solarstrike.net/wiki/index.p ... _Functions
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Rock5's ToDo list

#49 Post by Alkaiser » Thu Apr 21, 2011 9:06 am

A suggestion for lootAll() function.

It seems that there are times the mob won't get looted properly... the player will start to move toward the lootable target, then stop short for no apparent reason. The target gets added to the do-not-loot list and never gets looted.

I have made the following change that will force the bot to try up to 3 times before giving up. It's working great for me so far... been using it work weeks (I made the same change to lootBodies() before lootAll() was integrated)

Code: Select all

	local retry = 3
	while true do
		self:update()
		if( self.Battling  and
			self:findEnemy(true,nil,evalTargetDefault)) then
			break
		end

		local Lootable = self:findEnemy(false, nil, evalTargetLootable)

		if Lootable == nil then
			break
		end

		self:target(Lootable)
		self:update()
		if self.TargetPtr ~= 0 then -- Target's still there.
			self:loot()
			yrest(50)
			Lootable:update();
			if Lootable.Lootable == true then
				if retry == 0 then
					-- Failed to loot. Add to ignore list
					lootIgnoreListPos = lootIgnoreListPos + 1
					if lootIgnoreListPos > settings.profile.options.LOOT_IGNORE_LIST_SIZE then lootIgnoreListPos = 1 end
					lootIgnoreList[lootIgnoreListPos] = Lootable.Address
				else
					retry = retry - 1
				end
			end
		end
	end

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#50 Post by rock5 » Thu Apr 21, 2011 10:03 am

How long does it take to try 3 times if a body isn't lootable? I'm thinking there might be places where you encounter a lot of bodies that you can't loot so always trying 3 times might slow it down eg. an area where mobs are dropping daily items that you already have the maximum you can carry in your inventory.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Rock5's ToDo list

#51 Post by Alkaiser » Thu Apr 21, 2011 11:47 pm

rock5 wrote:How long does it take to try 3 times if a body isn't lootable? I'm thinking there might be places where you encounter a lot of bodies that you can't loot so always trying 3 times might slow it down eg. an area where mobs are dropping daily items that you already have the maximum you can carry in your inventory.
Not sure I understand. Do you mean if there is an obstacle between the loot and player? It doesn't loot at all if the mob isn't lootable. If there is a need for a loot retry there is a few second delay between each attempt though I don't know where they delay comes from. If inventory is full the loop breaks just as you designed it so it won't try to loot again and again if there is no space available. If loot is successful it won't try to loot again since Lootable.Lootable should be false.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#52 Post by rock5 » Fri Apr 22, 2011 12:09 am

What I meant is, in some zones you can only hold enough items for the daily and no more. For example in the Northern Janost Forest many of the dailies need 5 items and when collectiong them you can't pick up anymore once you have 5, although the monsters still drop them. That means if you are in such a zone and area where daily items are dropped, if you already have the maximum amount of that item, you would continuously be trying 3 times to loot those daily items.

I think I know what your initial problem was. It's when the character slightly bumps into something then stops moving forward. So the problem is not so much the looting but the movement. The player:moveTo function doesn't suffer from this problem because it keeps moving forward until it reaches its desination. But player:loot() effectively just clicks the body and allows the character to move there on it's own. Maybe what we need is a distance check in loot() so it can try again only if it's still out of range to loot? If it's in range it only tries once?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#53 Post by rock5 » Fri Apr 22, 2011 1:04 am

I've had a look at the loot function and there is already a 'try again' feature in it. You set LOOT_AGAIN, in your profile options, to a number and it will try again after waiting LOOT_AGAIN ms. Except it only tries again if the character didn't move. If the character stops part way, it won't loot again. But this could be adjusted to loot again when out of range, regardless of whether it moved or not.

Would you like to test a fix for me?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Rock5's ToDo list

#54 Post by Alkaiser » Sat Apr 23, 2011 10:25 am

rock5 wrote:I've had a look at the loot function and there is already a 'try again' feature in it. You set LOOT_AGAIN, in your profile options, to a number and it will try again after waiting LOOT_AGAIN ms. Except it only tries again if the character didn't move. If the character stops part way, it won't loot again. But this could be adjusted to loot again when out of range, regardless of whether it moved or not.

Would you like to test a fix for me?
Certainly!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#55 Post by rock5 » Sat Apr 23, 2011 10:37 am

Around line 1381 of player.lua you will see these lines

Code: Select all

		self.X == hf_x  and	-- we didn't move, seems attack key is not defined
	    self.Z == hf_z  and
Comment them out or delete them all together

Code: Select all

		--self.X == hf_x  and	-- we didn't move, seems attack key is not defined
	    --self.Z == hf_z  and
And don't forget to set LOOT_AGAIN in the profile.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Rock5's ToDo list

#56 Post by Alkaiser » Sat Apr 23, 2011 12:37 pm

I added

Code: Select all

<option name="LOOT_AGAIN" value="3" />
and commented the lines you suggested. It works more often now, but still occasionally gives up right away after moving two steps then stopping.

UPDATE:
I also added this to my profile:

Code: Select all

<option name="LOOT_TIME"			value="10" />
It seems to be working 100% now.
Last edited by Alkaiser on Sat Apr 23, 2011 12:54 pm, edited 1 time in total.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#57 Post by rock5 » Sat Apr 23, 2011 12:46 pm

With these changes it tries 2 times. I suspect, those times where it still stops, it would stop even if it tried 3 times.

I'll think about it and see if I can come up with a reliable solution.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Rock5's ToDo list

#58 Post by Alkaiser » Sat Apr 23, 2011 12:56 pm

I also added this to my profile:

Code: Select all

<option name="LOOT_TIME"			value="10" />
It seems to be working 100% now.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's ToDo list

#59 Post by rock5 » Sat Apr 23, 2011 1:08 pm

Alkaiser wrote:I also added this to my profile:

Code: Select all

<option name="LOOT_TIME"			value="10" />
It seems to be working 100% now.
I'm not sure I understand how that could help but do some more testing and let me know how it goes. I'll try to figure out how it helps.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Rock5's ToDo list

#60 Post by Alkaiser » Sat Apr 23, 2011 1:12 pm

The only thing I could think of is the distance calculation used to determine how much time to allow for looting isn't quite right. I'll remove the LOOT_TIME and see what happens.

UPDATE: I removed it and it still seems to be working. Not sure why it wasn't working right before.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests