Page 1 of 2
Constant mounting and dismounting issue
Posted: Fri May 25, 2012 12:27 pm
by loverunes
Hi all,
I've been following the forum for some time, but now posting for the first time.
So guys you have a great forum.
Ok, so my problem is this. I have used for some time the butterfly leaching script you can find on the forum here.
I started to add some extra waypoints for killing the butterflies. It works, but always at the same spots (multiple places) my char is starting to mount. Even I cannot find any mount code.
If you guys have any idea, it would be great. The mounting is not nedded at this point of the code.
Butterflyleach
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<!-- # 1 --><waypoint x="7548" z="2981" y="184">
local queststate = getQuestStatus("Catch Butterflies")
if queststate == "complete" then
repeat
player:dismount() ------- ADDED for mounting
yrest(2000)
player:update()
printf("Player Mounted: "..tostring(player.Mounted).."\n")
until not player.Mounted
yrest(2000)
player:mount()
yrest(2000)
__WPL:setDirection(WPT_FORWARD);
else
loadPaths("butterflykill"); ---------- ADDED to load the butterfly kill path.
end
</waypoint>
<!-- # 2 --><waypoint x="7581" z="3034" y="184"> </waypoint>
<!-- # 3 --><waypoint x="7671" z="3126" y="184"> </waypoint>
<!-- # 4 --><waypoint x="7555" z="3191" y="184"> </waypoint>
<!-- # 5 --><waypoint x="7435" z="3346" y="184"> </waypoint>
<!-- # 6 --><waypoint x="7365" z="3343" y="184"> </waypoint>
<!-- # 7 --><waypoint x="7342" z="3222" y="184"> </waypoint>
<!-- # 8 --><waypoint x="7255" z="3180" y="193"> </waypoint>
<!-- # 9 --><waypoint x="7157" z="3231" y="193"> </waypoint>
<!-- # 10 --><waypoint x="7049" z="3417" y="193"> </waypoint>
<!-- # 11 --><waypoint x="6626" z="3747" y="175"> </waypoint>
<!-- # 12 --><waypoint x="6560" z="3976" y="206"> </waypoint>
<!-- # 13 --><waypoint x="6479" z="4387" y="185"> </waypoint>
<!-- # 14 --><waypoint x="6326" z="5027" y="184"> </waypoint>
<!-- # 15 --><waypoint x="6427" z="5431" y="172">
local queststate = getQuestStatus("Catch Butterflies")
if queststate == "complete" then
player:target_NPC("Robbie Butcher");
CompleteQuestByName("Catch")
end
yrest(1000)
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount ~= 10 then
player:target_NPC("Robbie Butcher");
AcceptQuestByName("Catch")
else
inventory:update();
player:update();
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434);
yrest(2000)
player:target_NPC("Robbie Butcher");
AcceptQuestByName("Catch")
else
player:sleep();
end
end
__WPL:setDirection(WPT_BACKWARD);
</waypoint>
</waypoints>
Butterfly kill
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 22 kill --><waypoint x="7843" z="1410" y="168">
</waypoint>
<!-- # 21 kill --><waypoint x="7758" z="1692" y="168">
</waypoint>
<!-- # 20 kill --><waypoint x="7695" z="2002" y="168">
</waypoint>
<!-- # 19 kill --><waypoint x="7604" z="2302" y="168">
</waypoint>
<!-- # 18 kill --><waypoint x="7611" z="2508" y="168">
</waypoint>
<!-- # 17 kill --><waypoint x="7611" z="2677" y="168">
</waypoint>
<!-- # 16 --><waypoint x="7548" z="2981" y="184">
local queststate = getQuestStatus("Catch Butterflies")
if queststate == "complete" then
__WPL:setForcedWaypointType("TRAVEL")
loadPaths("buttkill");
else
__WPL:setDirection(WPT_FORWARD);
end
</waypoint>
</waypoints>
At the butterfly kill part, the char is always mounting at certain points, between waypoints.
If i look in the command line, it happens after the message "Stopping waypoint: target acquired".
Any Idea why this happens?
Kind regards
Re: Constant mounting and dismounting issue
Posted: Fri May 25, 2012 12:46 pm
by rock5
If it mounts when it says "Stopping waypoint: target acquired" it might be because there is a player:dismount() in the player:fight() function. If it thinks that it is mounted but is not, it's possible player:dismount() might cause it to mount. The only time I've encountered it not knowing if it was mounted was when I used my model files which didn't show the mounts. But I fixed that in a recent revision of the bot.
Are you using my models files? If so, have you updated the bot recently?
Re: Constant mounting and dismounting issue
Posted: Fri May 25, 2012 1:02 pm
by loverunes
Ok, i will test without any mount function first. To see if it happens again.
The only files i edit are waypoint and profiles.
I did an update to the latest version yesterday.
Kind Regards
Re: Constant mounting and dismounting issue
Posted: Fri May 25, 2012 1:12 pm
by loverunes
Stil the same, before the fight it mounts. Even when the code at waitpoint 1 is deleted.
Btw: what do you mean with your models files.
Kind Regards
Re: Constant mounting and dismounting issue
Posted: Fri May 25, 2012 2:17 pm
by rock5
It's been a known trick that we can sometimes make things not appear in game such as doors that block our way, by overriding the model files by placing empty files in the models folder in the games directory.
There are various model files around the forum for removing certain problem objects but I recently posted a fairly extensive model folder that replaces most models and also removes a lot of textures and effects. It's barely playable manually but ideal for the bot as it allows you to run more clients at the same time.
As to your problem, a couple of ideas come to mind in regards to the profile. Can we see your profile?
Re: Constant mounting and dismounting issue
Posted: Sat May 26, 2012 3:15 am
by loverunes
Ah k now I understand.
Here is my profile:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<profile>
<options>
<!-- Try the bot with a new char mage -->
<!-- At the pioneer village. Use demo.xml waypoint file -->
<option name="HP_LOW" value="85" />
<option name="MP_LOW_POTION" value="50" />
<option name="HP_LOW_POTION" value="40" />
<option name="USE_HP_POTION" value="best" /> <!-- potion select strategy: best|minstack -->
<option name="USE_MANA_POTION" value="best" /> <!-- potion select strategy: best|minstack -->
<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="15" />
<option name="MP_REST" value="15" />
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="99" />
<option name="MANA_POTION" value="99" />
<option name="ARROW_QUIVER" value="2" />
<option name="THROWN_BAG" value="2" />
<option name="POISON" value="30" />
<!-- either false or arrow or thrown -->
<option name="RELOAD_AMMUNITION" value="false" /> <!-- false|arrow|thrown -->
<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="true" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="150" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<option name="MAX_TARGET_DIST" value="150" />
<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="3" />
<option name="TARGET_LEVELDIF_BELOW" value="60" />
<!-- Waypoint and movement settings -->
<option name="WAYPOINTS" value="" /> <!-- leave empty to show a list -->
<option name="RETURNPATH" value="" />
<option name="PATH_TYPE" value="waypoints" /> <!-- waypoints | wander -->
<option name="WANDER_RADIUS" value="10" />
<option name="WAYPOINT_DEVIATION" value="10" />
<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" /> <!-- probability in % for a short rest -->
<!-- Harvest options -->
<option name="HARVEST_DISTANCE" value="120" />
<option name="HARVEST_WOOD" value="true" /> <!-- Choose which types to harvest. -->
<option name="HARVEST_HERB" value="true" /> <!-- "true" = harvest, "false" = do not harvest -->
<option name="HARVEST_ORE" value="true" />
<!-- Eggpet options -->
<option name="EGGPET_ENABLE_CRAFT" value="false" /><!-- If using same slot for assist and craft, onlt 1 can be enabled. -->
<option name="EGGPET_CRAFT_SLOT" value="1" />
<option name="EGGPET_ENABLE_ASSIST" value="false" />
<option name="EGGPET_ASSIST_SLOT" value="1" />
<option name="EGGPET_CRAFT_RATIO" value="1:4:4" /> <!-- mining:woodworking:herbalism ratio to produce. -->
<option name="EGGPET_CRAFT_INDEXES" value="" /> <!-- override auto craft index for mining,woodworking,herbalism eg. "2,,"-->
<!-- Log out and resurrect settings -->
<option name="LOGOUT_TIME" value="0" /> <!-- in minutes, 0 = timer disabled -->
<option name="LOGOUT_SHUTDOWN" value="false" />
<option name="LOGOUT_WHEN_STUCK" value="true" />
<option name="CLOSE_WHEN_STUCK" value="true" />
<option name="RES_AUTOMATIC_AFTER_DEATH" value="true" />
<option name="MAX_DEATHS" value="10" /> <!-- Log out after this many deaths -->
<!-- For more options and documentation see the RoM Bot Wiki: -->
<!-- http://www.solarstrike.net/wiki/index.php5?title=RoM_Bot -->
</options>
<friends>
<!-- names of friends we help fighting or enemys we don't want to attack -->
<!-- for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer -->
<friend name="MyOtherCharacter1" />
<friend name="MyOtherCharacter2" />
<friend name="Elite_Mob_Name1" />
<friend name="Elite_Mob_Name2" />
</friends>
<mobs>
<!-- names of mobs we want to attack -->
<!-- if no names defined we will attack all mobs -->
<mob name="Inferno Butterfly" />
<mob name="" />
<mob name="" />
</mobs>
<hotkeys>
<!-- to communicate with the RoM API / define ingame dummy macro at place 1 -->
<hotkey name="MACRO" modifier="" key="VK_0" />
</hotkeys>
<!-- define your skills depending from your actual primary class -->
<!-- see the example for a priest/mage -->
<!-- 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_priest>
<skill name="PRIEST_SOUL_SOURCE" modifier="" hotkey="VK_4" priority="110" inbattle="true" hpper="15" />
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="VK_7" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="VK_2" priority="100" hpper="30" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="VK_6" priority="90" />
<skill name="PRIEST_RISING_TIDE" modifier="" hotkey="VK_3" priority="80" />
<skill name="MAGE_FIREBALL" modifier="" hotkey="VK_8" priority="70" />
<skill name="PRIEST_WAVE_ARMOR" modifier="" hotkey="VK_5" priority="40" inbattle="true" />
<!--skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" /> -->
<!--skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_F" priority="20" rebuffcut="60" inbattle="false" /> -->
</skills_priest>
<skills_warrior>
<skill name="WARRIOR_SLASH" modifier="" hotkey="VK_2" priority="90" />
<skill name="WARRIOR_PROBING_ATTACK" modifier="" hotkey="VK_4" priority="80" />
<skill name="WARRIOR_OPEN_FLANK" modifier="" hotkey="VK_5" priority="70" />
</skills_warrior>
<skills_scout>
<skill name="SCOUT_SHOT" modifier="" hotkey="VK_=" priority="90" />
<skill name="SCOUT_AUTOSHOT" modifier="" hotkey="VK_-" priority="80" />
<skill name="SCOUT_WIND_ARROWS" modifier="" hotkey="VK_2" priority="70" />
</skills_scout>
<skills_rogue>
<skill name="ROGUE_SHADOWSTAB" modifier="" hotkey="VK_2" priority="90" />
<skill name="ROGUE_LOW_BLOW" modifier="" hotkey="VK_3" priority="80" />
<skill name="ROGUE_WOUND_ATTACK" modifier="" hotkey="VK_4" priority="70" />
<skill name="ROGUE_HIDE" modifier="" hotkey="VK_0" priority="10" inbattle="false" />
<skill name="SCOUT_SHOT" modifier="" hotkey="VK_7" priority="60" />
<skill name="SCOUT_VAMPIRE_ARROWS" modifier="" hotkey="VK_8" priority="100" />
</skills_rogue>
<skills_mage>
<skill name="MAGE_FLAME" modifier="" hotkey="VK_3" priority="80" />
<skill name="MAGE_ELEMENTAL_CATALYST" modifier="" hotkey="VK_2" priority="30" inbattle="true" />
</skills_mage>
<skills_knight>
<skill name="KNIGHT_HOLY_STRIKE" modifier="" hotkey="VK_3" priority="90" />
<skill name="KNIGHT_HOLY_SHIELD" modifier="" hotkey="VK_4" priority="80" inbattle="true" hpper="15" />
<skill name="KNIGHT_HOLY_SEAL" modifier="" hotkey="VK_5" priority="70" />
<skill name="KNIGHT_PUNISHMENT" modifier="" hotkey="VK_2" priority="60" />
</skills_knight>
<skills_warden>
<skill name="WARDEN_CHARGED_CHOP" modifier="" hotkey="VK_2" priority="90" />
<skill name="WARDEN_ENERGY_ABSORB" modifier="" hotkey="VK_3" priority="80" inbattle="true" hpper="25" />
</skills_warden>
<skills_druid>
<skill name="DRUID_RECOVER" modifier="" hotkey="VK_2" priority="90" hpper="30" />
<skill name="DRUID_EARTH_ARROW" modifier="" hotkey="VK_3" priority="80" />
</skills_druid>
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
]]></onLoad>
<onDeath><![CDATA[
-- Additional Lua code to execute on death
-- pauseOnDeath(); -- Stop the script
-- player:logout(); -- logout
]]></onDeath>
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
]]></onLeaveCombat>
<onLevelup><![CDATA[
-- Additional Lua code to execute after having a levelup
-- and levelup the skills for a new character (mage or priest recommended)
-- e.g. sendMacro("SetSpellPoint(_tabnr, _skillnr);"); would levelup a skill
]]></onLevelup>
<onSkillCast><![CDATA[
-- 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
-- e.g.:
--if( 15 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_SOUL_SOURCE");
--elseif( 25 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_HOLY_AURA");
-- player:cast("PRIEST_URGENT_HEAL");
-- player:cast("PRIEST_URGENT_HEAL");
]]></onSkillCast>
<onHarvest><![CDATA[
-- Additional Lua code to execute directly before the actual harvesting takes place.
-- Note: arg1 contains the object to be harvested.
-- i.e. arg1.Name will be the name of the node you are about to harvest
-- If this snippet returns 'false', the node will *not* be harvested.
-- All other return values result in the player attempting to harvest the node.
-- Note that returning 'false' here breaks out of harvesting completely;
-- You will not attempt to harvest other nearby nodes instead.
]]></onHarvest>
</profile>
Re: Constant mounting and dismounting issue
Posted: Sat May 26, 2012 3:32 am
by rock5
I notice you are using VK numbers for your skills hotkeys instead of "MACRO". Is it possible you placed your mount on the action bar at one of those numbers? Even if you didn't, it might be worth trying changing the VK_ values to "MACRO". "MACRO" is better anyway. The VK values just press a key but there is no guarantee that the key is pressed properly. The "MACRO" option does an extra check to make sure the command is executed. Also you free up your action keys for other things.

Re: Constant mounting and dismounting issue
Posted: Sat May 26, 2012 4:58 am
by Rebyc
I'm having the same problem, i'm also running a butterfly script but i created it myself.
Stopping waypoint: Target Acquired and than it mounts.
And it also seems when i get aggroed than it first mounts, dismount directly and than goes over to my attack skills.
It's also running past mobs while the WP is set to normal (mob is from a normal lvl and is not on my friend list)
All my spells are binded to the MACRO and my mount is in my right action bar without a key binded to it.
When i use the player:mount(); function in my waypoints the bot says it's already mounted while it's not ?
Re: Constant mounting and dismounting issue
Posted: Sat May 26, 2012 7:57 am
by rock5
Rebyc wrote:I'm having the same problem, i'm also running a butterfly script but i created it myself.
Stopping waypoint: Target Acquired and than it mounts.
And it also seems when i get aggroed than it first mounts, dismount directly and than goes over to my attack skills.
It's also running past mobs while the WP is set to normal (mob is from a normal lvl and is not on my friend list)
All my spells are binded to the MACRO and my mount is in my right action bar without a key binded to it.
When i use the player:mount(); function in my waypoints the bot says it's already mounted while it's not ?
I have no idea.
You are even talking about 2 issues. One: that it mounts when aquiring a target and two: that, when you use player:mount(), it says it's already mounted but it's not.
It seems to me that it thinks you are always mounted although you are not. Not sure what could be causing that besides a faulty rombot installation, a game/rombot version mismatch or something I can't think of.
Re: Constant mounting and dismounting issue
Posted: Sun May 27, 2012 5:02 am
by Rebyc
I've updated rom (SVN update) to be sure i didn't have any corrupted files or such.
Tested with another account (a scout) and it's working perfectly.
But i still have some troubles with my main mage bot.
The mounting and dismounting is working fine now, although i don't know what caused this ? Didn't change anything in profile/waypoint.
When i'm running on the waypoint now it stops when it sees a butterfly:
Stopping waypoint: Target acquired.
Engaging enemy [inferno butterfly] in combat.
than it just stands there untill the butterfly agroes me ??
Or if it's taking to long to get agro it moves to the next point.
So again, Butterfly's level is in range as setup in profile, the waypoint type is normal so it should attack all mobs (exc. friends).
Got the same problem in the Survival mini game script, i have to clear the trash manualy.
I guess the problem should be somewhere in my profile because it's all working normal on the other character.
Re: Constant mounting and dismounting issue
Posted: Sun May 27, 2012 5:16 am
by rock5
Could be. A simple way to test it is to start your waypoint file with the default profile and see if it attacks.
Re: Constant mounting and dismounting issue
Posted: Sun May 27, 2012 5:19 am
by Rebyc
I've rebuild the whole profile from the default one and it seems to be working now. Minigame i'll have to test tomorrow
Thx for the advice
Re: Constant mounting and dismounting issue
Posted: Sun May 27, 2012 1:05 pm
by C3PO
I have a similar problem since a few days. everytime when I use the code
in my scripts, I get the output (in Micromacro) "Already Mounted". But my char isn't mounted.
I tried via commandline the same command and got the same output.
Any Ideas? I change nothing in my Profile since month.
Re: Constant mounting and dismounting issue
Posted: Sun May 27, 2012 1:49 pm
by rock5
Well Rebyc said "rebuilding the whole profile" fixed it. So that would suggest a problem with the profile.
Re: Constant mounting and dismounting issue
Posted: Sun May 27, 2012 3:56 pm
by BillDoorNZ
I noticed (while reinstalling my system) that there was a change to pawn.lua:
Code: Select all
local attackableFlag = memoryReadRepeat("int", proc, self.Address + addresses.pawnAttackable_offset) or 0;
self.Mounted = bitAnd(attackableFlag, 0x10000000)
and this code is no longer in the file:
Code: Select all
self.Mounted = memoryReadRepeat("byte", proc, self.Address + addresses.pawnMount_offset) ~= 1;
looks a little dodgy to me...perhaps this is what is causing the problem?
Re: Constant mounting and dismounting issue
Posted: Mon May 28, 2012 12:58 am
by rock5
Except that works. Unless it only works with certain mounts or something. I can't see that happening.
Also Rebyc said he got it working by redoing his profile so that suggests there is nothing wrong with the bot.
Re: Constant mounting and dismounting issue
Posted: Mon May 28, 2012 4:06 am
by loverunes
rock5 wrote:I notice you are using VK numbers for your skills hotkeys instead of "MACRO". Is it possible you placed your mount on the action bar at one of those numbers? Even if you didn't, it might be worth trying changing the VK_ values to "MACRO". "MACRO" is better anyway. The VK values just press a key but there is no guarantee that the key is pressed properly. The "MACRO" option does an extra check to make sure the command is executed. Also you free up your action keys for other things.

Replaced all VK with MACRO and removed my mount from the action bars.
Still the same. will try to test it with another char to see if it is the waypoint or the profile file.
Re: Constant mounting and dismounting issue
Posted: Tue May 29, 2012 12:48 am
by Rebyc
I don't think it's because your mount is in the action bar.
Just do a complete SVN update
And build your profile again from the default one. (I didn't have all options from the default one in my profile, so i guess it was just a bit outdated).
Re: Constant mounting and dismounting issue
Posted: Thu May 31, 2012 1:48 pm
by abron1
i think this is the problem because you will repeat the dismount comand unless you have something else there that is what i use in the event monior script and if you put repeat before any thing it will keeping doing it and stay in the loop
Re: Constant mounting and dismounting issue
Posted: Sun Jun 03, 2012 8:20 am
by loverunes
Hi guys,
Sorry for the late response but hadn't much time to test things.
After som test, I started from an new waypoint file, with only a few waypoint, some channel switch code and som rest and jump codes.
I also started from a default profile, only changed th mobs attack level and the following rule:
Code: Select all
<skill name="ROGUE_HIDE" hotkey="MACRO" priority="10" autouse="true" />
When this auto use is true, the problem occurs.
Why i want to use this? As rogue i want to cover the bot in hide modus.
Code: Select all
<skill name="ROGUE_HIDE" hotkey="MACRO" priority="10" autouse="false" />
When this is false, no unexpected mounting is caused. So no problem anymore.
any idea i can use hide again after an attack ?
Update:
Code: Select all
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
player:cast("ROGUE_HIDE")
]]></onLeaveCombat>
seems to give the same problem.
Kind Regards