Free mush system

by Nezha

Back to Mechanic's Corner.

Nezha2008-06-19 01:28:47
Just because im feeling good today tongue.gif

QUOTE
I do know lua though. That bleed/clot code did confuse me at times. I'll have a crack at it.

So if it is under 20 don't bother, is that right?
The algo of the code I inserted sometime ago -- This should solve your clotting problem

CODE
function PhysicalTrigger (thename, theoutput, wildcards, line)
  
    ..stuf..

    if names == "Bleeding" then
        if (tonumber(wildcards) <= 20) then
            return
        end

        ..more stuff here,. i.e. add chervil eating affliction ..
    else    
        physical_table = 1  
    end
end



And also -- you can gag the clotting, bleeding in MUSH.. you can do it in
1. via code or
2. manually by going to MUSH triggers option (shift+ctrl+8), going to the trigger you want gagged, and checking "Omit from output".. presto, no more spam..


QUOTE
Well, I decided to just try MUSHClient. Kind of like it now that I'm using it. If anyone knows how to make the prompt not be darker when it's not on the first line that would be great though


I dunno what this means, but if its about color you can configure the color settings in MUSH too (alt+8)
Gartinua2008-06-19 04:06:01
QUOTE(Jello @ Jun 19 2008, 08:05 AM) 522899
Has anyone tried porting this into LMTS? I am decent in LUA when it comes to MUD system creation, and have a decent LUA achaea system, but this looks like it could save me a lot of time.

It's what I use it on.

You will need to emulate the trigger add/del/etc code for it to work. The only other thing I just had to change was the functions. The original code has functions as strings whereas I had to use pointers (or whatever the hell they're called).

So instead of
inserter = "PurgativeTrigger",
and the client somehow calling the function called PurgativeTrigger, I had to change it to
inserter = PurgativeTrigger,

It also meant it seemed to be happier if I stuck the tables down the bottom of the script, I assume so the function names are defined.

I'm not sure how you do something like:
CODE
function blah()
print "Hello, World!"
end

call_function_by_name("blah")

Nezha2008-07-22 04:11:26
** UPDATED 07/22/2008 **

by popular demand two fixes are added:

1. last announce of healing broke the system making it apply until you lose healing potion
2. added some nekotai lines...

please download latest file found at first page

btw: people do know there is a paid version of this system right? *cough*

-- And writing this just for reference ---
nezhmet.txt ( 239.61k ) Number of downloads: 265
README.txt ( 8.1k ) Number of downloads: 194
nezhmet_DOWNLOADTHISPLEASE.zip ( 42.38k ) Number of downloads: 43
Unknown2008-07-22 11:36:16
Sex : Male Birthday : 24th Estar 196 |
| Race : Human Age : 16 |
| Mentor : Nobody Mentorship: Not able to mentor |
|------------------------------------------------------------------ VITALS|
| Health : 504/504 Endurance : 800/800 Power : 0p |
| Mana : 342/384 Willpower : 800/800 Reserves : 0% |
| Ego : 342/384 Mindset : Pedantic Esteem : 0% |
|------------------------------------------------------------------- KARMA|
| Karma : 0% |
|---------------------------------------------------------------- RANKINGS|
| Experience : n/a Bold Level : 2 (92.36%) |
| Explorer : #0 a Vagrant i type this in for max health but it keeps spamming me with eat kafe.


here is the only thing i changed in the system

max_health = 504
max_mana = 384
max_ego = 384

-- critical levels
crit_health = 50
crit_mana = 35
crit_ego = 45


t_health = 200
t_mana = 100
t_ego = 90
Nezha2008-07-22 11:39:29
QUOTE
type this in for max health but it keeps spamming me with eat kafe.


then you obviously need to get kafe
Esano2008-07-22 11:39:56
Kafe has nothing to do with your health levels - it's a default in the system, whereby it checks if you have the kafe defence up (presumably by prompt) and tries to put it up if you don't. Not sure if you can turn it off.
Gartinua2008-07-23 22:38:28
You cannot turn it off (unless you change the code)
No k in the prompt means its time to eat kafe.
Unknown2008-07-31 03:18:54
I have a question:
I didn't really like the highlighting of certain things so I deleted the color thing in the triggers, but they are still be highlighted?
Raikas2008-08-18 02:08:02
Okay, I know Nezha's not promised any updates or scripting help. That's totally fine; he's already made a free script. wub.gif Maybe someone else can help me out, though, if he won't.

I've usually got the PsyMet bonedensity skill up, which often keeps bones from being broken. Problem is, you get the initial "your arm is getting broken!!" affliction line, and then immediately following you get a "just kidding, your bones vibrate and your arm isn't really broken" unaffliction line. Right now, Nezha's system isn't built to catch that unaffliction, so I apply mending without needing to.

Would it be better to make a static trigger something like "the hardened bones of your (left|right) (arm|leg) begin to vibrate" and then have it run the UnSalveTrigger function, or to have the affliction line create this as a Temporary Trigger instead? (Incidentally, does bonedensity keep nose/chest from breaking too, or only limbs??)

Some scripting guru help me out here; what would be the most effective method?
Nezha2008-08-18 02:55:04
Some ideas:

1. fastest way would be to insert "just kidding, your bones vibrate and your arm isn't really broken" in the deaffliction line.. youll might still apply mending but it will not do the retry and youll apply only once..

2. Or trigger the line where activate bonedensity, then in SAlveTrigger check if bonedensity is active, and if it is.. ignore the broken affliction

Shaddus2008-08-18 02:57:21
QUOTE(nezha @ Aug 17 2008, 09:55 PM) 547498
Some ideas:

1. fastest way would be to insert "just kidding, your bones vibrate and your arm isn't really broken" in the deaffliction line.. youll might still apply mending but it will not do the retry and youll apply only once..

2. Or trigger the line where activate bonedensity, then in SAlveTrigger check if bonedensity is active, and if it is.. ignore the broken affliction

Thing with that is, it stll breaks from time to time, just not as often. It would need to somehow diag, or check to see ifthe limb is broken.
Esano2008-08-18 06:55:35
Double post, the one below is complete (this one wasn't).
Esano2008-08-18 06:58:16
Rename .lua to .txt (or just open it in notepad or a lua editor anyway). Or you can do this through the mushclient editor. Search for CrippledArm. It should look like this:
CODE
CrippledArm   = {
       afflictionline = {
                                
                        },
       deaffliction   = {"The bones in your (left|right) arm mend", },
       cure           = {"apply mending to arms",},
       inserter       = "SalveTrigger",  
       remover        = "UnSalveTrigger",
       group          = "all",
    },


Add in, after "The bones in your (left|right) arm mend", another line (still inside brackets). If your above message is correct, it should then look like

CODE
deaffliction   = {"The bones in your (left|right) arm mend",
                "The hardened bones of your (left|right) arm begin to vibrate", },

Note the comma after the string.

Then just scroll down, add it into the CrippledLeg one as well (changing the message as necessary), save it, open up Mushclient (or recompile). You might need to run the daemon function again, too.
Unknown2008-08-18 11:08:38
Things like this are part of the reason I created my "queue" system for storing afflictions temporarily before actually adding them on the prompt. You store afflictions in the queue rather than setting them as real afflictions right away. Before the next prompt, you still have a chance to alter the queue for things like BoneDensity or illusions or whatever.
Raikas2008-08-18 16:55:47
Thanks for the help, all! For whatever reason, I'd not considered having multiple deaffliction lines.

Zarquan, what do you mean by a "queue" system for your afflictions? I'm not sure I understand how storing them temporarily and then adding them at prompt, after things like bonedensity or illusions would have sounded, is more effective than having a bonedensity line unset the affliction. What's better about your method?
Unknown2008-08-18 18:59:05
If you have a broken arm already, then you get another broken arm (or the same one, which makes more sense) but bonedensity stops it, you don't want to remove the real broken arm aff that you haven't yet healed. Putting the affs into the temporary queue prevents you from removing anything you wanted to keep while still giving you opportunity to catch and remove the current one before the prompt curing fires.

1. I have a broken right arm, not healed because I don't have salve balance or whatever other reason.
2. Someone hits me and breaks my right arm. I add 'broken right arm' to my queue.
3. Bonedensity message tells me that I ignore the affliction, so I remove it from the queue.
4. On the prompt, I take anything from the queue and execute it (or turn it into a real affliction) before checking what to heal.

Replace step 3 with other things that happen after the fact, such as the 'perceive it as an illusion' sort of line.

If you don't use this sort of method, you get into the situation that Thorgal's original system used to, where you're removing afflictions you should be curing, primarily aeon or things that happen while aeoned.
Unknown2008-11-17 04:56:14
For the record, this system does not work for monks due to the momentum system.
Casilu2008-11-17 05:33:06
QUOTE(Kyriel @ Nov 16 2008, 08:56 PM) 583086
For the record, this system does not work for monks due to the momentum system.


Yeah, free version wasn't updated, but the paid version was within 24 hours.
Unknown2008-11-17 14:52:14
QUOTE(Kyriel @ Nov 16 2008, 11:56 PM) 583086
For the record, this system does not work for monks due to the momentum system.


Unless you alter it to do so. tongue.gif
Unknown2008-11-17 19:44:56
If only I knew regular expressions.