Error while trying to use HP potion
Posted: Sun Sep 23, 2012 3:13 pm
rombot give this error when try to use hp potions. i have potions in both bags.


MicroMacro home
https://www.solarstrike.net/phpBB3/
Code: Select all
if not self.InUse then
Can't get bot to work? follow these instructions before posting, thank you.
1. SVN update micromacro/scripts/rom folder
2. SVN revert micromacro/scripts/rom folder
3. delete Runes of Magic/Interface/Addons/ingamefunctions folder
4. copy micromacro/scripts/rom/devtools/ingamefunctions folder to Runes of Magic/Interface/Addons folder
5. restart game
Code: Select all
if not self.InUse then
if ( self.CoolDownTime > 0 and self.LastTimeUsed ~= 0 and
( deltaTime( getTime(), self.LastTimeUsed ) / 1000 ) < self.CoolDownTime ) then -- Item is on CoolDown we can't use it
canUse = false;
reason = "Cooldown";
end;
else -- Item is in use, locked, we can't use it
reason = "In use";
canUse = false;
end;
if ( canUse ) then
RoMScript("UseBagItem("..self.BagId..")");
self.LastTimeUsed = getTime();
yrest( 500 ); -- give time for server to respond with new item count
else
cprintf( cli.yellow, "DEBUG - Cannot use Item %s\t BagId: #%s ItemCount: %s\treason: %s\n", self.Name, self.BagId, self.ItemCount, reason );
logMessage( sprintf( "DEBUG - Cannot use Item %s\t BagId: #%s ItemCount: %s\treason: %s\n", self.Name, self.BagId, self.ItemCount, reason ) );
end;
Code: Select all
if not self.InUse then
i try and same error.BillDoorNZ wrote:So...did you manually use the potion while the bot was fighting? Or were you moving the item?
Code: Select all
if not self.InUse then
printf("Item InUse: "..tostring(self.Name).." slot:"..tostring(self.SlotNumber).." bag:"..tostring(self.BagId).." LastTimeUsed:"..tostring(self.LastTimeUsed).."\n");
if ( self.CoolDownTime > 0 and self.LastTimeUsed ~= 0 and
I'm asking, as I can't see any way that LastTimeUsed can be nil given the latest code. I thought the private servers ran off a different version of the bot? or an older version?rock5 wrote:Line numbers don't match up. Line 75 isNo deltatime there. So maybe you have a corrupt rombot installation. Try Lisas sig instructions.Code: Select all
if not self.InUse then
Can't get bot to work? follow these instructions before posting, thank you.
1. SVN update micromacro/scripts/rom folder
2. SVN revert micromacro/scripts/rom folder
3. delete Runes of Magic/Interface/Addons/ingamefunctions folder
4. copy micromacro/scripts/rom/devtools/ingamefunctions folder to Runes of Magic/Interface/Addons folder
5. restart game
Code: Select all
-- If the item can't be used now we should be able to set a timer or something like that to recall this function and check again...
if not self.InUse then
if ( self.CoolDownTime > 0 and self.LastTimeUsed ~= 0 and (self.LastTime)
( deltaTime( getTime(), self.LastTimeUsed ) / 1000 ) < self.CoolDownTime ) then -- Item is on CoolDown we can't use it
Any time an item is defined with the item class the item.LastTimeUsed is defined as 0, the only way for it to be nil is if the bot is not the default bot and changes have been made or perhaps downloaded from another site where they made changes which obviously broke the bot, happened far to many times.BillDoorNZ wrote:and you definitely went through the steps Rock outlined?
rock5 wrote:Line numbers don't match up. Line 75 isNo deltatime there. So maybe you have a corrupt rombot installation. Try Lisas sig instructions.Code: Select all
if not self.InUse then
Can't get bot to work? follow these instructions before posting, thank you.
1. SVN update micromacro/scripts/rom folder
2. SVN revert micromacro/scripts/rom folder
3. delete Runes of Magic/Interface/Addons/ingamefunctions folder
4. copy micromacro/scripts/rom/devtools/ingamefunctions folder to Runes of Magic/Interface/Addons folder
5. restart game