Skip to content

ZMUD Scripting Help

edited October 2012 in Scripting
This is a general thread for people looking for scripting help with the ZMUD Client.

I know basically nothing about scripting. How do I make a pop out window in ZMUD that contains all of my clans/channels et cetera?
‘Least I won’t have to carry it no more. You see how bloody heavy it is?’

‘Every sword’s a weight to carry. Men don’t see that when they pick ’em up. But they get heavier with time.”

Comments

  • I'm pretty sure Zophael put one up on the IronRealms website. It may be fore cMud, if so my bad. But I do know he made one for the site.

  • Start with #window, and look into #capture. I use cmud, so I'm not sure what difference there is for zmud.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • I attempted to go to CMUD but the way you script there seems so much more advanced to me. I may just be much too used to ZMUD scripting though.
  • The vast majority of zmud code is compatible with cmud, so you can keep doing exactly what you're doing with a cleaner more up-to-date interface and more functionality.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • I'm trying to handle combos with a bladesurge modifier in there, but I can't get it to accept syntax alongside combo or using separators. For instance, trying to do this:

    #if {@stance="Gyanis"} {kipup\combo lowhook left lowhook left lowhook left {#if {@surging=1} {lowhook left}} @target @toxin}

    That doesn't work and I can't think of any other way to do it aside from not using combo and just having all the commands separate.
  • You don't want #if there, you want to use %if.

    #if (@stance = Gyanis) {kipup\combo lowhook left lowhook left lowhook left %if(@surging, "lowlook left", "") @target @toxin}
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • Too many symbols to choose from D:

    Thanks!
  • edited February 2013
    %SOMETHING is a built-in, either a variable or a function. In the case of %if, it's a function (that takes the place of an operator), and is used for in-line logic checks. #SOMETHING represent keywords (some of which are also functions! CMUD is weird.).

    You could accomplish the same thing with only #if, if you dislike %if for whatever reason:

    #if (@stance = Gyanis) {
        #if (@surging) {
            //we are surging
            kipup\combo lowhook left lowhook left lowhook left lowlook left @target @toxin
        } {//end if surging
            //we are not surging
            kipup\combo lowhook left lowhook left lowhook left @target @toxin
        }//end else (not surging)
    }//end Gyanis

    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • edited February 2013

    This isn't zMUD related at all, but I wouldn't advise doing your combos like that.

    It is altogether too easy to get your counts wrong if what's normally a three-hit combo turns into a 4-hit combo midfight. This is especially true if you're at, say, 10 lowhooks to break and you've already thrown 6 into the leg. What would be a perfect setup combo suddenly turns into an early break. When I had my combos do this as a predator, I found that I'd often end up having to manually type out single lowhooks mid-fight to account for the fact that the sudden change to my combo size had messed my counts all up.

    My advice would be for that extra bladesurge attack to be something that doesn't change the limbcounts of specific combos. Vertical, lateral(assuming you don't count torso hits), gouge, mindnumb, etc. 

    "On the battlefield I am a god. I love war. The steel, the smell, the corpses. I wish there were more. On the first day I drove the Northmen back alone at the ford. Alone! On the second I carried the bridge! Me! Yesterday I climbed the Heroes! I love war! I… I wish it wasn’t over."

  • AzefelAzefel Singapore
    I use individual aliases for each attack, and macros on my numpad for each alias. So I can hit like 4 6 8 on my numpad to do left arm, right arm, head. It'll never mess up because of a wrong stance, get total control of which limbs are hit in which order, and you can 'force' people to apply resto to the wrong limb this way.
  • How would I convert this Cmud script that Lionas made into Zmud script?

    #SAY %ansi( grey)Total Crits:"   "%ansi( high, green)%format( "&5d", @totalCrits)
    #SAY %ansi( grey)Total Attacks: %ansi( high, green)%format( "&5d", @attackCounter)
    #SAY %ansi( grey)Overall Critical Hit Rate: %ansi( high, green)%format( "%5f", %eval( %float( @totalCrits) / %float( @attackCounter) * 100))~%
    #SAY ---------------------------------
    #SAY %ansi( grey)2X ~ ~(%ansi( high, red)%format( "&4d", @critX2)%ansi( grey)~): %ansi( high, green)%format( "&6.2f", %eval( %float( @critX2) / %float( @totalCrits) * 100))~% "      "%format( "&6.2f", (@critX2 / %float( @attackCounter) * 100))~%
    #SAY %ansi( grey)4X ~ ~(%ansi( high, red)%format( "&4d", @critX4)%ansi( grey)~): %ansi( high, green)%format( "&6.2f", %eval( %float( @critX4) / %float( @totalCrits) * 100))~% "      "%format( "&6.2f", (@critX4 / %float( @attackCounter) * 100))~%
    #SAY %ansi( grey)8X ~ ~(%ansi( high, red)%format( "&4d", @critX8)%ansi( grey)~): %ansi( high, green)%format( "&6.2f", %eval( %float( @critX8) / %float( @totalCrits) * 100))~% "      "%format( "&6.2f", (@critX8 / %float( @attackCounter) * 100))~%
    #SAY %ansi( grey)16X ~(%ansi( high, red)%format( "&4d", @critX16)%ansi( grey)~): %ansi( high, green)%format( "&6.2f", %eval( %float( @critX16) / %float( @totalCrits) * 100))~% "      "%format( "&6.2f", (@critX16 / %float( @attackCounter) * 100))~%
    #SAY %ansi( grey)32X ~(%ansi( high, red)%format( "&4d", @critX32)%ansi( grey)~): %ansi( high, green)%format( "&6.2f", %eval( %float( @critX32) / %float( @totalCrits) * 100))~% "      "%format( "&6.2f", (@critX32 / %float( @attackCounter) * 100))~%
    #SAY ---------------------------------
    multiplier = (((@attackCounter - @totalCrits) + 2*@critX2 + 4*@critX4 + 8*@critX8 + 16*@critX16 + 32*@critX32) / %float( @attackCounter))
    #say %ansi( grey)Current Normalized Critical Hit Multiplier:"  "%ansi( high, green)%format( "&7.3f", @multiplier)
    #say

    It pastes in just fine, but it doesn't seem to read the things like "&6.2f".

  • There's no reason %format shouldn't work in zmud. Are you sure it's being imported correctly? (Quotes aren't smart quotes, all characters present, etc)
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • edited March 2013
    Because it was in .xml format, I had to manually enter the triggers for it. I simply paste that code into an Alias. This is the result.

    image

    It's for Aetolia, but I've plugged in all the appropriate messages since some of them are different.

    EDIT: Hell, even the triggers to add to the variables aren't adding. I've definitely done something wrong here. /chin

    So ignore the fact that I'm not triggering off the damage done since it's different and it has other stuff in there like damage types and the overkill system, but here's an example.

    #TRIGGER {^You connect to the torso!$} {#ADD @attackCounter 1}

  • If the values for all the vars aren't set, it won't display them correctly. Get the vars actually getting values first.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • Man, I made that script like 8 years ago or something.
  • edited March 2013
    I made one based on another one I've seen; entirely possible it's based on yours.

    EDIT: It should properly look like this
    image

    EDIT2: I made the version I distributed back in 2007. Wow.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • Yeah, I wrote that display called 'calccrits' in 2005.

    http://www.imperian.com/forum/critical-hit-percentager#comment-100290

    That's the only forum post I can find that properly mentions it and includes my original code.

  • edited March 2013
    Juran said:

    Yeah, I wrote that display called 'calccrits' in 2005.

    http://www.imperian.com/forum/critical-hit-percentager#comment-100290

    That's the only forum post I can find that properly mentions it and includes my original code.

    I stole the alias names along with the base table layout. I am shameless.
    ETA: And the hotpink highlight color for crits.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • Hotpink is the only true color for crits.
  • Credit goes to Katalina for helping me. Zmud doesn't recognise that format. At all. BUt formatting does work.


    #say
    #say
    #SAY %ansi( grey)Total Crits:"   "%ansi( high, green)@totalCrits
    #SAY %ansi( grey)Total Attacks: %ansi( high, green)@attackCounter
    #SAY %ansi( grey)Overall Critical Hit Rate: %ansi( high, green) %format( 4, %eval( %float( @totalCrits) / %float( @attackCounter) * 100))~%
    #SAY ---------------------------------
    #SAY %ansi( grey)2X ~ ~(%ansi( high, red)%format( 0, @critX2)%ansi( grey)~): %ansi( high, green)%format( 2, %eval( %float( @critX2) / %float( @totalCrits) * 100))~% "      "%format( 2, %eval( %float( @critX2 / %float( @attackCounter) * 100)))~%
    #SAY %ansi( grey)4X ~ ~(%ansi( high, red)%format( 0, @critX4)%ansi( grey)~): %ansi( high, green)%format( 2, %eval( %float( @critX4) / %float( @totalCrits) * 100))~% "      "%format( 2, %eval( %float( @critX4 / %float( @attackCounter) * 100)))~%
    #SAY %ansi( grey)8X ~ ~(%ansi( high, red)%format( 0, @critX8)%ansi( grey)~): %ansi( high, green)%format( 2, %eval( %float( @critX8) / %float( @totalCrits) * 100))~% "      "%format( 2, %eval( %float( @critX8 / %float( @attackCounter) * 100)))~%
    #SAY %ansi( grey)16X ~(%ansi( high, red)%format( 0, @critX16)%ansi( grey)~): %ansi( high, green)%format( 2, %eval( %float( @critX16) / %float( @totalCrits) * 100))~% "      "%format( 2, %eval( %float( @critX16 / %float( @attackCounter) * 100)))~%
    #SAY %ansi( grey)32X ~(%ansi( high, red)%format( 0, @critX32)%ansi( grey)~): %ansi( high, green)%format( 2, %eval( %float( @critX32) / %float( @totalCrits) * 100))~% "      "%format( 2, %eval( %float( @critX32 / %float( @attackCounter) * 100)))~%
    #SAY ---------------------------------
    multiplier = %eval( ((@attackCounter - @totalCrits) + 2*@critX2 + 4*@critX4 + 8*@critX8 + 16*@critX16 + 32*@critX32) / %float( @attackCounter))
    #say %ansi( grey)Current Normalized Critical Hit Multiplier:"  "%ansi( high, green)%format( 2, @multiplier)
    #say

  • So noob question but I can't get this work. 

    For the sake of argument, I made a simple trigger that goes like this.

    #trigger {Your pipe has gone cold and dark.} {lit = 0}

    #trigger {You quickly light your pipes, surrounding yourself with a cloud of smoke.} {lit = 1}

     

    Neither of these message changes my varibles value.  Though when I manually input lit = 1, it will change the value.

    What is causing this? 

    I was trying to do something a little more advanced, and made a razing deal #if {barrier = 0} {attack @target} {rsl @target} and that statement works fine if I adjust the variable manually, triggers just don't seem to be doing it.  I'm positive this is something small and dumb, but for whatever reason I can't make it work.

     

    image

  • AzefelAzefel Singapore
    get cmud instead


    also you might have triggers disabled?
  • I tried cmud once or twice, I didn't like how something worked :(

    image

  • Ignore my posts, turns out I made the triggers in a class folder unintentionally. 

    is dumb.:(

    image

Sign In or Register to comment.