Skip to content

CMud Scripting

13

Comments

  • AzefelAzefel Singapore
    edited May 2013
    my defup alias:

    eat myrrh\\deathsight\\regeneration on\\queue eqbal celerity
    defup=1


    trigger pattern:
    ^You have gained the (.*) defence\.$

    action:
    defences.%1=1
    #if @defup {
      #switch %1
        (celerity) {queue eqbal tenemecy}
        (tenemecy) {queue eqbal space all}
        (spacing) {queue eqbal prowess on}
        (prowess) {queue eqbal absorption on}
        (absorption) {queue eqbal edgehook on}
        (edgehook) {queue eqbal constitution}
        (constitution) {queue eqbal bladesurge}
        (bladesurge) {queue eqbal windwalk on}
        (windwalking) {queue eqbal preservation on}
        (preservation) {queue eqbal touch mindseye}
        (mindseye) {#additem OnPrompt {pacing on\\call wolf}}
      #alarm deffing +10 {defup=0}
    }
  • edited July 2013
    Anyone know why my afflictions database is doubling? The actual database in the DB window is adding a copy of the saved Afflictions.DB to itself occasionally. It's not cool. It seems random when it actually occurs, but it's pretty often. Also, I know that #ADDITEM doesn't add duplicates, I'm actually sorting through the Afflictions DB through every single affliction and echoing if I've got it, so I can list them according to how I sort my View.

    <472/472h 299/336m 1b <eb db> <100 0>> 64.71 
    [T:Me RAID Hinders: Limbs: LA0 RA0 ]
    You have no amnesia.
    Your aura of weapons rebounding disappears.
    You have lost the anti-weapon field defence.
    You lash out with your wicked talons, drawing slices across yourself's body.
    Damage Taken: 60 cutting, physical (raw damage: 88)
    Your claws seep hemotoxin into Baasche's bloodstream.
    An attack on your immune system causes your body to feel weak.
    Me afflicted with Hemotoxin.
    Me.Afflictions-> hemotoxin 
    You are afflicted with hemotoxin.
    [Afflictions:]
    [Afflicted by: [Hemotoxin] Cure: [Kelp(5)] (`1)]
    [Afflicted by: [Hemotoxin] Cure: [Kelp(5)] (`2)]
    [Afflicted by: [Hemotoxin] Cure: [Kelp(5)] (`3)]
    Balance Taken: 2.43s
    You sternly order a forest basilisk to hamper your ability to use tree tattoos, and it casts an iron-hard stare at you.
    Your ability to use tattoos appears to be reduced.
    Equilibrium Taken: 2.45s
    <412/472h 290/336m 6b <-- db> <100 0>> 64.71 

    The You are afflicted with <blah>. trigger:
    #SUB {%ansi(red, white)You are afflicted with %ansi(white, red)%1.}
    #additem Afflictions %1
    afflist

    The afflist alias:
    #DBOFFLINE
    #DBLOAD af
    #VIEW All {Priority|Cure}
    #IF (%numitems(@Afflictions)&gt;0) {#SAY <color red>[Afflictions:]</color>} {#SAY <color red>[No more known afflictions on you.]</color>}
    $i = 0
    #FORALL %dblist(Name,All) {#IF (%ismember(%i,@Afflictions)) {$i = ($i + 1);#SAY <color red>[<color gray>Afflicted by: [<color %if(%1="an unknown affliction"||%1=something||%1=unknown,yellow,red)>%i</color>]  Cure: [<color blue>@getCure(%i)~(@getPriority(%i)~)&lt;/color>] ~(<color white>`$i</color>~)</color>]</color>}}
    #DBONLINE

    The DBOFFLINE and DBONLINE are so it doesn't mess up whatever view I have set up in the DB window. I'm DBLOADING because I'm using two different DB's most of the time. I've got Afflictions and Players sorted out. I'm VIEWing to make sure they're sorted the way I want. I would assume the issue has to do with using DBLOAD too often, but I couldn't think of another way to switch DB as well when changing VIEW. I'm probably missing a super obvious function. =/

    Edit: Just a heads up, the 
    Me afflicted with Hemotoxin.
    Me.Afflictions-> hemotoxin 
    lines are part of my target affliction tracking, they don't have anything to do with my issue.
    image
  • AzefelAzefel Singapore
    Someone tell me how to get GMCP inventory to work :(
  • edited August 2013
    #SENDSB 201 Char.Items.Inv
    #SEND " "
    #T+ InventoryTrig

    <trigger name="InventoryTrig" type="GMCP" priority="27080" enabled="false" id="2708">
      <pattern>Char.Items.List</pattern>
      <value>#SAY %gmcp.data
    inventory = %gmcp.data.items
    #T- InventoryTrig</value>
    </trigger>

    ...
    profit?

    Explanation: Cmud's SENDGMCP sucks. I think it only works if you supply it with a DB variable, so blank things like Char.Items.Inv don't work. SENDSB ends the message you give it over the specified subchannel(201 == GMCP). Then you need to send " " because Imperian doesn't send back the response GMCP until the next prompt.
    image
  • AzefelAzefel Singapore
    Much appreciated
  • AzefelAzefel Singapore
    edited August 2013
    image

    Mwaha :D

    Now to just make it in columns!
  • I see four containers missing mango designs. You're a bad enthusiast.

    Constructive things: I'm going to have mine listing generalized items when possible. Instead of listing all vials or pipes separately in stacks, it'll be Vials: [x] Pipes: [x], etc. Not so much a problem when everything you have is the same design, but cool for those instants when you INV after Kryss has given you her lovely, handcrafted linseed pipe.
    image
  • AzefelAzefel Singapore
    edited August 2013
    Yeah I would generalize it, but the GMCPdoesn't give it's interactable syntax, and I didn't want to just look through the item's name for "pipe" or "vial" and the like, and have it give the wrong info if for whatever reason I happened to have a vial shaped like a pipe or whatever.


    edit I consolidated it anyway, will see how it goes :/

    image
  • AzefelAzefel Singapore
    edited August 2013
    Is there a way to turn disable MXP links being underlined?


    #call %pref(MXPUnderline,0)

    doesn't work :(


    edit: nm found a workaround
  • AzefelAzefel Singapore
    edited August 2013
    543H100 480M100 5C0 0B [eb][T:-] qw
    -------------------------------------------------------------------------------
    Azefel.
    -------------------------------------------------------------------------------
    There are 1 players in this world.
    543H100 480M100 5C0 0B [eb][T:-] #sh %gmcp.room.players
    "name=Iluv|fullname=Iluv Bialystone, the Crux Shade"

    This is annoying as shit

    image
  • In cmud, gmcp tables aren't cleared when you receive a new one. It is dumb, and I just keep my own table of room players based on room players, enter and leave messages. Remind me to give the triggers to you this evening.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • AzefelAzefel Singapore
    Yeah I know cmud's gmcp handling is dumb. For my inventory and vitals parser I can just #delk the items directly off the relevant %gmcp var, but it doesn't want to work for room.players evidently. 
  • edited August 2013
    ETA: %json is your friend.

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <cmud>
      <trigger type="GMCP" priority="1340790" copy="yes">
        <pattern>room.removeplayer</pattern>
        <value>#delitem roommembers %0</value>
      </trigger>
      <trigger type="GMCP" priority="1340780" copy="yes">
        <pattern>room.addplayer</pattern>
        <value>#local $message
    $message = %json(%0)
    #additem @roommembers $message.name</value>
      </trigger>
      <trigger type="GMCP" priority="1340810" copy="yes">
        <pattern>room.players</pattern>
        <value>#local $list, $name
    roommembers = ""
    $list = %json(%0)
    #forall $list {#additem roommembers %i.name}</value>
      </trigger>
    </cmud>
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • Hi, I've got a novice trigger issue maybe someone could help me out with?

    I'm trying to grab "The aura around Eujja is now tainted to 20%."

    For some reason, I can't quite get it, I think the % is throwing me off.
    In the trigger I have:

    ^The aura around @Target is now tainted to (%d)~%.$

    And script I have:
    Tracking/Variables/TargetTaint = %1
    #show taint = %1

    Where am I going wrong guys? :/

  • AzefelAzefel Singapore
    edited September 2013

    % doesn't need an escape char (~) before it, but putting one there does no harm.

    ^The aura around @Target* is now tainted to (%d)%.

    Try that, some messages in game don't end at the last "." (And if this is the case I would BUG/TYPO it).

    The * after @target lets it match partial names (so if you targeted aze, the trigger would still work off Azefel).



    Another way is, if this is a first-person message (I'm not familiar with new summoner stuff), you don't have the check for the name at all because you'll only see it (I assume) after you do something.

    ^The aura around %w is now tainted to (%d)%.
    ^The aura around * is now tainted to (%d)%.
  • edited September 2013
    Just posting this for Lionas to take a look:

    #SEND {stand; parry @Parry; daegger hunt @Tracking/Variables/Target @DaeggerToxin};#IF (@Tracking/Variables/DeadeyesTheCombo = 0) {queue eqbal Deadeyes  @Tracking/Variables/Target paralyse stupid}

    Edit: Neither the parry or Daegger Hunt goes through. Not sure why!
  • edited September 2013
    It looks like you have a space between the semicolons and the parry/daegger hunt commands?  Cmud will stop processing it there.
  • Also, CONFIG SEPARATOR. Always a good choice.
    image
  • And I think I remember someone saying queue eqbal could be problematic becuase of order of operations or something, but you'd need someone more experienced  with that than me to answer.
  • How the hell do you separate aliases and whatnot by different files? Mine keep bleeding into each other or something and it ends up being a mess when I try to edit one thing for another thing.


    Can't really find a good help file about classes and setting and whatever it is. Can anyone give me a rundown?
  • AzefelAzefel Singapore
    edited February 2014

    You can make a new 'package' in the settings:

    image

    which will make new tabs in the settings like these:

    image image




  • Thanks! Any way to easily copy paste a package, or load one and unload another?
  • AhkanAhkan Texas
    edited February 2014
    You can honestly cut and paste an entire package's xml file. Open it up in an editor, select all, copy. Go to the package, and paste.
  • AzefelAzefel Singapore
    I really hate using packages in cmud, I'd rather just have everything in 1 package and selectively disable/enable bits (or entire folders).
  • Delayed reply, but maybe helpful. Warning, girly colors.

    Pattern: 
    Your keen senses notice a single shard flying towards (*).

    Command: 
    #cw deeppink
    #say  %ansi(purple) ---|--- SHARDFALL! ---|---
    #say  %ansi(purple) %1
    #window shards {%time(hh:mm) Single shard - %1}
  • AzefelAzefel Singapore
    ^Your keen senses notice a single shard flying towards (.*)\.

    #sendraw {msg %gmcp.char.status.name shard: %subregex(%1,"^the ")}
  • edited April 2014
    EDIT: Nevermind. Figured it out.
  • Anyone who happen to have a script for Smithing ? Like a button list where i can just click on the item i want created and then it will make it. So it would be a lot easier to actually craft armour and such ??
  • 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
Sign In or Register to comment.