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

Monday, July 9th 2012, 2:39am

DIYCE S/Wd Help

I'm having trouble with DIYCE for s/wd. Here's the code in myfunctions.lau :

function ScoutWarden(arg1)
local Skill = {}
local i = 0
local enemy = UnitCanAttack("player","target")
local mana = UnitSkill("player")
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local targetAlive = (not UnitIsDeadOrGhost("target"))
local pvp = ((not friendly) and (UnitIsPlayer("target")))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill = { ['name'] = "Frost Arrow", ['use'] = (not string.find(pbuffs,"Frost Arrow")) }
i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not string.find(pbuffs,"Briar Shield")) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (not string.find(pbuffs,"Entling Offering")) }


if enemy then
i=i+1; Skill[i] = { name = "Snipe", use = (string.find(pbuffs, "Hidden Peril"))}
i=i+1; Skill[i] = { name = "Combo Shot", use = true }
i=i+1; Skill[i] = { name = "Autoshot", use = (not ASon) }
i=i+1; Skill[i] = { name = "Thorn Arrow", use = true }
i=i+1; Skill[i] = { name = "Reflected Shot", use = true }
i=i+1; Skill[i] = { name = "Hidden Peril", use = (focus >=30) }
i=i+1; Skill[i] = { name = "Shoot", use = true }
--i=i+1; Skill[i] = { name = "Charged Chop", use = true }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = (focus >=20) }
i=i+1; Skill[i] = { name = "Piercing Arrow", use = true }
i=i+1; Skill[i] = { name = "Snipe", use = true }
i=i+1; Skill[i] = { name = "Wind Arrows", use = (focus >=55) }
end
MyCombat(Skill,arg1)
end
end

I keep getting this error: [string 'ScoutWarden(arg1)']:1: attempt to call global 'ScoutWarden' (a nil value)

My macro in game looks like this: /run ScoutWarden(arg1)

What am I doing wrong?

2

Monday, July 9th 2012, 2:40am

Sorry wrong forum. Switched

Kalvan

Super Gamemaster

Posts: 2,053

Location: Lurking Amongst the Forums

  • Send private message

3

Monday, July 9th 2012, 8:16am

dupe thread, t-binned
[ New Sig Coming. Watch This Space! ]