More scripting

May 23, 2015 08:23AM
Mudlet has a pretty decent wiki on LUA scripting, and you can also google LUA stuff or check StackOverflow. Language-specific stuff should not be hard to figure out.

Not sure if you're familiar with basic programming, but it's useful to be (if-else, for-loops, while-loops) , when scripting your client.

For example, to script shapa's sleep-spammer trigger:

1. set variables, "target" for your target's name, "sleep_spam_indicator" for a dummy to indicate if you should try spamming.

2. set trigger to trigger on "They aren't here". if sleep_spam_indicator = 1, cast sleep target.

3. set alias to "sleepspam" which will set sleep_spam_indicator = 1, and then cast sleep target.

4. set trigger for failing your spell, someone resisting your sleep, being successfully slept, and spellbaning your sleep. This should set sleep_spam_indicator = 0 and do nothing else.

The sequence of events:

You input "sleepspam". you start spamming. Each time you get "They aren't here" you re-input c sleep target. Once they do get the cast off, you turn off your spam indicator.

Another example, to script getting your familiar to spam where for every person in your who list.

1. set variable "whocollect" for a dummy to indicate when your "who" should be finding who is on the who pk list. Set it to 1 when you're ready to use it.

2. make a trigger that reads the lines in who pk, and records (using regex matching groups) each name. Upon triggering, set whocollect to 0 and record every name in the who pk list. (you have to declare the list and make your trigger input names into that list).

3. set alias for famwhere or fwhere or fw or a key binding (like F5). This should make a for-loop across all elements in your who pk list, and do fam where element1, fam where element2, etc.

Or deriveh's dash alias with follow-up lag attack on target. Keypad 8462 are nsew, and 7913 can be dash north followup target etc. Again, just make an alias for declaring a followup attack string and a another alias for declaring target string.

For darker pruposes you can make it trigger upon declaring a variable "triggerchase" or something. So you input, for exmaple, "tchase 1" into your client and your client notes that trigger chasing mode is on. Then when your target flees in a given direction, you automatically perform the chase and followup attack on the target. Obviously don't do this, it's unfair to people especially if you have a fast connection and they have a slow one.
Subject Author Posted

Basic Mudlet/Lua alias setup questions

Unnamed_ May 22, 2015 11:48AM

Re:Regular Expressions

starbright May 23, 2015 01:49AM

More scripting

starbright May 23, 2015 08:23AM

Re: More scripting

Unnamed_ May 24, 2015 07:07AM

Re: More scripting

starbright May 24, 2015 11:12AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 38
Record Number of Users: 59 October 25, 2015
Record Number of Guests: 143 August 28, 2015