Convert envenom script for Deadeyes - need help!

Hi Everyone, 

Well only those that can help!

I want to convert Vadi's envenom script to a deadeyes script so I can use it on the fly, I have no real idea how to do it in Mudlet, played around for awhile but just cant get me head around it.

This is the script:

[code]

  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE MudletPackage (View Source for full doctype...)>
- <MudletPackage version="1.0">
  <TriggerPackage />
- <AliasPackage>
- <AliasGroup isActive="yes" isFolder="yes">
  <name>Offensive</name>
  <script />
  <command />
  <regex />
- <Alias isActive="yes" isFolder="no">
  <name>envenom</name>
  <script>-- first sword for alias,name in pairs(venoms) do if (alias == matches[2]) then envenom(s1, name) end if (alias == matches[3]) then envenom(s2, name) end end</script>
  <command />
  <regex>^e(\w{1})(\w{1})$</regex>
  </Alias>
  </AliasGroup>
  </AliasPackage>
  <ActionPackage />
- <ScriptPackage>
- <ScriptGroup isActive="yes" isFolder="yes">
  <name>General</name>
  <script>------------------------------------------------- -- Put your Lua functions here. -- -- -- -- Note that you can also use external Scripts -- -------------------------------------------------</script>
  <eventHandlerList />
- <Script isActive="yes" isFolder="no">
  <name>SETTINGS</name>
  <script>s1 = "sword#####" s2 = "sword#####" -- venom mappings venoms = {} venoms.a = "aconite" venoms.c = "curare" venoms.d = "delphinium" venoms.x = "xentio" venoms.k = "kalmia" venoms.g = "gecko" venoms.i = "slike" venoms.t = "epteth" -- arms venoms.s = "epseth" -- legs venoms.v = "vernalius" venoms.g = "digitalis" venoms.m = "monkshood"</script>
  <eventHandlerList />
  </Script>
- <Script isActive="yes" isFolder="no">
  <name>envenom</name>
  <script>function envenom (rapier, venom) if rapier == nil or venom == nil then return end send ("envenom " .. rapier .. " with " .. venom) end</script>
  <eventHandlerList />
  </Script>
  </ScriptGroup>
  </ScriptPackage>
  </MudletPackage>

[/code]

What I want to be able to do is just go dps and it will 

deadeyes ..target paralysis stupid

The mappings only need a couple in I can add the rest later and work it out, once I've installed the package.

Willing to shell out a few credits.

Any help would be great.

Thanks






Comments

  • JonathinJonathin Retired in a hole.
    You just need a table with the afflictions and an alias to call them.

    deadeyes = {}
    deadeyes.a = "affliction1"
    deadeyes.b = "affliction2"

    then an alias like ^d(\w)(\w)$

    send("deadeyes "..target.." "..deadeyes[matches[2]:lower()].." "..deadeyes[matches[3]:lower()])
    I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.
  • That doesn't seem to work for me Mosr

    for instance if I hit dab or dac it does nothing.
  • Actually got it working, thanks @Mosr appreciate it.

  • Jules said:
    Yeah, I do this with a lot of my things now, unloading, loading ship weapons, envenom, deadeyes
  • JonathinJonathin Retired in a hole.
    Tables are all-powerful.
    I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.
  • Maybe post up your deadeyes conversion, others could use it
  • Deadeyes Script that I use:

    In scripts just make a new one, call it what you want, mine is called deadeyes script funnily enough!

    Put this in the box:

    deadeyes = {}

    deadeyes.a = "anorexia"

    deadeyes.b = "breach"

    deadeyes.c = "confusion"

    deadeyes.d = "sleep"

    deadeyes.e = "epilepsy"

    deadeyes.f = ""

    deadeyes.g = "vomiting"

    deadeyes.h = "vertigo"

    deadeyes.i = "impatience"

    deadeyes.j = "claustrophobia"

    deadeyes.k = "asthma"

    deadeyes.l = "manaleech"

    deadeyes.m = "masochism"

    deadeyes.n = "dementia"

    deadeyes.o = "agoraphobia"

    deadeyes.p = "paralyse"

    deadeyes.q = "paranoia"

    deadeyes.r = "reckless"

    deadeyes.s = "stupid"

    deadeyes.t = "sensitivity"

    deadeyes.u = "peace"

    deadeyes.v = "plague"

    deadeyes.w = "weariness"

    deadeyes.x = "clumsy"

    deadeyes.y = "addiction"

    deadeyes.z = "bleed"


    You can adjust any of the letters to afflictions, its just that I can remember most things this way.


    --
    okay then I use an alias to deliver them

    Alias Name: deadeyes delivery
    Pattern: ^e(\w)(\w)$
    Substitution:

    Box:

    send("deadeyes "..target.." "..deadeyes[matches[2]:lower()].." "..deadeyes[matches[3]:lower()])

    de1 = deadeyes[matches[2]]

    de2 = deadeyes[matches[3]]


    --


    Things to note, you can change the first letter to what ever you want, ie: abcdefg blah blah, be careful in what you do change it to as it might clash with other scripts, for instance, I first used d by had a few issues for instance if I wanted to deadeye agoraphobia reckless as svo has dor.


    --


    Its easy to use as well just eac for deadeye anorexia confusion; ebc for deadeyes breach confusion, ekp for asthma paralyse.


    --


    okay I left the de1 and de2 because what that does is to allow you to send to a party if you afflict someone with it if you put it with the trigger pattern for a succesful deadeyes you could put something like 


    send("pt " ..target.. " deadeyes " ..de1.. " " ..de2)


    --


    I have a couple of things where I can press certain keys and it will store them in a script so I can execute things on the fly as well just using macros which I wont post at moment but for instance I have g1-g18 keys g4 = asthma g5= paralysis g6 = insomnia then g7 is blah, etc etc.


    I have three modes which use these keys asthma, para, free.


    If I press a key and its asthma mode then whatever key I press it uses deadeyes asthma ?? I then press f12 to execute the command which can be done either by spamming the hell out of f12 or I can make it just use do next balance.


    Same with para, in the free mode I need to press two keys.


    Its a pretty simple set up.


    Thanks to @Vadi @Mosr and @Micaelis for helping me with either the idea, setup and help getting it right.

  • Also quick addition if you want it to contemplate every second evileye

    Alias will need to look like

    send("deadeyes "..target.." "..deadeyes[matches[2]:lower()].." "..deadeyes[matches[3]:lower()])

    contemplate_check()

    de1 = deadeyes[matches[2]]

    de2 = deadeyes[matches[3]]


    Then have another script that looks like this:


    function contcheck()

    if contemplating == 2 then

    send("contemplate " ..target)

    contemplating = tonumber(1)

    elseif contemplating == 1 then contemplating = contemplating + 1

    else

    contemplating = tonumber(1)

    end

    end


    if you want it to check every third then:

    function contcheck()

    if contemplating == 3 then

     send("contemplate " ..target)

     contemplating = tonumber(0)

    elseif contemplating >= 0 and contemplating <= 2 then 

     contemplating = contemplating + 1

    else

     contemplating = tonumber(1)

    end

    end


    I believe these should work.


    Thanks to Annile who just brought it up and I thought it was a good idea so I stole it.



  • Just contemplating = 1 will do, btw
  • A while back I set up an envenom script to keep track of which venoms I had envenomed on my rapiers and how many were still applied. So on my prompt I could see how many attacks until they ran out. One issue I had was keeping track of which venom was applied to which rapier, this thread just gave me the idea of catching it on the alias with a function to envenom like you do above (Less giving me the idea and more me taking your idea).

    Thanks :)
  • edited February 2013
    Panpardus said:
    if you want it to check every third then:

    function contcheck()

    if contemplating == 3 then

     send("contemplate " ..target)

     contemplating = tonumber(0)

    elseif contemplating >= 0 and contemplating <= 2 then 

     contemplating = contemplating + 1

    else

     contemplating = tonumber(1)

    end

    end

    A little shorter, but you can also do...

    function contcheck()

      contemplating = contemplating + 1

      if contemplating == 3 then

        send("contemplate " .. target)

        contemplating = 0

      end
    end

    And outside the function/with any reset, just set contemplating to 0.
    Current scripts: GoldTracker 1.2, mData 1.1
    Site: https://github.com/trevize-achaea/scripts/releases
    Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
    Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Sign In or Register to comment.