Skip to content

Alesei's Mudlet packages

edited October 2015 in Scripting
So, I'm going to start posting in this thread various bits of code for mudlet that people just getting into system building might find useful.  If you start using any of this, please provide feedback so I can improve things.

Also, I'm taking requests

The first thing I'm going to post is a very simple targeting system.  It's extremely simple, but it's the first building block of creating a system.

This package consists of two aliases.
"tar [name]" sets name as a target
"tar" alone sets the target to nothing.

It also includes a very simple bashing alias, "bsh" that bashes your target, mostly to demonstrate how to use the target variable.

It also includes a function for checking if a parameter you pass to it is actually the active target.  It just adds a few safety checks to the comparison.

Finally, it includes a framework for prompt replacement trigger.  This one replicates the existing prompt, but adds the target to your prompt if you've set it, so it looks like this

H:429/500 M:431/418 <eb bd t: alesei>

The file is just a mudlet package file, you can add it by downloading it, clicking "Package Manager" at the top menu, clicking "install", and navigating to the downloaded file.


Comments

  • Next is a basic shield handling module.  It has triggers to tracking shield, rebounding, prismatic and curseward going up and down. 

    When it sees any of these going up or down, it will check if the person affected is your target.  If so, it will display an easy to see message, change the status of the tracking variable and raise an event.

    Whenever you change your target, it will reset the state of all the tracking variables.  This uses the setNewTargetEvent that was defined in the targeting module above.

    It also comes with two simple event handlers that will clear your queues when a rebounding or a shield goes up on your target.

    Finally, it comes with a function check_raze which you can use in your code.  It takes any string, which would be your attack.  It will check whether the target has either rebounding or shield.  If it doesn't, it will simply send your string, otherwise it will send a command to raze the defenses.  You need to set up the razing command appropriate to your class in the function shield_raze_on_startup.

    If you have any more questions on how to use this, please let me know

  • For those who want to examine the code or contribute, this project is now in github:

Sign In or Register to comment.