Page 1 of 1

Disappering mobs

Posted: Sun Jul 21, 2013 11:44 am
by cokebot
Hi, is there any way to handle with disappering mobs, like in the goblin mine.
I mean mobs how don't die and drop loot, but disappear slowly when they are dead.
The problem is, when they disappier the bot still want to kill them till it clears the target, that takes a lot of time.

Re: Disappering mobs

Posted: Tue Jul 23, 2013 7:54 am
by lolita
maybe you can add something like this on skillcast in your profile

Code: Select all

<onSkillCast>
if target.HP == 0 then
  player:clearTarget()
end
</onSkillCast>

Re: Disappering mobs

Posted: Wed Jul 24, 2013 11:39 am
by kuripot
i encountered in survival game... the mobs already died but my char continue attacking them because the corpse showing has full hp.. i activated show health bars thats why i see its show the coprse has hp even it is died

Re: Disappering mobs

Posted: Fri Aug 02, 2013 5:27 am
by gloover
Has someone solved this problem? I have the same problem of disappesaring the mobs, especially if they're going down by one hit. The bot has a problem to clear the target correctly

Re: Disappering mobs

Posted: Fri Aug 02, 2013 5:31 am
by rock5
Is it happening doing normal botting or only when using a goblin mines script? What loot options are you using and do you have any onleavecombat code?

Re: Disappering mobs

Posted: Fri Aug 02, 2013 8:16 am
by gloover
Yes rock, you've right - it happens in the goblin mine.
Loot options setted to false, onleavecombat only checks the mainhand dura

Re: Disappering mobs

Posted: Fri Aug 02, 2013 9:17 am
by rock5
Does your goblins script use a custom attack function or does it use the regular bot attack sequence?

Re: Disappering mobs

Posted: Fri Aug 02, 2013 9:31 am
by gloover
its a regular attack sequence. The only thing I've in my onscillcast is

Code: Select all

	if arg1.Name == "ROGUE_THROW" then
		player.ranged_pull = false
	end
but this doesn't a matter

Re: Disappering mobs

Posted: Fri Aug 02, 2013 10:06 am
by rock5
If you use the same character and profile botting elsewhere, does it work normally? If so there may be something funny about the mobs in the minigame. Something different about it's hp or it Alive value or attackable value or lootable value. You might have to have it print some stuff to see what's happening, maybe in onskillcast. Something like

Code: Select all

local target = player:getTarget()
if target and target.Address~=player.Address then
    printf("Alive=%s, HP=%d, Attackable=%s, Lootable=$s\n",tostring(target.Alive),target.HP,tostring(target.Attackable),tostring(target.Lootable))
end

Re: Disappering mobs

Posted: Fri Aug 02, 2013 2:37 pm
by lolita
i entered Goblines , and with changed profile option on skill cast, kiled 3 mobs from comand line, here is results

Code: Select all

Command> player:fight()
Engaging enemy [Brown-Eyed Cotton Worm] in combat.
Use MACRO: MAGE_FLAME          =>   Brown-Eyed Cotton Worm (45591/45591)
Alive=true, HP=45591, Attackable=true, Lootable=$s
Use MACRO: MAGE_LIGHTNING      =>   Brown-Eyed Cotton Worm (45591/45591)
Alive=true, HP=45591, Attackable=true, Lootable=$s
Use MACRO: MAGE_FIREBALL       =>   * Failed to cast *
Fight finished. Killed 2 <UNKNOWN>. (fight #2 / runtime 2 minutes)
Clearing target.
Command> player:fight()
Engaging enemy [Sharp-toothed Cotton Worm] in combat.
Use MACRO: MAGE_FLAME          =>   Sharp-toothed Cotton Worm (45591/45591)
Alive=true, HP=45591, Attackable=true, Lootable=$s
Use MACRO: MAGE_LIGHTNING      =>   * Failed to cast *
Fight finished. Killed 3 <UNKNOWN>. (fight #3 / runtime 2 minutes)
Clearing target.
Command> player:fight()
Engaging enemy [Redeye Cotton Worm] in combat.
Use MACRO: MAGE_FLAME          =>   Redeye Cotton Worm (45591/45591)
Alive=true, HP=45591, Attackable=true, Lootable=$s
Use MACRO: MAGE_LIGHTNING      =>   * Failed to cast *
Fight finished. Killed 4 <UNKNOWN>. (fight #4 / runtime 3 minutes)
Clearing target.
Command>
i oneHit every mob with mage, and he disappear in few second, but mob's Hp stay on full all the time until he vanish (something like brazer in survival game, just brazers Hp is 0, here remaing Hp is Hp befor killing strike)

Re: Disappering mobs

Posted: Fri Aug 02, 2013 2:49 pm
by rock5
I messed up with the lootable variable. It was supposed to be %s not $s.

It doesn't look like the other values change. If the HP doesn't even go down how are we supposed to know the mob is dead? If the mob becomes lootable we might be able to use that.

Re: Disappering mobs

Posted: Fri Aug 02, 2013 3:01 pm
by lolita
no loot from mobs in GM
Hp go down, but if you onehit him, it stay full, if you hit him several times it drops, but never reach 0

Re: Disappering mobs

Posted: Fri Aug 02, 2013 3:22 pm
by rock5
You could try clearing the target if the hp drops below a certain amount. I don't know if it will work though. In onskillcast put this code

Code: Select all

local target = player:getTarget()
if target and target.Address~=player.Address and 5 > target.HP then
    player:clearTarget()
    player:breakFight()
end

Re: Disappering mobs

Posted: Fri Aug 02, 2013 3:37 pm
by haringpb
Well a kind of walkaround for mages and outher classes with aoes is too make a castskillbyname function in the waypoint file, and to change type to Travel.
If anyone got better/outher solutions just tell me ;)

Re: Disappering mobs

Posted: Fri Aug 02, 2013 6:39 pm
by lisa
More than likely a bit value changes, like the one I use in andor training.

Code: Select all

				local function checkclicked(address)
					local tmp = memoryReadRepeat("int", proc, address + addresses.pawnAttackable_offset) or 0;
					if bitAnd(tmp,0x8) then
						return false
					else
						return true
					end
				end
I changed the true and false for this purpose though, it would need testing.

Re: Disappering mobs

Posted: Mon Aug 05, 2013 2:03 pm
by haringpb
One outher question i got regarding to this topic, do you also get critical error in about half an hour or is your bot only slowly?

Well and i´ve got an different idea, as we all seem to onehit the mobs in goblin cant we simply use one skill on the more clear the target, stop the fight and move on?
I tried to do this in preCodeOnElite with:

Code: Select all

RoMScript('CastSpellByName("Heiliger Schlag")');
		player:clearTarget()
    		player:breakFight()
		
but it seems not to work that well.

Update: Still not working but maybe an idea 4 someone else: i changed the while loop into a for i = 0, 0 so tha the attack function should have been called only once and the fight should have been breaked

Ps sry 4 my bad english ;)

Re: Disappering mobs

Posted: Tue Aug 06, 2013 3:22 pm
by haringpb
Anyone got an idea, how i can simply use one skill on the mob and after clearing the target, because with my current script Im getting crit after 10 minuits in Goblin.

Re: Disappering mobs

Posted: Tue Aug 06, 2013 6:56 pm
by lisa
untested, of course

In profile, or just set this as the event in the WP, plenty of examples already on how to do that.

Code: Select all

<onSkillCast>
if arg1.Type == STYPE_DAMAGE then
target = player:getTarget()
player:addToMobIgnoreList(target.Address)
player:clearTarget()
player:breakFight()
end
</onSkillCast>
You have to be sure you can 1 shot everything though as it will ignore the mob after you attack it once.


This is assuming you tried the code I posted earlier and it didn't work, that previously posted code would probably be best/most reliable though ....

Re: Disappering mobs

Posted: Sat Aug 10, 2013 4:23 pm
by haringpb
Ok thanks so far lisa, its the perfect solution for the publisher of the topic, but i´m still getting crits in goblin after 5 to 30min, when i farm manualy i can go 2 hours+ without crits. Maybe someonelse who is also interested in goblin ep/tp farming might check out.

You will need swim hack and autoacceptgrpinv.

Re: Disappering mobs

Posted: Sun Aug 11, 2013 3:44 am
by gloover
haringpb wrote:...but i´m still getting crits in goblin after 5 to 30min, when i farm manualy i can go 2 hours+ without crits....
I've the same problem. I've tried the "model-free-slim-client" without any addon accept of Invitelastgroup, but also got crits sporadically every 5-20 min, so I think it depends on cleartarget-problem descripted above.