Posts by Apuparentsuri

    No.


    Delete Interface-nonSW folder, it will be created by scripts.


    You should only have two interface folders - C:\giochi\runes of magic\Interface, which has your non-SW add-ons, and C:\giochi\runes of magic\Interface-SW, which you created and which should only have SW add-ons.


    Now your scripts will looks like this:


    Code
    1. if not exist "C:\giochi\Runes of Magic\Interface-SW" goto end
    2. ren "C:\giochi\Runes of Magic\Interface" Interface-nonSW
    3. ren "C:\giochi\Runes of Magic\Interface-SW" Interface
    4. :end



    Code
    1. if not exist "C:\giochi\Runes of Magic\Interface-nonSW" goto end
    2. ren "C:\giochi\Runes of Magic\Interface" Interface-SW
    3. ren "C:\giochi\Runes of Magic\Interface-nonSW" Interface
    4. :end

    The game folder itself? Then you would have this:


    "C:\giochi\runes of magic\Interface"

    "C:\giochi\runes of magic\Interface-SW"

    "C:\giochi\runes of magic\Interface-nonSW"


    Make sure to include quotation marks.

    So if you just want to have two separate Interface folders, you can do this:


    - Create a new Interface folder within RoM folder and call it Interface-SW, for example

    - Open Notepad program on your computer and paste this code into it:

    Code
    1. if not exist "C:\<path to Runes of Magic folder>\Runes of Magic\Interface-SW" goto end
    2. ren "C:\<path to Runes of Magic folder>\Runes of Magic\Interface" Interface-nonSW
    3. ren "C:\<path to Runes of Magic folder>\Runes of Magic\Interface-SW" Interface
    4. :end

    - Replace <path to Runes of Magic folder> with the actual path. If it's not on C drive, also replace C with whatever letter it should be

    - Save this file as SW.bat anywhere you want. Make sure it's saved as .BAT file and not as a Notepad .TXT file. .BAT is a script file that you can run.

    - Open notepad again and paste this code into it:

    Code
    1. if not exist "C:\<path to Runes of Magic folder>\Runes of Magic\Interface-nonSW" goto end
    2. ren "C:\<path to Runes of Magic folder>\Runes of Magic\Interface" Interface-SW
    3. ren "C:\<path to Runes of Magic folder>\Runes of Magic\Interface-nonSW" Interface
    4. :end

    - Again, replace path and drive as needed and save as non-SW.bat


    What these script do:

    - The first script checks if SW Interface folder exists. If it exists, it renames the regular Interface folder into Interface-nonSW, then renames Interface-SW folder into Interface. If it doesn't exist (meaning the Interface folder already is the folder for SW), then it just exists the script.

    - The second script does a similar thing. It checks if non SW Interface folder exists. If it exists, it renames Interface folder into Interface-SW, then renames Interface-nonSW into Interface. If it doesn't exist (meaning the Interface folder is already the folder for non-SW), it just exits the scripts.


    So depending on what you need, you run one script or the other before starting RoM. I tested on my computer, and they work fine. If they dont' work for you, let me know, and we'll fine-tune them.

    People used to make a copy of the RoM folder for SW, but I am not sure if it would work now.


    You could create another Interface folder and then create two Windows scripts that would rename them based on whether you need them for SW or for regular play, and after running one of the scripts you would start RoM.

    Looking closer at the original version, I don't see how it could have worked at all. The last condition (not name == "...") will always be true because name is not defined at this point, leading to an empty target.


    A simple fix for your macro would be replacing "break" with "return". I've just tested it with my house keeper and it worked fine, so I guess it will work with cattles, too. Also the last part of the macro could be changed to a simple TargetUnit("") without any conditions, but let's do things step by step.

    Code
    1. /run for i=1,20 do local name=UnitName("target") if name == "Cattle" then return else TargetNearestFriend() end end if not (name == "Cattle") then TargetUnit("") end

    It worked, thanks a lot!

    You create "name" as a local variable within the for loop. Checking it later "not (name == "Cattle") then" has no access to this local variable.

    So where's the problem? I copied the script from this thread.


    Also, I was told there's TargetUnitByName command, but that didn't work for me either.

    I haven't changed it as I am trying to target friendly mobs - cows from current festival event


    Code
    1. /run for i=1,20 do local name=UnitName("target") if name == "Cattle" then break else TargetNearestFriend() end end if not (name == "Cattle") then TargetUnit("") end

    I did, yes. I only want to target one specific mob, so I removed name == Y and name == Z, and only left name == X, replacing X with mob name in quotation marks.

    I guess I am not doing something right here cause it doesn't seem to work for me.