How could i start on this ? suggestion needed
How could i start on this ? suggestion needed
Hello,
I am new to LUA and Micromacro, but have some years experience with botting in Ultima Online, Everquest 2.
I would like to try something unusual as my first project in ROM scripting and just need some help how to start it. Making up a waypoint file isnt that bad, but i want something different.
I am a kind of person, who wants to reduce mouse clicking ingame to almost zero, when playing a game actively, cause i am hardcore keyboard player.
Plans are to make a script, which does the following:
1. Loot corpse on keypress near the char.
2. Harvest on keypress near the char
3. and maybe extend this later to more
I would need to use functions from ROM Bot as i understand this, but i dont need any waypoints for this. So can i make an "empty waypoint" (no coordinates) file or how does the structure of the file has to be ?
or
do i need to take out the needed functions from ROM Bot and write my own .lua file for this ?
I would appreciate any idea how to start on this.
I am new to LUA and Micromacro, but have some years experience with botting in Ultima Online, Everquest 2.
I would like to try something unusual as my first project in ROM scripting and just need some help how to start it. Making up a waypoint file isnt that bad, but i want something different.
I am a kind of person, who wants to reduce mouse clicking ingame to almost zero, when playing a game actively, cause i am hardcore keyboard player.
Plans are to make a script, which does the following:
1. Loot corpse on keypress near the char.
2. Harvest on keypress near the char
3. and maybe extend this later to more
I would need to use functions from ROM Bot as i understand this, but i dont need any waypoints for this. So can i make an "empty waypoint" (no coordinates) file or how does the structure of the file has to be ?
or
do i need to take out the needed functions from ROM Bot and write my own .lua file for this ?
I would appreciate any idea how to start on this.
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: How could i start on this ? suggestion needed
im not sure but imo u could make it in a macro, no bot needed then
Re: How could i start on this ? suggestion needed
You could put all your code in the onLoad section of a waypoint file like my RBAssist.xml. Maybe you can even use that file as a basis for your code.
- 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: How could i start on this ? suggestion needed
Hello,rock5 wrote:You could put all your code in the onLoad section of a waypoint file like my RBAssist.xml. Maybe you can even use that file as a basis for your code.
Ive checked RBAssist.xml and understand most of it. So the file has to look like
this:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
mycode
</onLoad>
</waypoints>
Do I need check for keyboard presses with LUA code ?
AND
I have access to player:harvest(). Is looting this here ?
Code: Select all
player:loot();
If the player has a dead enemy target, it will attempt to loot the corpse. This is generally not needed by the end-user.
sincerly,
Paton
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: How could i start on this ? suggestion needed
You do not have to, but you can if you want.Paton wrote: Do I need check for keyboard presses with LUA code ?
Yes, you can use player:harvest(). Yes, player:loot() will cause the player to loot, but do not include that second line (the description), as it isn't Lua code and will generate an error.I have access to player:harvest(). Is looting this here ?Code: Select all
player:loot(); If the player has a dead enemy target, it will attempt to loot the corpse. This is generally not needed by the end-user.
All player functions are in rom/classes/player.lua. You'll look for functions named CPlayer:<whatever>. CPlayer:loot() does not take any parameters. It just loots the selected target, and possibly picks up a sigil if one was dropped.Where is all that source code buried for player:harvest(), player:targetObject(), player:loot(), CObjectList(),... ? I didnt find it and the romwiki doesnt tell anything about parameters for player:loot() ?
Re: How could i start on this ? suggestion needed
@Administrator
thanks,
i do appreciate your answer. Ive overlooked player.lua in that directory, cause i was more focused on improving the speed of Rock5's Millers Ranch Scripts and learning my first steps there.
Ive found all i would need for the keyboard at http://www.solarstrike.net/wiki/index.p ... rd_Control, i think.
Do i need a loop in mycode to check for keyboard presses or does all between <waypoints> and </waypoints> get executed in specific intervalls ? Ive seen that Rock5 is using a loop in RBAssist.xml, so i am unsure.
@Administrator
It seems that setting the wait to 500-1000 causes client crashes. Any idea what could cause this ?
thanks,
i do appreciate your answer. Ive overlooked player.lua in that directory, cause i was more focused on improving the speed of Rock5's Millers Ranch Scripts and learning my first steps there.
Ive found all i would need for the keyboard at http://www.solarstrike.net/wiki/index.p ... rd_Control, i think.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
mycode
</onLoad>
</waypoints>
@Administrator
Code: Select all
while player:target_Object(112955,500) do -- Check for hens
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: How could i start on this ? suggestion needed
Yes, you would run your code in a while loop there.Do i need a loop in mycode to check for keyboard presses or does all between <waypoints> and </waypoints> get executed in specific intervalls ? Ive seen that Rock5 is using a loop in RBAssist.xml, so i am unsure.
No. If this is the case, it sounds like a problem with the client. Try reinstalling it.It seems that setting the wait to 500-1000 causes client crashes. Any idea what could cause this ?
Re: How could i start on this ? suggestion needed
I just noticed that not all your original questions were answered.
Pressing this macro will have different meanings depending on what mode you have the script set to, as described at the top of the RBAssist.xml script.
A note about classes: The 'player' object is created from the CPlayer class template which is found in the player.lua file. The 'inventory' object is created from the CInventory class template which is in the inventory.lua file. The 'objectList' object is created from the CObjectList class template which is in the objectlist.lua file. etc, etc. I hope that makes it clearer.
In game you can set up a macro to send triggers to the script. The macro looks like thisPaton wrote:Where is that script RBTrigger, i didnt find anywhere ?
Code: Select all
/script RBTrigger="go"
A note about classes: The 'player' object is created from the CPlayer class template which is found in the player.lua file. The 'inventory' object is created from the CInventory class template which is in the inventory.lua file. The 'objectList' object is created from the CObjectList class template which is in the objectlist.lua file. etc, etc. I hope that makes it clearer.
- 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
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests