Official home of Madman Addon

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
runegolemsentry
Posts: 10
Joined: Mon Sep 03, 2012 1:07 pm

Re: Official home of Madman Addon

#41 Post by runegolemsentry » Sun Oct 14, 2012 8:20 am

there is a problem still. With this code it works fine, but sometimes my char still dies.. because once he does the clear target function, he start moving to the next waypoint, and since i'm using teleport it gets stuck in the gates and killer after.
Once stucked it targets madman again, is there a way to reduce casualities to 0? :)

I tryed something like that

Code: Select all

   if getZoneId() == 127 or getZoneId() == 128 then
      target = player:getTarget();
      if target.Id == 103857 or target.Id == 103169  then
        if RoMScript("madman.Time") >= 1 then 
          unregisterTimer("timedAttack");
          player:clearTarget();
          printf("Running\n")
          rest(5000)
          local okander = player:findNearestNameOrId("103169")
          player:target(okander)  
        end
      end
   end
but something goes wrong, because it runs for 5 seconds, then runs again for 5 seconds and gets stuck to a corner, so on a eventual second jump it dies.
Before, after the player:target i added this code

Code: Select all

if not (okander)
  repeat
    yrest(1000)
  until false
end
  
but with this, the addon wasn't working at all, again the problem of running back to the position.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Official home of Madman Addon

#42 Post by rock5 » Sun Oct 14, 2012 10:09 am

Was that the right id that you tried to retarget?

Assuming that the address for Okander doesn't change, which I think it doesn't, you could also try

Code: Select all

          player:target(target)
instead of

Code: Select all

          local okander = player:findNearestNameOrId("103169")
          player:target(okander) 
So it just targets what you had targeted before.
  • 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

runegolemsentry
Posts: 10
Joined: Mon Sep 03, 2012 1:07 pm

Re: Official home of Madman Addon

#43 Post by runegolemsentry » Sun Oct 14, 2012 11:12 am

well now it works, both with my code and with yours (my id is fine since i do normal mode always, for easy it should be changed), the only problem happeans in case of an eventual second jump as i said, but so far i won't need to worry about it since the fight it self lasts 5-6 seconds normally.

User avatar
nightclaw
Posts: 123
Joined: Sun Sep 02, 2012 4:39 am

Re: Official home of Madman Addon

#44 Post by nightclaw » Wed Oct 17, 2012 2:31 pm

ya if fight over by 1st jump or just after seams to be NP but if it last longer tell second jump it goes all crazy 4 some reason not had chance test rocks idea yet been bit busy with other things but i try test it soon thax

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Official home of Madman Addon

#45 Post by noobbotter » Wed Oct 17, 2012 4:07 pm

It seems like no matter what I tried, for some reason my bot wanted to run back to where Okander is going to land. Not every time, but often enough that it wasn't working for me. I implemented a teleport instead of a run so that my bot would get far away from Okander and not be able to run back under him. As an extra added precaution, I also have me bot do a holy aura (priest skill, immune to all damage for 5 seconds, instant cast) prior to teleporting out of the way. To do this I went into my madman addon script and commented out the moveForwardStart() and MoveForewardStop() commands and then in my waypoint file, I have the following code in the function that's called when the timer goes off:

Code: Select all

            if RoMScript("madman.Time") >= 1 then 
			player:cast("PRIEST_HOLY_AURA");
			DOD_HA_CASTED = true --this is so I can know I casted holy aura and can wait longer before my next entance into the instance so my cooldown will expire.
			printf("lost my Okander target... teleporting \n");
			local madx = nil
			local madz = nil
			if (player.X > 2300) and (player.Z > 2323) then
				-- go to left side
				madx = 2151;
				madz = 2313;
			elseif (player.X > 2300) and (2323 > player.Z) then
				-- go to near entrance:
				madx = 2198;
				madz = 2507;
			elseif (2300 > player.X) and (player.Z > 2323) then
				-- go to far side
				madx = 2407;
				madz = 2120;
			elseif (2300 > player.X) and (2323 > player.Z) then
				-- go to right side
				madx = 2479;
				madz = 2347;
			end
			teleport(madx, madz);
			yrest(1000);
			player:update();
			yrest(6000)
	   end
The X and Z coordinates are basically set so that whichever side of the arena I'm on, I will teleport to the opposite side when okander jumps. This works pretty well but every once in a while after jumping the bot can't reacquire Okander as a target. I think it's sticking somewhere on releasing the target and gets stuck in some kind of loop. Anyway, just wanted to share my teleport away from Okander code for anyone that was having the same problem of walking back underneath him before he lands.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests