how would I go about making a script that looks at an address (HP of a character) and watches that address until the value goes to a certain point. When it reaches that point, I'd like to simulate pressing 1 on the keyboard.
Also, how do I simulate pressing spacebar in given intervals?
I am going to make a script for this new game that is in beta, it has a bot built into the game.
Official site: http://co.enjoymmo.com/
To get a beta key: http://www.mmorpg.com/betas/chaosonline_beta.cfm
Reading a memory address
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
- Administrator
- Site Admin
- Posts: 5318
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Reading a memory address
Read the address into a variable using memoryReadInt or a similar function, then use a conditional statement.
Code: Select all
local HP = memoryReadInt(proc, 0x12345678);
local MaxHP = memoryReadInt(proc, 0x87654321);
-- make sure we don't divide by 0
if( MaxHP == nil or MaxHP == 0 ) then MaxHP = 100; end;
local healPercent = 50;
local currentPercent = HP / MaxHP;
if( currentPercent <= healPercent ) then
-- we are below 50% HP, heal.
keyboardPress(key.VK_1);
end
Who is online
Users browsing this forum: No registered users and 1 guest