Page 4 of 6

Re: Need your help updating skill Ids

Posted: Sat Aug 01, 2015 11:31 am
by beanybabe
thanks rock. I used notepadd++ to mass open all the profiles and replace MAGE_ELEMENTAL_CATALYST with MAGE_ELEMENTAL_CATALYSIS. That worked fast and easy. Im running now see if any problems show.

Re: Need your help updating skill Ids

Posted: Sat Aug 01, 2015 1:21 pm
by Bill D Cat
I went poking around in Cheat Engine to see if I could possibly locate any flags that might signify if a skill was a buff, heal or attack. Alas I couldn't sort out anything just by looking at the code. The values are going to be static so that just makes it a bit more difficult to figure out what bytes might be relevant. I also tried using some offsets from the addresses.lua file but that wasn't much help to me. If anyone can or has figured a way to automatically determine the "type" and "target" values then I'd include that in this userfunction. But until then, I think this is as far as I can go with this project.

Re: Need your help updating skill Ids

Posted: Sat Aug 01, 2015 3:35 pm
by beanybabe
14 scout/13 priest got this error the numbers match what was in the skill file.
2015-08-01 15:24:24 - undefined player.Class1 in settings.lua

Re: Need your help updating skill Ids

Posted: Sat Aug 01, 2015 6:59 pm
by Bill D Cat
For some reason the bot is loosing the definition of your player class. This bit of code is pretty straight-forward. Add this one line to the settings.lua file to help debug the situation the next time it occurs. It should print a number from 1 to 10 if it is working, so this will give us an idea of where to look if it is something else.

Code: Select all

	-- default combat type if not in profile defined
	if( settings.profile.options.COMBAT_TYPE ~= "ranged" and
	    settings.profile.options.COMBAT_TYPE ~= "melee" ) then
		if( player.Class1 == CLASS_WARRIOR or
		    player.Class1 == CLASS_ROGUE   or
		    player.Class1 == CLASS_WARDEN  or
		    player.Class1 == CLASS_KNIGHT  or
			player.Class1 == CLASS_CHAMPION  ) then
			settings.profile.options.COMBAT_TYPE  = "melee";
		elseif(
		    player.Class1 == CLASS_PRIEST  or
		    player.Class1 == CLASS_SCOUT   or
		    player.Class1 == CLASS_DRUID   or
		    player.Class1 == CLASS_MAGE    or
			player.Class1 == CLASS_WARLOCK ) then
			settings.profile.options.COMBAT_TYPE  = "ranged";
		else
			printf("player.Class1 is currently %d\n",player.Class1)  -- Add this line.
			error("undefined player.Class1 in settings.lua", 0);
		end;
	end

Re: Need your help updating skill Ids

Posted: Sun Aug 02, 2015 1:17 am
by rock5
Bill D Cat wrote:I went poking around in Cheat Engine to see if I could possibly locate any flags that might signify if a skill was a buff, heal or attack. Alas I couldn't sort out anything just by looking at the code. The values are going to be static so that just makes it a bit more difficult to figure out what bytes might be relevant. I also tried using some offsets from the addresses.lua file but that wasn't much help to me. If anyone can or has figured a way to automatically determine the "type" and "target" values then I'd include that in this userfunction. But until then, I think this is as far as I can go with this project.
I don't think there is a flag that says it's an attack ,heal or buff etc. I think you just have a skill with some effects on it. What the effects are determine what typeof skill it is. So you would have to look at the effects to decide. I think.

Re: Need your help updating skill Ids

Posted: Sun Aug 02, 2015 3:57 am
by BlubBlab
rock5 wrote:
Bill D Cat wrote:I went poking around in Cheat Engine to see if I could possibly locate any flags that might signify if a skill was a buff, heal or attack. Alas I couldn't sort out anything just by looking at the code. The values are going to be static so that just makes it a bit more difficult to figure out what bytes might be relevant. I also tried using some offsets from the addresses.lua file but that wasn't much help to me. If anyone can or has figured a way to automatically determine the "type" and "target" values then I'd include that in this userfunction. But until then, I think this is as far as I can go with this project.
I don't think there is a flag that says it's an attack ,heal or buff etc. I think you just have a skill with some effects on it. What the effects are determine what typeof skill it is. So you would have to look at the effects to decide. I think.
I also thought of it buff and debuff are nearly the same but there is one exception there must be somewhere a flag which say in which bar it should be displayed.

What you must do is simply create a filter which compare buffs and debuffs and strip all know position from before I did something like this before with CE:

Code: Select all

--compareObj(0x38D6EEA0,0x3B9C1EA0,0x150)
function compareObj(base1, base2, size)
	local steps = size/4;
	local foundsome = {};
	local foundvalue = {};
	for position = 0, size, steps do
       local p1 = readInteger(position + base1)
	   local p2 = readInteger(position + base2)
	   local p3 = readFloat(position + base1);
	   if(p1 == p2 and p1 ~= 0)then
			if( not p3 or not(p3 == 500 or p3 == 2000 or p3 ==12043 or p3 == 60 or p3 == 10))then
				table.insert( foundsome, position + base1);
				table.insert( foundvalue, p1);
			end
	   end
    end
	
	for key,value in pairs(foundsome) do
		local output = string.format("%X",tonumber(value,16));
		local val = string.format("%X",tonumber(foundvalue[key],16));
		print("Found at position : "..output.." value: "..val.."");
	end
end
You must do that basically with a lot more object of buffs and debuffs on a bit level to eliminate the most possible foundsome until only 1 or 2 remains

Re: Need your help updating skill Ids

Posted: Sun Aug 02, 2015 6:49 am
by rock5
You cast a skill on another player. A symbol appears next to their name. Is it a buff or a debuff?

Re: Need your help updating skill Ids

Posted: Sun Aug 02, 2015 7:06 am
by BlubBlab
rock5 wrote:You cast a skill on another player. A symbol appears next to their name. Is it a buff or a debuff?
I'm not sure but they are on another position with Ikarus I can move them so that all debuff are on the right side of my LP bar while all buffs are under it

Re: Need your help updating skill Ids

Posted: Sun Aug 02, 2015 7:23 am
by rock5
Oh that's right. That's true. I didn't remember the layout properly.

It could be calculated though. The game could look at a lot of factors and decide what it is. Then again you might be right and find something.

Re: Need your help updating skill Ids

Posted: Sun Aug 02, 2015 3:59 pm
by Bill D Cat
I've verified a few more buff IDs, and placed a comment at the end of every skill that has been verified. All main skills are correct, it's just the buffs that are still needing to be checked. I also removed a few buffname entries where the duration of the buff was significantly shorter than the CD. I placed a comment at the end of those lines that list the buff ID that I removed, just in case there is a need to add any of them back.

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 6:01 pm
by beanybabe
Could the buff bar adons on curse have code to figure the buffs ?

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 6:50 pm
by Bill D Cat
beanybabe wrote:Could the buff bar adons on curse have code to figure the buffs ?
Rock's TooltipIDs addon does a great job of telling you what the ID of a Buff or Debuff is, but you have to actually have it on you (or on a mob, or another player) to see it. Most of the self-cast buffs are easy to check. It's the debuffs that you apply to a mob that take a bit more time to verify. You have to go out and actually engage in combat and mouseover the buff/debuff icon to see the ID. Not really all that difficult, just time consuming.

So what I've been doing is a double lookup with Rock's language converter. I look up the buff by the ID that is in the skills.xml file and make sure the name is (reasonably) correct. Then I look it up by name to see if there are more than one buff by the same name. Most of the time there isn't, but the few I've come across that do are the ones I've had to go field test when possible. I don't have every possible character class combination (close though, I have a 6 class dwarf and 6 class human on the Nexon server) to test with, so I'll have to rely on the language converter or other players to verify the rest.

What I should probably do is dual-box a couple characters onto the same server, drag them into the guild castle and duel each other. I can track buff IDs pretty easily that way.

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 7:20 pm
by BlubBlab
I think she/he talks about the about the difference between buff and debuff.

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 7:52 pm
by Bill D Cat
Right now I'm trying to find a way to determine the "type" of skill (buff, heal or damage), and the "target" (self, friendly or enemy). Knowing if a buff ID is actually a debuff is not all that important. Just knowing that it will be either on yourself (buff), a friendly target (buff), or a mob (debuff) when you cast the skill should be enough to determine the difference. Since this project is just to help rebuild the skills.xml file when IDs change, I think that would be sufficient.

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 8:38 pm
by beanybabe
I tried this bit of code but rom bot would not start with it stuck in. I may put it in wrong place I wend down about 1/3 way and put it in near some similar code. Is there a particular line number i need to put this after?

Bill D Cat wrote:For some reason the bot is loosing the definition of your player class. This bit of code is pretty straight-forward. Add this one line to the settings.lua file to help debug the situation the next time it occurs. It should print a number from 1 to 10 if it is working, so this will give us an idea of where to look if it is something else.

Code: Select all

	-- default combat type if not in profile defined
	if( settings.profile.options.COMBAT_TYPE ~= "ranged" and
	    settings.profile.options.COMBAT_TYPE ~= "melee" ) then
		if( player.Class1 == CLASS_WARRIOR or
		    player.Class1 == CLASS_ROGUE   or
		    player.Class1 == CLASS_WARDEN  or
		    player.Class1 == CLASS_KNIGHT  or
			player.Class1 == CLASS_CHAMPION  ) then
			settings.profile.options.COMBAT_TYPE  = "melee";
		elseif(
		    player.Class1 == CLASS_PRIEST  or
		    player.Class1 == CLASS_SCOUT   or
		    player.Class1 == CLASS_DRUID   or
		    player.Class1 == CLASS_MAGE    or
			player.Class1 == CLASS_WARLOCK ) then
			settings.profile.options.COMBAT_TYPE  = "ranged";
		else
			printf("player.Class1 is currently %d\n",player.Class1)  -- Add this line.
			error("undefined player.Class1 in settings.lua", 0);
		end;
	end

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 9:08 pm
by Bill D Cat
It should go at line 1211 in the settings.lua file.

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 10:56 pm
by lisa
beanybabe wrote:I tried this bit of code but rom bot would not start with it stuck in. I may put it in wrong place I wend down about 1/3 way and put it in near some similar code. Is there a particular line number i need to put this after?

Bill D Cat wrote:For some reason the bot is loosing the definition of your player class. This bit of code is pretty straight-forward. Add this one line to the settings.lua file to help debug the situation the next time it occurs. It should print a number from 1 to 10 if it is working, so this will give us an idea of where to look if it is something else.

Code: Select all

	-- default combat type if not in profile defined
	if( settings.profile.options.COMBAT_TYPE ~= "ranged" and
	    settings.profile.options.COMBAT_TYPE ~= "melee" ) then
		if( player.Class1 == CLASS_WARRIOR or
		    player.Class1 == CLASS_ROGUE   or
		    player.Class1 == CLASS_WARDEN  or
		    player.Class1 == CLASS_KNIGHT  or
			player.Class1 == CLASS_CHAMPION  ) then
			settings.profile.options.COMBAT_TYPE  = "melee";
		elseif(
		    player.Class1 == CLASS_PRIEST  or
		    player.Class1 == CLASS_SCOUT   or
		    player.Class1 == CLASS_DRUID   or
		    player.Class1 == CLASS_MAGE    or
			player.Class1 == CLASS_WARLOCK ) then
			settings.profile.options.COMBAT_TYPE  = "ranged";
		else
			printf("player.Class1 is currently %d\n",player.Class1)  -- Add this line.
			error("undefined player.Class1 in settings.lua", 0);
		end;
	end

He meant to only add in this line to the existing code.

Code: Select all

printf("player.Class1 is currently %d\n",player.Class1)  -- Add this line.

Re: Need your help updating skill Ids

Posted: Tue Aug 04, 2015 11:53 pm
by BlubBlab
I think still it is his memory reading issue Class1 will be updated inside player.lua to be true on my old PC with win 7 32-bit the old MM don't work flawless either but that is a really old machine so race conditions could be the issue.

Re: Need your help updating skill Ids

Posted: Wed Aug 05, 2015 1:05 am
by beanybabe
Trying that print now it only fails on a few chars scout, priest, druid. I finaly had a memory error again with that timing change i made it happened on the hour. may need to get times posted with that error to see if its a pattern.

Re: Need your help updating skill Ids

Posted: Thu Aug 06, 2015 6:22 am
by Bill D Cat
BlubBlab wrote:I think still it is his memory reading issue Class1 will be updated inside player.lua to be true on my old PC with win 7 32-bit the old MM don't work flawless either but that is a really old machine so race conditions could be the issue.
At first I thought it would be a memory issue as well. Perhaps a bad DIMM or something. But for it to be happening on more than one PC doesn't make sense. Now I'm wondering how many custom modifications were made to the various bot files in an attempt to fix the problem. Perhaps more were created in the process. My suggestion is to revert the entire directory to the SVN release, then only update the skills.xml file from the last one I posted and see how that works. I cannot reproduce any of the errors that beanybabe describes, so I'm at a loss as how to proceed from here.

Edit: Loosing the definition of player.Class1 could be possible with a poorly programmed userfunction that overwrites the data that should be saved in that variable. Might want to check there as well.