Page 2 of 6

Re: Rock5's catchCavy script

Posted: Thu Aug 26, 2010 12:16 pm
by VoidMain
I have the AT address, i can add it too...

Re: Rock5's catchCavy script

Posted: Thu Aug 26, 2010 3:15 pm
by fred55555
When it runs out of traps I am asuming that it will keep going with the boting or will it stop

Re: Rock5's catchCavy script

Posted: Thu Aug 26, 2010 6:57 pm
by rock5
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.

Re: Rock5's catchCavy script

Posted: Fri Aug 27, 2010 5:24 am
by Starrider
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?

Re: Rock5's catchCavy script

Posted: Fri Aug 27, 2010 5:45 am
by rock5
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.)

Re: Rock5's catchCavy script

Posted: Fri Aug 27, 2010 7:09 am
by Starrider
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...

Re: Rock5's catchCavy script

Posted: Fri Aug 27, 2010 7:35 am
by rock5
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")?

Re: Rock5's catchCavy script

Posted: Fri Aug 27, 2010 3:16 pm
by Starrider
no didn't tried it yet, but the problem was that no golden ones are spawning XD

Re: Rock5's catchCavy script

Posted: Fri Aug 27, 2010 11:19 pm
by rock5
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 .

Re: Rock5's catchCavy script

Posted: Sat Aug 28, 2010 5:29 am
by nokirk
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.

Re: Rock5's catchCavy script

Posted: Mon Aug 30, 2010 12:20 pm
by miximixi007
sorry,where can i find the instruction for magic cavy?

Re: Rock5's catchCavy script

Posted: Mon Aug 30, 2010 12:48 pm
by rock5
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.

Re: Rock5's catchCavy script

Posted: Mon Aug 30, 2010 2:01 pm
by fred55555
<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

Re: Rock5's catchCavy script

Posted: Tue Aug 31, 2010 12:10 am
by rock5
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".

Re: Rock5's catchCavy script

Posted: Tue Aug 31, 2010 5:45 am
by swietlowka
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 :)

Re: Rock5's catchCavy script

Posted: Tue Aug 31, 2010 7:22 am
by fred55555
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

Re: Rock5's catchCavy script

Posted: Wed Sep 01, 2010 8:57 pm
by rock5
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.

Re: Rock5's catchCavy script

Posted: Wed Sep 01, 2010 10:09 pm
by rock5
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.

Re: Rock5's catchCavy script

Posted: Thu Sep 02, 2010 2:54 pm
by fred55555
could i take the check for battling out ?
will it try and catch the cavy then while being attacked ?

Re: Rock5's catchCavy script

Posted: Fri Sep 03, 2010 3:05 am
by rock5
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.