Page 1 of 1

Warrior Tactical Attack not auto-detected

Posted: Wed Mar 02, 2011 3:03 pm
by Mushroomstamp
I started a new Warrior and am using "levelupSkills1To10();". I'm getting the "We learned skill 'WARRIOR_BLAHBLAH' and will use it" message for everything so far except Tactical Attack. Bot is also upgrading all other skills, but skipping over Tactical Attack. What can I do to get it to recognize Tactical Attack? Also... bot is trying to use Thunder, which requires a 1-H weapon, even though I'm using a 2-H sword... how do I change that, other than manually adding the skill to my profile, (only skill currently in profile is Slash).

Re: Warrior Tactical Attack not auto-detected

Posted: Wed Mar 02, 2011 7:46 pm
by rock5
Not all skills are auto detected. Only a short-list of skills are hard wired into the bot to be auto added. Tactical Attack is not one of them, probably because it had a weapon requirement so wouldn't work if the user uses a 1 handed weapon. Slash, on the otherhand, works with any weapon.

If you want to use Tactical Attack you will have to add it to your profile.

Re: Warrior Tactical Attack not auto-detected

Posted: Thu Mar 03, 2011 7:55 am
by lisa
A while back I made a userfunction to use the skills I wanted instead of having to worry about editing the existing functions or remembering to add it to each profile.

I don't take any credit for the code of course it is pretty much copy pasted from the default but I just add skills that I want in there.

so have in your profile's onlevelup

Code: Select all

myskillup();
and have a userfunction with this code in it.

Code: Select all

function myskillup(_loadonly)
-- level up the skill by using an internal leveling table
-- load the skills for using into the profile skill table

	-- e.g. 4 = third skill tab, 2 = second skill on the tab
	-- CAUTION: addressing a invalid skill will crash the RoM client
	local skillLevelupMap = {
		[CLASS_WARRIOR]		= {  [1] = { aslevel = 1, skillname="WARRIOR_SLASH" },
								 [2] = { aslevel = 2, skillname="WARRIOR_OPEN_FLANK" },
								 [3] = { aslevel = 2, skillname="WARRIOR_PROBING_ATTACK" },
								 [4] = { aslevel = 4, skillname="WARRIOR_TACTICAL_ATTACK" },
								 [5] = { aslevel = 4, skillname="WARRIOR_ENRAGED" }, },

		[CLASS_SCOUT]		= {  [1] = { aslevel = 1, skillname="SCOUT_SHOT" },
								 [2] = { aslevel = 2, skillname="SCOUT_WIND_ARROWS" },
								 [3] = { aslevel = 4, skillname="SCOUT_VAMPIRE_ARROWS" },},
		[CLASS_ROGUE]		= {  [1] = { aslevel = 1, skillname="ROGUE_SHADOWSTAB" },
								 [2] = { aslevel = 2, skillname="ROGUE_LOW_BLOW" },
								 [3] = { aslevel = 6, skillname="ROGUE_WOUND_ATTACK" }, },
		[CLASS_MAGE]		= {  [1] = { aslevel = 1, skillname="MAGE_FLAME" },
								 [2] = { aslevel = 4, skillname="MAGE_FIREBALL" }, },
		[CLASS_PRIEST]		= {  [1] = { aslevel = 1, skillname="PRIEST_RISING_TIDE" },
								 [2] = { aslevel = 1, skillname="PRIEST_URGENT_HEAL" },
								 [3] = { aslevel = 4, skillname="PRIEST_REGENERATE" }, },
		[CLASS_KNIGHT]		= {  [1] = { aslevel = 1, skillname="KNIGHT_PUNISHMENT" },
								 [2] = { aslevel = 1, skillname="KNIGHT_HOLY_STRIKE" },
								 [3] = { aslevel = 1, skillname="KNIGHT_MANA_RETURN" }, },
		[CLASS_WARDEN]		= {  [1] = { aslevel = 1, skillname="WARDEN_CHARGED_CHOP" },
								 [2] = { aslevel = 1, skillname="WARDEN_ENERGY_ABSORB" },
								 [3] = { aslevel = 2, skillname="WARDEN_THORNY_VINE" },
								 [4] = { aslevel = 4, skillname="WARDEN_BRIAR_SHIELD" },
								 [5] = { aslevel = 8, skillname="WARDEN_POWER_OF_THE_WOOD_SPIRIT" } },
		[CLASS_DRUID]		= {  [1] = { aslevel = 1, skillname="DRUID_RECOVER" },
								 [2] = { aslevel = 1, skillname="DRUID_EARTH_ARROW" },
								 [3] = { aslevel = 2, skillname="DRUID_BRIAR_ENTWINEMENT" },
								 [4] = { aslevel = 6, skillname="DRUID_RESTORE_LIFE" } },
		};


	local leveluptable = skillLevelupMap[player.Class1];
	for i,v in pairs(leveluptable)  do

		if (_loadonly ~= "loadonly") then
			-- levelup the skill ingame
			-- TODO: maxlevel skills vs. new skill with only one level
			if( player.Level == v.aslevel ) then		-- maxlevel the new skill
					levelupSkill(v.skillname, v.aslevel);
			elseif( player.Level == 2 and
					v.aslevel == 1) then			-- 2x aft level 2
					levelupSkill(v.skillname, 2);
			elseif( player.Level > v.aslevel ) then  	-- levelup 1 level
					levelupSkill(v.skillname);
			end
		end;

		-- sort the skill table
		local skillSort = function(tab1, tab2)
			if( tab2.priority < tab1.priority ) then
				return true;
			end;
			return false;
		end
		table.sort(settings.profile.skills, skillSort);

	end

	-- special skill for SCOUT / not usable, just level it
	if(_loadonly ~= "loadonly") then
		if(player.Class1 == CLASS_SCOUT and
		   player.Level  == 6 ) then
			levelupSkill("SCOUT_RANGED_WEAPON_MASTERY", 6)
		elseif(player.Class1 == CLASS_SCOUT and
		   player.Level  > 6 ) then
		   levelupSkill("SCOUT_RANGED_WEAPON_MASTERY")
		end
	end

end

Re: Warrior Tactical Attack not auto-detected

Posted: Thu Mar 03, 2011 12:13 pm
by Mushroomstamp
Awesome... thanks y'all. 8-)