Multi-drag script for Mudlet

Scripts and support for your favorite MUD client.
Vooku
Sojourner
Posts: 29
Joined: Tue Jul 24, 2007 5:02 pm

Multi-drag script for Mudlet

Postby Vooku » Thu Jul 19, 2018 1:03 pm

Format to use: dragX Y (X=number of corpses, Y=direction)

Pattern:

^drag(\d+) (\w+)

Code:

local cmd = ""
for k = 1,matches[2] do
cmd = string.format("%s drag %d.corpse",cmd, k)
end
cmd = cmd .. " " .. matches[3]
cmd = string.trim(cmd)
send(cmd)
Vooku (50 Barb Shammy)
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Re: Multi-drag script for Mudlet

Postby Afu » Tue Jul 24, 2018 8:50 pm

well done sir
i would add that you can replace corpse with pcorpse and if you have consent this would work as well
Vooku
Sojourner
Posts: 29
Joined: Tue Jul 24, 2007 5:02 pm

Re: Multi-drag script for Mudlet

Postby Vooku » Thu Jul 26, 2018 12:52 am

Good idea.
Vooku (50 Barb Shammy)
Vooku
Sojourner
Posts: 29
Joined: Tue Jul 24, 2007 5:02 pm

Re: Multi-drag script for Mudlet

Postby Vooku » Sat Feb 16, 2019 3:01 pm

Here is the player drag script. Works good unless someone is dead in that room and isn't consenting.

TRIGGER:
Name: Who Consenting
Pattern: ^(\w+) is consenting you (regex)

Code: Select all

if matches[2] ~= whoami() then
   table.insert(consent_tbl,matches[2])
end


ALIAS1:
Name: Consent
Alias: ^whoconsent$

Code: Select all

consent_tbl = {}

enableTrigger("Who Consenting")
send("consent")

tempTimer(5,[[disableTrigger("Who Consenting")]])


ALIAS2:
Name: Multidrag Pcorpse
Alias: ^dragall (\w+)

Code: Select all

local cmd = matches[2]
for k,v in ipairs(consent_tbl) do
    cmd = string.format("drag %s %s", v, cmd)
end
send(cmd)
Vooku (50 Barb Shammy)

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 15 guests