using MM to pass information to addon?
Re: using MM to pass information to addon?
you will probably find if you change the value it will update automatically back, in order to stop the updates you would need to stop the function that updates the value.
Like how the attack works now or swimhack.
It removes the code that updates the value and then once you are done with it then puts the function back the way it was.
It can get complicated but I think I might see where you are going with it, for instance farming to not need a reseter.
I seriously doubt you could do honor parties like this as it would have checks for party member lvl aswell.
Like how the attack works now or swimhack.
It removes the code that updates the value and then once you are done with it then puts the function back the way it was.
It can get complicated but I think I might see where you are going with it, for instance farming to not need a reseter.
I seriously doubt you could do honor parties like this as it would have checks for party member lvl aswell.
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: using MM to pass information to addon?
yeah, this would be a possibility also.
for now i am only interested about the theory behind this so i could be able to find these things alone and not be forced to wait for the experts to mouth-feed me with every trivial task
lisa you have a PM also please check it
for now i am only interested about the theory behind this so i could be able to find these things alone and not be forced to wait for the experts to mouth-feed me with every trivial task
lisa you have a PM also please check it
Re: using MM to pass information to addon?
i finally reached the point when this has made sence, and i could use successfully the first one, but this does not work:rock5 wrote:You could create a bot function or waypoint onload code that keeps checking if the player has a target. If so, the easy solution would be to change a variable in game, egThen just have the addon use that value when it's there.Code: Select all
RoMScript("} targetdistance = "..distance.." a={")
But to get faster speed than using a RoMScript you could write to a macro instead, eg.Then you can have the addon read the macro using GetMacroInfo function. Of course you would have to make sure they use the same macro.Code: Select all
writeToMacro(macroNum, distance)
Code: Select all
writeToMacro(7, targetdistance)
is there anything i should do for macro slot 7?
should there be an empty macro created? or is it a problem if it already has some value? has to be clear?
Re: using MM to pass information to addon?
my guess is you missed this step
Then you can have the addon read the macro using GetMacroInfo function. Of course you would have to make sure they use the same macro.
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: using MM to pass information to addon?
oh, no, i did this step
and when i write smtg in that macro slot, the getmacroinfo is printing my macro text.
it's just that MM does not update that text.
and i cannot figure out why bc it gives me no error message
and when i write smtg in that macro slot, the getmacroinfo is printing my macro text.
it's just that MM does not update that text.
and i cannot figure out why bc it gives me no error message
Re: using MM to pass information to addon?
It doesn't update itself. You have to keep updating it. Here's an example in a waypoint onload.
So while this waypoint file is running, when you read the macro with your addon, it will have an updated distance to the target or nil if you don't have a target.
Code: Select all
<waypoints>
<onLoad>
repeat
player:update()
local target = player:getTarget()
if target then
local dist = distance(player.X,player.Z,target.X,target.Z)
writeToMacro(7, dist)
else
writeToMacro(7, nil)
end
yrest(200)
until false
</onLoad>
</waypoints>
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: using MM to pass information to addon?
i have it in a loop
i think something else is wrong there, the function just does nothing in my wp.
i wil try to get a gode that updates it, maybe this one you posted and try to find out what is keeping it from working
i think something else is wrong there, the function just does nothing in my wp.
i wil try to get a gode that updates it, maybe this one you posted and try to find out what is keeping it from working
Re: using MM to pass information to addon?
progress is going OK, but i need another info, if available.
how can i check an object's buff? before targeting. so me targeting it depends on what buffs it has.
thx
how can i check an object's buff? before targeting. so me targeting it depends on what buffs it has.
thx
Re: using MM to pass information to addon?
you need to create a pawn of the object and that is pretty much it.
Code: Select all
local mob = CPawn(obj.Address)
if mob:hasBuff(buffname, count) then
--do stuff
end
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: using MM to pass information to addon?
thank you lisa
i didn't know that i could do that.
i didn't know that i could do that.
Re: using MM to pass information to addon?
In a nut shell, if you use any code that uses the objectlist,like findNearestNameOrId, it will have these variables.
If you want any more info than that from a mob/npc/obj then you need to make it a pawn using it's address, once you do that then you have all the info in pawn.lua.
Not going to post it as it is pretty long and I am sure you know how to have a look in the file =)
Code: Select all
self.Address = ptr;
self.Name = "<UNKNOWN>";
self.Id = 0;
self.Type = PT_NONE;
self.X = 0.0;
self.Y = 0.0;
self.Z = 0.0;
Not going to post it as it is pretty long and I am sure you know how to have a look in the file =)
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: using MM to pass information to addon?
Hi Lisa,
I used the userfunction "pawnlog" and got the info i want. Now I try to write a different value to the memory. I looked at the swimhack userfunktion but its not working that way for me
thats the pawnlog I got
thats what I want to write to memory
so in Code:
Thanks for your help
I used the userfunction "pawnlog" and got the info i want. Now I try to write a different value to the memory. I looked at the swimhack userfunktion but its not working that way for me
thats the pawnlog I got
Code: Select all
Bits,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,1,1,0,0,0, XXXX
Code: Select all
Bits,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,1,1,1,0,0,0
Code: Select all
if (bitAnd(inp,0x8000000) and bitAnd(inp,0x2000000)) then
???
memoryWriteIntPtr(getProc(), obj.Address, addresses.pawnAttackable_offset, active);
""0x4000000=0""
???
end
Re: using MM to pass information to addon?
I did something similar recently so I know how to do it.
If inp is the byte that you read from memory and 0x8000000 is the bit you want to add or remove then.
To add a bit you can just doIt will only add the bit if it doesn't already exist.
To remove a bit you can just minus the value but you have to check that is exists firstYou can also add the bit in this way too
Then just rewrite the byte back to memory.
Hope that helps.
If inp is the byte that you read from memory and 0x8000000 is the bit you want to add or remove then.
To add a bit you can just do
Code: Select all
inp = bitOr(inp,0x8000000)
To remove a bit you can just minus the value but you have to check that is exists first
Code: Select all
if bitAnd(inp,0x8000000) then
inp = inp - 0x8000000
end
Code: Select all
if bitAnd(inp,0x8000000) then
inp = inp + 0x8000000
end
Hope that helps.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: using MM to pass information to addon?
Hi Rock5,
thanks allot for the fast answer.
Just one more noob question.
thanks allot for the fast answer.
Just one more noob question.
how to rewrite back to memory?rock5 wrote:Then just rewrite the byte back to memory.
Re: using MM to pass information to addon?
Writing is similar to reading but I see you made a mistake in that too. So I'll just point you to the wiki.
http://www.solarstrike.net/wiki/index.p ... _Functions
Note: Some functions are for pointers and others are not. Learn the difference.
http://www.solarstrike.net/wiki/index.p ... _Functions
Note: Some functions are for pointers and others are not. Learn the difference.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: using MM to pass information to addon?
I willrock5 wrote:Note: Some functions are for pointers and others are not. Learn the difference.
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests