Skip to content

CMud Scripting

124»

Comments

  • Chani said:

    Oh and maybe if someone would be able to make something like this.


    All the Assemble pieces you got, if you could manage somehow to put that into a window for itself, so you would have a constant idea what you got and what you could trade with others and such ?

    More or less like the Channel Capture for Tells and such, just ordered up so it looks nice ?

    And of course the things i post about asking to get made, there is always a good chance for a profit from doing it for me :D
    Sounds like ASSEBLE LIST.
  • yeah but like i said, sorted up in a much nicer way than Assemble List, since that's just one long row. Where Elixlist is a lot easier to see things and such
  • Anyone who could help me make some sort of System that checks what i make per login ? 

    So there would be a grand total in my pouch.

    What's added/lost from the pouch during the time i have logged in, and that resets when i login again.

    And if i could have that in the Status Line that would be really nice :)
  • edited February 2015
    Okay, I've been trying to make this work but I just can't get it to seem to work right. Basically I want  something where if someone sends me a tell with a specific keyphrase it quickly calculates how much belief  I've done for the day.  and reports back, minus the cost of favours/ent favours. Everything I have seems to work, except when it sends the person the tell it reports 0 belief.  Even though my summary echo that displays when I run beliefcheck shows the right amount. Anyone have any ideas or a more elegant way to do this?

    Edit: I realize this is ghetto and not really done correctly but I was trying to go for the easiest way out. 

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <cmud>
      <class name="Belieftrack">
        <trigger priority="145550">
          <pattern>- Selthis spent (%d) belief on the </pattern>
          <value>#add beliefcount -(%1)</value>
        </trigger>
        <var name="beliefcount">0</var>
        <trigger priority="145570">
          <pattern>- We've gained (%d) belief thanks to Selthis.</pattern>
          <value>#add beliefcount (%1)</value>
        </trigger>
        <alias name="beliefclear">
          <value>#var beliefcount 0
    #EC farts</value>
        </alias>
        <trigger priority="145590">
          <pattern>- Myfanwe spent (%d) belief to * Selthis.</pattern>
          <value>#add beliefcount -(%1)</value>
        </trigger>
        <alias name="beliefcheck">
          <value>belieflog
    more
    more
    more
    more
    #alarm +1 {#EC Belief Status: @beliefcount}
    #alarm +10 {beliefclear}</value>
        </alias>
        <trigger priority="2010">
          <pattern>(%w) tells you, ~"Belief.~"</pattern>
          <value>#alarm +1 {beliefcheck}
    #alarm +3 tell %1 You have contributed @beliefcount belief today, with rituals and favours counted. This only covers the current log day
    </value>
        </trigger>
          </class>
    </cmud>
  • edited February 2015
    It seems like it's making the alarm with the current value of @beliefcount, which is 0 at the time of receiving the tell. You can probably fix it by replacing

    #alarm +3 tell %1 You have contributed @beliefcount belief today, with rituals and favours counted. This only covers the current log day

    with

    #var belieftell %1 none belieftrack

    and adding

    tell @belieftell You have contributed @beliefcount belief today, with rituals and favours counted. This only covers the current log day

    inside 'beliefclear' or some other alias.
    image
  • Thanks shou, that was exactly it. 
  • This is my prompt: 383/383hp 205/205m  pp 0 0

    This is my trigger pattern:  ~%d/~%dhp 

    #VAR hp %1 
    #VAR maxhp 383 
    #IF (%eval((@hp*100)/@maxhp)&lt;60) {transmute 100}

    I set the value for @maxhp to 383 but the value for @hp won't change. I set it to trigger  on prompt and not the new line. Anyone know what am I doing wrong?

  • edited March 2015
    Enclose your regex. On my phone but if you google you can find sites with nifty .js that will test your expressions. Also ignore your characters that are in the text line so they are not interpreted as part of regular expression

    Edit: Enclose meaning parens
  • I'm a little late, but ^(%d)/%dhp should capture it properly. The ^ anchors it to the beginning of a line, so it doesn't fire randomly.
    image
  • I got it working and then added a mana count too! (it was spamming me like crazy)  I will add in that ^ to anchor it. Thank you, both.
  • The prompt you are triggering already has your max health in it, so you should not be setting it to a constant. If you get your max health from the prompt it will automatically adjust for favours, artifacts, Moradeim modulation 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."

  • I'll take that out. Thanks! 
  • I can't seem to get this to work at all, any thoughts,

    <trigger priority="1590" id="159">
      <pattern>$You are afflicted with an unknown affliction.</pattern>
      <value>@affliction = 1
    #if (@bashing AND @affliction) {touch tree; purge blood; focus mind; affliction = 0)</value>
    </trigger>

  • edited February 2016
    I've never used that format for any of my IF checks, so I don't know how that works. Is it just a check to see if they exist and you turn off/on another class with these variables in it?

    I would do:
    #if (@bashing = whatever AND @affliction = whatever) {stuff}

    or #if (!@bashing) to check if it doesn't exist, or (@bashing != something) to check against a -specific- value. I can't tell which one you would need.
    image
  • edited February 2016
    @Cardi

    You should be using a caret, ^, and not $ at the beginning of your pattern. I think what you wanted to do was this. ^You are afflicted with an unknown affliction.$

  • It might have been firing regardless because that message is usually multi-line.

    Mob a hits you with a big rock.$
    You are afflicted with an unknown affliction.

    (though it should definitely be a ^ instead anyway, just pointing out that it might not have stopped it from firing)
    image
  • I got it figured using this way,

    @affliction = 1
    #if (@bashing AND @affliction) {touch tree; purge blood; focus mind; affliction = 0)

    I can't remember how to make multi-line triggers, I want to make a basic auto targetting script,

    You see the following objects:
    "creeper98735"            an enraged creeper
    "creeper161984"           an enraged creeper

    is the pattern, so I want to make a list so I can prioritize some targets over the other, any ideas?

  • bump
    Is anyone able to help me with a basic targetting script. Before there used to be limited mob names, orc, ogre, locust ect. Now there are several different mobs in a single area. How do you target all of them?
  • Lots of areas will have one general keyword that you can use to target. As an example you can use the word "horde" for goblins, ogres, orcs, and trolls. "Undead" will get ghosts, zombies, ghouls, wraiths, wights, banshees, skeletons, and all the various undead direwolves and other undead critters. For Iaat Valley, you can target "creature". 

    "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."

  • Also, all of the Underworld areas work with just "spirit" as the target.
    image
Sign In or Register to comment.