Page 3 of 6

Re: Rock5's catchCavy script

Posted: Fri Sep 03, 2010 1:04 pm
by fred55555
doing it with a warden pet takes all the punishment

i am usually in a not to heavy agro area mostly yellow to minimize this and low lvl areas

with the line removed i dont miss one cavy so performance is great.

like i said before ,you do great work and the script is amazing.

in higher areas i would leave the battling string in for safety
thank you again!

I thought i would share the reason for catching all pets

i stack pets to feed my main pet for max pts
ie pets A B C D
d= main pet
A B C are interchangeable pets as i load them (yes u can only do 2 others at a time)

pet A is fed to pet b, pet b is then fed to c
c now becomes A and you get a new b and C and do the process over and over again how many times you want until u have a pet with the points you want to transfer to your main then feed it to your main (remember this is the only step that has the three per day limit, the others do not since you are only ever feeding an egg to and egg once)
enjoy!

Re: Rock5's catchCavy script

Posted: Thu Sep 09, 2010 1:40 pm
by MiesterMan
Must give my thanks for a most excellent addon. :D

Re: Rock5's catchCavy script

Posted: Fri Sep 10, 2010 3:54 am
by fluxus
great addon, works very well out of the box :)
rock you simply rock :P

Re: Rock5's catchCavy script

Posted: Sat Nov 13, 2010 10:46 am
by jduartedj
Hey i was looking for this! nice! is it working 100%?

I had an idea to programme something like this. if you need help testing/fixing it just say so I'd be glad to help!

Re: Rock5's catchCavy script

Posted: Mon Nov 15, 2010 2:48 am
by rock5
jduartedj wrote:Hey i was looking for this! nice! is it working 100%?

I had an idea to programme something like this. if you need help testing/fixing it just say so I'd be glad to help!
As far as I know it works most of the time. Unless some obstacle gets in the way of course.

Re: Rock5's catchCavy script

Posted: Thu Nov 18, 2010 6:42 am
by atroxa
Hey,
as Mage it often doesn't take the spawning Cavy. I assume it has something to do with
local cavy = player:findNearestNameOrId(_cavy, player.IgnoreCavy)
as from the Name the nearest target is as an distant mob-killer often an other Mob and not the Cavy.
any Ideas for changing that (besides going into close-range combat?)
Maybe player:findTarget(); maybe (gonna try it back home later)?

Thx

Re: Rock5's catchCavy script

Posted: Thu Nov 18, 2010 7:39 am
by rock5
atroxa wrote:Hey,
as Mage it often doesn't take the spawning Cavy. I assume it has something to do with
local cavy = player:findNearestNameOrId(_cavy, player.IgnoreCavy)
as from the Name the nearest target is as an distant mob-killer often an other Mob and not the Cavy.
any Ideas for changing that (besides going into close-range combat?)
Maybe player:findTarget(); maybe (gonna try it back home later)?

Thx
local cavy = player:findNearestNameOrId(_cavy, player.IgnoreCavy)
is fine. It will target the nearest cavy that matches the name _cavy. And it doesn't have distance limitations.

Can you explain better what happens when it fails to catch the cavy? Does it start to catch it but stop? Does it get aggro while trying to catch it? Does it not try at all? etc.

Re: Rock5's catchCavy script

Posted: Thu Nov 18, 2010 3:16 pm
by jduartedj
rock5 wrote: Can you explain better what happens when it fails to catch the cavy? Does it start to catch it but stop? Does it get aggro while trying to catch it? Does it not try at all? etc.
In my case I've found that running the script under aggro can be a bit of a mess, as either the player gets the mob and forgets the cavy or forgets the mob and it might get the char killed to catch the cavy.
Also I've had a few cases where there is no attempt to catch it, as if it didn't see a cavy there.

Re: Rock5's catchCavy script

Posted: Thu Nov 18, 2010 10:34 pm
by rock5
How did you use the command, ie. what argument did you give it?

Re: Rock5's catchCavy script

Posted: Thu Nov 18, 2010 10:39 pm
by jduartedj
rock5 wrote:How did you use the command, ie. what argument did you give it?

Code: Select all

catchCavy("Cavy");

Re: Rock5's catchCavy script

Posted: Fri Nov 19, 2010 12:17 am
by rock5
The only reasons I can think of why it wouldn't start to try and catch the cavy are;
1. You ran out of traps (or you are not keeping them in your bags eg. transmutor).
2. You picked up some aggro before you started.
3. You already tried catching that cavy previously.

Re: Rock5's catchCavy script

Posted: Fri Nov 19, 2010 3:44 am
by atroxa
Hey,
it works like 3/4 of the time,

tested it with and without the line:
if player.Battling then return end

but seems the same.
It just ignors the Cavy and goes on killing the next mob. Seems to happen more likely on one-hit kills, maybe Cavy spawning bit slower(?).
Will play with: yrest(200); -- Make sure you've come to a complete stop.
around a bit today.
But gona watch it a while today and will report.
Traps like 400 in packpack 1 and happen even without any aggro while cavy spawns.

But when it finds the cavy it works like charm :-)



/Update:
Changed profile now it works always ;-) THX (assume it has something to do with HARVEST_DISTANCE as one of the big differences in the profiles? )


Thanks alot

Re: Rock5's catchCavy script

Posted: Fri Nov 19, 2010 4:40 am
by Jengoso
I just tried to add the Catchcavy to my bot but I cant seem to get it to work. I use revision 520, copied the catchcavy file to my userfunctions directory (which was empty except for a readme file before) and added this to my profile:
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
-- catchCavy("Magic Cavy")
]]></onLeaveCombat>

I also have huntmans traps in backpack 1 but it will not ring a bell or seem to detect the cavys when they spawn. Any ideas?

Re: Rock5's catchCavy script

Posted: Fri Nov 19, 2010 4:59 am
by atroxa
Hey:

Code: Select all

	<onLeaveCombat><![CDATA[
                catchCavy("Cavy");
		-- Additional Lua code to execute after killing an enemy
	]]></onLeaveCombat>
-- means the rest of the line is a comment ;-)

greetz

Re: Rock5's catchCavy script

Posted: Fri Nov 19, 2010 5:35 am
by Jengoso
Oh..Works like a charm now!

Re: Rock5's catchCavy script

Posted: Fri Nov 19, 2010 8:27 am
by rock5
atroxa wrote:/Update:
Changed profile now it works always ;-) THX (assume it has something to do with HARVEST_DISTANCE as one of the big differences in the profiles? )
I can't see any distance checks in catchcavy. Are there any other differences on the profiles?

Re: Rock5's catchCavy script

Posted: Sun Nov 21, 2010 6:57 pm
by atroxa
just took a look at the new profile,
a littlebit more like the default one on the Combat - Area,
harvestdistance 150 (insted of 60), combat_distance 80 (instead of 150), max_target_distance 125 (instead of 200).

the lootBodies();script (half-working) out of the forum on leavecombat (changed with the player.update inside) before catching cavys.

Maybe I just had a laggy day or so, but now it works nearly perfect. (like 9/10 because of nasty buildings in my farmspot)

Re: Rock5's catchCavy script

Posted: Sat Dec 18, 2010 7:26 am
by JackBlonder
Works almost perfect for me, but I think there's a typo at line 42

Code: Select all

				player.IgnoreCavyy = cavy.Address
shoud be

Code: Select all

				player.IgnoreCavy = cavy.Address

Re: Rock5's catchCavy script

Posted: Sat Dec 18, 2010 11:07 am
by jduartedj
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?

Re: Rock5's catchCavy script

Posted: Sat Dec 18, 2010 10:29 pm
by rock5
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.