Planting
Re: Planting
Well things are looking good, or they were lol
I have an issue, I can target the pot in memory and I can even use the attack skill to move close to it, trouble is I need to actually click it to open the plant interface, can't find any functions to open the interface without clicking it, so I am kinda stumped.
Any thoughts?
I have an issue, I can target the pot in memory and I can even use the attack skill to move close to it, trouble is I need to actually click it to open the plant interface, can't find any functions to open the interface without clicking it, so I am kinda stumped.
Any thoughts?
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: Planting
I deff have it targeted in memory
Here is snippet of code
Attempted to use attack skill a few times just in case it did actually target/open frame lol
Here is prints
2 pots same name, same id, diff address. so i know it works as far as that goes. Just need to be able to open the plant interface or actually click the pot.
Here is snippet of code
Code: Select all
for k,v in pairs(pots) do
printf(v)
player:target(v)
memoryWriteInt(getProc(), player.Address + addresses.pawnTargetPtr_offset, v);
RoMScript("UseSkill(1,1)"); yrest(50);
local target = player:getTarget();
printf(target.Name)
RoMScript("UseSkill(1,1)"); yrest(50);
printf(target.Id)
RoMScript("UseSkill(1,1)"); yrest(50);
Here is prints
Code: Select all
853309440Large Mayan Plant Pot203838
853312000Large Mayan Plant Pot203838
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: Planting
Ok little update,
Seems the character doesn't actually target the pot, even by clicking it.
So basically I will need to find a function that opens the potcare frame, which isn't listed in wiki.
Only other option is to use mouse click on the pot which would mean RoM client would have to be in focus, so couldnt run in background.
Obviously first option is best.
Seems the character doesn't actually target the pot, even by clicking it.
So basically I will need to find a function that opens the potcare frame, which isn't listed in wiki.
Only other option is to use mouse click on the pot which would mean RoM client would have to be in focus, so couldnt run in background.
Obviously first option is best.
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: Planting
I long suspected, in regards to functions, the wiki is not kept up to date. How do you normally open it? You click it, the interface opens, but it doesn't get targeted? Is that right?
- 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: Planting
This should give you a few clues. I found them in interface.fdb.
- Attachments
-
- planframe.zip
- (5.47 KiB) Downloaded 135 times
- 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: Planting
awesome, I needed this
which in hindsite is kinda obvious lol
Code: Select all
RoMScript("ShowUIPanel(PlantFrame);")
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: Planting
Ok this is getting annoying now.
Seems house furniture is very special, behaves like no other items/npc.
An example would be the storage chest, you can "harvest" it and it says it found the item and will try to harvest it but unless you have your mouse pointing at the storage chest nothing will happen.
So we can either accept the fact that this will only happen if you hover mouse over each pot when opening frame, otherwise need to find a way to trick it into thinking the mouse is pointing at the pots.
Don't need to have the window in focus, just need it to have the mouse over appear, like when name appears next to mouse.
Spoke to soon, on further testing, storage box you don't need window in focus but pots you do, just gets worse lol
Seems house furniture is very special, behaves like no other items/npc.
An example would be the storage chest, you can "harvest" it and it says it found the item and will try to harvest it but unless you have your mouse pointing at the storage chest nothing will happen.
So we can either accept the fact that this will only happen if you hover mouse over each pot when opening frame, otherwise need to find a way to trick it into thinking the mouse is pointing at the pots.
Don't need to have the window in focus, just need it to have the mouse over appear, like when name appears next to mouse.
Spoke to soon, on further testing, storage box you don't need window in focus but pots you do, just gets worse lol
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
- MiesterMan
- Posts: 543
- Joined: Tue Jul 06, 2010 9:15 pm
- Location: Between the Second and Third Circles of Hell
Re: Planting
I'm going to look at this right now but you might try the reload trick.
When you're harvesting something and do a /script ReloadUI(); the object appears in the target frame after it finishes reloading. This could tell you if it's targetting it properly or not.
Edit: Nevermind, tried it, doesn't work.
Edit2: The reload trick works if you use target object before reloading. Hehe, didn't really help but still. I think I've got a method for you. (Doesn't always work)
When you're harvesting something and do a /script ReloadUI(); the object appears in the target frame after it finishes reloading. This could tell you if it's targetting it properly or not.
Edit: Nevermind, tried it, doesn't work.
Edit2: The reload trick works if you use target object before reloading. Hehe, didn't really help but still. I think I've got a method for you. (Doesn't always work)
My RoM Bot toys:
- Object Viewer: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2619
Teleporter Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2605
Waypoint Finder: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2616
Mail Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2612
Equipment Swapper(TempFixed): http://www.solarstrike.net/phpBB3/viewt ... =27&t=2571
Re: Planting
Maybe it's got something to do with the fact that rombot doesn't really target objects? Cause sometimes you attack and kill a mob but don't even have it in target? And as a solution, is it possible to add something to the targeting function so rombot really takes it in target? It should be possible to open the pot interface then, shouldn't it?lisa wrote:Spoke to soon, on further testing, storage box you don't need window in focus but pots you do, just gets worse lol
Edit: which wouldn't solve the problem with the pots having the same id..
Re: Planting
The id being same isn't important as we use the address anyway.
I can target it via memory using player:target(address) and if you use attack skill on the item and also have mouse over object then it works perfectly in all aspects.
If you don't mouse over or you don't use attack skill then it doesn't get info from that pot. (it also only gets info from the moused over pot regardless of what is targeted in memory but you still need to target a pot in memory to make it work)
The plant frame can be forced to appear using showui but without actually doing the target/attack/mouseover the plant frame will have no data or the data from the last time it was opened.
Been trying to find the section of memory for the items but I am kinda lost on that bit. I get a print of the addresses for the items but it makes no sence to me. Even print of address of player or housemaid I can't see the relation to the memory address.
Ohh yeah reloadUI did show the target, but I knew I had it targeted anyway from other testing =)
I can target it via memory using player:target(address) and if you use attack skill on the item and also have mouse over object then it works perfectly in all aspects.
If you don't mouse over or you don't use attack skill then it doesn't get info from that pot. (it also only gets info from the moused over pot regardless of what is targeted in memory but you still need to target a pot in memory to make it work)
The plant frame can be forced to appear using showui but without actually doing the target/attack/mouseover the plant frame will have no data or the data from the last time it was opened.
Been trying to find the section of memory for the items but I am kinda lost on that bit. I get a print of the addresses for the items but it makes no sence to me. Even print of address of player or housemaid I can't see the relation to the memory address.
Code: Select all
2: table: 03D21170
Id: 203832
Type: 0
Name: Flowery Plant Pot
Address: 34931968
3: table: 03D211E8
Id: 113809
Type: 0
Name: (housemaid for pots**edited)
Address: 34934528
4: table: 03D21210
Id: 1000
Type: 1
Name: (Charname**edited)
Address: 442134016
8: table: 03D212D8
Id: 203838
Type: 0
Name: Large Mayan Plant Pot
Address: 442142976
9: table: 03D21350
Id: 110758
Type: 0
Name: Housekeeper
11: table: 03D213C8
Id: 203838
Type: 0
Name: Large Mayan Plant Pot
Address: 442158336
12: table: 03D21328
Id: 203906
Type: 0
Name: Sea Wave Plant Pot
Address: 442159616
13: table: 03D21440
Id: 203832
Type: 0
Name: Flowery Plant Pot
Address: 442162176
14: table: 03D21490
Id: 201383
Type: 0
Name: Storage Chest
Address: 442169856
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: Planting
At the moment I am trying to convince the client that the target is moused over using memory. That's why I am trying to find the region of memory so I can see if there is anything noticable for moused over objects.
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: Planting
I found a pointer that shows the address of the item under the mouse
address 9C57EC offset 744
Initial attempts at changing it didn't work. It just reset to 0. The area around it seems to do with the mouse. A little above it I even saw some values that show the coordinates of the mouse.
address 9C57EC offset 744
Initial attempts at changing it didn't work. It just reset to 0. The area around it seems to do with the mouse. A little above it I even saw some values that show the coordinates of the mouse.
- 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
- MiesterMan
- Posts: 543
- Joined: Tue Jul 06, 2010 9:15 pm
- Location: Between the Second and Third Circles of Hell
Re: Planting
Sorry, I got sidetracked and lost most of the work I'd been doing.
It's a bit confusing but you're definately right about this being different than an attackable item.
I got very confused when experimenting with the events involved so I'll just give you what I made to help me figure out how it works.
These are functions that you would put in one of your custome RoM addons:
There's another thing you can do to find values that seem mysterious:
I know I should have been able to reason it out but that's how I figured out the first argument being sent to the event handler was PlantFrame.
Greenthumb.lua uses a number of house functions to find info on the pots. It's "FindPots" or something like that. Using the EnumerateArgs function I was able to find a ghost return value that is proportional to the last sent in the event. Houses_GetFurnitureItemInfo(slotnumber) is the one I think. It was the fifth or sixth value returned (the one right after the boolean "Placed" value). You subtract that number from 1000000 I think. Bah, hang on, I'll log back in and check again.
It's a bit confusing but you're definately right about this being different than an attackable item.
I got very confused when experimenting with the events involved so I'll just give you what I made to help me figure out how it works.
These are functions that you would put in one of your custome RoM addons:
Code: Select all
function PlantFrame_OnEvent( this, event, arg1, arg2 )
SendSystemChat("this: " .. tostring(this));
SendSystemChat("event: " .. tostring(event));
SendSystemChat("arg1: " .. tostring(arg1));
SendSystemChat("arg2: " .. tostring(arg2));
if ( event == "HOUSES_PLANT_OPEN" ) then
ShowUIPanel(this);
PlantFrame_Update();
return;
elseif ( event == "HOUSES_PLANT_CLOSE" or
event == "HOUSESFRAME_HIDE" ) then
--event == "HOUSES_FURNITURE_CHANGED" ) then
HideUIPanel(this);
return;
elseif ( event == "HOUSES_PLANT_CHANGED" ) then
PlantFrame_Update();
return;
end
end
function EnumerateArgs(_func,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
local _tr = {_1,_2,_3,_4,_5,_6,_7,_8,_9};
_tr._1,_tr._2,_tr._3,_tr._4,_tr._5,_tr._6,_tr._7,_tr._8,_tr._9,_tr._10,_tr._11,_tr._12,_tr._13,_tr._14,_tr._15,_tr._16,_tr._17,_tr._18,_tr._19,_tr._20 = _func(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
for i=1,20,1 do
if _tr["_"..i] then
SendSystemChat("Return " .. i .. ": " .. tostring(_tr["_"..i]));
end
end
end
Code: Select all
/script for i,v in pairs(_G) do if tostring(value) == tostring(v) then SendSystemChat(tostring(i));end;end;
Greenthumb.lua uses a number of house functions to find info on the pots. It's "FindPots" or something like that. Using the EnumerateArgs function I was able to find a ghost return value that is proportional to the last sent in the event. Houses_GetFurnitureItemInfo(slotnumber) is the one I think. It was the fifth or sixth value returned (the one right after the boolean "Placed" value). You subtract that number from 1000000 I think. Bah, hang on, I'll log back in and check again.
My RoM Bot toys:
- Object Viewer: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2619
Teleporter Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2605
Waypoint Finder: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2616
Mail Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2612
Equipment Swapper(TempFixed): http://www.solarstrike.net/phpBB3/viewt ... =27&t=2571
Re: Planting
Ahh nice find.
Seems to me offset 744 is reference to the items address and 746 747 are the indicators of moused over.
when I mouse over a pot I get this info.
442142976 (address printed by MM) and is also the value of 744
745 has value of 1727121
746 has value of 6747
747 has value of 26
442158336 = 744
1727181
6747
26
8 out of 10 objects, including npc person I pointed at had the same 746 and 747
Now where it gets tricky is when the address is very different the 746/747 change
34931968 = 744
136453
533
2
So when the address is very different it affects the 746 & 747
Also in 8/10 objects in my house the 745 was 1727*** the other 2 were 136***
Any of that make sence?
Seems to me offset 744 is reference to the items address and 746 747 are the indicators of moused over.
when I mouse over a pot I get this info.
442142976 (address printed by MM) and is also the value of 744
745 has value of 1727121
746 has value of 6747
747 has value of 26
442158336 = 744
1727181
6747
26
8 out of 10 objects, including npc person I pointed at had the same 746 and 747
Now where it gets tricky is when the address is very different the 746/747 change
34931968 = 744
136453
533
2
So when the address is very different it affects the 746 & 747
Also in 8/10 objects in my house the 745 was 1727*** the other 2 were 136***
Any of that make sence?
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: Planting
I think you are getting a bit confused. The address at 744 is a 4 byte address. So it includes 745,756 and 747. Each of those single bytes has no meaning on its own.
Hm... interesting. A byte at offset 41 switches between 1 and 0 depending on whether the client is the active window or not. And offset 4bc and 4c0 alternate between 1 and 0 when clicking. Just tried simulating a mouse click. Didn't work.
Hm... interesting. A byte at offset 41 switches between 1 and 0 depending on whether the client is the active window or not. And offset 4bc and 4c0 alternate between 1 and 0 when clicking. Just tried simulating a mouse click. Didn't work.
- 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
- MiesterMan
- Posts: 543
- Joined: Tue Jul 06, 2010 9:15 pm
- Location: Between the Second and Third Circles of Hell
Re: Planting
So, getting nowhere with my possible "RoMScript" method I decided to explore rock's pointer. When you debug and scan for what accesses the pointer there is a distinctly different access for clicking but it uses this thing I've often run into and can't find a reference that can explain it to me.
So it's like the attached picture. Can anyone explain to me what that code means? What's happening?
So it's like the attached picture. Can anyone explain to me what that code means? What's happening?
My RoM Bot toys:
- Object Viewer: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2619
Teleporter Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2605
Waypoint Finder: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2616
Mail Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2612
Equipment Swapper(TempFixed): http://www.solarstrike.net/phpBB3/viewt ... =27&t=2571
Re: Planting
lol yeah I did get a bit confused there, for some reason I have display set to byte hex by default, have to keep changing it to 4byte or I get confused
Ok so little update
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x41, 1);
I added that into my function and did a timer for it. I checked on CE and it does set the value to 1 for the address, and it appears to be enough to make some of the code work but not all, actually returns values for the RoMScript("Plant_GetInfo();") which it wouldn't do unless I had RoM as focus window. So thats an improvement.
I also have this
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x744, v.Address);
where v.Address is the address of a pot. I check CE and the value isn't changing for the 744 offset and not sure why.
Ok so little update
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x41, 1);
I added that into my function and did a timer for it. I checked on CE and it does set the value to 1 for the address, and it appears to be enough to make some of the code work but not all, actually returns values for the RoMScript("Plant_GetInfo();") which it wouldn't do unless I had RoM as focus window. So thats an improvement.
I also have this
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x744, v.Address);
where v.Address is the address of a pot. I check CE and the value isn't changing for the 744 offset and not sure why.
Code: Select all
function targetpot()
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x41, 1);
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x744, v.Address);
end
registerTimer("targetpot", 10, targetpot);
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: Planting
Hmm 4bc appears to be movement on Y axis
4co appears to be movent on X,Z axis
offset 490 appears to be the cursor type, changes when the mouse hovers something that alters the cursor. Like mousing over storage box you get the cog, mousing over npc you get the chat dialog cursor.
480 appears to be camera zoom
3B4 and 3B8 appear to be for mouse coords on screen (positioning)
3B4 left/right 3B8 up/down
3BC and 3B0 appear to be the alternate mouse clicks, for me atleast.
and do a quick switch 1 and 0. hold down left click and it stays switched until left click release. (same for both left and right click)
Edit: I belive this is actually the icon dissappearing and then having camera movement using mouse. Not actually clicking anything with mouse.
4co appears to be movent on X,Z axis
offset 490 appears to be the cursor type, changes when the mouse hovers something that alters the cursor. Like mousing over storage box you get the cog, mousing over npc you get the chat dialog cursor.
480 appears to be camera zoom
3B4 and 3B8 appear to be for mouse coords on screen (positioning)
3B4 left/right 3B8 up/down
3BC and 3B0 appear to be the alternate mouse clicks, for me atleast.
and do a quick switch 1 and 0. hold down left click and it stays switched until left click release. (same for both left and right click)
Edit: I belive this is actually the icon dissappearing and then having camera movement using mouse. Not actually clicking anything with mouse.
Last edited by lisa on Sun Jul 03, 2011 11:32 pm, edited 1 time in total.
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: Planting
Sorry I meant 3bc and 3c0. I was typing from memory.lisa wrote:Hmm 4bc appears to be movement on Y axis
4co appears to be movent on X,Z axis
Maybe because it is always updating and it sees there isn't really anything under the mouse. Did you try freezing that too?lisa wrote:memoryWriteBytePtr(getProc(), 0x9C57EC, 0x744, v.Address);
where v.Address is the address of a pot. I check CE and the value isn't changing for the 744 offset and not sure why.
- 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: Planting
Do you mean 0x744 ?Did you try freezing that too?
yeah that is what isn't changing when I try
Code: Select all
function targetpot()
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x41, 1);
memoryWriteBytePtr(getProc(), 0x9C57EC, 0x744, v.Address);
end
registerTimer("targetpot", 10, targetpot);
Not sure which other offset to try freezing if you mean a different one.
sidenote:-
3BC and 3B0
I belive this is actually the icon dissappearing and then having camera movement using mouse. Not actually clicking anything with mouse.
So a switch to say move camera with mouse movement.
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
Who is online
Users browsing this forum: No registered users and 20 guests