I finally worked out the actual trouble with the killing summon thing and not clowns.
It was the distance to waypoint, I would never had thought that would be an issue, who cares how far it is to the next or last waypoint when you are killing a mob.
player:update()
local seal, sealtable = player:findNearestNameOrId(102368)
if seal then
local oldsetting = settings.profile.options.MAX_TARGET_DIST
settings.profile.options.MAX_TARGET_DIST = 1500 -- because of issue of distance to WP....
yrest(2000) -- wait for seal to really appear
print("found: "..#sealtable.." lets kill them")
for i = 1, #sealtable do
player:updateXYZ()
player:target(sealtable[i]) -- kills the summoning portal and not the ghost clown.
player:fight() -- might need to create fight function
yrest(2000) -- give a couple of seconds for the clown to disappear.
player:update()
end
print("they should be dead")
settings.profile.options.MAX_TARGET_DIST = oldsetting
end
Remember no matter you do in life to always have a little fun while you are at it
Hm... You're using a different id for the seal. Are you sure the issue wasn't that the id changed? Although I seem to remember a similar issue, was it with another minigame? Maybe survival.
Yeah I posted earlier the ID was wrong/changed and it still wouldn't work, issue is the distance check to the waypoint in evaltargetdefault which seems to get used even when you don't use findenemy, I didn't do a full trace to look for how it gets used I just know it is checking distance to waypoint and since the file only has the 3 waypoints and the rest is all done by functions it was ALWAYS to far from waypoint and so wouldn't attack the seal, it would however respond to being attacked by the clowns.
Remember no matter you do in life to always have a little fun while you are at it
If you make a working cot waypoint maybe you should start a new post for it. Then I can comment my first post saying it doesn't work anymore because you can't fly in cot anymore, and add a link to your working version.
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.
I guess I can post what I am using at the moment, it requires to use models so you can just walk over the other tiles, only had 1 time where char didn't go into portal, just a tweak of cords really.
I haven't been making my code look pretty as I pretty much just use what I make and haven't posted, seems hardly anyone on forum is playing game anymore.
This is a very ugly looking butchered up version of cot_tele which works anyway lol
The whole pathing code is probably not needed but I used it to work on that type of coding, also makes it easier to look for agro, kill seal and then continue on the same path.
-- check if aggro before attacking
target:updateLastHP()
target:updateTargetPtr()
self:updateBattling()
if( self.Battling == true and -- we have aggro
target.LastHP == 0 and -- we haven't started attacking it yet
target.TargetPtr ~= self.Address and
not target:targetIsFriend()) then -- but not from that mob
target:updateName()
local enemy = player:findEnemy(true,nil,evalTargetDefault) -- find enemy
if enemy and enemy.Address ~= self.TargetPtr then -- It's not the one we targeting
cprintf(cli.green, language[36], target.Name); -- Aggro during first strike
self:clearTarget();
break_fight = true;
break;
end
end;
if you are in combat and have done no damage it looks for an enemy to kill (using evaltargetdefault) regardless of if you already have a target.
I am thinking I want a player:killTarget() =)
--=== Added ===--
I just added an arg to player:fight() and if the arg is true it doesn't do that code I posted, I'll test it out and not use that increase max distance code.
Remember no matter you do in life to always have a little fun while you are at it
I have been having some trouble with this older version of the wp when running several clients. It seems to just stop when looting a key. I have to move move it thru the exit door to get it to start again. I may try the newer version and see if it works.
Hey, everybody!
I have a problem with "cot" wp: sometimes if >summoning portal< before exit-portal, bot making next things: he stoping (destination found) before summoning portal, wait some seconds (how and any time with this portal), kill it and... sleeping! No, it's not "player: sleep", it's just waiting for something like forloadscreen. So, if I won't see this, bot will stay in this position all 15 minutes and leave from COT cose time out and will stay again...
And there is one more mistake which I seen in this wp - sometimes bot run to angle of [key]-stone and it makes error cose bot only run in one point all 15 minutes.
Of couse, much tanks for you for this wp, but really I think that it's too complicated with all this point's massives...
And have any ideas to fix mistakes which I posted?
*I use model