Looking for more active discussion? Join our Discord at https://discord.gg/x2s7fY6

Simple scripting Help ? - Mudlet

So, I'll admit I'm fairly crappy with scripting in mudlet...but I have this idea and trying to see how it'd work is like trying to read different language.

So this is what I have:

Right now I have a simple trigger that based of the entrance of beetles, it will automatically attack them, in the same trigger i have it bounce off of balance, and equilibrium so that when the balance line shows I go and pick up the corpse and then attack the next one. the problem with this is that it spams this crap EVERY time I gain balance and I want to clean it up so instead it'll do something like this:

Alias : Rats :Echo- Ratting On

Beetle enters:

Have blance/ equilbrium- Frenzy beetle

Beetle dead  and  have blance/ equilbrium- take beetle

end

If anything I'd like to add the ylem trigger in it as well, so when it appears it'll stop collect the mist, and then start attacking the beetles once more.

If I could I'd like it to also count how many beetles have been killed in the room as well as estimate how much gold I've accumulated in the time I have been beetling and some how reset this after the beetles are sold or some such, that way I know if I've killed them all or not. I also like it the script toggled so its turned on with one alias that turns rats on and off so the script doesn't run all the time.

If trigger lines are required, I'll post them as necessary and no I do not want a script that will have me move rooms just something simple, allowing me to walk to the next room manually.

Comments

  • HavenHaven World Burner Flight School
    function AutoBash ()

    if (bash == true) and
      (balance == true) and
      (balance_rh == true) and
      (balance_lh == true) and
      (equilibrium == true) and
      (list_aff["right_leg_broken"] == false) and
      (list_aff["left_leg_broken"] == false) and
      (list_aff["right_leg_damaged"] == false) and
      (list_aff["right_leg_damaged"] == false) and
      (list_aff["right_arm_broken"] == false) and
      (list_aff["left_arm_broken"] == false) and
      (list_aff["right_arm_mangled"] == false) and
      (list_aff["left_arm_mangled"] == false) and
      (writhe_mode == false) and
      (list_aff["aeon"] == false) and
      (list_aff["stun"] == false) and
      (list_aff["unconscious"] == false) and
      (list_aff["asleep"] == false) and
      (list_aff["death"] == false) and
      (channel_mode == false) and
      (shape_changed == false) and
      (retardation_mode == false) then
    if (ylem == true) then
    Send ("ABSORB YLEM")
    elseif (ylem == false) then
    if (gold == true) and
    (slain == true) then
    Execute ("take gold;take corpse;kill")
    elseif (gold == true) and
    (slain == false) then
    Execute ("take gold;kill")
    elseif (gold == false) and
    (slain == true) then
    Execute ("take corpse;kill")
    elseif (gold == false) and
    (slain == false) then
    Execute ("kill")
    end
    end
    end
    end
    ---------------------------------
    Kill being your attack alias. You'd call this function in each trigger you want the attack to occur: When you've recovered balance/equilibrium/cured paralysis or stupidity/recovered from stun/cured broken arms/when you stand up/etc.

    Trigger: ^You have recovered balance on all limbs\.$
    Send: AutoBash ()

    Trigger: You have cured paralysis.
    Send: AutoBash ()

    Trigger: Beetle emerges.
    Send: AutoBash ()

    Not sure how Mudlet operates but that's how I do it with MUSHclient.
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • That's another client I'm not familiar with...not even sure where to begin to convert it, other than that its pretty XD

  • HavenHaven World Burner Flight School
    If you're interested in using MUSHclient, I'd be happy to teach you what I know. Alternatively, if you want to skip making your own and all that there are several free systems available on the forums.

    There's my system Lilith for MUSHclient.

    There are some that people charge you for like Lanira's Citadel that works across any client you decide to use.

    I'm sure there are more but I can't think of any at the moment.

    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • TozToz
    edited May 2013
    Trigger: You kill a beetle.

    beetleDead = true

    Trigger: A little beetle enters. How cute.

    if gmcp.Char.Vitals.balance == "1" and gmcp.Char.Vitals.equilibrium == "1" and beetling  then
    send("frenzy beetle")
    else
    beetleHere = true
    end

    Trigger: You got balance back.
    Also trigger: You got EQ back.

    if beetleHere == true and beetling  then
    send("frenzy beetle")
    beetleHere = nil
    end

    if beetleDead == true and beetling then
    send("get 50 beetle")
    beetleDead = nil
    end

    Alias: 
    ^beetle (on|off)$

    if matches[2] == "on" then
    beetling = true
    echo("\nkilling beetles.")
    else
    echo("\nNot killing beetles.")
    beetling = nil
    end

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • Thanks toz, but how would I go about adding the ylem trigger as well?

  • if beetleDead == true and beetling then
    send("get 50 beetle")
    send("qb absorb ylem")
    beetleDead = nil
    end

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • Thanks!
  • So to keep from spamming the new discussion I'll just keep my questions here:

    I've been trying for the longest time to get Mudlet to highlight names, but each time I've come up with it working, then bugging out, to not working at all. I've tried every variation of trigger i can think of to try an get it work to no avail, is mudlet simply not capable of highlighting one word/ name or item? Or am I missing something a bit more intricate?
  • You could make a tempTrigger. From the Mudlet manual: 

    if id then killTrigger(id) end
    id = tempTrigger(target, [[selectString("]] .. target .. [[", 1) fg("gold") resetFormat()]])

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

Sign In or Register to comment.