You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1,021

Friday, August 27th 2010, 11:13pm

my script

Here is what I am working with for my scout priest

I use the first arguement to drink my phirius pots if im hurting badly my regular pots I simply use from ntbuffs built in pot percentage potion to use never ending herbs at anything bellow 90 percent life.

does this look like it will work ? i want it to check autoshot to turn it on at the start of each run of the script if its not on.

also is there any way to
1 check for my movement so it doesnt call snipe or combo shot if im moving ie kiting a mob.

and
2 set it up so it will cast throat cut if the target is casting and is in range of throat cut.

3 cast Regenerate onmsyelf if i have less then 95 percent hit points but NOT recast it if Regenerate is already runing


function ScoutPriest(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(1)
-- # is your Autoshot slot number
i=i+1; Skill = { name = "Autoshot", use = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { name = "Action: 41", use = (PctH("player") < .35) }
i=i+1; Skill[i] = { name = "Throat Attack", use = ((not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5)) }
i=i+1; Skill[i] = { name = "Frost Arrow", use = (not ChkBuff("player","Frost Arrow")) }
i=i+1; Skill[i] = { name = "Combo Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly) and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Wind Arrows", use = ((not friendly) and (focus >= 15)) }
i=i+1; Skill[i] = { name = "Snipe", use = (not friendly) }
MyCombat(Skill,arg1)
end

1,022

Friday, August 27th 2010, 11:51pm

Looks mostly good. You aren't setting up the ttime etc. for the throat attack check that I can see though, and you need to put it into a slot so you can tell if it's useable (i.e. the distance check)

(also, as scout, I'm not sure that throat cut is worthwhile on auto. It uses up a good chunk of focus for negligable damage.. that being said, I have it in my script when I'm playing D/S... though I don't use DIYCE.)

Regenerate check would looks something like
i=i+1; Skill = { name = "Regenerate", use = ((PctH("player") < .95) and(not ChkBuff("player","Regenerate"))) }


No idea in regards to the moving check, that's something I'd like to know as well.

1,023

Saturday, August 28th 2010, 12:18am

like this

ok changed it to this and i removed the throat cut ill just use it manualy
function ScoutPriest(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(1)
-- # is your Autoshot slot number
i=i+1; Skill = { name = "Autoshot", use = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { name = "Action: 41", use = (PctH("player") < .35) }
i=i+1; Skill[i] = { name = "Regenerate", use = ((PctH("player") < .95) and(not ChkBuff("player","Regenerate"))) }
i=i+1; Skill[i] = { name = "Frost Arrow", use = (not ChkBuff("player","Frost Arrow")) }
i=i+1; Skill[i] = { name = "Combo Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly) and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Wind Arrows", use = ((not friendly) and (focus >= 15)) }
i=i+1; Skill[i] = { name = "Snipe", use = (not friendly) }
MyCombat(Skill,arg1)
end

1,024

Saturday, August 28th 2010, 2:19am

ok im using waht you see above but for some reason itss NOT casting the regenerate or turning auto shot on

1,025

Saturday, August 28th 2010, 3:41am

Not really sure about regenerate (other than making sure the names are all correct) but do you have autoshot in slot 1?

1,026

Saturday, August 28th 2010, 4:04am

yes it is in slot 1

also I dont care if im hurt or not i want regenerate to cast any time im using the script and the spell i snot on me so how would i change that line would itbe like this ?

i=i+1; Skill = { name = "Regenerate", use = ((not ChkBuff("player","Regenerate")) }

1,027

Saturday, August 28th 2010, 5:25am

wierd part IT WORKS in pvp and in guild castle but not on mobs wth ?

1,028

Sunday, August 29th 2010, 11:51pm

ok need help

i m mage scout i need help

this WORKS

function Magescout(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))

i=i+1; Skill = { name = "Fire Rose Explosion", use = ChkBuff("Target","Fire Rose III") }
i=i+1; Skill[i] = { name = "Fire Rose", use = (not friendly) }

MyCombat(Skill,arg1)
end

now this doesnt : [trying to cast shot then fire rose and if buff is ok fire rose explosion]
shot is 1sec cd,
its not casting anything

function Shotrose(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))

i=i+1; Skill[i] = { name = "Fire Rose Explosion", use = ChkBuff("target","Fire Rose III") }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
i=i+1; skill[i] = { name = "Fire Rose", use = (not friendly) }


MyCombat(Skill,arg1)
end


the way i have it setup is this
in dyice.toc , i have 4lua files :
DIYCE.lua
magescout.lua
shotrose.lua


OUT of the 2 functions onlu magescout works

PLease help thank u

1,029

Monday, August 30th 2010, 1:33am

LOL need more debugg help

i have a warrior /warden alt which i like a lot

made this for him :

function Warden(arg1)
local Skill = {}
local i = 0
local rage = UnitMana("Player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")

i=i+1; Skill = { name = "Tactical Attack", use = ChkBuff("target","Bleed") }
i=i+1; Skill[i] = { name = "Savage Whirlwind", use = (not friendly) }
i=i+1; Skill[i] = { name = "Charged Chop", use = (not friendly) }
i=i+1; Skill[i] = { name = "Slash", use = ((not friendly) and (rage>=50)) }
i=i+1; Skill[i] = { name = "Power of the Wood Spirit", use = (not friendly) }

MyCombat(Skill,arg1)
end

problem here is Slash doesnt work , rotation goes like planned but slash doesnt activate ,
if i activate it with another button, Tactical attack IS cast

1,030

Monday, August 30th 2010, 1:09pm

thanks

Just Wanted to say thanks to sixpax for the code he posted in response to my issue.
Unfortunately, after testing several different configurations it seems that I lose dps vs. manually casting.Looks like until there is some way to use the engine to cast in specific order it wont really help mage dps.
This just supports my theory that RoM hates mages.:(

1,031

Monday, August 30th 2010, 7:06pm

Quoted from "neonsun;329392"


function Shotrose(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))

i=i+1; Skill = { name = "Fire Rose Explosion", use = ChkBuff("target","Fire Rose III") }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
i=i+1; skill[i] = { name = "Fire Rose", use = (not friendly) }


MyCombat(Skill,arg1)
end


May just be a typo in copying it, but the Skill var for Fire Rose isn't capitalized.

(Not sure if it would have helped, but you get a little glowing green icon to the right of your minimap when you get a script error, clicking on it will open the error dialog. I suspect this was throwing an error and thus not processing the rest of the script)

Quoted from "neonsun;329421"

function Warden(arg1)
local Skill = {}
local i = 0
local rage = UnitMana("Player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")

i=i+1; Skill[i] = { name = "Tactical Attack", use = ChkBuff("target","Bleed") }
i=i+1; Skill[i] = { name = "Savage Whirlwind", use = (not friendly) }
i=i+1; Skill[i] = { name = "Charged Chop", use = (not friendly) }
i=i+1; Skill[i] = { name = "Slash", use = ((not friendly) and (rage>=50)) }
i=i+1; Skill[i] = { name = "Power of the Wood Spirit", use = (not friendly) }

MyCombat(Skill,arg1)
end


player when getting the rage is capitalized and shouldn't be, so rage was probably always 0 or nil. Definitely not >=50

1,032

Monday, August 30th 2010, 7:49pm

Quoted from "someonexh0;329067"

wierd part IT WORKS in pvp and in guild castle but not on mobs wth ?


Do you have self-cast turned on in the game options?

1,033

Monday, August 30th 2010, 7:54pm

Quoted from "anan1;328851"

Ah, sorry. What I meant was when I remove the dashes my entire code stops working.

(I did a direct copy and paste, sorry about the confusion!)


Can you post your entire class function? I don't see any errors with those particular lines, but there are some assumptions in that limited context that I need to verify.

1,034

Tuesday, August 31st 2010, 5:06am

Nature's Power count

I played around with some code this evening after reading through the API functions on theromwiki.com. Came up with this snippet to return the value of how many Nature's Power you have stacked (0 if you don't have the buff). A little kludgy by my standards, but it works.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
function NaturesBuff()
    local cnt = 1
    local buff, icon, power = UnitBuffInfo("player",cnt)
    while buff ~= nil do
        if buff == "Nature's Power" then
            return power
        end
        cnt = cnt + 1
        buff, icon, power = UnitBuffInfo("player",cnt)
    end
    return 0
end
Hope you fellow druids enjoy this.

1,035

Wednesday, September 1st 2010, 12:44pm

s/p issue

hi i don't really know the .lua language however i have been modifying scripts however urgent heal and regenerate only casts if i re-target myself it wont just change target by itself heres my function and yes cast self in the settings is enabled.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function ScoutPriest(arg1)
   local Skill = {}
   local i = 0
   local focus = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local pbuffs = BuffList("player")

   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",    ['use'] = (not ChkBuff("player","Frost Arrow")) }
--   i=i+1; Skill[i] = { ['name'] = "Combo Shot",     ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Autoshot",          ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { ['name'] = "Wind Arrows",    ['use'] = ((not friendly) and (focus >= 15)) }
   i=i+1; Skill[i] = { ['name'] = "Rising Tide",    ['use'] = ((not friendly) and (focus <= 15)) }
--   i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = (not friendly) }
--   i=i+1; Skill[i] = { ['name'] = "Snipe",          ['use'] = (not friendly) }

   i=i+1; Skill[i] = { ['name'] = "Regenerate",            ['use'] = ((PctH("player") <= .90) and (not string.find(pbuffs,"Regenerate"))) }

   i=i+1; Skill[i] = { ['name'] = "Urgent Heal",           ['use'] = (PctH("player") <= .75) }

   MyCombat(Skill,arg1)
end

any help would be greatly appreciated as i don't know the language although it appears similar to other languages i do know:confused:

:edit: on a side note i intend to add blood arrow enable/disable when engaged and disengaged combat altho i haven't got anything to reference those sorts of operations yet.

i guess the goal is to get it to use blood arrow then use regenerate automaticly then disable blood arrow when outside of combat etc.

1,036

Wednesday, September 1st 2010, 2:44pm

Quoted from "Sixpax;329734"

Can you post your entire class function? I don't see any errors with those particular lines, but there are some assumptions in that limited context that I need to verify.


Ah ha! I found the issue. I had a stray parenthesis in my code when I copied it over to the text file. Thank you for all your help Sixpax!
-kiri

1,037

Wednesday, September 1st 2010, 9:05pm

Quoted from "lesso;330392"

hi i don't really know the .lua language however i have been modifying scripts however urgent heal and regenerate only casts if i re-target myself it wont just change target by itself heres my function and yes cast self in the settings is enabled.


Give this a try (add both functions to the .lua file where your custom ones are). You'll have to replace the # in GetActionInfo(#) with your Autoshot actionbar slot number for Autoshot to work properly.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function CustomAction(action)
    if CD(action) then
        FocusUnit(12, "target")
        TargetUnit("player")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    else
        return false
    end
end

function ScoutPriest(arg1)
    local Skill = {}
    local i = 0
    local focus = UnitMana("player")
    local friendly = (not UnitCanAttack("player","target"))
    local pbuffs = BuffList("player")
    local phealth = PctH("player")
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(#) -- # is your Autoshot action bar slot number

    i=i+1; Skill[i] = { name = "Frost Arrow",    use = (not string.find(pbuffs, "Frost Arrow")) }
--  i=i+1; Skill[i] = { name = "Combo Shot",     use = (not friendly) }
    i=i+1; Skill[i] = { name = "Autoshot",       use = ((not friendly) and (not ASon)) }
    i=i+1; Skill[i] = { name = "Shot",           use = (not friendly) }
    i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly) and (focus >= 20)) }
    i=i+1; Skill[i] = { name = "Wind Arrows",    use = ((not friendly) and (focus >= 15)) }
    i=i+1; Skill[i] = { name = "Rising Tide",    use = ((not friendly) and (focus <= 15)) }
--  i=i+1; Skill[i] = { name = "Piercing Arrow", use = (not friendly) }
--  i=i+1; Skill[i] = { name = "Snipe",          use = (not friendly) }

    i=i+1; Skill[i] = { name = "Custom: Regenerate",   use = ((phealth <= .90) and (not string.find(pbuffs,"Regenerate"))) }
    i=i+1; Skill[i] = { name = "Custom: Urgent Heal",  use = (phealth <= .75) }

    MyCombat(Skill,arg1)
end

Quoted from "lesso;330392"

:edit: on a side note i intend to add blood arrow enable/disable when engaged and disengaged combat altho i haven't got anything to reference those sorts of operations yet.

i guess the goal is to get it to use blood arrow then use regenerate automaticly then disable blood arrow when outside of combat etc.


There are a few posts in this thread on using Blood Arrow. Try doing a thread search for "Blood".

mrmarc0001

Beginner

Posts: 3

Location: SF Bay Area

Occupation: Web Producer @ UCSF

  • Send private message

1,038

Wednesday, September 1st 2010, 9:21pm

Quoted from "lesso;330392"

...i intend to add blood arrow enable/disable when engaged and disengaged combat altho i haven't got anything to reference those sorts of operations yet.

i guess the goal is to get it to use blood arrow then use regenerate automaticly then disable blood arrow when outside of combat etc.


You can use GetPlayerCombatState() to determine whether or not you're in combate. It returns TRUE if you are. Also, you can set a variable ahead of time if you will check for this more than once:

Source code

1
local combat = GetPlayerCombatState()


An example of this for your case would be:

Source code

1
2
3
4
5
local combat = GetPlayerCombatState()
local pBuffs = BuffList("player")

i=i+1; Skill[i] = { name = "Custom: Stop Blood Arrow", use = ((not combat) and (string.find(pBuffs,"Blood Arrow"))) }
i=i+1; Skill[i] = { name = "Blood Arrow", use = (not string.find(pBuffs,"Blood Arrow")) }


In your custom actions, you would define the CancelBuff() operation to clear Blood Arrow when "Stop Blood Arrow" is called.

1,039

Thursday, September 2nd 2010, 4:53am

thanks

thanks for the help I'll have a play with those examples i did get it working as 2 macros however one would simplify things :)

1,040

Thursday, September 2nd 2010, 10:53am

for the stop blood arrow declaration do i simply define the variable as follows

Source code

1
   local Stop = CancelBuff()

or do i have to declare it differently this is the whole script

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function CustomAction(action)
    if CD(action) then
        FocusUnit(12, "target")
        TargetUnit("player")
        CastSpellByName(action)
        TargetUnit("focus12")
        FocusUnit(12, "")
        return true
    else
        return false
    end
	end


function ScoutPriest(arg1)
   local Skill = {}
   local i = 0
   local focus = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local phealth = PctH("player")
   local thealth = PctH("target")
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
   local a1,a2,a3,a4,a5,ASon = GetActionInfo(0)
-- above ASon # is Autoshot's slot number currently slot 0 make sure autoshot is in that slot or change value to corresponding slot number
   local combat = GetPlayerCombatState()
   local pressshift = IsShiftKeyDown()
   local Stop = CancelBuff()

    --Ammo Check
    if (ammo == false) then
        local HaveAmmo = false
        local arrows = ""
        for i=1,60 do
            local x,y,name = GetBagItemInfo(i)
            if (string.find(name," Arrow")) then
                HaveAmmo = true
                arrows = name
            end
        end
        if (HaveAmmo == true) then
            i=i+1; Skill[i] = { name = "Item: "..arrows,    use = (not ammo) } --Equip arrows if have           
        elseif ((g_cnt%100) == 0) then
            SendChatMessage("I'm out of ammo!","SAY")
        end
        g_cnt = g_cnt + 1
    end
   --buffs
   if (not combat) then
    i=i+1; Skill[i] = { name = "Frost Arrow",                  use = (not string.find(pbuffs,"Frost Arrow")) }
    i=i+1; Skill[i] = { name = "Custom: Magic Barrier",        use = (not string.find(pbuffs,"Magic Barrier")) }
    i=i+1; Skill[i] = { name = "Custom: Blessed Spring Water", use = (not string.find(pbuffs,"Blessed Spring Water")) }
   end
   --combat skills/preference
   i=i+1; Skill[i] = { name = "Custom: Regenerate",    use = ((phealth <= .85) and (not string.find(pbuffs,"Regenerate"))) }
   i=i+1; Skill[i] = { name = "Custom: Urgent Heal",   use = (phealth <= .65) }
   i=i+1; Skill[i] = { name = "Custom: Holy Aura",     use = (phealth <= .35) }
   i=i+1; Skill[i] = { name = "Custom: Stop Blood Arrow",    use = (((not combat) or (phealth <= .55)) and (string.find(pbuffs,"Blood Arrow"))) }
   i=i+1; Skill[i] = { name = "Blood Arrow",     use = ((combat) and (phealth >= .95) and (not string.find(pbuffs, "Blood Arrow"))) }
--   i=i+1; Skill[i] = { name = "Combo Shot",      use = (not friendly) }
   i=i+1; Skill[i] = { name = "Vampire Arrows",  use = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { name = "Autoshot",        use = ((not  friendly) and (not ASon)) }
   i=i+1; Skill[i] = { name = "Shot",            use = (not friendly) }
   i=i+1; Skill[i] = { name = "Wind Arrows",     use = ((not friendly) and (focus >= 15)) }
   i=i+1; Skill[i] = { name = "Rising Tide",     use = ((not friendly) and (focus <= 15)) }
   i=i+1; Skill[i] = { name = "Piercing Arrow",  use = ((not friendly) and pressshift) }
   i=i+1; Skill[i] = { name = "Snipe",           use = ((not friendly) and (not combat)) }
   i=i+1; Skill[i] = { name = "Wind Arrows",     use = ((not friendly) and (not combat)) }

    MyCombat(Skill,arg1)
end
thanks again for the assist i have posted the last working version of this in the other thread and will update as soon as blood arrow is working as intended at the moment its simply reusing the skill if i am outside of combat