Keep laying traps.... wtf
Keep laying traps.... wtf
Even without a cavy appearing, i keep laying traps. I have logged out and restarted MM several times, but have wasted aboout 6 traps... grrrr. What can I do to stop this???
Re: Keep laying traps.... wtf
Well going to need more info of course.
I'd try loading character with default profile, if it doesn't lay any traps then check whats in your profile that is causing it to lay traps.
I'd try loading character with default profile, if it doesn't lay any traps then check whats in your profile that is causing it to lay traps.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Keep laying traps.... wtf
I copied a profile that works fine, just changed the name. It seems to think I have a cavy to catch and lays a trap for some reason. I have changed to catch golden only but it just lays traps regardless even without a cavy?
Re: Keep laying traps.... wtf
Also what version of the catchcavy script are you using? And copy the commands you tried here.
- 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
Re: Keep laying traps.... wtf
Heres the cavy thingy....
and a bit of my profile...
Does each character have an event log or something, its like the stupid thing thinks it has to catch a cavy from ages ago......
Code: Select all
--==<< Rock5'scatchCavy function >>==--
--==<< By Rock5 Version 1.02 >>==--
--==<< >>==--
--==<< www.solarstrike.net/phpBB3/viewtopic.php?p=12979 >>==--
function catchCavy(_cavy)
local hpper = 50 -- Players hp percent threshhold to give-up catching the cavy
_cavy = _cavy or 103567 -- Default value "Golden Magic Cavy"
if string.lower(_cavy) == "cavy" then -- Look for all cavies
_cavy = {103566,103567}
end
local cavy = player:findNearestNameOrId(_cavy, player.IgnoreCavy)
if not cavy then return end -- No cavy, return
yrest(200); -- Make sure you've come to a complete stop.
player:update()
-- Don't catch cavy if still battling.
if player.Battling and
player:findEnemy(true, nil, evalTargetDefault) then
return
end
local function CalcNewPos(_trap, _cavy)
local HerdDist = 50 -- distance to herd cavy
local TrapCavyDist = distance(_trap.X, _trap.Z, _cavy.X, _cavy.Z)
local Ratio = (TrapCavyDist + HerdDist) / TrapCavyDist
local x = (_cavy.X - _trap.X) * Ratio + _trap.X
local z = (_cavy.Z - _trap.Z) * Ratio + _trap.Z
local NewPos = CWaypoint(x, z)
NewPos.Type = 4 -- Travel
return NewPos
end
if cavy and inventory:useItem(206776) then -- Huntsman's Trap
cprintf(cli.yellow,"\a\aAttempting to catch cavy...\n")
yrest(3000)
player:update()
trap = {X = player.X, Z = player.Z}
while true do
cavy:update()
if cavy.Id == 0 then break end -- cavy is gone
if distance(cavy.X, cavy.Z, trap.X, trap.Z ) < 5 then -- cavy is in trap
printf("Cavy is in trap\n")
memoryWriteInt(getProc(), player.Address + addresses.pawnTargetPtr_offset, cavy.Address);
RoMScript("UseSkill(1,1)"); yrest(50); RoMScript("UseSkill(1,1)"); -- 'click' again to be sure
yrest(2000);
break
end
if player.Battling and (100*player.HP/player.MaxHP) < hpper then -- taking too much damage. fight
player.IgnoreCavy = cavy.Address
break
end
NewPos = CalcNewPos(trap, cavy)
player:moveTo(NewPos, true)
yrest(200)
player:update()
end
end
end
Code: Select all
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
catchCavy()
player:update()
if 65 > (player.Pet.HP/player.Pet.MaxHP * 100) then
player:target( player.Pet )
player:cast("WARDEN_ELVEN_PRAYER")
yrest(3000)
end
]]></onLeaveCombat>
Re: Keep laying traps.... wtf
Is it possible it is now detecting cavy that is far away?
If so might need to add in a distance check before laying traps.
If so might need to add in a distance check before laying traps.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Keep laying traps.... wtf
BizARRo, I played another char for a little while, then came back to this one and, VIOLA, it is fine. I have no idea what happened....
Re: Keep laying traps.... wtf
I was thinking that but wouldn't it try to catch it anyway? Then you'd see that it is trying to catch a cavy far away. Still, it probably does need a distance check now. I'll see about updating it. Maybe compare it to MAX_TARGET_DIST.lisa wrote:Is it possible it is now detecting cavy that is far away?
If so might need to add in a distance check before laying 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
Re: Keep laying traps.... wtf
There was noone near me, I was literally miles from anyone, and there was defiitely no cavys about. It was very strange. I just had to kill something, and it would say setting a trap... like about six times. In fact to describe the incident more, I would kill a mushroom and have my character lay a trap. Thinking 'bloody hell' I would find something close hoping it would drop a cavy before the trap disappears, to only have the dopey character drop another trap within inches of the first
. Restarting MM changed nothing. I had to play another character for this bizarre behaviour to stop....... Still, trying to catch other peeps cavys is annoying to say the least. Maybe a distance thingy would be a great idea.......
Re: Keep laying traps.... wtf
Hate to ask, but now that things have quietened down a little (I think) can someone point me in the direction as to how I can add a range/distance option to the catchcavy script as suggested by Rock? Then I won't run off and try to catch someone elses cavy, which more often than not, run and hide just as the trap is laid, wasting the bloody trap....... 
Re: Keep laying traps.... wtf
Try changing line 16whome wrote:Hate to ask, but now that things have quietened down a little (I think) can someone point me in the direction as to how I can add a range/distance option to the catchcavy script as suggested by Rock? Then I won't run off and try to catch someone elses cavy, which more often than not, run and hide just as the trap is laid, wasting the bloody trap.......
Code: Select all
if not cavy then return end -- No cavy, returnCode: Select all
if not cavy or
distance(cavy.X, cavy.Z, player.X,player.Z) > settings.profile.options.MAX_TARGET_DIST then
return -- No cavy, return
end- 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