Mudlet Scripts

68 posts / 0 new
Last post
Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0
Mudlet Scripts

Since I am using Mudlet and enjoy coding in it, I thought it'd be nice if there was a collection of scripts that people use in their own Mudlet system. I know there's an old thread with useful scripts, but I wanted one dedicated only to Mudlet. Easier to sort it out that way!

[size="4"]My scripts: [/size]
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=422441"]Improved Skills view (it's in this post..)
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=422504"]Minimap
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=422849"]Lua prompt command
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=422870"]Tabbed chat
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=426016"]Improved News view
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=426034"]Cooldown bars
[url="http://forums.imperian.com/index.php?showtopic=9716&view=findpost&p=426103"]Gauges (health, mana, endurance, willpower and experience bars)

So I'll start with a script I made while spending way to much time regaining my willpower after my many hunting trips. The script will improve your SKILLS view and show you the required lessons and credits for both the next rank and to Transcendent.

Remember that I have a word wrap set to 150 in my Mudlet settings and that this script will look best at a word wrap over 110.

(The numbers I used in the script are from http://maius.imperian.org/learning.php and I hope they're correct even if it seems like an old website.)

SIDENOTE: I couldn't attach the .xml file for whatever reason. If it's just that the filetype isn't added for uploaded, I'd love it to be added into that list. But for now I just shared it through other means:

UPDATED @ 6/7/2011: Fixed bug where the lessons displayed as learned on the current rank wasn't calculate correctly.

[url="http://www.mediafire.com/?3ihfg1woz244gdr"]DOWNLOAD SCRIPT

I am looking forward to see all the neat and useful scripts for Mudlet that you use! And if there's something in this small and simple script you think should be changed and can be improved, feel free to send me a PM!

EDIT: Almost forgot that I wanted to suggest a sub-board or new board that's dedicated to scripting only. I think it'd be quite useful and easier for newcomers.

Thanos of Dis (not verified)
Thanos of Dis's picture

also wanting to know how to change the colors on the gauges also is there a way to show XP even when your at a low percentage the XP: % thanks~!

Selthis's picture
Offline
Joined: 2012-07-16
Posts: 1473
Points: 0

Dazul wrote:

I am using the Mudlet mapper for pathing and speedwalking actually. Love having a reliable mapper that never gets lost - as long as the room is mapped in the in game system. I haven't looked into if it's at all possible having the mapper that small and minimal in a window/miniconsole, but you should be able to atleast detach it from its default position. I find the in game map just as good since the Mudlet mapper is based on that. Only thing you lack is the clickable rooms that makes you go to them - but that's so minimal that I haven't even bothered.

Semi related, is it possible to make it use a larger radius so I can put it under my tabbed chat and see more of the room around me? I've edited the tabbed chat to only take up about half the height, I'd like to use the rest of that to have as where the miniconsole displays. Sorry if I'm not being clear.

Edit; Another quesiton that I had just before bed but don't want to worry about making another post for. With your gauges (in particular health and mana) can I basically copy and paste one of the sections, change out the percentage and have it function properly?

And how the heck do I change the colors. I want them to follow the green/yellow/red progression that I'm used to from the prompt, but I am bad at this crap.

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

Feniks wrote:

I'm having trouble getting the gauges to work, I'm using mudlet version 1.1.1-final.

Try using the latest RC version found [url="http://forums.mudlet.org/viewtopic.php?f=5&t=1874"]here.

Selthis wrote:

Dazul, I was just curious if you'd used the mudlet mapper much as it is insanely fast. But I was also curious if there was way to get it to show up sort of like your map window does for the Imperian based mapper.

I am using the Mudlet mapper for pathing and speedwalking actually. Love having a reliable mapper that never gets lost - as long as the room is mapped in the in game system. I haven't looked into if it's at all possible having the mapper that small and minimal in a window/miniconsole, but you should be able to atleast detach it from its default position. I find the in game map just as good since the Mudlet mapper is based on that. Only thing you lack is the clickable rooms that makes you go to them - but that's so minimal that I haven't even bothered.

Feniks's picture
Offline
Joined: 2012-07-16
Posts: 1
Points: 0

I'm having trouble getting the gauges to work, I'm using mudlet version 1.1.1-final.

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

Rechar wrote:

better just using "get gold from pack", setting a specific amount will fail if you don't have that much, that way you purchase as many as possible at the set price.

You mean not everyone in the game has infinite gold? (Editing it to make that change)

hibou's picture
Offline
Joined: 2012-07-16
Posts: 69
Points: 0

Lionas wrote:

When you're copying text from the mud, it's generally a good idea to put it in code tags to preserve spaces.

Assuming you have a variable called "myprice", make a trigger of type regex with the pattern
^\s+(\d+) credits at (\d+) gold per credit.$
For the code, use
if matches[3] >= myprice then
send("get gold from pack")
// send("get "..matches[3]*matches[2].." gold from pack")
send("credits buy "..matches[2].." credits at "..matches[3])
send("put gold in pack")
end


Uhhh. Doesn't this buy the credits if they're GREATER than his price?

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

hibou wrote:

Uhhh. Doesn't this buy the credits if they're GREATER than his price?

I was hoping no one would catch that.
EDIT: Since hibou ruined my fun, I'm editing the operator to be correct

hibou's picture
Offline
Joined: 2012-07-16
Posts: 69
Points: 0

Lionas wrote:

I was hoping no one would catch that.
EDIT: Since hibou ruined my fun, I'm editing the operator to be correct

Laugh it up all you want, but they come to ME when scripts don't work :C

Kevadrin's picture
Offline
Joined: 2012-07-16
Posts: 46
Points: 0

I am curious if its possible for you to do a script for watching credit prices?

My goal is to be able to buy credits when they are lower in price.

Thank you for the help
Mudlet is confusing to me. I can't even figure out why my prompt script isn't working.

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

Kevadrin wrote:

I am curious if its possible for you to do a script for watching credit prices?

My goal is to be able to buy credits when they are lower in price.

Thank you for the help
Mudlet is confusing to me. I can't even figure out why my prompt script isn't working.


You're going to have to be more specific. What exactly do you want the script to do?

Kevadrin's picture
Offline
Joined: 2012-07-16
Posts: 46
Points: 0

Well have it read in the screen:
Credits currently available for purchase:
69 credits at 14993 gold per credit.
75 credits at 14994 gold per credit.
63 credits at 14999 gold per credit.
45 credits at 17998 gold per credit.
2 credits at 17999 gold per credit.
50 credits at 18000 gold per credit.
14 credits at 20000 gold per credit.
75 credits at 25000 gold per credit.
43 credits at 50000 gold per credit.
1 credits at 55000 gold per credit.
(1 offer with a higher price has not been shown.)
Total credits for sale: 437 shown (483 total) (Average sale price: 14061)
Use CREDITS BUY AT to purchase.

then pull the Number of credits and price in variables. If they are lower and/or meet my price, I purchase the credits. I am just not getting it enough to figure it out on my own.

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

When you're copying text from the mud, it's generally a good idea to put it in code tags to preserve spaces.

Kevadrin wrote:

then pull the Number of credits and price in variables. If they are lower and/or meet my price, I purchase the credits. I am just not getting it enough to figure it out on my own.


Assuming you have a variable called "myprice", make a trigger of type regex with the pattern
^\s+(\d+) credits at (\d+) gold per credit.$
For the code, use
if matches[3] <= myprice then
send("get gold from pack")
// send("get "..matches[3]*matches[2].." gold from pack")
send("credits buy "..matches[2].." credits at "..matches[3])
send("put gold in pack")
end

Ike
Ike's picture
Offline
Joined: 2012-07-16
Posts: 5
Points: 0

hibou wrote:

Bingo. IMTS, for whatever reason, intercepts MXP and ATCP but strips just about anything it doesn't understand.

The experience tag on the prompt line for IMTS isn't working either.

And I might add health, mana, endurance, and willpower all work on both the imts prompt and dazul's gauge. it is JUST the experience parts of both that aren't working.

hibou's picture
Offline
Joined: 2012-07-16
Posts: 69
Points: 0

Pellerin wrote:

Just a quick check/observation...if you are using IMTS it will not work...as it will strip GMCP I believe. Not sure if this is the problem but it is the quickest/easiest answer since GMCP is involved...

Bingo. IMTS, for whatever reason, intercepts MXP and ATCP but strips just about anything it doesn't understand.

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

You need to enable GMCP under Settings in Mudlet. Remember to restart Mudlet after doing that though.

Ike
Ike's picture
Offline
Joined: 2012-07-16
Posts: 5
Points: 0

Got another one for you. Just loaded up your new gauge script and so for with GMCP on it is a no go. Do I have to put in my own prompt line for the prompt trigger thing for it to work?

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

Sounds like you've defined a variable called "math" to a number. Math is a global table in Lua, if not changed. See if you've got a variable called "math" and consider changing the name of that variable.

Ike
Ike's picture
Offline
Joined: 2012-07-16
Posts: 5
Points: 0

Hey Dazul,
On your cooldown script it worked a few times for me and now there is an error in the math.round script. It says it is trying to index global 'math' (a number value)

Kialae's picture
Offline
Joined: 2012-07-16
Posts: 402
Points: 0

You guys make such cool scripts! I love them, and they inspire me to think of little ways I can make Imperian easier to use on the back-end (as in, game-side, not client-side).

Edit: I used to have a who parser for my old Sab. I'd see if there were 2 people in a room together so I know who's probably off having mudsex, so I could blackmail them later. Boy, did I ever regret doing that. Shudder.

Anyway, I have super-invis god powers now. Sleep tight!

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

Dazul,

Thanks for posting these, making it easier on an old man here! Downloading and using a bunch, outside of my question earlier about the tabbed chat, I am looking to implement the Health, Mana, Endurance, WillPower and XP Bars. Didn't see them separately, are they an application of your Cooldown Bars? Either way, I would love to use them! Keep it up, it is much appreciated.

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

Maybe a little nit-picky but anyway to make the tabbed chat scroll top to bottom...top being most recent? As opposed to bottom? Have patience I really didnt even look at it yet jut in case it is really easy...heh.

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

Lag when using my scripts or just in general? I haven't experience any difference at all myself. I'd guess it's on your end. (Or the server.. since that have been quite laggy the past few days)

Pretty much all of my GUI is posted here on the forum now. A bit spread out, but still around. Check out my signature and you'll see Wink

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

Dazul wrote:

Well, the scripts I've released here should do the work - both the minimap and the tabbed chat. If you have any problem setting them up or if it's displaying incorrect on a smaller screen, send me a PM and I'll help you solve it.

I'm considering releasing my whole GUI setup here... but we'll see Wink

Okay so I downloaded and imported your mini map console and the tabbed chat. I like them both, however, I am experiencing some serious and spotty lag on entry. Not sure if it's the server or me switching over. Anyone else experience this? Also, if you are taking votes I would like you to post your GUI...heh.

The Last Predator (not verified)
Thanos of Dis's picture

Hey Vadi, anyway to put your Mudlet Mapper in a spot similar to the MiniConsole Map thats on here?

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

name='The Last Predator' date='04 June 2011 - 11:23 PM' timestamp='1307247802' post='426033' wrote:

For the record, the who list parser is awesome, I would just like to know the easiest way to gag the old who completely and replace it with 'whog'

Find the trigger named "who lines" and add deleteLine() to it.
EDIT: That won't gag the top header or the bottom header, and won't gag people whose location you can't find (like those in a concealed grove). You can add triggers for those if you want, but keeping them visible is my preferred behavior.

EDIT 2: I've always been more a fan of a queued "OnBalance" list that fires (in priority order) when balance is regained. Similar for equilibrium. I've always had enough lag that timers break.

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

I've had cooldown timers for a long time now and they're quite useful. Good for timing "hit and runs" with hard hitting mobiles, for example.

Here's the code and the examples in it should be easy enough to make you figure out how it all works. Right from the start you'll get a cooldown bar for health and mana sipping plus a balance/eq cooldown bar based on CONFIG SHOWBALANCE ON.

If you have any questions on it, just PM me. Other than that, just download, import and enjoy!

[url="http://www.mediafire.com/?3c1dww6ci7cftdn"]DOWNLOAD SCRIPT

The Last Predator (not verified)
Thanos of Dis's picture

For the record, the who list parser is awesome, I would just like to know the easiest way to gag the old who completely and replace it with 'whog'

edit: If anyone could make a graphical tick timer that counts down from x amount of time using buttons or whatever mudlet should use. that would be awesome

p.s. everything else kicks @$$ too

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

Well, the scripts I've released here should do the work - both the minimap and the tabbed chat. If you have any problem setting them up or if it's displaying incorrect on a smaller screen, send me a PM and I'll help you solve it.

I'm considering releasing my whole GUI setup here... but we'll see Wink

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

I've had this little script for quite some time now and thought someone else might enjoy it as well. This particular script will change the look of NSTAT and make reading news slightly easier.

The blue links are clickable and will do what they say.

Download, import and enjoy!

[url="http://www.mediafire.com/?w2qxle4w852cbmp"]DOWNLOAD SCRIPT

(Note that I'm still using 150 wrap width in Mudlet.)

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

At the moment I am using Anatole's starter package which has tabbed chat and a mini map capture. Both of which I like, but they both have limitataions. Would like to still have tabbed chat, one that works and doesn't cut off stuff randomly, and would like to have a mini map the uses the mudlet ire mapper. Any suggestions on what to pick up and where? Keep in mind that I am using a laptop and would rather something that auto-configs to screen size. Thanks!

vadi (not verified)
Thanos of Dis's picture

Mudlet Mapper script for IRE - allows you to map and use Mudlet to walk around and etc: http://wiki.mudlet.org/w/IRE_mapping_script

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

Plant Growth Calendar (replaces the output from DATE)

Spoiler: Highlight to view
Substitutes
Quote:
Today is the 21st day of Letum, in the year 630 AD. In your world it is Monday,
the 7th of February, in the year 2011.

With
Quote:
It is the 21st day of Letum.
It is the winter of 630.

No plants grow this month.


Or a table if the month is one in which plants actually grow, similar to
It is the 21st day of Vita.
It is the spring of 630.

+-----------------------------+
| Plants grown this month: |
+-----------------------------+
| Plant | Environment |
+---------------+-------------+
| juniper | hills |
| weed | desert |
| ribwort | grasslands |
| laurel | forest |
| dandelion | grasslands |
| violet | swamp |
| primrose | forest |
| toadstool | underground |
+---------------+-------------+

[url="http://www.mediafire.com/?imb1tdrlczg6wib"]Download Link

NOTE 1: I haven't really tested it extensively since translating it from zscript, so if it completely breaks someone tell me and I'll fix it.
NOTE 2: Needs a quick fix to a couple of triggers. It'll work fine as is, but I didn't escape the periods.

Tattoo Alias

Spoiler: Highlight to view
Mocked together mostly as an example for similar scripts. Outrifts the appropriate inks and tattoos. It relies on a table being populated, which happens in a script. I encourage you to move the declaration into whatever script you do your initializations in.

Syntax: tattoo tattooname targetname location

[url="http://www.mediafire.com/?d8z7q1nxvu1fajm"]Download Link

Caravan Runner:

Spoiler: Highlight to view

The following uses the in game path finding. It relies on you having a trigger for balance to send a command, because PATH FIND takes balance. If you want to change it to the IMTS mapper it should be pretty straightforward to edit the path generation

Path generation:
[spoiler]
^Path: (.*)$
^((n|ne|nw|s|se|sw|e|w|u|d|in|out)(,)?( )?)+$

--strip the Path: off it (if present) so the lines are identical
local pathingstring = string.gsub(matches[1],"Path: ","")
for token in string.gmatch(pathingstring, "[^,%s]+") do
table.insert(caravanpath,token)
end
--debug print to show that the list is getting populated
--for i,v in ipairs(caravanpath) do echo (i.." "..v.."\n") end

if (not (string.byte(pathingstring,-1) == 44 or string.byte(pathingstring,-2) == 44)) then
onbalance = "lead caravan "..caravanpath[1]
disableTrigger(caravanpath_impy)
end

stepping:

Spoiler: Highlight to view

You lead a caravan \w+\.
table.delete(caravanpath,1)
if #caravanpath > 0 then
send("lead caravan "..caravanpath[1])
end

alias:

Spoiler: Highlight to view

^caravanto (\d+)$
enableTrigger(caravanpath_impy)
caravanpath = {}
send("path find "..matches[2])

If it gets stuck because you fought bandits or something alias

Spoiler: Highlight to view

^docaravan$
send("lead caravan "..caravanpath[1])

[/spoiler]

Concoctions:

Spoiler: Highlight to view

variable, stick it wherever your initialization variables go
[spoiler]concoctions = {
restoration = {gold = 2,endive = 2,lovage = 1, galingale = 1},
speed = {skin = 2,endive = 1,mandrake = 1,ginger = 1},
mass = {toadstool = 1,maidenhair = 1,endive = 1,dust = 1},
mending = {dust = 1,kelp = 1,endive = 1,ginger = 2},
levitation = {kelp = 2,pear = 1,feather = 1},
caloric = {endive = 1,lovage = 1,kelp = 2,galingale = 1},
frost = {kelp = 1,pear = 1,nightshade = 1},
venom = {venomsac = 1,violet = 1,kelp = 1,linseed = 1},
health = {lovage = 1,mandrake = 1,nightshade = 1,myrrh = 1},
mana = {dandelion = 1,galingale = 1,hyssop = 1,maidenhair = 1},
epidermal = {endive = 2,maidenhair = 1,juniper = 1,nightshade = 1},
immunity = {venomsac = 1,wormwood = 1,violet = 2}}

alias:
Spoiler: Highlight to view
^brew[ ]?(\w+)[ ]?(\d*)$
if concoctions[matches[2]] then
for k,v in pairs(concoctions[matches[2]]) do
if k == "gold" then
send("get "..(v*(matches[3]~="" and tonumber(matches[3]) or 1)*200).." gold from pack")
for i=1,((matches[3] and tonumber(matches[3]) or 1)*v) do send("inpot gold to pot") end
else
send("outr "..(v*(matches[3]~="" and tonumber(matches[3]) or 1)).." "..k)
send("inpot "..(v*(matches[3]~="" and tonumber(matches[3]) or 1)).." "..k.." to pot")
end
end
send("drop pot");send("boil pot for "..matches[2])
else
echo("\nInvalid selection, your options are ")
for k,_ in pairs(concoctions) do echo(k.." ") end
end

syntax: "brewTHING[ amount]" OR "brew THING[ amount]"
Example: I want to brew 5 health, so I "brew health 5" OR "brewhealth 5". If you leave out the amount, it defaults to 1.
[/spoiler]

Crit Counter.

Spoiler: Highlight to view
Contains triggers to count, and an alias for output.
Syntax: calccrits
Views your current crit rate
Syntax: clearcrits
Resets crit and hit numbers to 0 (resetting the counter)

[url="http://www.mediafire.com/?ccg7tpf7z9t116d"]Download Link

Who List/Group parser: Note: Be sure to download the version appropriate to you!

Spoiler: Highlight to view

NOTE: This only finds people without gems of cloaking and falls victim to chameleon tricks! It only parses the who list!
Syntax: whog
Spams your screen with the who list, parses it for groups, then outputs those groups (see picture below)
Syntax: find NAME
Usable after the list is populated in whog, this will show the group/room information for an individual
Syntax: alone
Usable after the list is populated in whog. Finds all individuals with no other people in their room. Useful for knowing who to gank. See note above!

[url="http://www.mediafire.com/?bxq76hf6lkdqu6y"]IF YOU HAVE IMAP USE THIS ONE
[url="http://www.mediafire.com/?jtrbmlx2tysdb31"]IF YOU DO NOT HAVE IMAP USE THIS ONE
The no-IMAP version will not have the room number or area!

Makasem (not verified)
Thanos of Dis's picture

Dazul wrote:

To get this thread started, I'd like anyone who wants utility scripts done to PM me and I'll have them made and post them here, unless you want it only for yourself. Very small fee of 5-10cr if you want it to be a private script.

If you have questions about Mudlet or if something isn't working in your script, you can send me a PM about that too. I'll answer as soon as possible, completely free of charge.

XD Competition Sweet!

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

To get this thread started, I'd like anyone who wants utility scripts done to PM me and I'll have them made and post them here, unless you want it only for yourself. Very small fee of 5-10cr if you want it to be a private script.

If you have questions about Mudlet or if something isn't working in your script, you can send me a PM about that too. I'll answer as soon as possible, completely free of charge.

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

The script that was in this post has been moved elsewhere.

(Check the post at the bottom of the page)

ivellios's picture
Offline
Joined: 2012-07-16
Posts: 981
Points: 0

Loving that mini-map.

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

As a note, if you're trying to export an entire session using Save Profile As, it seems to be completely broken in 1.1.0, creating empty profiles. You'll have to update to the 2.0 RC snapshot, which can be found at http://forums.mudlet.org/viewtopic.php?f=5&t=1874 (thanks to Dazul for the link)

The script that was in this posted merged into my post below.

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

I concur with Rustic. I also know there are a number of others out there using Mudlet. It would be awesome of you to share your knowledge to help "Newbies" like me get the most out of Mudlet. Innocuous, though user-friendly, things like Dazul's help people new to Mudlet, like me, parse the language and such. So, I encourage all to be generous and helpful here, and as I progress I will be posting.

Here's hoping this topic really takes off!

rustic (not verified)
Thanos of Dis's picture

I really haven't got anything to add to this topic, other than to give it the proper respect it deserves.

You're doing good things, and I would love to see more of this myself. I also concur that mudlet scripting deserves a sub forum.

I'm still pretty green to lua scripting, but will gladly offer my broken code as I piece-meal it together.

Thank you so much for your work!

Looks awesome!

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

This is my own little Tabbed Chat script for Mudlet. Very similiar to those existing, I'm sure. Colours and text are there to fit with the theme I'm having for my Mudlet GUI stuff.

You can click the tabs to go through different "logged" chat channels. Quite useful and you'll stop missing things!

This one won't delete the line from the actual main window. If you want to do that you can simply add "deleteLine()" in the append function. Remember that this is currently used on a 1920x1080 resolution, so the result and positioning of the tabs may vary. Good thing I made it easy to adjust the size then eh? An example trigger have been made for Ring tells, to show you how to append text into your specified chat window.

Enjoy!

UPDATED @ 6/7/2011: Cosmetic change plus more triggers from the start.

[url="http://www.mediafire.com/?u62bvals12rwese"]DOWNLOAD SCRIPT

Selthis's picture
Offline
Joined: 2012-07-16
Posts: 1473
Points: 0

Dazul, I was just curious if you'd used the mudlet mapper much as it is insanely fast. But I was also curious if there was way to get it to show up sort of like your map window does for the Imperian based mapper.

Rechar's picture
Offline
Joined: 2012-07-16
Posts: 1219
Points: 0

Lionas wrote:

When you're copying text from the mud, it's generally a good idea to put it in code tags to preserve spaces.

Assuming you have a variable called "myprice", make a trigger of type regex with the pattern
^\s+(\d+) credits at (\d+) gold per credit.$
For the code, use
if matches[3] >= myprice then
send("get "..matches[3]*matches[2].." gold from pack")
send("credits buy "..matches[2].." credits at "..matches[3])
end

better just using "get gold from pack", setting a specific amount will fail if you don't have that much, that way you purchase as many as possible at the set price.

leonderath's picture
Offline
Joined: 2012-07-16
Posts: 1081
Points: 0

Kaotac wrote:

Could we get these guys in a script format to download? Still new to Mudlet and not really sure how to make the bare code work.

I don't have mudlet installed anymore, but I'm sure dazul can package up the two that aren't for me.

Kaotac's picture
Offline
Joined: 2012-07-16
Posts: 80
Points: 0

Lionas wrote:

Plant Growth Calendar (replaces the output from DATE)
Spoiler: Highlight to view
Substitutes

With

Or a table if the month is one in which plants actually grow, similar to
It is the 21st day of Vita.
It is the spring of 630.

+-----------------------------+
| Plants grown this month: |
+-----------------------------+
| Plant | Environment |
+---------------+-------------+
| juniper | hills |
| weed | desert |
| ribwort | grasslands |
| laurel | forest |
| dandelion | grasslands |
| violet | swamp |
| primrose | forest |
| toadstool | underground |
+---------------+-------------+

[url="http://www.mediafire.com/?imb1tdrlczg6wib"]Download Link

NOTE 1: I haven't really tested it extensively since translating it from zscript, so if it completely breaks someone tell me and I'll fix it.
NOTE 2: Needs a quick fix to a couple of triggers. It'll work fine as is, but I didn't escape the periods.

Tattoo Alias

Spoiler: Highlight to view
Mocked together mostly as an example for similar scripts. Outrifts the appropriate inks and tattoos. It relies on a table being populated, which happens in a script. I encourage you to move the declaration into whatever script you do your initializations in.

Syntax: tattoo tattooname targetname location

[url="http://www.mediafire.com/?d8z7q1nxvu1fajm"]Download Link

Caravan Runner:

Spoiler: Highlight to view

The following uses the in game path finding. It relies on you having a trigger for balance to send a command, because PATH FIND takes balance. If you want to change it to the IMTS mapper it should be pretty straightforward to edit the path generation

Path generation:
[spoiler]
^Path: (.*)$
^((n|ne|nw|s|se|sw|e|w|u|d|in|out)(,)?( )?)+$

--strip the Path: off it (if present) so the lines are identical
local pathingstring = string.gsub(matches[1],"Path: ","")
for token in string.gmatch(pathingstring, "[^,%s]+") do
table.insert(caravanpath,token)
end
--debug print to show that the list is getting populated
--for i,v in ipairs(caravanpath) do echo (i.." "..v.."\n") end

if (not (string.byte(pathingstring,-1) == 44 or string.byte(pathingstring,-2) == 44)) then
onbalance = "lead caravan "..caravanpath[1]
disableTrigger(caravanpath_impy)
end

stepping:

Spoiler: Highlight to view

You lead a caravan \w+\.
table.delete(caravanpath,1)
if #caravanpath > 0 then
send("lead caravan "..caravanpath[1])
end

alias:

Spoiler: Highlight to view

^caravanto (\d+)$
enableTrigger(caravanpath_impy)
caravanpath = {}
send("path find "..matches[2])

If it gets stuck because you fought bandits or something alias

Spoiler: Highlight to view

^docaravan$
send("lead caravan "..caravanpath[1])

[/spoiler]

Concoctions:

Spoiler: Highlight to view

variable, stick it wherever your initialization variables go
[spoiler]concoctions = {
restoration = {gold = 2,endive = 2,lovage = 1, galingale = 1},
speed = {skin = 2,endive = 1,mandrake = 1,ginger = 1},
mass = {toadstool = 1,maidenhair = 1,endive = 1,dust = 1},
mending = {dust = 1,kelp = 1,endive = 1,ginger = 2},
levitation = {kelp = 2,pear = 1,feather = 1},
caloric = {endive = 1,lovage = 1,kelp = 2,galingale = 1},
frost = {kelp = 1,pear = 1,nightshade = 1},
venom = {venomsac = 1,violet = 1,kelp = 1,linseed = 1},
health = {lovage = 1,mandrake = 1,nightshade = 1,myrrh = 1},
mana = {dandelion = 1,galingale = 1,hyssop = 1,maidenhair = 1},
epidermal = {endive = 2,maidenhair = 1,juniper = 1,nightshade = 1},
immunity = {venomsac = 1,wormwood = 1,violet = 2}}

alias:
Spoiler: Highlight to view
^brew[ ]?(\w+)[ ]?(\d*)$
if concoctions[matches[2]] then
for k,v in pairs(concoctions[matches[2]]) do
if k == "gold" then
send("get "..(v*(matches[3]~="" and tonumber(matches[3]) or 1)*200).." gold from pack")
for i=1,((matches[3] and tonumber(matches[3]) or 1)*v) do send("inpot gold to pot") end
else
send("outr "..(v*(matches[3]~="" and tonumber(matches[3]) or 1)).." "..k)
send("inpot "..(v*(matches[3]~="" and tonumber(matches[3]) or 1)).." "..k.." to pot")
end
end
send("drop pot");send("boil pot for "..matches[2])
else
echo("\nInvalid selection, your options are ")
for k,_ in pairs(concoctions) do echo(k.." ") end
end

syntax: "brewTHING[ amount]" OR "brew THING[ amount]"
Example: I want to brew 5 health, so I "brew health 5" OR "brewhealth 5". If you leave out the amount, it defaults to 1.
[/spoiler]

Crit Counter.

Spoiler: Highlight to view
Contains triggers to count, and an alias for output.
Syntax: calccrits
Views your current crit rate
Syntax: clearcrits
Resets crit and hit numbers to 0 (resetting the counter)

[url="http://www.mediafire.com/?ccg7tpf7z9t116d"]Download Link

Who List/Group parser: Note: Be sure to download the version appropriate to you!

Spoiler: Highlight to view

NOTE: This only finds people without gems of cloaking and falls victim to chameleon tricks! It only parses the who list!
Syntax: whog
Spams your screen with the who list, parses it for groups, then outputs those groups (see picture below)
Syntax: find NAME
Usable after the list is populated in whog, this will show the group/room information for an individual
Syntax: alone
Usable after the list is populated in whog. Finds all individuals with no other people in their room. Useful for knowing who to gank. See note above!

[url="http://www.mediafire.com/?bxq76hf6lkdqu6y"]IF YOU HAVE IMAP USE THIS ONE
[url="http://www.mediafire.com/?jtrbmlx2tysdb31"]IF YOU DO NOT HAVE IMAP USE THIS ONE
The no-IMAP version will not have the room number or area!


Could we get these guys in a script format to download? Still new to Mudlet and not really sure how to make the bare code work.

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

Dazul wrote:

I've had no problem with them so far. There was a brief moment when GMCP wasn't updated correctly on Mudlet, which made the XP bar stand still. But as long as you have the RC5 release of Mudlet, it should work. If it doesn't work even if you have that RC5 release, contact me through PM and we'll get into more details Wink

Just a quick check/observation...if you are using IMTS it will not work...as it will strip GMCP I believe. Not sure if this is the problem but it is the quickest/easiest answer since GMCP is involved...

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

I've had no problem with them so far. There was a brief moment when GMCP wasn't updated correctly on Mudlet, which made the XP bar stand still. But as long as you have the RC5 release of Mudlet, it should work. If it doesn't work even if you have that RC5 release, contact me through PM and we'll get into more details Wink

Ike
Ike's picture
Offline
Joined: 2012-07-16
Posts: 5
Points: 0

Alright I reloaded and it worked for a second but now everything but the experience gauge is working.

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

And here they are! The neat gauges that will show you health, mana, endurance, willpower and experience. They require you to enable GMCP under Settings (remember to restart Mudlet after you enable it). I've also included comments about how to change the position of the gauges. On install, they will reach from left to right of the screen. But if you alter the values to what I wrote in the script comments, you will be able to position them better depending on if you're using my minimap and/or my tabbed chat script. You'll find the comment under Scripts->Gauges.

I'm using a font called Big Noodle Titling in this script, so here's [url="http://www.dafont.com/bignoodle-titling.font"]a link to download that. If you want to use another font, simply just alter the font variable in the script.

Just import the script and enjoy!

[url="http://www.mediafire.com/?s4nuari35iqc9tz"]DOWNLOAD SCRIPT

Pellerin's picture
Offline
Joined: 2012-07-16
Posts: 49
Points: 0

Dazul wrote:

Lag when using my scripts or just in general? I haven't experience any difference at all myself. I'd guess it's on your end. (Or the server.. since that have been quite laggy the past few days)

Pretty much all of my GUI is posted here on the forum now. A bit spread out, but still around. Check out my signature and you'll see Wink

Seems okay now, server I guess, was balking every time I sent a command for a bit. Thanks

Dazul's picture
Offline
Joined: 2012-07-16
Posts: 51
Points: 0

Doing a little bump here.

I've included a screenshot of the cooldown bars in the post above. I've also updated my first post to include links to all my scripts in this thread. And last but not least, I've updated the Improved Skills view and the Tabbed chat script slightly, so go ahead and download them again if you're using them.

Enjoy!