Castetime suggestion

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#21 Post by rock5 » Wed Jun 23, 2010 10:49 am

Starrider wrote:before r462+ i could use urgend heal directly two times with this code:

Code: Select all

if( 24 > player.HP/player.MaxHP*100 ) then
       player:cast("PRIEST_HOLY_AURA");
       player:cast("PRIEST_URGENT_HEAL");
       player:cast("PRIEST_URGENT_HEAL");
   end;
now i got at the second cast an error messsage that it failed to cast a second time.
Can you please change SKILL_USE_PRIOR = 400 on line 71 of settings.lua and tell me if that fixes the problem?
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#22 Post by Valleyguy » Wed Aug 04, 2010 11:40 pm

rock5 wrote:
Starrider wrote:before r462+ i could use urgend heal directly two times with this code:

Code: Select all

if( 24 > player.HP/player.MaxHP*100 ) then
       player:cast("PRIEST_HOLY_AURA");
       player:cast("PRIEST_URGENT_HEAL");
       player:cast("PRIEST_URGENT_HEAL");
   end;
now i got at the second cast an error messsage that it failed to cast a second time.
Can you please change SKILL_USE_PRIOR = 400 on line 71 of settings.lua and tell me if that fixes the problem?

Sorry for resurrecting an older thread but this was a great help with the current code it appears I have a great ping to the server I am on... I had to reduce SKILL_USE_PRIOR = 400 on line 72 to SKILL_USE_PRIOR = 35 to remove the massive amounts of fail casts this number is going to be different for everyone based on their ping to the server they are playing on...

Just FYI if your having alot of problems with Fail Casts.
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#23 Post by rock5 » Thu Aug 05, 2010 12:19 am

Valleyguy wrote:Sorry for resurrecting an older thread but this was a great help with the current code it appears I have a great ping to the server I am on... I had to reduce SKILL_USE_PRIOR = 400 on line 72 to SKILL_USE_PRIOR = 35 to remove the massive amounts of fail casts this number is going to be different for everyone based on their ping to the server they are playing on...

Just FYI if your having alot of problems with Fail Casts.
SKILL_USE_PRIOR is the amount of time, before the previous skill ends, to cast the spell. The bigger the value, the faster it casts (as long as it's not too early and fails to cast). In theory I designed it to not be affected by server ping time unless you're affected by severe lag. It might be affected by really slow computers or computers running too many processors at once but I'm not entirely sure.

So I'm sorry to say a value of 35 does not mean you have a fast connection. You should try to raise that value as much as you can without getting too many failed casts.
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#24 Post by Valleyguy » Thu Aug 05, 2010 12:57 am

rock5 wrote:
Valleyguy wrote:Sorry for resurrecting an older thread but this was a great help with the current code it appears I have a great ping to the server I am on... I had to reduce SKILL_USE_PRIOR = 400 on line 72 to SKILL_USE_PRIOR = 35 to remove the massive amounts of fail casts this number is going to be different for everyone based on their ping to the server they are playing on...

Just FYI if your having alot of problems with Fail Casts.
SKILL_USE_PRIOR is the amount of time, before the previous skill ends, to cast the spell. The bigger the value, the faster it casts (as long as it's not too early and fails to cast). In theory I designed it to not be affected by server ping time unless you're affected by severe lag. It might be affected by really slow computers or computers running too many processors at once but I'm not entirely sure.

So I'm sorry to say a value of 35 does not mean you have a fast connection. You should try to raise that value as much as you can without getting too many failed casts.

Himm.. somethings not right then in the logic here... i decreased the number to 100 then increments of 5 until the fail casts stopped ... I am killing much faster cast speed is perfect streaming of spells one right after the other... i tracked what the bot was doing and it was starting to cast the next spell way to early by dropping that number it put the time it started to cast as close to the end of the spell as my lag allowed without a fail... don't know man all im telling ya is that number fixed me and my spells are streaming one right after the other much faster and complete i also tested the above priest code and it works just fine now at 35 it fails the second spell at 475 and 400

i.e. simple 1 - 10 Mage / Priest i had him casting flame then tidal wave then flame then tidal wave etc.... at 475 / 400 it always failed tidal wave and went back to the much longer casting flame... at 35 it casts every spell in sequence as the priority of the spells is setup ...

my ping response average to the server is in the 55ms area setting it to 55 it succeeded about 50% of the time i had to lower it to 35 to avoid the flux in my ping times. and it worked so it is driectly tied to ping at least on my end.. dono but it worked for me it might work for others....

Connection info for me : ADSL 10mbs ping avg 55ms - 100 ms to US servers

Quad core 6600 pc avg load on all 4 cores during botting 22%... no core exceeded 50%
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#25 Post by rock5 » Thu Aug 05, 2010 1:40 am

Valleyguy wrote:Himm.. somethings not right then in the logic here... i decreased the number to 100 then increments of 5 until the fail casts stopped ... I am killing much faster cast speed is perfect streaming of spells one right after the other... i tracked what the bot was doing and it was starting to cast the next spell way to early by dropping that number it put the time it started to cast as close to the end of the spell as my lag allowed without a fail... don't know man all im telling ya is that number fixed me and my spells are streaming one right after the other much faster and complete i also tested the above priest code and it works just fine now at 35 it fails the second spell at 475 and 400

i.e. simple 1 - 10 Mage / Priest i had him casting flame then tidal wave then flame then tidal wave etc.... at 475 / 400 it always failed tidal wave and went back to the much longer casting flame... at 35 it casts every spell in sequence as the priority of the spells is setup ...

my ping response average to the server is in the 55ms area setting it to 55 it succeeded about 50% of the time i had to lower it to 35 to avoid the flux in my ping times. and it worked so it is driectly tied to ping at least on my end.. dono but it worked for me it might work for others....

Connection info for me : ADSL 10mbs ping avg 55ms - 100 ms to US servers

Quad core 6600 pc avg load on all 4 cores during botting 22%... no core exceeded 50%
I have no doubt that you are casting 1 skill after another but at 35 you are not undercutting the previous skill so you are not casting as fast as you could.

When playing manually the fastest way to cast is to press the next skill button when the timer for the last skill is about 1/4 from the end (depending on the skill cast time). If you press too early it fails to cast. If you press it too close to the end of the cast time it will also fail to cast, so I'm not surprised that at 100 it failed to cast. If you don't press it within the undercut time you have to wait till the skill has properly finished casting.

If you want to use undercutting to speed up your casting I suggest you follow these steps.
1. Practice casting manually and undercutting the previous spell until you are familiar with the best time to press the skill.
2. Put the value back to 400.
3. Start the bot and watch the casting bar and the macro button in your action bar to see if it is undercutting at the right time.
4. If it looks early reduce SKILL_USE_PRIOR. If it looks late increase it.
5. Repeat until perfect.
6. Report what value you settled on here so others can make comparisons.
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#26 Post by Valleyguy » Thu Aug 05, 2010 10:51 am

rock5 wrote: I have no doubt that you are casting 1 skill after another but at 35 you are not undercutting the previous skill so you are not casting as fast as you could.

When playing manually the fastest way to cast is to press the next skill button when the timer for the last skill is about 1/4 from the end (depending on the skill cast time). If you press too early it fails to cast. If you press it too close to the end of the cast time it will also fail to cast, so I'm not surprised that at 100 it failed to cast. If you don't press it within the undercut time you have to wait till the skill has properly finished casting.

If you want to use undercutting to speed up your casting I suggest you follow these steps.
1. Practice casting manually and undercutting the previous spell until you are familiar with the best time to press the skill.
2. Put the value back to 400.
3. Start the bot and watch the casting bar and the macro button in your action bar to see if it is undercutting at the right time.
4. If it looks early reduce SKILL_USE_PRIOR. If it looks late increase it.
5. Repeat until perfect.
6. Report what value you settled on here so others can make comparisons.
I have tested this extensively i wish there was a hole in the game code that would let me get up to a half second jump on stream casting here are my results for your testing..

Test Method I started at 1000ms and decreased the ms count by 10 ms each time i used the wander script in a area where at least 3 spells would not kill the monster and i allowed at least 10 kills prior to moving onto the next increment... the following is my results...

1000 - 670 First spell would cast the next 2 spells would fail every fight.
660 - 190 First Spell would cast every other one would not cast I.E. casts flame fails to cast rising tide casts flame fails to cast rising tide...
180 - 150 the results were starting to succeed basically reducing from 100 % fail every other spell to 100% fail every third spell at 150
I.e. start flame success... cast tide success.... cast flame fail... cast tide success... cast flame fail...

140 - 75 Same as above results but failing less and less to the point where 1 in 10 fights every spell cast by the bot was succeeding chained together.
75 - 40 succeeding at casting every spell the bot cast increasing from 10% success to 100% success.
40 - 20 I kept lowering this due to the fact in larger fights over the next 50 fights i was still getting fails especially when urgent heal needed to proc right after a cast but it would fail i get 100% stream casting at 25ms never a fail after 30+ fights...

If there is some magical hole you can get a spell to start pre-casting greater then your current lag/ping i cant find it or its above 1000ms....

hope this helps you out.

Edit: Note i discovered another anomaly ... in larger fights after i get to casing 4 or 5 spells the bot seems to be rapid spamming the spells by the 4th and 5th spells not controlled by this number so those are failing... i.e. it starts to cast flame on the 4th spell but casts tide 5th spell and then flame 6th spell within 500ms of each other so they fail to cast then it seems to reset for the next 3 spells and succeed to chain ....

maybe this is related to the other code you have written in the bot for casttime casting?
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#27 Post by rock5 » Thu Aug 05, 2010 12:30 pm

Valleyguy you sure are dedicated to kill 1000 mobs as part of your testing.

So did you try my instructions? Were you able to undercut the previous spell when casting manually? When running the bot what happened when you watched both the casting bar and the macro in the action bar? Does the macro go off at the right time?

I tried my mage/priest with just Rising Tide and Flame and sure enough I was getting a lot of failed casts in the mm window. Then I realized Rising Tide was an instant cast because of an elite. The bot thinks its a 2 second cast so problems would be expected. Do you have the "Rising Tide Mastery" elite that makes Rising Tide instant? I then tried Flame and Plasma Arrow which is a 2 second cast. It worked perfectly.

If your Rising Tide isn't instant then I can't explain your test results.
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#28 Post by Valleyguy » Thu Aug 05, 2010 2:15 pm

rock5 wrote:Valleyguy you sure are dedicated to kill 1000 mobs as part of your testing.

So did you try my instructions? Were you able to undercut the previous spell when casting manually? When running the bot what happened when you watched both the casting bar and the macro in the action bar? Does the macro go off at the right time?

I tried my mage/priest with just Rising Tide and Flame and sure enough I was getting a lot of failed casts in the mm window. Then I realized Rising Tide was an instant cast because of an elite. The bot thinks its a 2 second cast so problems would be expected. Do you have the "Rising Tide Mastery" elite that makes Rising Tide instant? I then tried Flame and Plasma Arrow which is a 2 second cast. It worked perfectly.

If your Rising Tide isn't instant then I can't explain your test results.
no i did all this testing on a lvl 10 mage / 10 priest Using mage as primary so i don't have the elite skill yet.. yes i killed a pile of mobs the mage s level 15 by the end of testing the rising tide is a 2 second cast at this time but i'll try changing my profile to not use rising tide and use plasma arrow for a bit see if i get the same results as you.
Image

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#29 Post by Valleyguy » Thu Aug 05, 2010 3:15 pm

Getting the same thing with plasma arrow here i'll try something else here ...

Profile for this character (using base default with these skills)

Code: Select all

	<skills_mage>
		<skill name="MAGE_FLAME"              hotkey="VK_1" priority="80" />
		<skill name="MAGE_PLASMA_ARROW"              hotkey="VK_2" priority="70" />
		<skill name="MAGE_FIREBALL"        modifier="" hotkey="VK_3" priority="50" />
		<skill name="PRIEST_REGENERATE" hotkey="VK_6" priority="100" hpper="60"  />
		<skill name="PRIEST_URGENT_HEAL" hotkey="VK_9" priority="99" hpper="50"  />
		<skill name="PRIEST_HOLY_AURA"     modifier="" hotkey="VK_7" priority="100" inbattle="true" hpper="24" />
	</skills_mage>
Setting at 475 (default)

This is a copy of the MM log that the bot was trying to do for a fight....

Code: Select all

We will wander arround in a radius of 500
No return path with default naming wander_return.xml found.
We use the normal waypoint path <NONE> now.
We will wander around with a radius of 500.
100% [**************************************************]
Moving to waypoint #1, (782, 2642)
Stopping waypoint: Target acquired before moving.
Engaging enemy [Leeching Bat] in combat.
Use 1: MAGE_FLAME          =>   Leeching Bat (1185/1185)
Use 2: MAGE_PLASMA_ARROW   =>   * Failed to cast *
Use 3: MAGE_FIREBALL       =>   Leeching Bat (792/1185)
Use 1: MAGE_FLAME          =>   Leeching Bat (772/1185)
Use 2: MAGE_PLASMA_ARROW   =>   * Failed to cast *
Use 3: MAGE_FIREBALL       =>   Leeching Bat (506/1185)
Use 1: MAGE_FLAME          =>   Leeching Bat (281/1185)
Use 2: MAGE_PLASMA_ARROW   =>   Leeching Bat (281/1185)
Fight finished. Killed 1 Leeching Bat. (fight #1 / runtime 0 minutes)
Use MACRO: Looting target in distance 10.
here is the combat log for this fight...
Image
Note the Fireball 99 life is not a spell cast its the eruption damage...

Now Setting at 400 ...

Code: Select all

Engaging enemy [Leeching Bat] in combat.
Use 1: MAGE_FLAME          =>   Leeching Bat (1007/1007)
Use 2: MAGE_PLASMA_ARROW   =>   Leeching Bat (1007/1007)
Use 3: MAGE_FIREBALL       =>   Leeching Bat (1007/1007)
Use 1: MAGE_FLAME          =>   Leeching Bat (421/1007)
Use 2: MAGE_PLASMA_ARROW   =>   * Failed to cast *
Use 3: MAGE_FIREBALL       =>   Leeching Bat (0/1007)
Fight finished. Killed 1 Leeching Bat. (fight #3 / runtime 3 minutes)
Use MACRO: Looting target in distance 9.
and combat log
Image

Now at my setting of 50

Code: Select all

Engaging enemy [Leeching Bat] in combat.
Use 1: MAGE_FLAME          =>   Leeching Bat (1075/1075)
Use 2: MAGE_PLASMA_ARROW   =>   Leeching Bat (1075/1075)
Use 3: MAGE_FIREBALL       =>   Leeching Bat (757/1075)
Use 1: MAGE_FLAME          =>   Leeching Bat (489/1075)
Use 2: MAGE_PLASMA_ARROW   =>   Leeching Bat (489/1075)
Use 1: MAGE_FLAME          =>   Leeching Bat (180/1075)
Use 3: MAGE_FIREBALL       =>   Leeching Bat (0/1075)
Fight finished. Killed 1 Leeching Bat. (fight #1 / runtime 0 minutes)
And the combat log :
Image

all attacks cast by the bot hit up until the 4th spell it was cast while spell #3 was only half way done casting and the last one because target was dead.

now this works fine for a single fight that quick and short but it seems sometime after spell 4 or 5 the bot starts rapidly casting 2 or 3 spells in a row it seems to come out of sync with the timing... im trying to locate the spell casting code to see if theres something in there that might be causing that...
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#30 Post by rock5 » Fri Aug 06, 2010 6:37 am

"So did you try my instructions? Were you able to undercut the previous spell when casting manually? When running the bot what happened when you watched both the casting bar and the macro in the action bar? Does the macro go off at the right time?"

Also, when set to 400, when it didn't fail to cast was it undercutting the previous spell? Was it casting really fast?

In my experience when undercutting I may miss a spell or 2 in about 3 battles but it casts super fast. On the other-hand if you don't undercut, it more reliably casts every spell but casts a lot slower. I'd rather it cast really fast and miss the occasional spell than reliably cast every skill but cast painfully slow. If undercut we are talking about 100 ms between spells. When not undercutting it can be more like 500ms.

One last thing do you have any code in your onSkillCast section of your profile?
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#31 Post by Valleyguy » Fri Aug 06, 2010 9:39 am

rock5 wrote:"So did you try my instructions? Were you able to undercut the previous spell when casting manually? When running the bot what happened when you watched both the casting bar and the macro in the action bar? Does the macro go off at the right time?"
Manually I can under cut but only right at the end of the cast (100ms or less...) I have not been able to get another spell to start casting at 1/4 or more of the cast bar.
rock5 wrote:Also, when set to 400, when it didn't fail to cast was it undercutting the previous spell? Was it casting really fast?
no it was failing every other spell then waiting till the bot casted the next spell
rock5 wrote:In my experience when undercutting I may miss a spell or 2 in about 3 battles but it casts super fast. On the other-hand if you don't undercut, it more reliably casts every spell but casts a lot slower. I'd rather it cast really fast and miss the occasional spell than reliably cast every skill but cast painfully slow. If undercut we are talking about 100 ms between spells. When not undercutting it can be more like 500ms.
From everything I have found researching this to death is you can undercut but the amount you can undercut can only be the amount of ping (lag) your client receives X 2 (start cast lag of casting spell + start cast lag of undercut spell) in my case with a avg ping sitting in the 80 - 100 area i am seeing success with a 50 - 120 value the fail rate at 120 is more (about 25% second spell) but the casting is much faster... i am currently using 100 just to reduce the fails a bit.
rock5 wrote:One last thing do you have any code in your onSkillCast section of your profile?
Yes I am using the example code above see my profile below I know its a steal from the L1L10 modified to my use I haven't removed the gift bag parts at the bottom yet but I don't see them causing this problem.... :

Code: Select all

<profile>
	<options>
		<!-- Try the bot with a new char mage                   -->
		<!-- At the pioneer village. Use demo.xml waypoint file -->
		<option name="HP_LOW"			value="65" />
		<option name="MP_LOW_POTION"	value="50" />
		<option name="HP_LOW_POTION"	value="60" />

		<!-- Rest if HP or Mana is below that level -->
		<option name="HP_REST" value="40" />
		<option name="MP_REST" value="40" />

		<!-- Shopping options, how many of what do you want to keep in your inventory -->
		<option name="HEALING_POTION"	value="0" />
		<option name="MANA_POTION"		value="0" />
		<option name="ARROW_QUIVER"		value="0" />
		<option name="THROWN_BAG"		value="0" />

		<!-- Combat options -->
		<option name="COMBAT_TYPE"			value="" />		<!-- leave empty or 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="15" />		<!-- 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="2" />
		<option name="TARGET_LEVELDIF_BELOW" value="10" />

		<!-- 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="150" />
		<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="300" />
		<option name="LOOT_PAUSE_AFTER"		value="0" />		<!-- probability in % for a short rest -->

		<!-- 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="RES_AUTOMATIC_AFTER_DEATH" value="true" />


		<!-- 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="" />
		<friend name="" />
		<friend name="" />
	</friends>

	<hotkeys>
		<!-- to communicate with the RoM API / define ingame a dummy macro at place 1 -->
		<hotkey name="MACRO"		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_mage>
		<skill name="MAGE_FLAME"              		hotkey="VK_1" priority="80" />
		<skill name="PRIEST_RISING_TIDE"              	hotkey="VK_2" priority="70" />
		<skill name="MAGE_FIREBALL"        		hotkey="VK_3" priority="50" />
		<skill name="PRIEST_REGENERATE" 		hotkey="VK_6" priority="100" hpper="80"  />
		<skill name="PRIEST_URGENT_HEAL" 		hotkey="VK_9" priority="99" hpper="60"  />
		<skill name="MAGE_ELEMENTAL_CATALYST"  		hotkey="VK_8" priority="90" inbattle="true" cooldown="300" />		
		<skill name="PRIEST_HOLY_AURA"     		hotkey="VK_7" priority="100" inbattle="true" hpper="30" />
	</skills_mage>

	<skills_priest>
		<skill name="PRIEST_SOUL_SOURCE" hotkey="VK_4" priority="110" hpper="25" inbattle="true" />
		<skill name="PRIEST_URGENT_HEAL" hotkey="VK_2" priority="99" hpper="30"  />
		<skill name="PRIEST_RISING_TIDE" hotkey="VK_3" priority="70" level="" />
	</skills_priest>

	<onLoad>
		-- 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);
		inventory:update();

		if(player.Level == 1) then
			openGiftbags1To10(player.Level);
		else
			levelupSkills1To10("loadonly");
		end;

		if(player.Class1 == CLASS_SCOUT ) then
			changeProfileOption("ARROW_QUIVER", 2);
		end;

	</onLoad>

	<onDeath>
		-- Additional Lua code to execute on death
		-- pauseOnDeath(); -- Stop the script
	</onDeath>

	<onLeaveCombat>
		-- Additional Lua code to execute after a target is finished

			if(player.Level == 10) then
				__WPL:setForcedWaypointType("TRAVEL")
			end;


	</onLeaveCombat>

	<onLevelup>
		-- thats a demo for opening the gift bags from Lvl 1-10
		-- and levelup the skills for a new character (mage or priest recommended)
		-- you can delete that lines if you don't want to use that

			-- single skill would be: sendMacro("SetSpellPoint(4,2);");
			-- or levelupSkill(_skillname, _times)
			levelupSkills1To10();

			-- open giftbag and equipt content
			openGiftbags1To10(player.Level);

	</onLevelup>

	<onSkillCast>
if( 30 > player.HP/player.MaxHP*100 ) then
       player:cast("PRIEST_HOLY_AURA");
       player:cast("PRIEST_URGENT_HEAL");
       player:cast("PRIEST_URGENT_HEAL");
   end;
	</onSkillCast>
</profile>
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#32 Post by rock5 » Fri Aug 06, 2010 11:28 am

Valleyguy wrote:From everything I have found researching this to death is you can undercut but the amount you can undercut can only be the amount of ping (lag) your client receives X 2 (start cast lag of casting spell + start cast lag of undercut spell) in my case with a avg ping sitting in the 80 - 100 area i am seeing success with a 50 - 120 value the fail rate at 120 is more (about 25% second spell) but the casting is much faster... i am currently using 100 just to reduce the fails a bit.
That's very interesting. So what you are saying is the smaller your ping time the less you can undercut by? My ping time is 390 and I always thought my idea setting was about 375 to 400. Does that match your calculations (I couldn't quite follow your calculations)? If this is true maybe we can calculate the correct value?
Valleyguy wrote:
rock5 wrote:One last thing do you have any code in your onSkillCast section of your profile?
Yes I am using the example code above see my profile below I know its a steal from the L1L10 modified to my use I haven't removed the gift bag parts at the bottom yet but I don't see them causing this problem.... :
Me neither.
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#33 Post by Valleyguy » Fri Aug 06, 2010 12:51 pm

rock5 wrote:
Valleyguy wrote:From everything I have found researching this to death is you can undercut but the amount you can undercut can only be the amount of ping (lag) your client receives X 2 (start cast lag of casting spell + start cast lag of undercut spell) in my case with a avg ping sitting in the 80 - 100 area i am seeing success with a 50 - 120 value the fail rate at 120 is more (about 25% second spell) but the casting is much faster... i am currently using 100 just to reduce the fails a bit.
That's very interesting. So what you are saying is the smaller your ping time the less you can undercut by? My ping time is 390 and I always thought my idea setting was about 375 to 400. Does that match your calculations (I couldn't quite follow your calculations)? If this is true maybe we can calculate the correct value?
Valleyguy wrote:
rock5 wrote:One last thing do you have any code in your onSkillCast section of your profile?
Yes I am using the example code above see my profile below I know its a steal from the L1L10 modified to my use I haven't removed the gift bag parts at the bottom yet but I don't see them causing this problem.... :
Me neither.
if your ping is 390 you should see success anywhere in the range ping fluctuates allot so you need to see what your inner and outer range is. but yes if your ping avg is 390 your number of anywhere between <350 - 475 you will not see allot of casting fails. try this set your number at 325 if your ping is consistent you will always cast every spell (up to the other bug i found at cast #4 - #5 ) for the first 4 spells then you will see the bot try and instant cast 2 spells in a row one will take the other will fail due to cast times in the game. this now is the bug i am trying to find and squash. i wish there was somewhere we could self adjust that number by a basic ping check in the bot but from what i see MM is not capable of running a ping check > result.

Here is a Image of my ping times taken over a 15 min period in different zones the in game ping is a very slow updater (1 ping every 5 sec it looks like) so your number should be much higher then my number... reality is your not casting any faster then the game lets you cast your just negating the lag you have between the client and the server thus your casting efficiently.
Image

so my setting at 70 currently is avoiding the ping flux and will consistently cast unless something changes my ping. on my client it looks like im stream casting reality is i am ignoring the client and estimating the lag (ping) between commands to cast.
Last edited by Valleyguy on Fri Aug 06, 2010 12:59 pm, edited 1 time in total.
Image

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#34 Post by Valleyguy » Fri Aug 06, 2010 12:55 pm

to find the bug is easy to repeat set your SKILL_USE_PRIOR = 0 you will succeed up until the bug (because you are no longer trying to speed cast past the lag)

let me know if your getting the same result around spell 4 or 5 it seems to double cast it does not matter what spells its trying to do.
Image

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#35 Post by Valleyguy » Sat Aug 07, 2010 9:06 pm

well i found why i was getting the mysterious fails at casts 4 - 5 when i had it set lower then 50ms its conflicking with the client ending the main cast i have mine now set at 90 which is just below my 93 avg ping in game and i have been stream casting ever since... you might want to sticky a thread on this and possibly move this to the player profile ?

I.E. to customize your bot to stream cast and not fail allot track your in game ping avg (Ctrl-X in game) and set this number to 5ms - 10ms below your avg ping. (warning do not set this number between 50ms and 1ms other wise more casting fails)
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#36 Post by rock5 » Sat Aug 07, 2010 10:24 pm

Valleyguy wrote:well i found why i was getting the mysterious fails at casts 4 - 5 when i had it set lower then 50ms its conflicking with the client ending the main cast i have mine now set at 90 which is just below my 93 avg ping in game and i have been stream casting ever since... you might want to sticky a thread on this and possibly move this to the player profile ?

I.E. to customize your bot to stream cast and not fail allot track your in game ping avg (Ctrl-X in game) and set this number to 5ms - 10ms below your avg ping. (warning do not set this number between 50ms and 1ms other wise more casting fails)
What I'd rather do is have some sort of variable that holds the game ping and is updated regularly so we could use it to calculate the right values in situations like this. That way it won't need the user to do it manually.

I Looked for a memory address pointer and found 1.
base = 9AA1BC (which is = to staticbase_char)
offset = 7A0

Administrator, could you incorporate this into the bot somehow? Then I could use it to customise SKILL_USE_PRIOR to match users ping 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#37 Post by Valleyguy » Sat Aug 07, 2010 11:27 pm

rock5 wrote: What I'd rather do is have some sort of variable that holds the game ping and is updated regularly so we could use it to calculate the right values in situations like this. That way it won't need the user to do it manually.

I Looked for a memory address pointer and found 1.
base = 9AA1BC (which is = to staticbase_char)
offset = 7A0

Administrator, could you incorporate this into the bot somehow? Then I could use it to customise SKILL_USE_PRIOR to match users ping times.
There are add-ons i seen that already can pull ping from the client and put it in their add ons can we not use that as the trigger?

also have to do a monitor of ping find the avg and then set the Skill Use Prior or your thinking of making skill use prior a variable thats checked against the ping at the start of casting each time?

my ping is rock solid i played last 2 days with it at 90 and haven't had any weird fails yet ... it might be just as easy to have the user maintain it then trying to incorp it into the bot... but then you have a edited Lua file that doesn't match the SVN which means every update it'll reset... which is why if it was in profile it wouldn't get lost.
Image

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#38 Post by Valleyguy » Sat Aug 07, 2010 11:36 pm

Looked up some of the other addons Xbar uses this lua to deal with ping tho i cant find the main function in any other of his files for Sys["ping"]=GetPing();

unless this is a client supported request / result?

Code: Select all

local Sys={["fps"]=0,["ping"]=0,["update"]=0};

function XBarPing_OnUpdate(this,elapsedTime)
--	ChatFrame1:AddMessage("XBar-Ping : "..elapsedTime);
	Sys["update"]=Sys["update"]+elapsedTime;
	if (Sys["update"]>=1) then
		Sys["update"]=0;
		Sys["fps"]=math.floor(GetFramerate());
		Sys["ping"]=GetPing();
		if (Sys["fps"]<=20.0) then Sys["fps"]="|cffFC2323"..Sys["fps"].."|r";
		elseif (Sys["fps"]<=24.0) then Sys["fps"]="|cffFCFC00"..Sys["fps"].."|r";
		else Sys["fps"]="|cff23FC23"..Sys["fps"].."|r"; end

		if (Sys["ping"]<=50) then Sys["ping"]="|cff23FC23"..Sys["ping"].."|r";
		elseif (Sys["ping"]<=120) then Sys["ping"]="|cffFCFC00"..Sys["ping"].."|r";
		else Sys["ping"]="|cffFC2323"..XBar_SetDecimals(Sys["ping"]).."|r"; end
	--	Output
		local usrtxt={[1]=XBar["PingV1"],[2]=XBar["PingV2"]};
		local output="";
		for i=1,2 do
			usrtxt[i],_=XBar_StrReplace(usrtxt[i],"%[MS%]",Sys["ping"]);
			usrtxt[i],_=XBar_StrReplace(usrtxt[i],"%[FPS%]",Sys["fps"]);
		end
		if (XBar["PingT1"]==true) then output=usrtxt[1]; end
		if (XBar["PingT2"]==true) then
			if (XBar["PingT1"]==true) then output=output.."\n"..usrtxt[2]; else output=usrtxt[2]; end
		end
		XBarPing_F_Text:SetText(output);
	--	EoL
	end
end
Image

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Castetime suggestion

#39 Post by rock5 » Sat Aug 07, 2010 11:57 pm

Valleyguy wrote:There are add-ons i seen that already can pull ping from the client and put it in their add ons can we not use that as the trigger?
Yes I know but I figured it's always better to get it from memory, faster and more reliable than using the macro.
Valleyguy wrote:also have to do a monitor of ping find the avg and then set the Skill Use Prior or your thinking of making skill use prior a variable thats checked against the ping at the start of casting each time?
I wasn't thinking of updating it each time just occationally. Also we don't need to calculate the average because I think that value is an average already, I think, but I might be wrong. Either way it's pretty steady.
Valleyguy wrote:my ping is rock solid i played last 2 days with it at 90 and haven't had any weird fails yet ... it might be just as easy to have the user maintain it then trying to incorp it into the bot...
I think you're right, mine is very stable at 390 just occationally jumping up to 405. So maybe we could just use the memory address to set CAST_USE_PRIOR at the beginning. I'd still like to avoid the user maintaining it.
Valleyguy wrote: but then you have a edited Lua file that doesn't match the SVN which means every update it'll reset... which is why if it was in profile it wouldn't get lost.
That shouldn't be a problem. If CAST_USE_PRIOR was added to the profile it would only affect versioned files default.xml and l1-10.xml not customized character profiles, and even then changes would most likely be merged without changing that setting.
Valleyguy wrote:Looked up some of the other addons Xbar uses this lua to deal with ping tho i cant find the main function in any other of his files for Sys["ping"]=GetPing();

unless this is a client supported request / result?
LoL. GetPing() is the ingame function. I have xbar too. I didn't look for that function because I wanted to use memory addresses. To use it in a script you would just use

Code: Select all

ping = RoMScript("GetPing()")
  • 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

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Castetime suggestion

#40 Post by Valleyguy » Mon Aug 09, 2010 12:47 am

rock5 wrote: LoL. GetPing() is the ingame function. I have xbar too. I didn't look for that function because I wanted to use memory addresses. To use it in a script you would just use

Code: Select all

ping = RoMScript("GetPing()")
So could we not just move the value to the players profile and use that above and insert it as code in the profile ...

Code: Select all

<onLoad>
ping = RoMScript("GetPing()")
speedcast = ("ping") - 20 - make sure were safely under the current ping
changeProfileOption("SKILL_USE_PRIOR ", "("speedcast")");
</onLoad>
Or something along this line ... i mean the ping to the servers is pretty stable from what i can see from your end and mine so checking the ping when starting the bot up via the profile should be a easy fix... maybe its getting the code to look for SKILL_USE_PRIOR in the player profile and not in settings.lua now....
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 32 guests