Welcome to the forums of Runes of Magic EN & US

Rules and Guidelines: Game Rules - Community Guidelines - Terms of Use - RoM Servers Status

Customer Support: EN/EU Customer Support - US Customer Support

Get in touch with us: Join our Discord!
  • Hey there,


    I was trying to clean up my diyce script a little, and i was wondering

    if it is possible to somehow get the following things to work, the idea is:


    name = x, use = targetname("Karver Shattertooth")

    name = y, use = targetclass("Warlock/Champion")


    The only thing i could find was (_target == UnitName("target")), but this didnt seem to work.

    Since i have very limited knowledge about writing scripts any help is appreciated!

  • For first one you must create local variable in customfunctions.lua, then use the local name to make a condition, for example:

    Code
    1. local KarverShattertooth = UnitName("target") == "Karver Shattertooth"

    and in skill sequence:


    Code
    1. { name = "x", use = KarverShattertooth },

    For target class you could do somewhat similiar:

    Code
    1. local targetmainclasswarlock, targetsubclasschampion = UnitClassToken( "target" ) == "WARDEN" , "PSYRON"
    Code
    1. { name = "y",    use = targetmainclasswarlock and targetsubclasschampion },

    but I don't know if it'll work, because I didn't test it.

  • For first one you must create local variable in customfunctions.lua, then use the local name to make a condition, for example:

    Code
    1. local KarverShattertooth = UnitName("target") == "Karver Shattertooth"

    and in skill sequence:


    Code
    1. { name = "x", use = KarverShattertooth },

    For target class you could do somewhat similiar:

    Code
    1. local targetmainclasswarlock, targetsubclasschampion = UnitClassToken( "target" ) == "WARDEN" , "PSYRON"
    Code
    1. { name = "y",    use = targetmainclasswarlock and targetsubclasschampion },

    but I don't know if it'll work, because I didn't test it.



    Above code would be easier if you just use this:


    In Skill Sequense

    Code
    1. { name = "x", use = (UnitName("target") == "Karver Shattertooth") },


    For the target class i don't know, i don't know DIYCE yet, but i think that will change now i saw you question.