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,901

Thursday, January 12th 2012, 8:23pm

Can anyone point me in the direction for a beginner? I am very lost and confused with the coding. I have no coding experience. Is there a tutorial site or place that can help me?
I am a scout warden and would very much like some help with a macro or DIYCE. I am so lost I do not even know how to properly download the DIYCE or open a page to paste others codes. (Though I did manage to get DICYE from a link here in forums, I just can't open the documents inside the folder and don’t know if it is 2.0)
Any help would be appreciated. Thank you

1,902

Friday, March 2nd 2012, 10:28am

I am playing on a german server Muinin
have a Warrior Knight and working on a combo macro

Selfbuffs (long duration)
"Enhanced Armor"
"Blocking Stance"

Buffs (short duration)
"Aggressiveness"
"Frenzy"
"Beserk"
"Enraged"

Single Attacks
"Disarmament"
"Slash"
"Probing Attack"
"Tactical Attack"
"Open Flank"

AoE
"Moon Cleave"

Sure the class combo w/k has more skill options but this is mainly my memento farm rotation with manual play. other aoe skills like whirlwind and blastting cyclone wont the that amount of dmg on a single target as single strikes. moon cleave does 3x 200% 600% with a chance up to 1200% with 3 critical hits.

What I have to do:
cast self buff when no cooldown
cast disarmament only as long as the target has less then Disarmament IV debuff
required pre buffs for open flank and tactical Attack
energybar requirement for slash and probing attack

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,903

Friday, March 2nd 2012, 11:55am

You are likely better off using DIYCE 2 for this (see the DIYCE 2.0 thread). Much of what you are trying to do has already been posted there.

Further, DIYCE 2.0 executes faster, has more options, and is more flexible.

Since you play on a German server, you will likely need to convert the skill names to German. You can use the Runes of Magic Database to find the skill in English, then switch that site's language to German to get the translation. You will also likely need to save your file as UTF8 (no BOM) to get the extra accent characters.
2013... The year from hell....

1,904

Monday, March 5th 2012, 6:28pm

Help plz....

first i have no exp with coding

i found a warriorrogue diyce but cant get it to work and i cant find the thread that i got it from

i added it to the diyce file in my addons folder also added file name to the .toc file wher the preade ones are but cant get it to work or even load. below is the code. ty for your time in advance

g_lastaction = ""

function CustomAction(action)
if CD(action) then
if IsShiftKeyDown() then Msg("- "..action) end
g_lastaction = action
CastSpellByName(action)
return true
else
return false
end
end

function WarriorRogue(arg1, potslot, arg3, ragepot, foodslot)
local Skill = {}
local i = 0
local combat = GetPlayerCombatState()
local enemy = UnitCanAttack("player","target")
local rage = UnitMana("player")
local energy = UnitSkill("player")
local tbuffs = BuffList("target")
local pbuffs = BuffList("player")
local front = UnitIsUnit("player", "targettarget")
local tDead = UnitIsDeadOrGhost("target")
local melee = GetActionUsable(12)
local phealth = PctH("player")
local LockedOn = UnitExists("target")
local ammo = (GetEquipSlotInfo(10) ~= nil)

potslot = potslot or 0
ragepot = ragepot or 0
foodslot = foodslot or 0

--Ammo Check and Equip
if (ammo == false) then
local HaveAmmo = false
local daggers = ""
for i=1,60 do
local x,y,name = GetBagItemInfo(i)
if (string.find(name, " Blade")) then --[[This will equip the daggers bought in Dalanis.
Change this name to whatever current throwing dagger you use.]]
HaveAmmo = true
daggers = name
end
end
if (HaveAmmo == true) then
i=i+1; Skill = { name = "Item: "..daggers, use = (not ammo) } --Equip daggers if have
elseif ((g_cnt%100) == 0) then
SendChatMessage(DEFAULT_CHAT_FRAME:AddMessage"I need to get throwing daggers!")
end
g_cnt = g_cnt + 1
end

i=i+1; Skill[i] = { name = "Survival Instinct", use = (phealth < .33) }
i=i+1; Skill[i] = { name = "Action: "..potslot, use = (phealth < .70) }
i=i+1; Skill[i] = { name = "Action: "..foodslot, use = (enemy and (not (string.find(pbuffs,"Caviar Sandwich")))) } --[[ This is the food the housemaid gives you.
Change the name here to suit whatever food item you use.]]

if enemy and (not melee) then
i=i+1; Skill[i] = { name = "Surprise Attack", use = true }
i=i+1; Skill[i] = { name = "Shadow Step", use = (energy >= 20) }
i=i+1; Skill[i] = { name = "Throw", use = true }
elseif enemy and melee then
i=i+1; Skill[i] = { name = "Feint", use = ((_target == UnitName("target")) and (_type == "DODGE")) }
i=i+1; Skill[i] = { name = "Blasting Cyclone", use = ((rage >= 35) and (not string.find(tbuffs,"Thunder Stun")) and (not string.find(tbuffs,"Surprise Attack Effect"))) }
i=i+1; Skill[i] = { name = "Shadowstab", use = ((energy >= 20) and (not string.find(tbuffs,"Excessive Bleeding"))) }
i=i+1; Skill[i] = { name = "Shadowstab", use = ((energy >= 20) and (rage <=9) and (not CD("Probing Attack"))) }
i=i+1; Skill[i] = { name = "Blind Stab", use = (front and (energy >= 20) and (not string.find(tbuffs,"Blind"))) }
i=i+1; Skill[i] = { name = "Enraged", use = (rage < 50) }
i=i+1; Skill[i] = { name = "Slash", use = ((rage >= 25) and (not string.find(tbuffs,"/Bleed/"))) }
if (string.find(tbuffs,"Weakened")) then
i=i+1; Skill[i] = { name = "Custom: Splitting Chop", use = ((rage >= 15) and (g_lastaction ~= "Splitting Chop")) }
i=i+1; Skill[i] = { name = "Custom: Thunder", use = ((rage >= 15) and (g_lastaction ~= "Thunder")) }
end
if (string.find(tbuffs,"Vulnerable")) then
i=i+1; Skill[i] = { name = "Keen Attack", use = ((energy >= 20) and ((rage <= 9) or (not CD("Splitting Chop")) or (not CD("Thunder")))) }
i=i+1; Skill[i] = { name = "Open Flank", use = ((rage >= 10)) }
end
i=i+1; Skill[i] = { name = "Probing Attack", use = (rage >= 20) }
-- i=i+1; Skill[i] = { name = "Blood Dance", use = (enemy and (phealth >= 0.8)) }
i=i+1; Skill[i] = { name = "Shadowstab", use = (energy >= 20) }
i=i+1; Skill[i] = { name = "Attack", use = ((PctH("target") == 1)) }
i=i+1; Skill[i] = { name = "Slash", use = (rage >= 40) }

i=i+1; Skill[i] = { name = "Action: "..ragepot, use = ((arg3 == "rage") and combat and (rage <= 30)) }
end

i=i+1; Skill[i] = { name = "Attack", use = (tDead or (not combat and not enemy)) }

MyCombat(Skill,arg1)

if (tDead) or (not LockedOn) or (not enemy) then
TargetNearestEnemy()
end
end

1,905

Tuesday, April 17th 2012, 6:01pm

Hey guys, any chance anyone has mage/warrior diyce to share?

1,906

Tuesday, April 17th 2012, 9:47pm

anyone have the codeing line for Lion Claw Mark that will work on DIYCE ver 1.4

1,907

Wednesday, April 25th 2012, 5:03am

PartyHealer ?

I've been away for a while and was wondering what happened to the PartyHealer DIYCE? I know I had it loaded way back but I cannot find it on my machine or any info regarding it on the forums. Anyone give me a heads up as to what happened? Or anyone still have the code?

Posts: 17

Location: Wisconsin

Occupation: Student

  • Send private message

1,908

Saturday, June 23rd 2012, 10:02pm

I have decided to use DIYCE for my Priest/Warlock, and it is working well. My only question is if there is a condition for not moving. One of my first skills is a cast bar skill and therefore I have to be standing still to use my DIYCE macro. Is there any way to make it so the skill will not attempt to fire if I am moving? Also I am sure this was addressed earlier but the thread is very difficult to page through, in my diyce code I have a macro for m/wrd and one for p/lock but I have to replace the code each time I switch toons. Is there a way to add both macro codes into the same DIYCE.lua code?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,909

Sunday, June 24th 2012, 6:53am

Though I don't know of a way to detect if you are currently moving, you can force your character to stop moving with a call to MoveForwardStop().

As to having multiple DIYCE functions for your macros, nothing is easier. Basically create a separate function for each class combo and make sure to call them by different names. Now for each class combo, have its macro call the appropriate function for that class. If this is still problematic, consider upgrading to DIYCE 2.0. It allows multiple class combos within the same code function (it was setup that way on purpose).
2013... The year from hell....

Posts: 17

Location: Wisconsin

Occupation: Student

  • Send private message

1,910

Sunday, June 24th 2012, 10:16pm

Thank you, I updated my DIYCE and was able to put in all 7 class combos I can play now. If anyone stumbles across a way to pass over a skill that cannot be cast while in motion please let me know.
[img][/img]
"My soul froze a long time ago, don't kid yourself into expecting mercy.."
Name: Sacredmagic Class: Mage/Warden/Warrior Guild: Pewpewkittens

1,911

Monday, June 25th 2012, 12:56am

Help?

I'm new at this so please excuse my stupidity. I am attempting to hit the mob with shadow prison at a distance, followed immediately by vamp and shot. I have commented out everything but the necessary skills, but when I run it I get an error msg saying,"Bad argument #1 to 'find' (string expected, got table) on the line pertaining to shadow prison. What am I missing?

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
function RogueScout(arg1, arg2)
    local Skill = {}
    local i = 0
    local energy = UnitMana("player")
    local focus = UnitSkill("player")
    local friendly = (not UnitCanAttack("player", "target"))
    local combat = GetPlayerCombatState()
    local tspell,ttime,telapsed = UnitCastingTime("target")
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
  --  i=i+1; Skill[i] = { name = "Throat Attack",  use = ((not friendly) and (tspell ~= nil) and (ttime >= 0.8) and ((ttime - telapsed) > 0.3) and (focus >= 15)) }
  --  i=i+1; Skill[i] = { name = "Combat Master",  use = ((not string.find(pbuffs, "Combat Master")) and (not string.find(pbuffs, "Informer"))) }
  --  i=i+1; Skill[i] = { name = "Sneak Attack",   use = ((not friendly) and (energy >= 30) and (arg2 == "behind") and (not combat)) }
  --  i=i+1; Skill[i] = { name = "Blind Spot",     use = ((not friendly) and (energy >= 25) and (arg2 == "behind")) }
    i=i+1; Skill[i] = { name = "Shadow Prison",  use = ((not friendly) and (CD("Shadow Prison")) and (not string.find(tbuffs, "Shadow Prison")))}
    i=i+1; Skill[i] = { name = "Shot",           use = (not friendly) }
  --  i=i+1; Skill[i] = { name = "Energy Thief",   use = (energy <= 30) }
  --  i=i+1; Skill[i] = { name = "Wound Attack",   use = ((not friendly) and (energy >= 38) and string.find(tbuffs, "Bleed") and string.find(tbuffs, "Grievous Wound")) }
  --  i=i+1; Skill[i] = { name = "Low Blow",       use = ((not friendly) and (energy >= 35) and string.find(tbuffs, "Bleed")) }
  --  i=i+1; Skill[i] = { name = "Shadowstab",     use = ((not friendly) and (energy >= 35)) }
    i=i+1; Skill[i] = { name = "Vampire Arrows", use = (not friendly) }

    MyCombat(Skill,arg1)
end

1,912

Monday, June 25th 2012, 1:09am

Quoted from "misterrypto;540708"

I'm new at this so please excuse my stupidity. I am attempting to hit the mob with shadow prison at a distance, followed immediately by vamp and shot. I have commented out everything but the necessary skills, but when I run it I get an error msg saying,"Bad argument #1 to 'find' (string expected, got table) on the line pertaining to shadow prison. What am I missing?

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
function RogueScout(arg1, arg2)
    local Skill = {}
    local i = 0
    local energy = UnitMana("player")
    local focus = UnitSkill("player")
    local friendly = (not UnitCanAttack("player", "target"))
    local combat = GetPlayerCombatState()
    local tspell,ttime,telapsed = UnitCastingTime("target")
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
  --  i=i+1; Skill[i] = { name = "Throat Attack",  use = ((not friendly) and (tspell ~= nil) and (ttime >= 0.8) and ((ttime - telapsed) > 0.3) and (focus >= 15)) }
  --  i=i+1; Skill[i] = { name = "Combat Master",  use = ((not string.find(pbuffs, "Combat Master")) and (not string.find(pbuffs, "Informer"))) }
  --  i=i+1; Skill[i] = { name = "Sneak Attack",   use = ((not friendly) and (energy >= 30) and (arg2 == "behind") and (not combat)) }
  --  i=i+1; Skill[i] = { name = "Blind Spot",     use = ((not friendly) and (energy >= 25) and (arg2 == "behind")) }
    i=i+1; Skill[i] = { name = "Shadow Prison",  use = ((not friendly) and (CD("Shadow Prison")) and (not string.find(tbuffs, "Shadow Prison")))}
    i=i+1; Skill[i] = { name = "Shot",           use = (not friendly) }
  --  i=i+1; Skill[i] = { name = "Energy Thief",   use = (energy <= 30) }
  --  i=i+1; Skill[i] = { name = "Wound Attack",   use = ((not friendly) and (energy >= 38) and string.find(tbuffs, "Bleed") and string.find(tbuffs, "Grievous Wound")) }
  --  i=i+1; Skill[i] = { name = "Low Blow",       use = ((not friendly) and (energy >= 35) and string.find(tbuffs, "Bleed")) }
  --  i=i+1; Skill[i] = { name = "Shadowstab",     use = ((not friendly) and (energy >= 35)) }
    i=i+1; Skill[i] = { name = "Vampire Arrows", use = (not friendly) }

    MyCombat(Skill,arg1)
end


Find takes a string, which tbuff and pbuff are not in diyce2.0, they are a table (i think...right?). change the string.find(tbuff, "Shadow Prison") to tbuff['Shadow Prison'] etc so...

Source code

1
[LEFT][COLOR=#000000] i=i+1; Skill[i] = { name = "Shadow Prison",  use = ((not friendly) and (CD("Shadow Prison")) and (not string.find(tbuffs, "Shadow Prison")))}[/COLOR][/LEFT]
[LEFT]
[/LEFT]
becomes

Source code

1
[LEFT][COLOR=#000000] i=i+1; Skill[i] = { name = "Shadow Prison", use = ((not friendly) and (CD("Shadow Prison")) and (not tbuffs['Shadow Prison']))}[/COLOR][/LEFT]

i free-handed that so the parenthesis and spelling is probably off.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,913

Monday, June 25th 2012, 1:10am

Quoted from "misterrypto;540708"

I'm new at this so please excuse my stupidity. I am attempting to hit the mob with shadow prison at a distance, followed immediately by vamp and shot. I have commented out everything but the necessary skills, but when I run it I get an error msg saying,"Bad argument #1 to 'find' (string expected, got table) on the line pertaining to shadow prison. What am I missing?

At one point, the BuffList function was changed to support a different method of retrieving the buffs/debuffs. I'm not sure if the version you are using has this change, but it seems like it is.

The change makes things clearer anyway. Basically, the buff lists were changed to be a table with all the buffs so that you can do direct lookups. Instead of doing string.find(pbuffs, "some skill"), you can now do pbuffs["some skill"].

Change all references to string.find to use this new method. For example, for your Shadow Prison skill, the line would become:

Source code

1
    i=i+1; Skill[i] = { name = "Shadow Prison",  use = ((not friendly) and (CD("Shadow Prison")) and (not tbuffs['Shadow Prison']))}


Edit:
@thebadtouch09
Though you are technically correct, this is the older DIYCE 1.4 thread so there can be much confusion related to the BuffList function change.
2013... The year from hell....

1,914

Monday, June 25th 2012, 3:13am

I made the change th the above function and all it did was fire shot and vamp. Nothing from shadow prison. I then tried the following code and got the same result. Shadow prison never fired.


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function RS(arg1, arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local focus = UnitSkill("player")
local friendly = (not UnitCanAttack("player", "target"))
local combat = GetPlayerCombatState()
local tspell,ttime,telapsed = UnitCastingTime("target")
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local melee = GetActionUsable(42) -- # is your Shadowstab action bar slot number

i=i+1; Skill[i] = { name = "Shadow Prison", use = ((not friendly) and (CD("Shadow Prison")) and (tbuffs['Shadow Prison']))}
i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly) and (not melee)) }
i=i+1; Skill[i] = { name = "Shot", use = ((not friendly) and (not melee)) }

MyCombat(Skill,arg1)
end



Now I'm getting an error msg, "attempt to call local tbuffs(a table value)

1,915

Monday, June 25th 2012, 3:25am

what does the CD function do? if that returns true when the skill is on cd, that wont ever work will it?

1,916

Monday, June 25th 2012, 3:40am

Took out the CD function but I'm still getting the error msg.


Okay, not sure what I did but it's working now. Thanks to all for the help.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,917

Monday, June 25th 2012, 4:27am

Quoted from "thebadtouch09;540737"

what does the CD function do? if that returns true when the skill is on cd, that wont ever work will it?

CD is a bit of a misnomer. It returns true if the skill is not on cooldown. It should really be called something like SkillReady but hey...


Quoted from "misterrypto;540736"

I made the change th the above function and all it did was fire shot and vamp. Nothing from shadow prison. I then tried the following code and got the same result. Shadow prison never fired.

That is because you are checking to see if the target has the Shadow Prison buff on them. You want to use not tbuffs['Shadow Prison']. The confusion may be because I did make that mistake originally in my previous post, then edited it later so if you only saw the previous version, you may have grabbed that instead. Sorry 'bout that. thebadtouch09's post had it right though.

Quoted from "misterrypto;540736"

Now I'm getting an error msg, "attempt to call local tbuffs(a table value)

Yeah, that's a little weirdness that occurs due to how Lua uses logic operators, how it handles true and false values and the way DIYCE handles this stuff. Re-ordering items here to put the tbuffs stuff first should fix things.

Anyway, to make a long story short, you'll want to change this:

Source code

1
i=i+1; Skill[i] = { name = "Shadow Prison", use = ((not friendly) and (CD("Shadow Prison")) and (tbuffs['Shadow Prison']))}

to this:

Source code

1
i=i+1; Skill[i] = { name = "Shadow Prison", use = ((not tbuffs['Shadow Prison']) and (not friendly) and (CD("Shadow Prison")))}
2013... The year from hell....

1,918

Wednesday, June 27th 2012, 3:08am

Just a question does anyone know the coding needed to adding Soul Point/PSI management?
-[EvilEmpires]-
Cocheech - RIP
Ricknight - R/M/S/Wd
Necrotix - WL/C/M
Yamanight D/W/Wd
Nightmareknight K/W/M/P

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,919

Wednesday, June 27th 2012, 4:06am

Alterios and I posted about this in the DIYCE 2.0 thread (see here).

You'll want to add the following at the top of your DIYCE function

Source code

1
    local PsiPoints, PsiStatus = GetSoulPoint()


Now you can use PsiPoints to check the number of Soul Points you have (0 to 6). PsiStatus can be a value from 0 to 2 or nil (treat nil as the same as 0) and relates to the various states the bar can be in.

Here's an example (converted from the DIYCE 2.0 thread):

Source code

1
i=i+1; Skill[i] = { name = "Ruthless Judgement",   use = ((pbuffs['Willpower Blade']) and (PsiPoints >= 2)) }
2013... The year from hell....

1,920

Wednesday, June 27th 2012, 7:00am

Thanks for the Help!


Figured out how to add Willpower Blade and it works, now to figure out how to add Saces's Impulse for Warlock/Champion
-[EvilEmpires]-
Cocheech - RIP
Ricknight - R/M/S/Wd
Necrotix - WL/C/M
Yamanight D/W/Wd
Nightmareknight K/W/M/P