Rock5's catchCavy script

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: Rock5's catchCavy script

#21 Post by VoidMain » Thu Aug 26, 2010 12:16 pm

I have the AT address, i can add it too...

fred55555
Posts: 101
Joined: Sat Aug 07, 2010 7:57 pm

Re: Rock5's catchCavy script

#22 Post by fred55555 » Thu Aug 26, 2010 3:15 pm

When it runs out of traps I am asuming that it will keep going with the boting or will it stop

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

Re: Rock5's catchCavy script

#23 Post by rock5 » Thu Aug 26, 2010 6:57 pm

fred55555 wrote:When it runs out of traps I am asuming that it will keep going with the boting or will it stop
Yes, it only tries to catch the cavy if you have a trap.

What this line does

Code: Select all

	if cavy and inventory:useItem(206776) then -- Huntsman's Trap
is only continue if it found a matching cavy and it successfully used a trap. Otherwise it does nothing.
  • 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

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Rock5's catchCavy script

#24 Post by Starrider » Fri Aug 27, 2010 5:24 am

in the german description golden Cavy's are also announced by the ingame massage as magic cavy as the magic cavys are, so is it equal because you add the objekt id?

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

Re: Rock5's catchCavy script

#25 Post by rock5 » Fri Aug 27, 2010 5:45 am

Starrider wrote:in the german description golden Cavy's are also announced by the ingame massage as magic cavy as the magic cavys are, so is it equal because you add the objekt id?
Don't worry about the ingame message, just look at the name above it.

I just happen to have the german language file here. It says that "Magic Cavy" is called "Magisches Cavia" and "Golden Magic Cavy" is called "Goldenes magisches Cavia". So to catch all cavys you would have to use catchCavy("Cavia"). Try that and let me know. (And remember, to catch "Golden Magic Cavy" only, just leave it blank ie. catchCavy(). That will work in any language.)
  • 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

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Rock5's catchCavy script

#26 Post by Starrider » Fri Aug 27, 2010 7:09 am

ok :-) but still dont' found some golden one with the bot at the area where I am when i observed the bot for a while... :-(, but it will come...

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

Re: Rock5's catchCavy script

#27 Post by rock5 » Fri Aug 27, 2010 7:35 am

Starrider wrote:ok :-) but still dont' found some golden one with the bot at the area where I am when i observed the bot for a while... :-(, but it will come...
Did you try catchCavy("Cavia")?
  • 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

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Rock5's catchCavy script

#28 Post by Starrider » Fri Aug 27, 2010 3:16 pm

no didn't tried it yet, but the problem was that no golden ones are spawning XD

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

Re: Rock5's catchCavy script

#29 Post by rock5 » Fri Aug 27, 2010 11:19 pm

Starrider wrote:no didn't tried it yet, but the problem was that no golden ones are spawning XD
I just thought you might want to test it first on normal cavys by using catchCavy("Cavia") first.

Golden Cavys are pretty rare. If I remember correctly, after fighting all night, it catches 1 or 2 .
  • 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

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Rock5's catchCavy script

#30 Post by nokirk » Sat Aug 28, 2010 5:29 am

tried it with german client and changed "golden magic cavy" to "Goldenes magisches Cavia" in the the script to be on the safe side. Works perfect :) Only thing that was a little strange but has nothing to do with the script, I found a golden one, catched it and it was only a phantastic egg. Seems like there's no 100% guarantee that every golden one becomes a holy egg.

Anyways, thanks a lot for another great and fun script rock5! Awesome work.

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's catchCavy script

#31 Post by miximixi007 » Mon Aug 30, 2010 12:20 pm

sorry,where can i find the instruction for magic cavy?

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

Re: Rock5's catchCavy script

#32 Post by rock5 » Mon Aug 30, 2010 12:48 pm

miximixi007 wrote:sorry,where can i find the instruction for magic cavy?
Do you mean where can you learn about cavys? Talk to 1 of the Sorrun bothers. They can be found in a few of the lower level zones, in town on a donkey.
  • 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

fred55555
Posts: 101
Joined: Sat Aug 07, 2010 7:57 pm

Re: Rock5's catchCavy script

#33 Post by fred55555 » Mon Aug 30, 2010 2:01 pm

<onLeaveCombat>
catchCavy()
</onLeaveCombat>

this is the line needed to add plus the copy f the .lua file in the folder

the above is it right want to test it out tonight

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

Re: Rock5's catchCavy script

#34 Post by rock5 » Tue Aug 31, 2010 12:10 am

fred55555 wrote:<onLeaveCombat>
catchCavy()
</onLeaveCombat>

this is the line needed to add plus the copy f the .lua file in the folder

the above is it right want to test it out tonight
That will default to catch the rare 'Golden Magic Cavy' and should work in any language. To catch any cavy you have to use the language specific general part of the cavy name eg. catchCavy("Cavy") for English clients will catch "Golden Magic Cavy" and "Magic Cavy".
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: Rock5's catchCavy script

#35 Post by swietlowka » Tue Aug 31, 2010 5:45 am

also i belive we could make it check if have any traps before calling the script in ten on leave combat... or is it allready implememnted in the script?


EDIT:
PS. Is it possible to make alle those scripts and good shared waypoints to be put into bot like in next revision or smt? it would make it much easier to call some of those functions :)

fred55555
Posts: 101
Joined: Sat Aug 07, 2010 7:57 pm

Re: Rock5's catchCavy script

#36 Post by fred55555 » Tue Aug 31, 2010 7:22 am

Wow great script amazing work, worked the first time out the door as I tested it on regulare cavys to ensure it worked caught 3 in an hour.

and with that I have a question :)

I am trying to run my scripts in areas were there are mostly yellow mobs (non agro) a few red (agro) is there a way to have the script catch the cavy if no agroes are around ranther than trying to kill all in the area before attempt to catch cavy it missed catching a few
if it is a huge chore then o worries cause the script work great and missing a few isnt a big deal compared to the many it does catch.

thnx again

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

Re: Rock5's catchCavy script

#37 Post by rock5 » Wed Sep 01, 2010 8:57 pm

swietlowka wrote:also i belive we could make it check if have any traps before calling the script in ten on leave combat... or is it allready implememnted in the script?
It does check already in this line.

Code: Select all

	if cavy and inventory:useItem(206776) then -- Huntsman's Trap
What happens in this line is, if there is a cavy it will try to use a trap. If you don't have any traps then it will return false and stop executing the function.
swietlowka wrote:PS. Is it possible to make alle those scripts and good shared waypoints to be put into bot like in next revision or smt? it would make it much easier to call some of those functions :)
I personally don't think it's appropriate to add scripts that perform a particular task or else you could end up adding thousands of them. I think only functions that can be used for many purposes and places should be added. Anyway it's not that hard to add the functions you want to uses anymore. It used to be a hassle to copy and past functions into the userfunctions.lua file and remember which functions go with which functions but now all you have to do is add the addon_XXXX.lua file to the userfunctions folder.
  • 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 catchCavy script

#38 Post by rock5 » Wed Sep 01, 2010 10:09 pm

fred55555 wrote:Wow great script amazing work, worked the first time out the door as I tested it on regulare cavys to ensure it worked caught 3 in an hour.

and with that I have a question :)

I am trying to run my scripts in areas were there are mostly yellow mobs (non agro) a few red (agro) is there a way to have the script catch the cavy if no agroes are around ranther than trying to kill all in the area before attempt to catch cavy it missed catching a few
if it is a huge chore then o worries cause the script work great and missing a few isnt a big deal compared to the many it does catch.

thnx again
It's supposed to try to catch the cavy when leaving combat. Isn't that what it is doing? The only time it wouldn't catch the cavy is if you've aggro'd multiple mobs. It should catch the cavy after you've killed all currently aggro'd mobs.

I just did some testing. It looks like it can take upto 800ms before the player.Battling flag is reset so it keeps skipping catching the cavy.

Try this, before line 11

Code: Select all

	if player.Battling then return end --Don't catch cavy if still battling.
add this code

Code: Select all

	local c=0
	while c < 10 do -- max time to wait 1s
		yrest(100)
		player:update()
		if not player.Battling then break end -- Battling flag cleared. ok to catch cavy.
		c = c + 1
	end
That should, if needed, wait upto 1 second for the Battling flag to clear. See how that goes.
  • 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

fred55555
Posts: 101
Joined: Sat Aug 07, 2010 7:57 pm

Re: Rock5's catchCavy script

#39 Post by fred55555 » Thu Sep 02, 2010 2:54 pm

could i take the check for battling out ?
will it try and catch the cavy then while being attacked ?

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

Re: Rock5's catchCavy script

#40 Post by rock5 » Fri Sep 03, 2010 3:05 am

fred55555 wrote:could i take the check for battling out ?
will it try and catch the cavy then while being attacked ?
Yes, if you are tough enough and your health stays above 50% it will still catch it even though a mob is attacking it. If your health falls below 50% or was already below 50% then it will give up and attack the mob but will have wasted a trap.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest