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
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Rock5's catchCavy script

#61 Post by jduartedj » Sun Dec 19, 2010 1:02 pm

rock5 wrote:
jduartedj wrote:You're right but the typo I found was "cavyy.address" and not "IgnoreCavyy"! anyway Rock5 you should look it up, maybe it makes a difference?
Well it would as it means it wouldn't work as intended. I've got an update ready including better battling checks but I can't test it until the problems with the inventory are fixed. I'll look into that now.
Have you tried adding my new address for Bagids it should help inventory problems but NOT the stuck problem.
I'll look forward for the update, if you want i can test it myself.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

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

Re: Rock5's catchCavy script

#62 Post by rock5 » Sun Dec 19, 2010 1:31 pm

jduartedj wrote:I'll look forward for the update, if you want i can test it myself.
Actually i might take you up on that seeing as i mostly already updated it but didn't get to test it and now can't. I'll have one last look over it tomorrow and send it to you.
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Rock5's catchCavy script

#63 Post by jduartedj » Sun Dec 19, 2010 1:35 pm

Great, PM me tomorrow then.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Rock5's catchCavy script

#64 Post by jduartedj » Tue Dec 21, 2010 10:17 pm

Rock5,

I've been using your catch cavy script and it has been doing very well so far in 10 traps got 100% success! luck or not it's a successful result! So after this basic test is there any other particular test you want me to run regarding this?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Rock5's catchCavy script

#65 Post by jduartedj » Wed Dec 22, 2010 12:46 am

talked a little early as I would have this changed:

Code: Select all

local HerdDist
to at least 50, because It looks like it is following the cavy rather than passing over it! the bot stay almost next to the cavy and it just goes on further away or sideways.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

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

Re: Rock5's catchCavy script

#66 Post by rock5 » Wed Dec 22, 2010 4:03 am

jduartedj wrote:talked a little early as I would have this changed:

Code: Select all

local HerdDist
to at least 50, because It looks like it is following the cavy rather than passing over it! the bot stay almost next to the cavy and it just goes on further away or sideways.
Well you said it was working so maybe you just had bit of lag when it didn't pass the cavy. I'm happy to change it to a more conservative 50 if you have tested it and it works to your satisfaction. Did you test it?
  • 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

horsewilly
Posts: 25
Joined: Tue Aug 17, 2010 6:41 am

Re: Rock5's catchCavy script

#67 Post by horsewilly » Sat Jan 08, 2011 9:08 am

Hey, this usually works great, but sometimes (for example if other people try to screw you over), the bot just keeps putting more and more traps. Tonight, for example, it seems the bot used 20 traps, and I caught 3 eggs (from golden cavies). Is there a way to make it use a maximum of about 2 traps by any chance?

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

Re: Rock5's catchCavy script

#68 Post by rock5 » Sat Jan 08, 2011 9:45 am

horsewilly wrote:Hey, this usually works great, but sometimes (for example if other people try to screw you over), the bot just keeps putting more and more traps. Tonight, for example, it seems the bot used 20 traps, and I caught 3 eggs (from golden cavies). Is there a way to make it use a maximum of about 2 traps by any chance?
Actually if it fails to catch the cavy I'm pretty sure it's supposed to give up and move on, not keep laying traps to try again. I can't think of any way someone could cause you to use up extra traps.
  • 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

mayainverse
Posts: 94
Joined: Tue Dec 21, 2010 3:12 am

Re: Rock5's catchCavy script

#69 Post by mayainverse » Sun Jan 09, 2011 12:54 am

im having problems with this. i changed "golden magic cavy" to "magic cavy" to test if it works. and it works fine. but then i swap back to it saying "golden magic cavy" a golden cavy spawned a little bit later and it just ignored it.

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

Re: Rock5's catchCavy script

#70 Post by lisa » Sun Jan 09, 2011 1:18 am

rock5 wrote:Actually if it fails to catch the cavy I'm pretty sure it's supposed to give up and move on, not keep laying traps to try again. I can't think of any way someone could cause you to use up extra traps.
I think he is saying or assumed that the bot would lay another trap if it failed to catch the cavy.
If someone was close by and kept making cavy run from u then you would never catch it.

I'f it lays 1 trap per cavy then purhaps you had 20 golden cavy spawn and only caught 3. Hard to say
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 catchCavy script

#71 Post by rock5 » Sun Jan 09, 2011 6:15 am

mayainverse wrote:im having problems with this. i changed "golden magic cavy" to "magic cavy" to test if it works. and it works fine. but then i swap back to it saying "golden magic cavy" a golden cavy spawned a little bit later and it just ignored it.
I don't know. I can't see what would cause that unless you were just really unlucky. Leave it running overnight or something and see if it catches any cavies.
lisa wrote:I'f it lays 1 trap per cavy then purhaps you had 20 golden cavy spawn and only caught 3. Hard to say
Not likely. My experience, you would be lucky to catch 3 Golden Magic Cavies overnight which is why it confuses me. Maybe he just misremembered how many he had.
  • 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

horsewilly
Posts: 25
Joined: Tue Aug 17, 2010 6:41 am

Re: Rock5's catchCavy script

#72 Post by horsewilly » Sun Jan 09, 2011 7:05 pm

Nope, I'm pretty sure it must have used like 18 at least. This happened to me once before, where I had 28 traps the night before, and when I tried to catch a cavy the next day, I realized that I had no traps left.
Either way, if you say it stops, Ill try to watch next time it makes the cavy sound and see what happens exactly.

mayainverse
Posts: 94
Joined: Tue Dec 21, 2010 3:12 am

Re: Rock5's catchCavy script

#73 Post by mayainverse » Mon Jan 10, 2011 2:34 am

it works. i guess it does not always find the cavy. but it caught one today by itself. sad thing was it was the 1 most perfect pet i could have had except stats was element fire but needed wind sigh

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Rock5's catchCavy script

#74 Post by sdude13 » Sun Jan 30, 2011 12:24 pm

I play as mage endlevel, so kills are one hits.
Installed addon on german client and put:

Code: Select all

<onLeaveCombat>
		-- Additional Lua code to execute after killing an enemy
		cprintf(cli.yellow, "check cavy\n");
		catchCavy("Magisches Cavia");
</onLeaveCombat>
in it, the cprintf i did to see if onLeaveCombat is triggered.
it does not catch any cavy.
I tried catchCavy("Magisches Cavia");, catchCavy();, catchCavy("Cavy");

nothing happens, it gives me the "check cavy" message and does nothing.
i changed the addon itself putting

Code: Select all

-- if player.Battling then return end --Don't catch cavy if still battling.
and also

Code: Select all

local cavy = player:findNearestNameOrId(_cavy, player.IgnoreCavy)
	if cavy then cprintf(cli.yellow,"\a\found cavy\n") end
	if cavy and inventory:useItem(206776) then -- Huntsman's Trap
to see if it arrives at that line. it doesnt :(

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

Re: Rock5's catchCavy script

#75 Post by lisa » Sun Jan 30, 2011 9:35 pm

If your killing in 1 shot then you could try changing your profile.

Code: Select all

		<option name="COMBAT_DISTANCE"    value="100"

You would atleast be in range of the mob when it dies, which might help it detect the cavy.
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 catchCavy script

#76 Post by rock5 » Sun Jan 30, 2011 10:57 pm

First to clarify some things.

As far as I know, there are no distance checks in catchCavy.

Code: Select all

catchCavy()
wont work because it defaults to "Golden Magic Cavy" which is the wrong language. It would have worked if I'd remembered to release my 1.02 version of the script which uses the id instead.

Code: Select all

catchCavy("Cavy") 
wont work again because it's the wrong language.

Code: Select all

catchCavy("Magisches Cavia")
I believe should only catch regular Magic Cavys because golden cavys is spelled with a small "m" in your language.

If you want to catch both regular and golden cavys try

Code: Select all

catchCavy("Cavia")
If it's still not catching the cavies then the following are reasons I can think of why it wouldn't.
1. You don't have any traps.
2. The player has aggro from a mob.
3. The cavy is being ignored because of a previous failed attempt to catch it.

I'll see about uploading my newer version of catchCavy.
  • 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

#77 Post by rock5 » Mon Jan 31, 2011 1:16 am

Ok, I've uploaded version 1.02.

Main changes:
  • catchCavy() has always defaulted to catching only Golden Magic Cavys. I've stated before that it works in any language. Now it really does work in any language.
  • catchCavy("cavy") will catch both types of cavy and will work in any client language.
  • No longer waits for 1s for the Battling flag to clear so it goes faster.
  • 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

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Rock5's catchCavy script

#78 Post by sdude13 » Mon Jan 31, 2011 3:08 am

tested new version, works like charm (on german client).
did not catch any golden so far but i guess i need more luck (or time hehe)

thank you !

Auto Pilot
Posts: 24
Joined: Tue Mar 01, 2011 3:23 am

Re: Rock5's catchCavy script

#79 Post by Auto Pilot » Thu Mar 03, 2011 7:20 pm

Just tried the script (setup to catch all cavys for the testing) and it's amazing how nicely it worked (I don't think I ever catched one that fast myself.

Now hopefully my char can catch some golden ones :oops:

Edit : after some testing it seem to work pretty nicely ... erm ... perfectly. Every trap that went missing from my bags was replaced by a amazing or holy pet egg :mrgreen: (and I didn't see the bot not try to catch a golden cavy, but that's obviously a pretty hard one to check)

Auto Pilot
Posts: 24
Joined: Tue Mar 01, 2011 3:23 am

Re: Rock5's catchCavy script

#80 Post by Auto Pilot » Tue Mar 29, 2011 6:50 pm

Been reading the code over and over, but I can't find what part of the code rings the bell, wanted to copy that in a script watching some boss spawn for me so I need your help again Rock for this one :mrgreen:

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests