Page 1 of 2

Table range / onSkillCast error - 614 or ROM patch?

Posted: Tue Jul 12, 2011 9:28 am
by Mushroomstamp
Updated to 614 early this morning before patch. Getting table range errors for most of my skills now on Bot start, and bot is only using two or three of the skills in my profile. Trying to bot now with waypoint that was working last night. I'm getting a table range not found after casting Tactical Attack through onSkillCast, then bot stops with player.lua:669:, (onSkillCast), and skill.lua:476:, (local skillName), errors.

Code: Select all

	<onSkillCast>
	if _t ~= nil then
		leaptime = os.difftime(os.time(), _t)
		if ( leaptime > 21 and 28 > leaptime ) then
			keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
			yrest(4500)
			keyboardHold( settings.hotkeys.ROTATE_RIGHT.key )
			yrest(1500)			
			keyboardPress(key.VK_SPACE)
			yrest(500)
			keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
			keyboardRelease( settings.hotkeys.ROTATE_RIGHT.key )
			yrest(200)
			player:cast("DRUID_RECOVER")
			yrest(2200)
			player:cast("WARRIOR_ENRAGED")	
			player:cast("WARRIOR_BERSERK")
			player:cast("WARRIOR_SURPRISE_ATTACK")
			_t = os.time()
		end
		yrest(100)
	end
	
	if (35 > player.HP/player.MaxHP*100) then
        player:cast("WARRIOR_DEFENSIVE_FORMATION")
	elseif (50 > player.HP/player.MaxHP*100) then
        player:cast("WARRIOR_SURVIVAL_INSTINCT")
	end	
    
	--if (70 > player.HP/player.MaxHP*100) then
    --  player:cast("DRUID_RECOVER")
    --	yrest(2200)
    --end	
	
	if arg1.Name == "WARRIOR_SURPRISE_ATTACK" then
		RoMScript("UseSkill(1,1)")
	elseif arg1.Name == "WARRIOR_PROBING_ATTACK" then
		player:cast("WARRIOR_OPEN_FLANK")
		player:cast("WARRIOR_TREMOR")
	elseif arg1.Name == "WARRIOR_SLASH" then
		player:cast("WARRIOR_TACTICAL_ATTACK")		
	--elseif arg1.Name == "DRUID_RECOVER" then
		--yrest(2200)
	end	
	<![CDATA[
		-- Additional Lua code to execute when casting a skill
		-- Note: arg1 contains the skill being used.
		-- i.e. arg1.Name will be the name of the skill being cast
		-- e.g.:
		--if( 15 > player.HP/player.MaxHP*100 ) then
		--    player:cast("PRIEST_SOUL_SOURCE");
		--elseif( 25 > player.HP/player.MaxHP*100 ) then
		--    player:cast("PRIEST_HOLY_AURA");
		--    player:cast("PRIEST_URGENT_HEAL");
		--    player:cast("PRIEST_URGENT_HEAL");
	]]></onSkillCast>
The timer is for DOD boss fight, (still can't get event monitor to work right), and the rest is self-explanatory but I don't see where the problem could be.


Also, could we get the below skills added to skills.xml?

Code: Select all

<skill name="WARRIOR_GUARDIAN'S_PLEDGE" id="494036" skilltab="4" skillnum="12" mana="1" cooldown="180" type="buff" target="self" />
<skill name="WARRIOR_TREMOR" id="494035" skilltab="4" skillnum="10" mana="1" cooldown="15" type="damage" target="enemy" />
<skill name="WARRIOR_TERROR" id="490142" aslevel="32" rage="30" range="90" cooldown="45" type="damage" target="enemy" />
Finally, 4.0 added an "S" onto Thorny Vine... EDIT: "S" has since been removed. Oddly enough, I think I remember this happening with another patch as well. Regardless, skill is now again Thorny Vine... carry on.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Tue Jul 12, 2011 11:41 am
by grande
EDIT: Woops, I had click to move unselected. Don't I look silly :P. Sorry don't have anything useful for the OP.


I think the most recent patch changed a lot of things. Miller's ranch doesn't work... characters just stand in one place in combat stance. characters won't loot on normal waypoints outside of miller's. Seems to kill things just fine though.

Will be back to see what Rock5, Lisa, Meister, etc have for us :-)

back to the 9-5 grind. GL2U

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Tue Jul 12, 2011 1:58 pm
by rock5
Sorry but the nephew was over today and didn't get much time to myself. He even slept over so I probably wont get much time tomorrow to check things.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Tue Jul 12, 2011 8:05 pm
by lisa
I didn't get a patch recently, mine works fine.

Edit: Lol ok well I've had a couple of bots farming for last 10 hours, apparently the server was patched in that time but my characters still run just fine. I went to log in another client and says I need to update client but I am still botting without a patch.

I'll patch and have a look.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Tue Jul 12, 2011 8:28 pm
by lisa
have you tried using update.lua?

Edit:
Mine works fine after patch with no changes.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 1:24 am
by Mushroomstamp
I hadn't run update... didn't realize that it was okay to again. :?
EDIT;
Still error out on casting Tactical Attack through onSkillCast after update.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 1:49 am
by lisa
Mushroomstamp wrote:I hadn't run update... didn't realize that it was okay to again. :?
Sorry i need to use quotes more often, that was aimed at grande.

Since rock did the update to get skills from memory it is now very important that the skill names match what you see in your skill book, previously it didn't matter as the names were just for our benefit.

I do know that the skill names arn't always the same for everyone, even on the same server. I have a skill on 1 of my characters that is called something different to everyone else I can even link it for people and it shows the name on my screen for them. So to combat this issue I have had to add in another skill to skills.xml so the bot actually uses it for my character.

This may or may not be your issue, just something to look into.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 2:09 am
by Mushroomstamp
Lisa - are you running 614? Anywhere else I need to check spelling other than in-game, skills & local skills? I haven't changed my profiles... just updated to new patch and 614 when this started.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 3:03 am
by Mushroomstamp
Mana Return is causing the same problem for my Knight.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 8:15 am
by lisa
yup 614
So just the 2 skills?

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 1:26 pm
by Mushroomstamp
Yeah, just those two, and through onSkillCast... it's not autocasting them.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 6:38 pm
by Mushroomstamp
Just found something else... one of my low-level warriors is only casting slash in battle.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 8:06 pm
by lisa
may not make any difference but have you tried with the
<![CDATA[
before the code?

Code: Select all

  <onSkillCast>
<![CDATA[
   if _t ~= nil then
      leaptime = os.difftime(os.time(), _t)
      if ( leaptime > 21 and 28 > leaptime ) then
         keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
         yrest(4500)
         keyboardHold( settings.hotkeys.ROTATE_RIGHT.key )
         yrest(1500)         
         keyboardPress(key.VK_SPACE)
         yrest(500)
         keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
         keyboardRelease( settings.hotkeys.ROTATE_RIGHT.key )
         yrest(200)
         player:cast("DRUID_RECOVER")
         yrest(2200)
         player:cast("WARRIOR_ENRAGED")   
         player:cast("WARRIOR_BERSERK")
         player:cast("WARRIOR_SURPRISE_ATTACK")
         _t = os.time()
      end
      yrest(100)
   end
   
   if (35 > player.HP/player.MaxHP*100) then
        player:cast("WARRIOR_DEFENSIVE_FORMATION")
   elseif (50 > player.HP/player.MaxHP*100) then
        player:cast("WARRIOR_SURVIVAL_INSTINCT")
   end   
    
   --if (70 > player.HP/player.MaxHP*100) then
    --  player:cast("DRUID_RECOVER")
    --   yrest(2200)
    --end   
   
   if arg1.Name == "WARRIOR_SURPRISE_ATTACK" then
      RoMScript("UseSkill(1,1)")
   elseif arg1.Name == "WARRIOR_PROBING_ATTACK" then
      player:cast("WARRIOR_OPEN_FLANK")
      player:cast("WARRIOR_TREMOR")
   elseif arg1.Name == "WARRIOR_SLASH" then
      player:cast("WARRIOR_TACTICAL_ATTACK")      
   --elseif arg1.Name == "DRUID_RECOVER" then
      --yrest(2200)
   end  
]]></onSkillCast>

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 9:24 pm
by Mushroomstamp
Changing the CDATA tags didn't help.

I thought that one of my warriors was working right but I was wrong. All of my warriors are casting only Slash, warrior AOE's, or secondary skills. Bot does not even use the regular attack, (UseSkill(1,1)), if no secondary skills are defined, it just engages and waits for 25 rage to build, then casts Slash. rom/bot debug didn't give any extra info. WTF?

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 9:36 pm
by lisa
Maybe try commenting out the onskillcast code and just run it with debug and see if those skills are used at all normally. Might help narrow down issue

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 9:47 pm
by Mushroomstamp
Yeah, I commented it out after posting this thread... it wouldn't stay running with it in there.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 10:03 pm
by lisa
So it uses the skills without that code, then issue must be to do with that code then.

I had a look at the code dealing with the onskillcast event and it seems fine, I couldn't see any reason for it not to work.

Maybe try doing some troubleshoot tests.

Code: Select all

 <onSkillCast>
<![CDATA[
if arg1.Name == "WARRIOR_SURPRISE_ATTACK" then
printf(Using Surprise Attack.\n")
end
if arg1.Name == "WARRIOR_PROBING_ATTACK" then
printf(Using PROBING ATTACK.\n")
end
if arg1.Name == "WARRIOR_WARRIOR_SLASH" then
printf(Using WARRIOR SLASH.\n")
end
]]></onSkillCast>

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 10:29 pm
by Mushroomstamp
No, it does not use the skill without the code. It is only using Slash, warrior AOE's and some secondary skills... and forgot about Surprise Attack. So it's not casting Probing Attack, (or consequently Open Flank), Tactical Attack, Earth Pulse, Recover, etc... it looks like the I.D.'s might be wrong. It's giving a bunch of table range errors after loading the profile.

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Wed Jul 13, 2011 11:28 pm
by lisa
Ok I blew the cobwebs off my warr and ran it with debug_skills and got this

Code: Select all

[DEBUG] ONLYFRIENDLY WARRIOR_SLASH 0
[DEBUG] ONLYFRIENDLY WARRIOR_SURPRISE_ATTACK 0
[DEBUG] ONLYFRIENDLY WARRIOR_TACTICAL_ATTACK 0
So these attack skills are set to only attack friendly, which is wrong. On restarting WP it didn't get this for surprise attack and used the skill as intended. Not sure what is going on here.

but in the database it has

Code: Select all

	<skill name="WARRIOR_SURPRISE_ATTACK" id="490129" minrange="60" range="150" cooldown="12" type="damage" target="enemy" inbattle="false" />
So only thing I can think of is the info it is getting from memory for target is somehow wrong.

I also now understand why you added in the use skill 1,1 if you have no rage then it just stands there not attacking. Need to add in a just normal attack skill to profile somehow I'd say.

Edit: if you want to turn on skill debugging without altering settings.lua use this in onload of your profile

Code: Select all

settings.profile.options.DEBUG_SKILLUSE.ENABLE = true
I tried using it in the function to change profile options but I couldn't get it to work lol

Re: Table range / onSkillCast error - 614 or ROM patch?

Posted: Thu Jul 14, 2011 12:36 am
by Mushroomstamp
Maybe the skill id's are being incorrectly associated with buffs?