Page 2 of 2

Re: [Help] Runes Of Magic

Posted: Tue Jan 06, 2009 8:15 pm
by RedBloodz
thanks.
Another question, I found the address for HP by searching the integers. Now m trying to find for DPS (damage per second), but its in decimal form. So how do I search for the DPS address.

Re: [Help] Runes Of Magic

Posted: Tue Jan 06, 2009 9:15 pm
by Administrator
Floats (floating-point integers) can contain decimals. Try searching for that type. Double is also another viable option, as it is exactly like a float but double the size. It is highly unlikely for it to be a double simply because that kind of precision isn't necessary here.

There is a chance that DPS is only calculated when it is needed, so there might not be any way to access it easily.

Re: [Help] Runes Of Magic

Posted: Thu Jan 08, 2009 11:40 am
by view
Hey guys,

i just installed micromacro and set everything up. I start bot.lua using micromacro and it tells me to press "delete" to start the script but if I do so it sais:

Code: Select all

micromacro\scripts\rom\settings.lua:53: XML Parse Error
Line: 26
Column: 36
Message: not well-formed (invalid token)
Hopefully somebody will be able to help me^^

So long... View

Re: [Help] Runes Of Magic

Posted: Thu Jan 08, 2009 12:49 pm
by Administrator
No idea. You messed up the settings file on line 26 somehow. Also, don't you think that signature is a bit large?

Re: [Help] Runes Of Magic

Posted: Thu Jan 08, 2009 1:01 pm
by view
//edit

Got it to work...
found a missing / in my profile.xml^^

Hmm^^
Guess you're right. I'll resize it later xD But it looks nice, doesn't it?

Re: [Help] Runes Of Magic

Posted: Fri Jan 09, 2009 4:44 pm
by RedBloodz
Hey i was just wondering, since RoM run in LUA and the player can write macro in the game, can we just write a bot using the game macro?

I found this addon in RoM forums. So m thinking mayb can we write a bot ad-on or something
So since we dont use 3rd party program, would this make it legal? hahaha

Code: Select all

-- pbMobInfo
-- v0.06
-- by p.b. a.k.a. novayuna
-- released under the Creative Commons License By-Nc-Sa: http://creativecommons.org/licenses/by-nc-sa/3.0/
-- 
-- Many thanks to the following people for their ideas and/or code:
--   "dr00gz" 	- http://www.forum.romla.de/					: Tooltip idea and lot's of hints
--   "gastro19" 	- http://forum.runesofmagic.com/member.php?u=78657: Slash command idea
--
-- Hover your mouse over a target to get some detailed information.
--
-- In the target frame, the target's health bar now shows the real actual and maximum halth points.
-- (Only available if target was hovered or targetted once before the combat.)
--
-- Create a new macro and put "/mobinfo" into it. Select a mob, player or NPC and press the macro button.
-- Or just use /mi in the chat window.
-- This sends information about the target to your chat window or, if you are in a group, in group chat.
--
-- Have fun!

--if (GetLocale() == "deDE") then -- I don't know the real function and return values .. . :/
--	pbLocale = {
--		HP 		= "Lebenspunkte",
--		NVT 		= "Kein g\195\188ltiges Ziel ausgew\195\164hlt!",
--		LVL 		= "Stufe",
--		TYPE1 	= "Mana",
--		TYPE2 	= "Wut",
--		TYPE3 	= "Fokus",
--		TYPE4 	= "Energie"
--	};
--else
	pbLocale = {
		HP 		= "Health",
		NVT 	= "No valid target selected!",
		LVL 	= "Level",
		TYPE1 	= "Mana",
		TYPE2 	= "Rage",
		TYPE3 	= "Focus",
		TYPE4 	= "Energy"
	};
--end;
classColors = {
	Magier 			= "FFC000", -- german class descriptions...
	Kundschafter 	= "92D050",
	Priester 		= "0070C0",
	Ritter 			= "FFFF48",
	Schurke 		= "009999",
	Krieger 		= "FF0000",
	Mage 	= "FFC000", -- ... and the english ones
	Scout 	= "92D050",
	Priest 	= "0070C0",
	Knight 	= "FFFF48",
	Rogue 	= "009999",
	Warrior = "FF0000"
};
pbMobsMaxHP, pbLastGUID = {}, 0;

function pbMobInfoHover() -- thx to dr00gz for the idea and the hints!
	if (UnitExists("mouseover") and (UnitIsPlayer("mouseover") or UnitLevel("mouseover") > 1)) then -- get rid of messages for level 1 NPCs and other level 1 stuff, except players
		local mC, sC = UnitClass("mouseover");
		local mL, sL = UnitLevel("mouseover");
		local health, healthMax, healthRatio = 0, 0, 0;
		local mana, manaMax, manaType  = UnitMana("mouseover"), UnitMaxMana("mouseover"), UnitManaType("mouseover");
		local skill, skillMax, skillType = UnitSkill("mouseover"), UnitMaxSkill("mouseover"), UnitSkillType("mouseover");
		local healthText, manaText, skillText = "", "";
		local unitQuestMsg = UnitQuestMsg("mouseover");

		-- clears GameTooltip
		GameTooltip:SetText(UnitName("mouseover"), 1.0, 1.0, 0.0);

		-- adding class information to GameTooltip
		local mColor = ""; -- colorize the following output for the primary class
		if (classColors[mC] ~= nil) then
			mColor = "|cff" .. classColors[mC];
		end;
		GameTooltip:AddLine(mColor .. mC .. "|r (" .. pbLocale["LVL"] .. " " .. mColor .. mL .. "|r)", 1.0, 1.0, 1.0);

		if (sL > 0 and sC ~= "") then -- do the same for the secondary class, if available
			local sColor = "";
			if (classColors[sC] ~= nil) then
				sColor = "|cff" .. classColors[sC];
			end;
			GameTooltip:AddLine(sColor .. sC .. "|r (" .. pbLocale["LVL"] .. " " .. sColor .. sL .. "|r)", 1.0, 1.0, 1.0);
		end;
		
		-- adding healthpoint information to GameTooltip
		if (not UnitIsPlayer("mouseover")) then -- calculate or get the current healthpoints for mobs and NPCs
			unitGUID = UnitGUID("mouseover");
			healthRatio = UnitHealth("mouseover");
			if (pbMobsMaxHP[unitGUID] ~= nil) then
				healthMax = pbMobsMaxHP[unitGUID];
				health = math.ceil(healthMax * healthRatio / 100);
				healthText = health .. " / " .. healthMax .. " (" .. healthRatio .. "%)", 1.0, 1.0, 1.0;
			else
				healthText = healthRatio .. "%", 1.0, 1.0, 1.0;
			end;
			if (healthRatio == 100) then -- that's how I save the unit's maximum healtpoints
				pbMobsMaxHP[unitGUID] = UnitChangeHealth("mouseover");
			end;
			manaText = mana .. "%";
			skillText = skill .. "%";
		else -- players? That's easy .. .
			health = UnitHealth("mouseover");
			healthMax = UnitMaxHealth("mouseover");
			healthRatio = UnitMaxHealth("mouseover");
			healthText = health .. " / " .. healthMax .. " (" .. math.ceil(100 * health/healthMax) .. "%)", 1.0, 1.0, 1.0;
			manaText = mana .. " / " .. manaMax;
			if (manaType == 1) then
				manaText = manaText .. " (" .. math.ceil(100 * mana/manaMax) .. "%)";
			end;
			skillText = skill .. " / " .. skillMax;
			if (skillType == 1) then
				skillText = skillText .. " (" .. math.ceil(100 * skill/skillMax) .. "%)";
			end;
		end;
		GameTooltip:AddLine(pbLocale["HP"] .. ": " .. healthText, 1.0, 1.0, 1.0);
		
		-- adding mana and skill information to GameTooltip, if available - unfortunately, UnitChangeMana() and UnitChangeSkill() don't work
		if (manaMax > 0 and manaType > 0) then
			GameTooltip:AddLine(pbLocale["TYPE" .. manaType] .. ": " .. manaText, 1.0, 1.0, 1.0);
		end;
		if (skillMax > 0 and skillType > 0) then
			GameTooltip:AddLine(pbLocale["TYPE" .. skillType] .. ": " .. skillText, 1.0, 1.0, 1.0);
		end;

		-- (re-)adding quest information to GameTooltip, if available
		if (unitQuestMsg ~= nil) then
			GameTooltip:AddLine("\n" .. unitQuestMsg, 1.0, 1.0, 1.0);
		end;
	end;
end;

-- used to set a mob's maximum healthpoints if "Target next enemy" (TAB or similar) is used
function pbMobInfoUpdateOnUnitTargetChange(player)
	unitGUID = UnitGUID("target");
	if (player == "player" and not UnitIsPlayer("target") and UnitHealth("target") == 100 and unitGUID ~= nil) then
		pbMobsMaxHP[unitGUID] = UnitChangeHealth("target");
	end;
end;

-- updates the health bar in target frame, if a mob's maximum healthpoints are available
function pbMobInfoUpdateOnTargetChangeHealth()
	if (not UnitIsPlayer("target")) then
		unitGUID = UnitGUID("target");
		healthMax = pbMobsMaxHP[unitGUID];
		if (healthMax ~= nil) then
			TargetHealthBarValueText:SetText(math.ceil((UnitHealth("target") * healthMax) / 100) .. "/" .. pbMobsMaxHP[unitGUID])
		end;
	end;
end;

-- Teh oldsql way in chat window
function pbMobInfoChat()
	if (UnitName("target") ~= nil) then
		local mC, sC = UnitClass("target");
		local mL, sL = UnitLevel("target");
		local health, healthRatio = 0, 0;
		local sub, message = "", "";

		if (not UnitIsPlayer("target")) then
			local unitGUID = UnitGUID("target");
			healthRatio = UnitHealth("target");
			if (pbMobsMaxHP[unitGUID] ~= nil) then
				health = pbMobsMaxHP[unitGUID] * healthRatio / 100;
			else
				health = UnitChangeHealth("target");
			end;
			if (healthRatio == 100) then
				pbMobsMaxHP[unitGUID] = UnitChangeHealth("target");
			end;
		else
			health = UnitHealth("target");
			healthRatio = math.ceil(1000 * UnitHealth("target")/UnitMaxHealth("target")) / 10;
		end;

		if (UnitInRaid("raid1") or UnitInParty("party1")) then
			if (sL > 0 and sC ~= "") then
				sub = " / " .. sC .. " (" .. sL .. ")";
			end;
			message = "[ " .. UnitName("target") .. " - " .. pbLocale["HP"] .. ": " .. health .. " (" .. healthRatio .. "%) - " .. mC .. " (" .. mL .. ")" .. sub .. " ]";
			SendChatMessage(message,"PARTY");
		else
			local mColor, sColor = "", "";
			if (classColors[mC] ~= nil) then
				mColor = "|cff" .. classColors[mC];
			end;
			if (sL > 0 and sC ~= "") then
				if (classColors[sC] ~= nil) then
					sColor = "|cff" .. classColors[sC];
				end;
				sub = " / " .. sColor .. sC .. "|r (" .. sColor .. sL .. "|r)";
			end;
			message = "[pbMobInfo]: [ " .. UnitName("target") .. " - " .. pbLocale["HP"] .. ": " .. health .. " (" .. healthRatio .. "%) - " .. mColor .. mC .. "|r (" .. mColor .. mL .. "|r)" .. sub .. " ]";
			DEFAULT_CHAT_FRAME:AddMessage(message, 1, 1, 1);
		end;
		ChatFrame2:AddMessage(message, 1, 1, 1); -- combat log
	else
		local message = "[pbMobInfo]: " .. pbLocale["NVT"];
		DEFAULT_CHAT_FRAME:AddMessage(message, 1, 1, 1);
		ChatFrame2:AddMessage(message, 1, 1, 1); -- combat log
	end;
end;

SLASH_PBMOBINFO1 = "/mobinfo"; -- thx to gastro19 for the idea!
SLASH_PBMOBINFO2 = "/mi";
SlashCmdList["PBMOBINFO"] = pbMobInfoChat;


Re: [Help] Runes Of Magic

Posted: Fri Jan 09, 2009 9:54 pm
by 3cmSailorfuku
RedBloodz wrote:Hey i was just wondering, since RoM run in LUA and the player can write macro in the game, can we just write a bot using the game macro?

I found this addon in RoM forums. So m thinking mayb can we write a bot ad-on or something
So since we dont use 3rd party program, would this make it legal? hahaha

Code: Select all

-- pbMobInfo
-- v0.06
-- by p.b. a.k.a. novayuna
-- released under the Creative Commons License By-Nc-Sa: http://creativecommons.org/licenses/by-nc-sa/3.0/
-- 
-- Many thanks to the following people for their ideas and/or code:
--   "dr00gz" 	- http://www.forum.romla.de/					: Tooltip idea and lot's of hints
--   "gastro19" 	- http://forum.runesofmagic.com/member.php?u=78657: Slash command idea
--
-- Hover your mouse over a target to get some detailed information.
--
-- In the target frame, the target's health bar now shows the real actual and maximum halth points.
-- (Only available if target was hovered or targetted once before the combat.)
--
-- Create a new macro and put "/mobinfo" into it. Select a mob, player or NPC and press the macro button.
-- Or just use /mi in the chat window.
-- This sends information about the target to your chat window or, if you are in a group, in group chat.
--
-- Have fun!

--if (GetLocale() == "deDE") then -- I don't know the real function and return values .. . :/
--	pbLocale = {
--		HP 		= "Lebenspunkte",
--		NVT 		= "Kein g\195\188ltiges Ziel ausgew\195\164hlt!",
--		LVL 		= "Stufe",
--		TYPE1 	= "Mana",
--		TYPE2 	= "Wut",
--		TYPE3 	= "Fokus",
--		TYPE4 	= "Energie"
--	};
--else
	pbLocale = {
		HP 		= "Health",
		NVT 	= "No valid target selected!",
		LVL 	= "Level",
		TYPE1 	= "Mana",
		TYPE2 	= "Rage",
		TYPE3 	= "Focus",
		TYPE4 	= "Energy"
	};
--end;
classColors = {
	Magier 			= "FFC000", -- german class descriptions...
	Kundschafter 	= "92D050",
	Priester 		= "0070C0",
	Ritter 			= "FFFF48",
	Schurke 		= "009999",
	Krieger 		= "FF0000",
	Mage 	= "FFC000", -- ... and the english ones
	Scout 	= "92D050",
	Priest 	= "0070C0",
	Knight 	= "FFFF48",
	Rogue 	= "009999",
	Warrior = "FF0000"
};
pbMobsMaxHP, pbLastGUID = {}, 0;

function pbMobInfoHover() -- thx to dr00gz for the idea and the hints!
	if (UnitExists("mouseover") and (UnitIsPlayer("mouseover") or UnitLevel("mouseover") > 1)) then -- get rid of messages for level 1 NPCs and other level 1 stuff, except players
		local mC, sC = UnitClass("mouseover");
		local mL, sL = UnitLevel("mouseover");
		local health, healthMax, healthRatio = 0, 0, 0;
		local mana, manaMax, manaType  = UnitMana("mouseover"), UnitMaxMana("mouseover"), UnitManaType("mouseover");
		local skill, skillMax, skillType = UnitSkill("mouseover"), UnitMaxSkill("mouseover"), UnitSkillType("mouseover");
		local healthText, manaText, skillText = "", "";
		local unitQuestMsg = UnitQuestMsg("mouseover");

		-- clears GameTooltip
		GameTooltip:SetText(UnitName("mouseover"), 1.0, 1.0, 0.0);

		-- adding class information to GameTooltip
		local mColor = ""; -- colorize the following output for the primary class
		if (classColors[mC] ~= nil) then
			mColor = "|cff" .. classColors[mC];
		end;
		GameTooltip:AddLine(mColor .. mC .. "|r (" .. pbLocale["LVL"] .. " " .. mColor .. mL .. "|r)", 1.0, 1.0, 1.0);

		if (sL > 0 and sC ~= "") then -- do the same for the secondary class, if available
			local sColor = "";
			if (classColors[sC] ~= nil) then
				sColor = "|cff" .. classColors[sC];
			end;
			GameTooltip:AddLine(sColor .. sC .. "|r (" .. pbLocale["LVL"] .. " " .. sColor .. sL .. "|r)", 1.0, 1.0, 1.0);
		end;
		
		-- adding healthpoint information to GameTooltip
		if (not UnitIsPlayer("mouseover")) then -- calculate or get the current healthpoints for mobs and NPCs
			unitGUID = UnitGUID("mouseover");
			healthRatio = UnitHealth("mouseover");
			if (pbMobsMaxHP[unitGUID] ~= nil) then
				healthMax = pbMobsMaxHP[unitGUID];
				health = math.ceil(healthMax * healthRatio / 100);
				healthText = health .. " / " .. healthMax .. " (" .. healthRatio .. "%)", 1.0, 1.0, 1.0;
			else
				healthText = healthRatio .. "%", 1.0, 1.0, 1.0;
			end;
			if (healthRatio == 100) then -- that's how I save the unit's maximum healtpoints
				pbMobsMaxHP[unitGUID] = UnitChangeHealth("mouseover");
			end;
			manaText = mana .. "%";
			skillText = skill .. "%";
		else -- players? That's easy .. .
			health = UnitHealth("mouseover");
			healthMax = UnitMaxHealth("mouseover");
			healthRatio = UnitMaxHealth("mouseover");
			healthText = health .. " / " .. healthMax .. " (" .. math.ceil(100 * health/healthMax) .. "%)", 1.0, 1.0, 1.0;
			manaText = mana .. " / " .. manaMax;
			if (manaType == 1) then
				manaText = manaText .. " (" .. math.ceil(100 * mana/manaMax) .. "%)";
			end;
			skillText = skill .. " / " .. skillMax;
			if (skillType == 1) then
				skillText = skillText .. " (" .. math.ceil(100 * skill/skillMax) .. "%)";
			end;
		end;
		GameTooltip:AddLine(pbLocale["HP"] .. ": " .. healthText, 1.0, 1.0, 1.0);
		
		-- adding mana and skill information to GameTooltip, if available - unfortunately, UnitChangeMana() and UnitChangeSkill() don't work
		if (manaMax > 0 and manaType > 0) then
			GameTooltip:AddLine(pbLocale["TYPE" .. manaType] .. ": " .. manaText, 1.0, 1.0, 1.0);
		end;
		if (skillMax > 0 and skillType > 0) then
			GameTooltip:AddLine(pbLocale["TYPE" .. skillType] .. ": " .. skillText, 1.0, 1.0, 1.0);
		end;

		-- (re-)adding quest information to GameTooltip, if available
		if (unitQuestMsg ~= nil) then
			GameTooltip:AddLine("\n" .. unitQuestMsg, 1.0, 1.0, 1.0);
		end;
	end;
end;

-- used to set a mob's maximum healthpoints if "Target next enemy" (TAB or similar) is used
function pbMobInfoUpdateOnUnitTargetChange(player)
	unitGUID = UnitGUID("target");
	if (player == "player" and not UnitIsPlayer("target") and UnitHealth("target") == 100 and unitGUID ~= nil) then
		pbMobsMaxHP[unitGUID] = UnitChangeHealth("target");
	end;
end;

-- updates the health bar in target frame, if a mob's maximum healthpoints are available
function pbMobInfoUpdateOnTargetChangeHealth()
	if (not UnitIsPlayer("target")) then
		unitGUID = UnitGUID("target");
		healthMax = pbMobsMaxHP[unitGUID];
		if (healthMax ~= nil) then
			TargetHealthBarValueText:SetText(math.ceil((UnitHealth("target") * healthMax) / 100) .. "/" .. pbMobsMaxHP[unitGUID])
		end;
	end;
end;

-- Teh oldsql way in chat window
function pbMobInfoChat()
	if (UnitName("target") ~= nil) then
		local mC, sC = UnitClass("target");
		local mL, sL = UnitLevel("target");
		local health, healthRatio = 0, 0;
		local sub, message = "", "";

		if (not UnitIsPlayer("target")) then
			local unitGUID = UnitGUID("target");
			healthRatio = UnitHealth("target");
			if (pbMobsMaxHP[unitGUID] ~= nil) then
				health = pbMobsMaxHP[unitGUID] * healthRatio / 100;
			else
				health = UnitChangeHealth("target");
			end;
			if (healthRatio == 100) then
				pbMobsMaxHP[unitGUID] = UnitChangeHealth("target");
			end;
		else
			health = UnitHealth("target");
			healthRatio = math.ceil(1000 * UnitHealth("target")/UnitMaxHealth("target")) / 10;
		end;

		if (UnitInRaid("raid1") or UnitInParty("party1")) then
			if (sL > 0 and sC ~= "") then
				sub = " / " .. sC .. " (" .. sL .. ")";
			end;
			message = "[ " .. UnitName("target") .. " - " .. pbLocale["HP"] .. ": " .. health .. " (" .. healthRatio .. "%) - " .. mC .. " (" .. mL .. ")" .. sub .. " ]";
			SendChatMessage(message,"PARTY");
		else
			local mColor, sColor = "", "";
			if (classColors[mC] ~= nil) then
				mColor = "|cff" .. classColors[mC];
			end;
			if (sL > 0 and sC ~= "") then
				if (classColors[sC] ~= nil) then
					sColor = "|cff" .. classColors[sC];
				end;
				sub = " / " .. sColor .. sC .. "|r (" .. sColor .. sL .. "|r)";
			end;
			message = "[pbMobInfo]: [ " .. UnitName("target") .. " - " .. pbLocale["HP"] .. ": " .. health .. " (" .. healthRatio .. "%) - " .. mColor .. mC .. "|r (" .. mColor .. mL .. "|r)" .. sub .. " ]";
			DEFAULT_CHAT_FRAME:AddMessage(message, 1, 1, 1);
		end;
		ChatFrame2:AddMessage(message, 1, 1, 1); -- combat log
	else
		local message = "[pbMobInfo]: " .. pbLocale["NVT"];
		DEFAULT_CHAT_FRAME:AddMessage(message, 1, 1, 1);
		ChatFrame2:AddMessage(message, 1, 1, 1); -- combat log
	end;
end;

SLASH_PBMOBINFO1 = "/mobinfo"; -- thx to gastro19 for the idea!
SLASH_PBMOBINFO2 = "/mi";
SlashCmdList["PBMOBINFO"] = pbMobInfoChat;

You can make a Bot with the Runes of Magic Macro System, because the whole game script eg. the placement of NPCs, Quests etc was written in the same API
that the Macro-System uses. That means, you can access any function and variable created by the developers during the developement of the game. However, in future this will be surely restriced and violations will be enforced.

Re: [Help] Runes Of Magic

Posted: Sat Jan 10, 2009 5:42 am
by tcflying
hi, 3cmSailorfuku thx to your code for last chaos, i have use a part of it because the get mob function can't work. will you improve of it? EG, find mob in memory with call? anyway. i can't find the mob struct in memory, would you also try to do it and tell me how to get it. thx. i think it will need mob id.

Re: [Help] Runes Of Magic

Posted: Sat Jan 10, 2009 9:34 am
by 3cmSailorfuku
tcflying wrote:hi, 3cmSailorfuku thx to your code for last chaos, i have use a part of it because the get mob function can't work. will you improve of it? EG, find mob in memory with call? anyway. i can't find the mob struct in memory, would you also try to do it and tell me how to get it. thx. i think it will need mob id.
It was pretty retarded, I don't recommend using it for anything. You should go to elitepvpers and ask Syntex, I believe he still has his hook he made for Last Chaos,
it allows to Target the nearest mob and so on, easily by calling in the memory.

Re: [Help] Runes Of Magic

Posted: Sun Jan 11, 2009 2:19 pm
by tcflying
3cmSailorfuku, thanks for your reply first of all. i am crazy in this game to find the static mob address and character address. but it's easy to find the game base address. would you plz also help me to find the mob address and character's ?

thx anyway.