"player.spell(xxx).casted < 1"  what does this mean? menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Mackdaddy2887's Avatar Knight-Lieutenant
    Reputation
    43
    Join Date
    Mar 2011
    Posts
    265
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "player.spell(xxx).casted < 1" what does this mean?

    title.
    /chars

    &quot;player.spell(xxx).casted &lt; 1&quot;  what does this mean?
  2. #2
    Malloot's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you casted this spell less then one second ago?

  3. #3
    Mackdaddy2887's Avatar Knight-Lieutenant
    Reputation
    43
    Join Date
    Mar 2011
    Posts
    265
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Malloot View Post
    If you casted this spell less then one second ago?
    so i tested. I think it has to do with how many times you casted it.

    basically that line would only return true ONCE, as after the first time, you can w/e ability, then.. its casted. I tried it on REJUVENATION, and it cast it once, then... nothing, for like a solid min or two, then it cast again.

    It was trash, I dont know if combat dropped, or if there is some time of cache that keeps record of your casts?


    anyways, thats my theory.



    ( I will note, that in Tao's old MW he uses "player.spell(detox).casted < 1" as a condition for his dispells, and it seems to dispell multiple times in a fight)

    ..nvm I guess im still lost

  4. #4
    Malloot's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can test this on the tank dummy maybe get hit by it and go out of range, tank dummy is a pain to get out of combat with so you could use that :P
    with a simple profile that just does.

    {"player.spell(Rejuvination).casted < 1", { "player.health < 90"}},
    {"Wrath"},

    Check time of first rejuv cast and see if second is a minute later?

    PS: Probably mispelled rejuvination so check that :P

  5. #5
    zeldaboch's Avatar Member
    Reputation
    1
    Join Date
    Apr 2013
    Posts
    52
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can put in the ooc part, for test it

  6. #6
    Greymalkin's Avatar Corporal
    Reputation
    13
    Join Date
    May 2014
    Posts
    28
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm, can't quote questions in a title... grr...

    From the look of it, casted checks the last 10 successfully cast spells by the player so "player.spell(xxx).casted < 1" will return true only if the spell being queried is not in that list of 10 spells. I did not see a trigger for the castCache being reset, but I suspect that might occur at combat start or stop. (Oooor... maybe it never actually wipes, but there were enough other spells being cast In Combat or OOC to push your Rejuv off the table so the conditional became true again.) As a whole, I do not see why casted would be used for a condition for dispels. A "!modifier.last" conditional seems more appropriate for a dispel so that PE does not accidentally try to stack the same dispel in the automated queue twice due to lag. The "player.spell(xxx).casted" conditional is more for setting up sequences such as double Steady Shot for Hunters or more complex spell setups that need multiple preceding spells to qualify.

  7. #7
    Mackdaddy2887's Avatar Knight-Lieutenant
    Reputation
    43
    Join Date
    Mar 2011
    Posts
    265
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Greymalkin View Post
    hmm, can't quote questions in a title... grr...

    From the look of it, casted checks the last 10 successfully cast spells by the player so "player.spell(xxx).casted < 1" will return true only if the spell being queried is not in that list of 10 spells. I did not see a trigger for the castCache being reset, but I suspect that might occur at combat start or stop. (Oooor... maybe it never actually wipes, but there were enough other spells being cast In Combat or OOC to push your Rejuv off the table so the conditional became true again.) As a whole, I do not see why casted would be used for a condition for dispels. A "!modifier.last" conditional seems more appropriate for a dispel so that PE does not accidentally try to stack the same dispel in the automated queue twice due to lag. The "player.spell(xxx).casted" conditional is more for setting up sequences such as double Steady Shot for Hunters or more complex spell setups that need multiple preceding spells to qualify.
    Is there a way to make it check just the last three spell casts? Id like to cast combustion if it shot three pyroblasts. Or something like that. I'm trying to think of a genuine safe fallback for automating combustion.


    What would be nice, is if I new actual coding.

    What I would do is this:

    Measure the magnitude of the ignite dot every tick, and store that in a cache or something.

    Then have the bot cast combustion when that ignite magnitude Reeves l reaches a threshold.

    Say it records the dot ticks ranging anywhere between 10-50, with the average tick at 22. What this data would show is that ignite is relatively low, with a few high spikes. (I think)

    Now the condition would be to cast combustion when the ignite tick is in the top 20th percentile of that data range.

    If the function always updated this 'cache' You will never have to update the combustion conditional, because the data range itself updates. i.e. right now it's 10-50, but with better gear it ranges more 60-80 with an average of 70.

    Not sure if the additional statistics is needed, but if there was a way to collect that data, and set a custom function to cast when it's in the top 20% of that data range, would be amazing

  8. #8
    Mackdaddy2887's Avatar Knight-Lieutenant
    Reputation
    43
    Join Date
    Mar 2011
    Posts
    265
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would prob need to clear every so often.



    Or note that I think about it, would this be easier:
    Since pe has the spell list of last 10 spells like you said, how about measure the ignite tick over that interval, use that data range as your sample, then return true if the current ignite tick is at last within 20% of the max.

    So using the above example, 10-50 was the min and maximum input dot, if we can't do advanced statistics using interquartile data ranges, we can just say
    50 minus 10=40
    40/100=.4
    .4x80=32
    10+32= 42

    So if the ignite dot reaches 42 or above, then cast.



    Also, when enterring combat, use the most recent threshold from the last time you were in combat until new data is collected?


    Id pay to have this I think.






    If not, a conditional of the pyros back to back would be good I think. Haven't leveled my mage yet, but was wanting to build a profile to use while leveling, then possibly raiding
    Last edited by Mackdaddy2887; 12-31-2014 at 04:48 AM.

  9. #9
    ImogenOC's Avatar Contributor ProbablyEngine Community Manager
    Reputation
    173
    Join Date
    Nov 2013
    Posts
    364
    Thanks G/R
    0/8
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This requires BOTH combat log reading & tooltip reading, both of which lack API calls from wow natively.
    ProbablyEngine - Developer and Lead Support
    A Powerful Rotation Bot: ProbablyEngine

  10. #10
    MrTheSoulz's Avatar Contributor
    Reputation
    143
    Join Date
    Nov 2013
    Posts
    192
    Thanks G/R
    19/32
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mackdaddy2887 View Post
    Is there a way to make it check just the last three spell casts? Id like to cast combustion if it shot three pyroblasts. Or something like that. I'm trying to think of a genuine safe fallback for automating combustion.


    What would be nice, is if I new actual coding.

    What I would do is this:

    Measure the magnitude of the ignite dot every tick, and store that in a cache or something.

    Then have the bot cast combustion when that ignite magnitude Reeves l reaches a threshold.

    Say it records the dot ticks ranging anywhere between 10-50, with the average tick at 22. What this data would show is that ignite is relatively low, with a few high spikes. (I think)

    Now the condition would be to cast combustion when the ignite tick is in the top 20th percentile of that data range.

    If the function always updated this 'cache' You will never have to update the combustion conditional, because the data range itself updates. i.e. right now it's 10-50, but with better gear it ranges more 60-80 with an average of 70.

    Not sure if the additional statistics is needed, but if there was a way to collect that data, and set a custom function to cast when it's in the top 20% of that data range, would be amazing
    the only way i can think of to cast something if the last 3 spell's are the same would be:
    Code:
    local spell1 = false
    local spell2 = false
    local spell3 = false
    ProbablyEngine.listener.register("COMBAT_LOG_EVENT_UNFILTERED", function(...)
      local timeStamp, event, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, _ = ...
      
      	if event == "SPELL_CAST_SUCCESS" then
    		if sourceGUID == UnitGUID("player") then	
    			-- Monk MW // Soothing Mist
    			if spellID == 115175 then
                                    if spell1 and spell2 and not spell3 then spell3 == true end
                                    if spell1 and not spell2 then spell2 == true end
    				if not spell1 then spell1 == true end
                                    if spell3 then
                                         spell1 == false
                                         spell2 == false
                                         spell3 == false
                                         return true
                                   end
    			end
    		end
      	end
    end)
    Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.

Similar Threads

  1. [Lua Script] Spawning a mon once a spell is cast and/or finished [Lua]
    By felindalei in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-21-2010, 08:49 AM
  2. Spell interrupted, cast same school spell anyways!
    By Trufox in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 01-31-2009, 07:22 AM
  3. Player Spells
    By Chuck Norris in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 03-20-2008, 04:10 AM
  4. [Lua] Make mobs channel spell then cast?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 01-18-2008, 03:24 PM
All times are GMT -5. The time now is 02:46 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search