Update
Update
I've made an update to the bot, where it handle's a lot of item functions for you. you no longer have to set the mana and healing potion's key, because it knows what is the best potion in your inventory.
allso:
- auto buy new potions and sticks and stones! (arrows and thrown weapons)
- auto reload. when you run out of sticks or stones. to make this work, you need to configure your onLeaveCombat as shown in the Default.xml
- newer and easier to use create path script.
allso:
- auto buy new potions and sticks and stones! (arrows and thrown weapons)
- auto reload. when you run out of sticks or stones. to make this work, you need to configure your onLeaveCombat as shown in the Default.xml
- newer and easier to use create path script.
Re: Update
Greate work! I feel like christmas Such a lot of new stuff. Couldn't play with all up to now! thx a lot.droppen wrote:I've made an update to the bot, where it handle's a lot of item functions for you. ...
I would have a wish for the wishlist. I'm a little economical. So I most like to use the most worse mana/hp potions or that one with the lowest quantity (to save space).
For the addMessage() function I would suggest to use it the same way as by doing it with error messages. Just format the string before using addMessage with sprintf(). By doing that, we wouldn't need different language entries for printing in the MM windows and ingame.
Potion cooldown (player.lua 223: I suppose the reason for being variable was that depending from the type of postion you are using, the cooldown is either 15 or 30 seconds? If we don't read the cooldown from the potions itselfe, we could still leave the cooldown variable as option in the setting.lua file and just delete the option from the default.xml profile. So it would be just an expert option for special cases.
The RoM Bot Online Wiki needs your help!
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Update
Yes, you should use sprintf() to format the string for addMessage(). You can do that like this:d003232 wrote: For the addMessage() function I would suggest to use them analog to the printf(). Means to use the %s. %d, placeholder in the language files. In order to be compatible with the rest? I think within the addMessage we could format and merge the arguments with sprintf() ?
Code: Select all
addMessage(sprintf("Testing %s, %d", "test string", 1234));
Re: Update
I wonder, if we could do a simple check if the new MACRO function works. Means if the user has defined and assigned the dummy macro to the right key.
Just sending a simple macro to get a returncode should work?
I tried something likebut that doesn't work?
EDIT: I do the check now with a function that has defined return values:
Just sending a simple macro to get a returncode should work?
I tried something like
Code: Select all
hf_return = RoMScript("return 2;");
EDIT: I do the check now with a function that has defined return values:
Code: Select all
local hf_return = RoMScript("GetLocation();");
if( hf_return ~= "DE" and
hf_return ~= "ENUS" and
hf_return ~= "ENEU" and
hf_return ~= "CN" and
hf_return ~= "JP" and
hf_return ~= "SG" and
hf_return ~= "TR" and
hf_return ~= "TW" ) then
RoMScript("GetPing();"); -- overwrite return values
cprintf(cli.yellow, language[906] ); -- Define ingame an empty macro
local msg = sprintf(language[904], getKeyName(settings.profile.hotkeys.MACRO.key) );
if( not settings.profile.options.IGNORE_MACRO_ERROR) then -- only temporary, can be deleted later
error(msg, 0);
end
end
The RoM Bot Online Wiki needs your help!
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Update
Code: Select all
hf_return = RoMScript("2");
Re: Update
I updated from svn and set up everything according to the wiki, my client crashes when the "new" macro is used.
Macro 1 has
Macro 2 has
Code: Select all
Mapping inventory...........Window lost (Client crashed or closed?). You must re
-start the script.
Code: Select all
/script r='' a={GetLocation();} for i=1,#a do if a[i] then r=r..tostring(a[i]) end r=r..' ' end EditMacro(2,'',7,r);
Code: Select all
ENEU
Re: Update
I would suggest to restart window and look if that error would come again. And it could also help to delete (or rename) your personal Runes of Magic configuration (normaly the folder 'Runes of Magic' in your folder'/my documents/'. It could be that some of your configration files is corrupt. RoM will create them again after you restart RoM.kizza wrote:I updated from svn and set up everything according to the wiki, my client crashes when the "new" macro is used.
If so you can set back to an earlier SVN version or set the expert option:
Code: Select all
<option name="IGNORE_MACRO_ERROR" value="true" />
The RoM Bot Online Wiki needs your help!
Re: Update
Thanks that worked.And it could also help to delete (or rename) your personal Runes of Magic configuration (normaly the folder 'Runes of Magic' in your folder'/my documents/'. It could be that some of your configration files is corrupt. RoM will create them again after you restart RoM.
Re: Update
There seems some timing bug in RoMScript. I try to open gift bags automaticly. Sometimes, a available bag will not be opended.
The bag is allready there. The levelup happens. I'm using to open the bag.
I set a printf in the CItem:use():. In the attached screenshot it is the bagid = 69. Everything is ok. As you can see in the folloing inventory:update, the bagid is ok.
So the reason has to be within the RoMScript function.
The bag is allready there. The levelup happens. I'm using
Code: Select all
local hf_return, hf_itemid, hf_name = inventory:useItem( v.itemid ); -- open bag or equipt item
I set a printf in the CItem:use():
Code: Select all
RoMScript("UseBagItem("..self.BagId..");");
if( settings.profile.options.DEBUG_INV) then
cprintf(cli.lightblue, "DEBUG - UseBagItem: %s\n", self.BagId ); -- Open/eqipt item:
end;
So the reason has to be within the RoMScript function.
The RoM Bot Online Wiki needs your help!
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Update
Maybe it is because of global cooldown or something? Try putting a 1 second rest right before trying to open the bag and see if that helps.
Re: Update
It looks good! Could have been the reason. I will do more test tomorrow.Administrator wrote:Maybe it is because of global cooldown or something? Try putting a 1 second rest right before trying to open the bag and see if that helps.
The RoM Bot Online Wiki needs your help!
Re: Update
hallo,
@d003232
du hast auf jedenfalls richtig skill!
Bloß ich habe ein Problem mein bot benützt keine mana potionen
er sagt immer: "Benutze Manatrank: Empty" -.-
habe hp potions auf "-" und mana potions auf "=" ich finde nicht heraus wo der fehler liegt da mir ja kein wirklicher error angezeigt wird.
danke schon mal im voraus für die Hilfe.
mfg AmonRa
@d003232
du hast auf jedenfalls richtig skill!
Bloß ich habe ein Problem mein bot benützt keine mana potionen
er sagt immer: "Benutze Manatrank: Empty" -.-
habe hp potions auf "-" und mana potions auf "=" ich finde nicht heraus wo der fehler liegt da mir ja kein wirklicher error angezeigt wird.
danke schon mal im voraus für die Hilfe.
mfg AmonRa
Re: Update
Die Potions werden nicht mehr über diese 'alten' Hotkeys ausgeührt. Vielmehr gibt es einen neuen allgemienen Hotkey 'MACRO'. Und über die Intentarfunktion werden die besten Potions ermittelt und dann direkt über die RoM API benutzt.AmonRa wrote:Bloß ich habe ein Problem mein bot benützt keine mana potionen
er sagt immer: "Benutze Manatrank: Empty" -.-
habe hp potions auf "-" und mana potions auf "=" ich finde nicht heraus wo der fehler liegt da mir ja kein wirklicher error angezeigt wird.
Mache mal einen SVN Update. Und schaue dass der MACRO Hotkey belegt ist. Dazu ingame ein Dummy Makro auf dem ersten Makroplatz. Dann sollte der Bot deine Tränke finden und auch nehmen.
The RoM Bot Online Wiki needs your help!
Re: Update
Es liegt an was anderend003232 wrote:Die Potions werden nicht mehr über diese 'alten' Hotkeys ausgeührt. Vielmehr gibt es einen neuen allgemienen Hotkey 'MACRO'. Und über die Intentarfunktion werden die besten Potions ermittelt und dann direkt über die RoM API benutzt.AmonRa wrote:Bloß ich habe ein Problem mein bot benützt keine mana potionen
er sagt immer: "Benutze Manatrank: Empty" -.-
habe hp potions auf "-" und mana potions auf "=" ich finde nicht heraus wo der fehler liegt da mir ja kein wirklicher error angezeigt wird.
Mache mal einen SVN Update. Und schaue dass der MACRO Hotkey belegt ist. Dazu ingame ein Dummy Makro auf dem ersten Makroplatz. Dann sollte der Bot deine Tränke finden und auch nehmen.
Code: Select all
<profile>
<options>
<!-- Try the bot with a new char mage or priest -->
<!-- At the pioneer village. Use demo.xml waypoint file -->
<option name="HP_LOW" value="50" />
<option name="MP_LOW_POTION" value="50" />
<option name="HP_LOW_POTION" value="40" />
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="10" />
<option name="MANA_POTION" value="99" />
<option name="ARROW_QUIVER" value="0" />
<option name="THROWN_BAG" value="2" />
<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="15" />
<option name="MP_REST" value="15" />
<!-- Combat options -->
<option name="COMBAT_TYPE" value="ranged" /> <!-- Choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="false" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="200" />
<option name="MAX_FIGHT_TIME" value="13" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="5" />
<option name="TARGET_LEVELDIF_BELOW" value="10" />
<!-- Waypoint and movement settings -->
<option name="WAYPOINTS" value="Beute.xml" />
<option name="RETURNPATH" value="" />
<option name="PATH_TYPE" value="waypoints" /> <!-- waypoints | wander -->
<option name="WANDER_RADIUS" value="500" />
<option name="WAYPOINT_DEVIATION" value="0" />
<option name="QUICK_TURN" value="true" />
<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_IN_COMBAT" value="true" />
<option name="LOOT_DISTANCE" value="200" />
<option name="LOOT_PAUSE_AFTER" value="0" />
<!-- Log out and resurrect settings -->
<option name="LOGOUT_TIME" value="0" />
<option name="LOGOUT_SHUTDOWN" value="false" />
<option name="LOGOUT_WHEN_STUCK" value="false" />
<option name="RES_AUTOMATIC_AFTER_DEATH" value="true" />
</options>
<friends>
<!-- names of friends we help fighting or enemys we don't want to attack -->
<friend name="MyOtherCharacter1" />
<friend name="MyOtherCharacter2" />
<friend name="Elite_Mob_Name1" />
<friend name="Elite_Mob_Name2" />
</friends>
<hotkeys>
<hotkey name="MACRO" key="VK_J" />>
</hotkeys>
<!-- define your skills depending from your actual primary class -->
<!-- see the example for a priest/mage respectively mage/priest -->
<!-- delete skills you don't have or don't want to use. -->
<!-- For more skills to use see /database/skills.xml -->
<!-- demo skills for LvL 1 character for all classes -->
<skills_mage>
<skill name="MAGE_ELECTRIC_BOLT" hotkey="VK_3" priority="90" />
<skill name="MAGE_FLAME" hotkey="VK_2" priority="80" />
<skill name="MAGE_FIREBALL" hotkey="VK_4" priority="70" />
<skill name="MAGE_ESSENCE_OF_MAGIC" hotkey="VK_P" priority="60" />
<skill name="MAGE_ENERGY_WELL" hotkey="VK_0" priority="60" />
<skill name="MAGE_ENERGY_SUPPLY" hotkey="VK_9" priority="60" />
<skill name="MAGE_INTENSIFICATION" hotkey="VK_8" priority="60" />
<skill name="PRIEST_URGENT_HEAL" hotkey="VK_6" priority="90" hpper="30" />
<skill name="PRIEST_REGENERATE" hotkey="VK_7" priority="100" />
<skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_I" priority="60" />
</skills_mage>
<skills_priest>
</skills_priest>
<skills_rogue>
</skills_rogue>
<skills_scout>
</skills_scout>
<skills_runedancer>
</skills_runedancer>
<skills_druid>
</skills_druid>
<skills_knight>
</skills_knight>
<onDeath>
printf("\a\a\a"); -- BEEP BEEP BEEP!
</onDeath>
<onLeaveCombat>
-- Additional Lua code to execute after killing an enemy
</onLeaveCombat>
<onSkillCast>
-- Additional Lua code to execute when casting a skill
-- Note: arg1 contains the skill being used.
-- i.e. arg1.Name will be the name of the skill being cast.
</onSkillCast>
</profile>
Re: Update
Jep. Aber an was? Ach da war doch was: hierAmonRa wrote: Es liegt an was anderen
I suppose thats the bug and reason for showing 'empty'. Perhaps droppen will look for that the next time. If not I will try to look into tommorow or so. Perhaps you can try to do a
Code: Select all
inventory:update;
And you could set
Code: Select all
<option name="DEBUG_INV" value="true" />
The RoM Bot Online Wiki needs your help!
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests