Rom Bot error
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Rom Bot error
*I just update everything and delete all my userfunctions and waypoints and change the ingamefunctions and boot the rombot and throws me this error
*ROM BOT R777
*MICROMACRO V1.04.167
*ROM BOT R777
*MICROMACRO V1.04.167
If you think something is right just because everyone else believes,you're not thinking.
Re: Rom Bot error
What this means is that in your userfunctions.lua file it does some code when it load, probably a RoMScript, that causes setupMacro to run early when starting the bot. In most cases the bot will still start ok but in some cases this will cause an error or some other strange effect. For example when the game has been patched and the addresses need to be updated, usually the bot updates the addresses when it starts. But because of the code in userfunctions.lua it will cause an error because it tries to do run setupMacro before the addresses have been updated.
The message is just a warning letting you know that a potential problem exists.
Usually userfunction.lua (and userfunctions in the userfunctions folder for that matter) should only create functions, not execute code. If you have to execute code you should be careful what you do.
The message is just a warning letting you know that a potential problem exists.
Usually userfunction.lua (and userfunctions in the userfunctions folder for that matter) should only create functions, not execute code. If you have to execute code you should be careful what you do.
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Rom Bot error
without userfunctions throws this error but with userfunctions not
Okey understood Rock5 many thanks
Okey understood Rock5 many thanks
If you think something is right just because everyone else believes,you're not thinking.
- cibervagos
- Posts: 26
- Joined: Sat Apr 12, 2014 10:36 pm
- Location: Argentina
Re: Rom Bot error
Hi Rock! I have a problem. Some times (many times) my bot get stuck on Clearing Target. I don't know where I need to start looking for.
Re: Rom Bot error
ClearTarget is used in a lot of places in the bot so I need to know what it was doing when it got stuck. For now I'll assume it's the one at the end of the fight. Seeing as the bot usually works, maybe you have some bad code in the onLeaveCombat section of your profile?
- 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
- cibervagos
- Posts: 26
- Joined: Sat Apr 12, 2014 10:36 pm
- Location: Argentina
Re: Rom Bot error
I have 2 function in my waypoint.
Function 1 (Looking for the Boss)
Function 2 (Looting the Boss):
I quit the second function from OnLeaveCombat be couse bot stuck many time. Now I don't have anything in OnLeaveCombat.
Sorry for my english.
Function 1 (Looking for the Boss)
Code: Select all
function Buscando()
local jefe = player:findNearestNameOrId(102349); -- Life Leecher (Origin)
if jefe then
player:target(jefe);
local blanco = player:getTarget();
sendPartyChat('|H|h|cffCC99FFEncontré a |r|cffAA6666'..blanco.Name..'|r|cffCC99FF! con |r|cffFFAAAA'..tostring(blanco.HP)..'|r|cffCC99FF de HP.|r|h')
RoMScript('SetRaidTarget("target",1);');
keyboardPress(key.VK_SPACE); -- I jump to avoid an obstacule (if there).
yrest(600);
keyboardPress(key.VK_7); -- Pull skill (I have a meele character).
yrest(3000);
keyboardPress(key.VK_1);
yrest(800);
blanco:update()
if blanco.HP > 0 then
sendPartyChat('|H|h|cffCC99FFA darle rosca!!!!!|r|h')
repeat
succionavida = player:findEnemy(nil,102350) -- Summoned Boss
if succionavida then -- I don't need this for now. I need replace fight loop to use it.
player:target(succionavida)
otroBicho = player:getTarget();
sendPartyChat('|H|h|cffCC99FFMato primero el trucho...|r|h')
repeat
player:fight()
otroBicho:update()
until otroBicho.HP == 0 -- Here stuck some time. When combat end. Clearing Target.
else
player:target(jefe)
end
if 60 > (player.HP/player.MaxHP*100) then -- I don't need this for now.
RoMScript("SendChatMessage('|H|h|cffFF4444JUEPUTA!!|r|h', 'SAY')")
end
player:fight()
blanco:update()
until blanco.HP == 0
Looteando();
sendPartyChat('|H|h|cffCC99FFListo|r|h')
yrest(500)
succionavida = player:findEnemy(nil,102350)
if succionavida then
player:target(succionavida)
otroBicho = player:getTarget();
if otroBicho.HP > 0 then
sendPartyChat('|H|h|cffCC99FFVamos por el otro!|r|h')
repeat
player:fight()
otroBicho:update()
until otroBicho.HP == 0 -- Here stuck some time. When combat end. Clearing Target.
sendPartyChat('|H|h|cffCC99FFMuertos los 2.|r|h')
else
Looteando(); -- Call loot function
end
else
Looteando();
end
else
blanco:update()
if blanco.HP == 0 then
sendPartyChat('|H|h|cffCC99FFParece que esta muerto... a lootear!|r|h')
Looteando();
end
end
end
end
Code: Select all
function Looteando()
player:updateBattling()
if (not player.Battling) then
local elBicho = player:findNearestNameOrId(102349)
if elBicho then
player:target(elBicho);
local blanco = player:getTarget();
if blanco.HP == 0 then
buffed = player:getBuff(504033) -- looking for root buff
if buffed then
sendPartyChat('|H|h|cffCC99FFSe encontro un puto Debuff que impide el looteo.|r|h')
for index, buff in pairs(player.Buffs) do
if string.find(buffed.Name,buff.Name,1, true) then
lefttime=RoMScript("GetPlayerBuffLeftTime(GetPlayerBuff("..index..", 'HELPFUL'))"); -- Try to get debuff remaining time (never work :'( )
print("Intentando tomar tiempo del buff: "..tostring(lefttime));
sendPartyChat('|H|h|cffCC99FFAún no puedo tomar el tiempo de |r|cffFFFF88'..buff.Name..'.|r|cffCC99FFPuede ser |r|cffFFAAAA'..tostring((lefttime))..'|r|cffCC99FFseg.??|r|h')
sendPartyChat('|H|h|cffCC99FFPor las dudas descanso por |r|cffFFAAAA45|r|cffCC99FF seg.|r|h')
player:rest(45);
return
end
end
else
sendPartyChat('|H|h|cffCC99FFNo se encontro Debuff.|r|h')
end
sendPartyChat('|H|h|cffAA6666'..blanco.Name..'|r|cffCC99FF está morido. A lootear!!|r|h')
player:target(elBicho);
player:loot(elBicho)
sendPartyChat('|H|h|cffCC99FFDone ;].|r|h') -- Here stuck some time. Clearing Target.
else
sendPartyChat('|H|h|cffCC99FFTodavia no se murió??.|r|h')
end
end
end
end
Sorry for my english.
Re: Rom Bot error
you have
player:fight() will fight until target is dead or fight reaches time limit set in profile.
So the only reason why you would need to use that repeat loop is if the fight is ending before boss dies due to time limit being reached, if that is the case then just change that value in your profile.
With some bosses it is possible that the bot may think fight is over when it really isn't, HoS boss comes to mind where it becomes impossible to attack it for a period of time and then it comes back, in this case though the bot stays in combat and then when boss comes back again the bot attacks it again, so end result is boss still dies but bot says it killed 2-3 of the boss in it's counting. Either way default bot code still works fine.
Code: Select all
repeat
player:fight()
otroBicho:update()
until otroBicho.HP == 0 -- Here stuck some time. When combat end. Clearing Target.
So the only reason why you would need to use that repeat loop is if the fight is ending before boss dies due to time limit being reached, if that is the case then just change that value in your profile.
Code: Select all
<option name="MAX_FIGHT_TIME" value="30" />
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
- cibervagos
- Posts: 26
- Joined: Sat Apr 12, 2014 10:36 pm
- Location: Argentina
Re: Rom Bot error
Ty Lisa. In my case the Boss desapear and come back in a few seconds summoning a second Boss. So, I will quit the loop and I try changing MAX_FIGHT_TIME. Be couse my Druid need many time to kill that Boss
Re: Rom Bot error
And in future tell us from the beginning that you are using your own code or we will just assume you are talking about the bot code and we'll waste time looking for a problem that isn't there.
- 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
- cibervagos
- Posts: 26
- Joined: Sat Apr 12, 2014 10:36 pm
- Location: Argentina
Re: Rom Bot error
Ok. Sorry for that.rock5 wrote:And in future tell us from the beginning that you are using your own code or we will just assume you are talking about the bot code and we'll waste time looking for a problem that isn't there.
I quit the loop. But bot still doing the same. Stuck on Clearing Target and take 99% of CPU usage. (Note: MM don't back to shell. Just keep on Clearing Target).
I will try one or two thing before going to bed.
Re: Rom Bot error
that is because you have a loop with no rests in it so MM will be doing hundreds of memory reads every single second to the point that it goes insane.cibervagos wrote:Stuck on Clearing Target and take 99% of CPU usage
The reason it is clearing target is because that is what player:fight() does when it has no target.
You need to look at the boss fight more closely as to what is happening and what you are telling the bot to do in response to that.
Code: Select all
repeat
player:fight()
otroBicho:update()
until otroBicho.HP == 0 -- Here stuck some time. When combat end. Clearing Target.
As soon as your target is dead the game takes the target away from you, hence why player fight uses that instead of monitoring HP for when to stop attacking. So you need to ask yourself, with boss 2 why would you lose target and boss not be dead?
Maybe try testing with the other pawn functions, such as :isAlive()
Code: Select all
repeat
player:fight()
yrest(100)
until not otroBicho:isAlive()
This is why player:fight() is more than 300 lines of code because things go wrong and you need to be able to deal with issues.
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: Rom Bot error
Lisa beat me, just.
What she said.
What she said.
- 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
- cibervagos
- Posts: 26
- Joined: Sat Apr 12, 2014 10:36 pm
- Location: Argentina
Re: Rom Bot error
Ty for answer so fast ! I don't have the loop anymore.
I replace
Just for
in every loop.
But keep doing the same.
But meaby I can resolve it changing player:fight() with my own fight function. Now Im testing the waypoint without the first function. Just keeping the second.
I replace
Code: Select all
repeat
player:fight()
otroBicho:update()
until otroBicho.HP == 0 -- Here stuck some time. When combat end. Clearing Target.
Code: Select all
player:fight()
But keep doing the same.
But meaby I can resolve it changing player:fight() with my own fight function. Now Im testing the waypoint without the first function. Just keeping the second.
Re: Rom Bot error
Maybe you could show us your updated code.
- 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
- cibervagos
- Posts: 26
- Joined: Sat Apr 12, 2014 10:36 pm
- Location: Argentina
Re: Rom Bot error
Well, the problem is solved. Lisa was right. I forgot replace one more loop. Now the bot don't stuck anymore on Clearing Target. Unfortunately, the script don't work correctly without the loop. Be couse the combat allways finish before Boss die. So, use this function for fight or use normal waypoint is the same.
Here is my code:
Next step: Make a new working loop and use my own fighting function (becouse I need interrupt the fight to check party for heals). But I will do it by my self.
Thank you so much Rock and Lisa for your help.
If anyone is interested on this code, just ask for it and I will post the new code. (Or if I get some trouble with the new code I will post here )
Here is my code:
Code: Select all
function Buscando()
local jefe = player:findNearestNameOrId(102349);
if jefe then
player:target(jefe);
local blanco = player:getTarget();
sendPartyChat('|H|h|cffCC99FFEncontré a |r|cffAA6666'..blanco.Name..'|r|cffCC99FF! con |r|cffFFAAAA'..tostring(blanco.HP)..'|r|cffCC99FF de HP.|r|h')
RoMScript('SetRaidTarget("target",1);');
keyboardPress(key.VK_SPACE);
yrest(600);
keyboardPress(key.VK_7);
yrest(3000);
keyboardPress(key.VK_1);
yrest(800);
blanco:update()
if blanco.HP > 0 then
sendPartyChat('|H|h|cffCC99FFA darle rosca!!!!!|r|h')
player:fight()
Looteando();
sendPartyChat('|H|h|cffCC99FFListo|r|h')
yrest(500)
succionavida = player:findEnemy(nil,102350)
if succionavida then
player:target(succionavida)
otroBicho = player:getTarget();
if otroBicho.HP > 0 then
sendPartyChat('|H|h|cffCC99FFVamos por el otro!|r|h')
player:fight()
sendPartyChat('|H|h|cffCC99FFMuertos los 2.|r|h')
else
Looteando();
end
else
Looteando();
end
else
Looteando();
end
end
end
Thank you so much Rock and Lisa for your help.
If anyone is interested on this code, just ask for it and I will post the new code. (Or if I get some trouble with the new code I will post here )
Who is online
Users browsing this forum: No registered users and 7 guests