Zmud Scripts

A place where new players can get help and have their question's answered.
Post Reply
Guest

Zmud Scripts

Post by Guest »

Some simple Zmud scripts to get players started. All work on this mud (should work - I have converted them from the format I use in Zmud)

Basic targeting alias to set variable and key to use variable in an attack:

#CLASS {Targeting}
#ALIAS 1 {#VAR target1 %1} {#SHOW Target-1 set as @target1}
#KEY F1 Kill @target1
#CLASS 0

typing 1 Primal sets target 1 to primal
pressing key F1 makes kill Primal
if you prefer using alias kk for example replace #KEY line with #ALIAS kk kill @target1

Basic riding targets and aliases:

#CLASS {horses}
#ALIAS horse {#VAR horse %1} {#SHOW horse set as @horse}
#ALIAS rh ride @horse
#ALIAS dsm dismount
#ALIAS lh lead @horse
#ALIAS rhh ride 2.@horse
#ALIAS lhh lead 2.@horse
#CLASS 0

Simple door opening trigger:

#CLASS {doors}
#TRIGGER ^The %1 seems to be closed. {#VAR door2 %1} {open @door2}
#KEY f11 open @door2
#KEY f12 close @door2
#CLASS 0

Feel free to add more, or ask for more, I have some mining triggers and a few other bits and pieces but I think it's a, more fun to make them and b, not sure if I should encourage botting.
Primal
Posts: 183
Joined: Sun Jan 16, 2005 6:20 am

Post by Primal »

To continue - thought i logged in:

Simple but very effective butchering and scalping script:

#CLASS {butcher}
#ALIAS weapon1 #VAR weapon1 %1
#ALIAS weapon2 #VAR weapon2 %1
#ALIAS bt {remove @weapon1; wield @weapon2; butcher; butcher; butcher; remove @weapon2; wield @weapon1}
#ALIAS scalp {remove @weapon1; wield @weapon2; scalp corpse; remove @weapon2; wield @weapon1}
#ALIAS scalp2 {remove @weapon1; wield @weapon2; scalp 2.corpse; remove @weapon2; wield @weapon1}
#CLASS 0

- if you can butcher more or less change the number of butcher; int he {}
Primal
Posts: 183
Joined: Sun Jan 16, 2005 6:20 am

Post by Primal »

Some other usefull scripts:

Mining:

thanks Ereh - love that On/Off switch - (see Ereh's post after this one and mine after that was some great mining scripts)

On! - you type On and it says what room you are and who you were fighting last. Doesn't quite work if the last thing you were fighting was a mob, works v well when in pk. It was converted from Charbal's old wotmud script to this mud and to latest version of zmud, it works, but can be improved upon.

#CLASS {On!}
#ALIAS on {#if (%numparam > 0) {nar On %proper(%-1) @inroom} {nar On @enemy, at @inroom}}
#VAR inroom {} {}
#VAR enemy {} {}
#TRIGGER {%e[36m(%*)%e[0m} {#IF ("%1" =~ "^%w speaks from the {Light|Dark}") {#NOOP} {#VARIABLE inroom "%1"}} "" {color}
#TRIGGER {^HP:%w MV:%w - %1: %w>} {#VAR enemy %1} ""
#TRIGGER {^HP:%w MV:%w - %1: %w: %w>} {#VAR enemy %1} ""
#CLASS 0

Tic Timers:

This seems to work ok, although sometimes it changes length of tic, not a problem if you are thirsty or hungry two times in a row.

#CLASS {Ticktimer}
#ALIAS tic #TS
#TRIGGER {^The sun rises in the east.} {#TS}
#TRIGGER {^You are hungry.} {#TS}
#TRIGGER {^You are thirsty.} {#TS}
#TRIGGER {^The sun slowly disappears in the west.} {#TS}
#TRIGGER {^Shadows begin to linger as the sun slowly sinks into the horizon.} {#TS}
#TRIGGER {^The night has begun.} {#TS}
#CLASS 0

Alternate Tic timer - you might prefer (fully tested and works fine):
Advantages are that once you set length of manualy the triggers dont change that, just make adjustment to when tic is caused by lag or saving.

#CLASS {Ticktimer}
#ALIAS tic {#TS 60}
#TRIGGER {^The sun rises in the east.} {#TZ}
#TRIGGER {^You are thirsty.} {#TZ}
#TRIGGER {^The sun slowly disappears in the west.} {#TZ}
#TRIGGER {^You are hungry.} {#TZ}
#TRIGGER {^Shadows begin to linger as the sun slowly sinks into the horizon.} {#TZ}
#TRIGGER {^The night has begun.} {#TZ}
#CLASS 0

You can use a combination of the two tic timers, ie. for hungry and thirsty #ts, for eveything else #tz

done targets already but this is what i use pretty much:
#CLASS {targets}
#VAR target1 {} {}
#VAR targetx {} {}
#ALIAS 1 {#VAR target1 %1;#SHOW Target1 set to @target1}
#ALIAS xxx {#VAR targetx %1;#SHOW Targetx set to @targetx}
#KEY F1 {hide; backstab @target1}
#KEY F5 {kill @target1}
#KEY SUB {hide;backstab @targetx}
#KEY ADD [Kill @targetx}
#CLASS 0
Last edited by Primal on Tue Dec 12, 2006 9:02 pm, edited 13 times in total.
Guest

Post by Guest »

#CLASS {mining}
#var isMining {0}
#var weapon {YOURWEAPON}
#ALIAS startmining {#IF (@isMining=0) {isMining=1;#ECHO {--- Mining trigger is ON ---}} {isMining=0;#ECHO {--- Mining trigger is OFF ---}}}
#TRIGGER {You stop mining and back away when you see that the wall in front of you is moving!} {#IF (@isMining=1) {remove pick; wield @weapon}}
#TRIGGER {%w is dead! R.I.P.} {#IF (@isMining=1) {remove @weapon; wield pick}}
#TRIGGER {You hit a weak spot in the rock, and the wall starts to cave in on you!} {#IF (@isMining=1) {mine}}
#TRIGGER {You found some} {#IF (@isMining=1) {get all;mine}}
#TRIGGER {You didn't find anything.} {#IF (@isMining=1) {mine}}
#TRIGGER {You are thirsty.} {#IF (@isMining=1) {get flask pack; drink flask; drink flask; put flask pack}}
#TRIGGER {You are hungry.} {#IF (@isMining=1) {get meat pack; get meat pack; eat meat; eat meat}}
#CLASS 0

I made a few minor modifications to your script. Hope you don't mind.

I added an on/off alias as well as added a 'get all' action if you manage to find something.

I also included the variable for the weapon. Just change 'YOURWEAPON' to.. well.. your weapon.

On/off alias is 'startmining'
Primal
Posts: 183
Joined: Sun Jan 16, 2005 6:20 am

Post by Primal »

Ok, I love Ereh's script, but I made a few changes and got confused trying to apply his on off trigger so I made a different type of one, if Ereh could apply that to this one would be excellent. In the meantime this should work, I have tested it to an extent;
You need both classes for this to work, cut and past one at a time in;

#CLASS {controls}
#VAR weapon1 {sword} {}
#ALIAS weapon1 {#VAR weapon1 %1; #SHOW weapon1 set to @weapon1}
#ALIAS minestart {g pick pack; remove @weapon1; mine; #t+ mining; #SHOW mining script started}
#ALIAS minestop {#t- mining; remove pick; wield @weapon1; #SHOW mining script stopped}
#CLASS 0

#CLASS {mining}
#var weight1 {0} {}
#VAR ore {0} {}
#TRIGGER {^You found some %1 ore!} {#VAR ore %1; mine; stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight1 %4; get @ore; stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight1=4) {put ore pack; weight1=0} {put ore sack; weight1=0}} {skip|Param=2}
#TRIGGER {^You stop mining and back away when you see that the wall in front of you is moving!} {remove pick; wield @weapon1}
#TRIGGER {^A massive black beetle is dead! R.I.P.} {remove @weapon1; wield pick; mine; stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight1 %4; get ore corpse; stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight1=4) {put ore pack; weight1=0} {put ore sack; weight1=0}} {skip|Param=2}
#TRIGGER {^A baby scorpion is dead! R.I.P.} {kill baby}
#COND {^A baby scorpion is dead! R.I.P.} {remove @weapon1; wield pick; mine}
#TRIGGER {^You hit a weak spot in the rock, and the wall starts to cave in on you!} {mine}
#TRIGGER {^You found some impure coal!} {get coal; put coal pack; ;mine}
#TRIGGER {^You didn't find anything.} {mine}
#TRIGGER {^You found a small chunk of bright %w stone!} {get stone;put stone pack; mine}
#TRIGGER {^You try to swing the pick, but are too exhausted!} {rest}
#CONDITION {^HP:%w MV:Fresh >} {stand; mine}
#TRIGGER {^You are thirsty.} {get flask pack; drink flask; drink flask}
#TRIGGER {^It's empty.} {put flask sack; drink flask; drink flask}
#TRIGGER {^You are hungry.} {get meat pack; get meat pack; eat meat; eat meat}
#TRIGGER {^You are idle and are pulled into the void.} {Nar Where's Waldo?}
#CLASS 0

For this you carry both a sack and a pack - it weighs everything and puts the 4 pound ores and lumps of coal into pack and the 2pound ores into the sack. Then you wonder along later and sell the shit from the bag. you can change the bit - put ore sack- to - drop ore - if you prefer. it makes no odds to me. Or change to put or bag, however you prefer it.

Commands:

weapon1 axe or sword or whatever (changes weapon1 to axe or sword or whatever)
minestart (starts the mining and also the mining script)
minestop (stops the script - actual mining stops after a few seconds)
The best thing about the script, if I may be so modest, is the utterly excellent auto weighing and sorting of ores part - even if you dont like the rest of it you will love that part.

What it doesn't do:
flee off miner or auto fight him - this isn't a bot, watch your screen.
I suppose I could put a beep in or something if you are making a cup of tea
deal with pk - again i suppose i could put a beep.

Please feel free to give me advice on how to improve scripts (I have used that excellent on off alias of Ereh's to turn on and off my automapping script and I love it. Unfortunately my script for that is far from perfect so I'll not post it yet.


Also, please feel free to add to these, I love playing with other peoples scripts and as you can probably see I am still learning.

Edit: i made a small error with the drinking part of it - tried editing whilst tired it should work now.
Last edited by Primal on Tue Dec 12, 2006 9:41 pm, edited 1 time in total.
Guest

Post by Guest »

That's absolutely brilliant with the weights of ores. Just wanted to toss that out there.
Guest

Post by Guest »

Code: Select all

#CLASS {AntiIdle}
#VAR isIdle {0}
#ALIAS idleon {#IF (@isIdle=0) {isIdle=1;#ECHO {--- Idling trigger is ON ---}} {isIdle=1;#ECHO {--- Idling trigger is already ON ---}}}
#ALIAS idleoff {#IF (@isIdle=1) {isIdle=0;#ECHO {--- Idling trigger is OFF ---}} {isIdle=0;#ECHO {--- Idling trigger is already OFF ---}}}
#TRIG {You are idle and are pulled into the void.} {#IF (@isIdle=1) {say afk!}}
#CLASS 0
Please don't use the AntiIdle script for long periods of idling. It's just really handy for use with the Mining Script that Primal wrote. Sometimes it takes awhile to regen all those mvs.

Code: Select all

#CLASS {Mining Controls & Variables}
#VAR weapon {weapon} {}
#ALIAS setweapon {#VAR weapon %1; #SHOW Your weapon has been set to @weapon!}
#ALIAS startmining {g pick pack;remove @weapon;put @weapon pack;wield pick;mine;#T+ mining;#SHOW MINING SCRIPT STARTED}
#ALIAS stopmining {#T- mining;remove pick;get @weapon pack;wield @weapon;put pick pack;#SHOW MINING SCRIPT STOPPED}
#CLASS 0
#CLASS {mining}
#var weight1 {0} {}
#VAR ore {0} {}
#TRIGGER {^You found some %1 ore!} {#VAR ore %1; mine; stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight1 %4;get @ore;stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight1=4) {put ore pack;weight1=0} {put ore sack;weight1=0}} {skip|Param=2}
#TRIGGER {^You stop mining and back away when you see that the wall in front of you is moving!} {remove pick;get @weapon pack;wield @weapon}
#TRIGGER {^A massive black beetle is dead! R.I.P.} {remove @weapon;put @weapon pack;wield pick;mine;stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight1 %4;get ore corpse;stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight1=4) {put ore pack;weight1=0} {put ore sack;weight1=0}} {skip|Param=2}
#TRIGGER {^A baby scorpion is dead! R.I.P.} {kill baby}
#COND {^A baby scorpion is dead! R.I.P.} {remove @weapon;put @weapon pack;wield pick;mine}
#TRIGGER {^You hit a weak spot in the rock, and the wall starts to cave in on you!} {mine}
#TRIGGER {^You didn't find anything.} {mine}
#TRIGGER {^You found a carved stone idol!} {get idol;put idol pack;mine}
#TRIGGER {^You found a small chunk of bright %w stone!} {mine}
#TRIGGER {^You found some impure coal!} {mine}
#TRIGGER {^You try to swing the pick, but are too exhausted!} {rest}
#TRIGGER {^You are too exhausted to start swinging that heavy pick around!} {rest}
#COND {^HP:%w MV:Fresh >} {stand;mine}
#CLASS 0 
I don't think I made at changes to your script there Primal other than changing the weapon variables and adding another variable for the larger pickaxe. It's pretty much great as is. I really like how you figured out how to use #T+ and #T- to enable/disable a Class. Saves a lot of code. To sum up its use and requirements: You must 'setweapon' to your weapon's name. The script as is uses a pack and a sack to sort ores. You must also have a pick stored in your pack. During mining you'll automatically sort ores that will create a large bar into your pack and other ores that will create a small bar or possibly melt away during smelting into your sack. Rather than waste your time smelting, you can sell them for cash. All in all an amazing and useful script from Primal. Note: It does not include anything for Crazed Miner's, as this isn't a Botting Script. Be sure to pay attention to your MUD Window.

Code: Select all

#CLASS {TellHistory}
#ALIAS tellh {#IF ((%numparam > 0)&(%isnumber( %1))) {newhowmany = %1;#ECHO TellHistory set to the last @newhowmany tell~(s~).;howmany = @newhowmany} {#IF ((%numparam > 0)&(%1 == "clear")) {#VAR tellhistory "";#ECHO TellHistory cleared.} {#ECHO --- Last @howmany tell~(s~) received---;#LOOP %numitems( @tellhistory)-@howmany,%numitems( @tellhistory) {#ECHO %item( @tellhistory, %i)}}}}
#VAR howmany {10}
#VAR tellrec {}
#VAR newhowmany {}
#VAR curtime {}
#VAR enterthis {}
#VAR tellhistory {} {}
#TRIGGER {(%w) tells you, '(*)'$} {#IF (%numitems( @tellhistory) = 100) {#DELNITEM tellhistory 1} {#NOOP};#VARIABLE tellrec "%2";#VARIABLE tellrec %replace( @tellrec, ~(, ~{);#VARIABLE tellrec %replace( @tellrec, ~", ~');#VARIABLE tellrec %replace( @tellrec, ~), ~});#VARIABLE curtime %time( "h:nn:ss");#VARIABLE enterthis %expand( "~(@curtime)~: %1 told you: @tellrec");#VARIABLE tellhistory %additem( @enterthis, @tellhistory)}
#CLASS 0

#CLASS {NarrHistory}
#ALIAS narrh {#IF ((%numparam > 0)&(%isnumber( %1))) {newhowmany = %1;#ECHO narrHistory set to the last @newhowmany narr~(s~).;howmany = @newhowmany} {#IF ((%numparam > 0)&(%1 == "clear")) {#VAR narrhistory "";#ECHO narrHistory cleared.} {#ECHO --- Last @howmany narr~(s~) received---;#LOOP %numitems( @narrhistory)-@howmany,%numitems( @narrhistory) {#ECHO %item( @narrhistory, %i)}}}}
#VAR howmany {10}
#VAR narrrec {}
#VAR newhowmany {10}
#VAR curtime {}
#VAR enterthis {}
#VAR narrhistory {} {}
#TRIGGER {(%w) narrates, '(*)'$} {#IF (%numitems( @narrhistory) = 100) {#DELNITEM narrhistory 1} {#NOOP};#VARIABLE narrrec "%2";#VARIABLE narrrec %replace( @narrrec, ~(, ~{);#VARIABLE narrrec %replace( @narrrec, ~", ~');#VARIABLE narrrec %replace( @narrrec, ~), ~});#VARIABLE curtime %time( "h:nn:ss");#VARIABLE enterthis %expand( "~(@curtime)~: %1 narrated: @narrrec");#VARIABLE narrhistory %additem( @enterthis, @narrhistory)}
#CLASS 0

#CLASS {GrowlHistory}
#ALIAS growlh {#IF ((%numparam > 0)&(%isnumber( %1))) {newhowmany = %1;#ECHO GrowlHistory set to the last @newhowmany growl~(s~).;howmany = @newhowmany} {#IF ((%numparam > 0)&(%1 == "clear")) {#VAR growlhistory "";#ECHO GrowlHistory cleared.} {#ECHO --- Last @howmany growl~(s~) received---;#LOOP %numitems( @growlhistory)-@howmany,%numitems( @growlhistory) {#ECHO %item( @growlhistory, %i)}}}}
#VAR howmany {10}
#VAR growlrec {}
#VAR newhowmany {}
#VAR curtime {}
#VAR enterthis {}
#VAR growlhistory {} {}
#TRIGGER {(%w) growls '(*)'$} {#IF (%numitems( @growlhistory) = 100) {#DELNITEM growlhistory 1} {#NOOP};#VARIABLE growlrec "%2";#VARIABLE growlrec %replace( @growlrec, ~(, ~{);#VARIABLE growlrec %replace( @growlrec, ~", ~');#VARIABLE growlrec %replace( @growlrec, ~), ~});#VARIABLE curtime %time( "h:nn:ss");#VARIABLE enterthis %expand( "~(@curtime)~: %1 growled: @growlrec");#VARIABLE growlhistory %additem( @enterthis, @growlhistory)}
#CLASS 0

#CLASS {YellHistory}
#ALIAS yellh {#IF ((%numparam > 0)&(%isnumber( %1))) {newhowmany = %1;#ECHO YellHistory set to the last @newhowmany yell~(s~).;howmany = @newhowmany} {#IF ((%numparam > 0)&(%1 == "clear")) {#VAR yellhistory "";#ECHO YellHistory cleared.} {#ECHO --- Last @howmany yell~(s~) received---;#LOOP %numitems( @yellhistory)-@howmany,%numitems( @yellhistory) {#ECHO %item( @yellhistory, %i)}}}}
#VAR howmany {10}
#VAR yellrec {}
#VAR newhowmany {}
#VAR curtime {}
#VAR enterthis {}
#VAR yellhistory {} {}
#TRIGGER {(%w) yells, '(*)'$} {#IF (%numitems( @yellhistory) = 100) {#DELNITEM yellhistory 1} {#NOOP};#VARIABLE yellrec "%2";#VARIABLE yellrec %replace( @yellrec, ~(, ~{);#VARIABLE yellrec %replace( @yellrec, ~", ~');#VARIABLE yellrec %replace( @yellrec, ~), ~});#VARIABLE curtime %time( "h:nn:ss");#VARIABLE enterthis %expand( "~(@curtime)~: %1 bellowed: @chatrec");#VARIABLE yellhistory %additem( @enterthis, @yellhistory)}
#CLASS 0
Just a series of History Scripts. I tend to miss a lot of tells and narrates. Use tellh/yellh/growlh/narrh to review your previous tells, yells, growls, and narrates. Use tellh ## (ex: tellh 30) to change how many it stores. Same thing for each script.

Code: Select all

#CLASS {Targets & Doors}
#KEY F12 {#var target dark;#SHOW Target set to dark.} 
#KEY F11 {#var target human;#SHOW Target set to human.} 
#KEY F10 {#var target @tgt;#SHOW Target set to @tgt.} 
#ALI tgt {#var tgt %1;#var target @tgt;#SHOW Custom-target set to @tgt} 
#ALI kk {kill @target} 
#ALI kk2 {kill 2.@target}
#ALI tt {track @target} 
#ALI bb {bash @target}
#ALI bb2 {bash 2.@target}
#ALI ss {skewer @target}
#ALI ss2 {skewer 2.@target}
#ALI setdoor {#var door %1;#var door @door;#SHOW Door set to @door} 
#KEY F5 {open @door} 
#KEY F6 {close @door}
#CLASS 0 
Perfect for switching targets around and changing doors. Use 'tgt <player>' to select a specific target. Use 'setdoor <doorname>' to set the door you're going to spam. Let the door trapping begin! Obviously the way I have it written is geared towards my own personal setup. If you're a charger or stabber, feel free to add your own #ALIAS (Alias of Choice) {backstab @target} thing in there. Or even a #KEY (Key of Choice) {kill @target} to make spamming for your target that much faster.

Code: Select all

#CLASS {Food & Water Script} 
#TRIGGER {You are hungry.} {#T+ Meat} 
#TRIGGER {You are full.} {#T- Meat} 
#TRIGGER {You don't feel thirsty any more.} {#T- Blood} 
#TRIGGER {You are thirsty.} {#T+ Blood} 
#BUTTON 1 {Blood} { 
get flask pack
drink flask
drink flask
put flask pack
#T- Blood 
} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {Blood} 
#BUTTON 2 {Meat} { 
get meat pack
get meat pack
eat meat
eat meat
#T- Meat 
} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {Meat} 
#CLASS 0 
Pretty basic Food & Water Script for Trollocs. Instead of auto-drinking/-eating when it Triggers, it'll display a button for you to press. If you want, you can set yourself an alias for #BUTTON MEAT and #BUTTON BLOOD to do it without moving your mouse.

Almost all of these with the exception of Primal's Mining Script are taken from WoTMUD and modified for use on KinslayerMUD. Enjoy!

Edit: Just as a note, all of these scripts work with cMUD with the exception of Primal's Mining Script. It just doesn't like the weight sorting part. Which is a damn shame, because everything in cMUD is SO much faster!

And again, please don't use these scripts to turn your character into a Bot. Botting is not allowed. These scripts are designed to make your life easier to focus on more important things like PK and RP.

Edit Again: Turns out Primal's Mining Script DOES work in cMUD. I'm just an idiot and deleted a semi-colon on accident.

Edit #3: Fixed some more edits to Primal's script and changed up the comments.

Edited Edit of an Edited Edit: Did some more work with Primal's Mining Script. Adjusted the setweapon variable as well as changed it so you leave coal and brightly colored stones on the ground. Also added a Trigger for finding idols. Should I ever find an artifact, I'll add that also. And expect some changes to how ores are sorted.
Last edited by Guest on Thu Dec 14, 2006 8:49 pm, edited 2 times in total.
Guest

Post by Guest »

Code: Select all

#TRIGGER {^Offensive Bonus: (%d) Dodge Bonus: (%d), Parry Bonus: (%d)$} {#SUBSTITUTE {Offensive Bonus: %1 Dodge Bonus: %2, Parry Bonus: %3 Total Defense: %eval( %2+%3)~.}} 
This is a simple Trigger to take your DB and PB, add them together, and automatically add your Total Defense and display it when you type stat.

Code: Select all

#TRIGGER {By what name do you wish to be known?} {#var missbash 0;#var totalbash 0;#var landbash 0;#echo landbash set at @landbash;#echo totalbash set at @totalbash;#echo missbash set at @missbash;#var missskewer 0;#var totalskewer 0;#var landskewer 0;#echo landskewer set at @landskewer;#echo totalskewer set at @totalskewer;#echo missskewer set at @missskewer}
#Class {Skewer Counter}
#var missskewer {0}
#var landskewer {0}
#var totalskewer {0}
#var skewerpercentage {0}
#TRIGGER {You SKEWER %1, who doesn't get the opportunity to see its body get torn in half.} {#MATH landskewer @landskewer+1;#math totalskewer @landskewer+@missskewer;#math skewerpercentage (@landskewer*100 / @totalskewer);#Echo This session you've landed @landskewer out of @totalskewer skeweres (@skewerpercentage~% landed)}
#TRIGGER {You SKEWER %1 right through the middle!} {#MATH landskewer @landskewer+1;#math totalskewer @landskewer+@missskewer;#math skewerpercentage (@landskewer*100 / @totalskewer);#Echo This session you've landed @landskewer out of @totalskewer skeweres (@skewerpercentage~% landed)}
#TRIGGER {You try to skewer %1, and stumble as it steps aside.} {#math missskewer @missskewer+1;#math totalskewer @landskewer+@missskewer;#math skewerpercentage (@landskewer*100 / @totalskewer);#Echo This session you've missed @missskewer out of @totalskewer skeweres (@skewerpercentage~% landed)}
#class 0 
#Class {Bash Counter}
#var missbash {0}
#var landbash {0}
#var totalbash {0}
#var bashpercentage {0}
#TRIGGER {Your bash at %1 sprawling!} {#MATH landbash @landbash+1;#math totalbash @landbash+@missbash;#math bashpercentage (@landbash*100 / @totalbash);#Echo This session you've landed @landbash out of @totalbash bashes (@bashpercentage~% landed)}
#TRIGGER {As %1 your bash, you topple over and fall to the ground!} {#math missbash @missbash+1;#math totalbash @landbash+@missbash;#math bashpercentage (@landbash*100 / @totalbash);#Echo This session you've missed @missbash out of @totalbash bashes (@bashpercentage~% landed)}
#class 0
This is a Script created by Janers from WoTMUD and modified for use here at KinslayerMUD. Basically, whenever you log on the MUD for the first time, it'll reset your counters to 0. Then everytime you miss or land a bash or skewer it'll count it up and give you your certain landing percentage. Pretty handy for figuring out what weapons do better at their special attacks.

And if anyone wants me to set it up for Charge or Stab, get me ALL of the possible messages you'd get when you land or miss and I'll add it on.

Edit: Cleaned it up so that each type of special attack is in its own class folder. Just have to edit the trigger each time.
Last edited by Guest on Thu Dec 14, 2006 9:09 pm, edited 1 time in total.
Guest

Post by Guest »

Code: Select all

#class {Multiple Corpse Scalping Script}
#alias (scalp) {rem @weapon;get dagger pack;wield dagger;#var corpses %1;#var corpsecount 1;#echo Amount of corpses to scalp set to %1;rem dagger;wield @weapon;put all pack}
#var {corpses} {1}
#var {corpsecount} {1}
#tr {You lean over} {#IF @corpses<@corpsecount {}  {scal @corpsecount~.~corpse;#math corpsecount @corpsecount+1 };#IF @corpses=@corpsecount {scal @corpsecount~.~corpse;#math corpsecount @corpsecount+1 }  {} }
#tr {Amount of corpses to scalp set to} {#IF @corpsecount<@corpses {scal @corpsecount~.~corpse;#math corpsecount @corpsecount+1 }  {}
#IF %1=@corpsecount {scal @corpsecount~.~corpse;#math corpsecount @corpsecount+1}  {} }
#class 0

Code: Select all

#class {Multiple Corpse Butchering Script}
#alias (butcher) {rem @weapon;get dagger pack;wield dagger;#var corpses %1;#var corpsecount 1;#echo Amount of corpses to butcher set to %1;rem dagger;wield @weapon;put all pack}
#var {corpses} {1}
#var {corpsecount} {1}
#tr {You lean over} {#IF @corpses<@corpsecount {}  {butch @corpsecount~.~corpse;#math corpsecount @corpsecount+1 };#IF @corpses=@corpsecount {butch @corpsecount~.~corpse;#math corpsecount @corpsecount+1 }  {} }
#tr {Amount of corpses to butcher set to} {#IF @corpsecount<@corpses {butch @corpsecount~.~corpse;#math corpsecount @corpsecount+1 }  {}
#IF %1=@corpsecount {butch @corpsecount~.~corpse;#math corpsecount @corpsecount+1}  {} }
#class 0
Because typing all that crap up for scalping and butchering corpses just takes too long. These scripts work alongside Primal's Mining Script (uses the setweapon variable). You must have a dagger in your pack to make it work. Simply 'butcher 3' or 'scalp 2' for the number of corpses in your room. It'll take a slab of meat or a scalp from whatever number you have. SHAZAM!
Guest

Post by Guest »

Code: Select all

#CLASS {Mining Controls & Variables}
#VAR weapon {weapon} {}
#VAR pick {pick} {}
#VAR room {room} {}
#ALIAS sw {#VAR weapon %1;#SHOW Your weapon has been set to a @weapon!}
#ALIAS sp {#VAR pick %1;#SHOW Currently mining using a @pick!}
#ALIAS sr {#VAR room %1;#SHOW Currently mining in @room!}
#ALIAS startmining {get pick pack;remove @weapon;put @weapon pack;wield pick;mine;#T+ mining;#FILE 1 mininglog.txt}
#ALIAS readlog {#LOOP (%filesize( 1)-20),($filesize( 1)) {#SH %read( 1, 0)}}
#ALIAS stopmining {#T- mining;remove pick;get @weapon pack;wield @weapon;put pick pack}
#CLASS 0

#CLASS {mining}
#VAR weight {0} {}
#VAR ore {0} {}
#TRIGGER {^You found some %1 ore!} {#VAR ore %1;stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight %4;get @ore;stat;mine}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight=4) {put ore pack;weight=0;#WRITE 1 You found a 4lb @ore ore in the @room using @pick.} {put ore bag;weight=0;#WRITE 1 You found a 2lb @ore ore in the @room using @pick.}} {skip|Param=2}
#TRIGGER {^A crazed man crashes through the wall, pickaxe in hand!} {remove pick;get @weapon pack;wield @weapon;put pick pack;#WRITE 1 You were attacked by a crazed miner in @room using @pick.}
#TRIGGER {^An enormous sand scorpion crashes out of the wall!} {remove pick;get @weapon pack;wield @weapon;put pick pack;#WRITE 1 You were attacked by an enormous sand scorpion in the @room using @pick.}
#TRIGGER {^A massive black beetle digs its way out of the wall!} {remove pick;get @weapon pack;wield @weapon;put pick pack;#WRITE 1 You were attacked by a massive black beetle in the @room using @pick.}
#TRIGGER {^A massive black beetle is dead! R.I.P.} {remove @weapon;put @weapon pack;wield pick;stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight %4;get ore corpse;stat;mine}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight=4) {put ore pack;weight1=0} {put ore sack;weight1=0}} {skip|Param=2}
#TRIGGER {^A baby scorpion is dead! R.I.P.} {kill baby}
#COND {^A baby scorpion is dead! R.I.P.} {remove @weapon;put @weapon pack;get pick pack;wield pick;mine}
#TRIGGER {^You hit a weak spot in the rock, and the wall starts to cave in on you!} {mine;#WRITE 1 The wall caved in on you in the @room using @pick.}
#TRIGGER {^You didn't find anything.} {mine;#WRITE 1 You failed to find anything in the @room using @pick.}
#TRIGGER {^You found a carved stone idol!} {get idol;put idol pack;mine;#WRITE 1 You found a carved stone idol in the @room using @pick.}
#TRIGGER {^You found an ancient cuendillar artifact!} {get artifact;put artifact pack;mine;#WRITE 1 You found an ancient cuendillar artifact in the @room using @pick.}
#TRIGGER {^You found a small chunk of bright %1 stone!} {mine;#WRITE 1 You found a small chunk of bright %1 stone in the @room using @pick.}
#TRIGGER {^You found some impure coal!} {mine;#WRITE 1 You found some impure coal in the @room using @pick.}
#TRIGGER {^You try to swing the pick, but are too exhausted!} {rest}
#COND {^HP:%w MV:Fresh >} {stand;mine}
#TRIGGER {^You are too exhausted to start swinging that heavy pick around!} {rest}
#COND {^HP:%w MV:Fresh >} {stand;mine}
#CLASS 0
So I altered Primal's Mining Script even more. I added triggers for idols and artifacts, as well as changed it so you auto-prepare for fighting when a mob comes out of the wall. Plus I changed where it restarts mining from finding an ore (there were issues about the auto-rest, wait for Fresh, auto-stand and mine not working for me).

The main thing I added as the Mining Log so you can see what types of ores/items/mobs you find more often in certain rooms using certain picks.

The only downside is I can't figure out how to use the alias to change the variable into something using multiple words. So you have to change the variable manually in the Settings Menu on your client.

The rest just does it on its own. Example is:

readlog

HP:Healthy MV:Strong >
You failed to find anything in the south east room using a smooth-hafted miner's pick
You found some aluminum ore in the south east room using a smooth-hafted miner's pick
You failed to find anything in the south east room using a smooth-hafted miner's pick
You found some copper ore in the south east room using a smooth-hafted miner's pick
You found some impure coal in the south east room using a smooth-hafted miner's pick
You found some iron ore in the south east room using a smooth-hafted miner's pick

I am the KING of all mining!

EDIT: By request, I changed it to log what size ore you found. Also, since bags are more common on both LS and DS, I changed the sack to a bag. Be sure to remember that. Hopefully I can work on default settings for the different variables as well as multi-text variables without manually editing.
Guest

Post by Guest »

I can't get this part to work:


#ALIAS readlog {#LOOP (%filesize( 1)-20),($filesize( 1)) {#SH %read( 1, 0)}}

something about the filesize bit not sure
Guest

Post by Guest »

love it, i can read using #read mininglog.txt

BUT - can i get it to make an actual log which i can read at my leasure rather than like this:

HP:Healthy MV:Draining >
You found some impure coal in the room using pick.
You found some impure coal in the room using pick.
The wall caved in on you in the room using pick.
The wall caved in on you in the room using pick.
You found some gold ore in the room using pick.
You found some gold ore in the room using pick.
You found small gold ore in the room using pick.
You found some impure coal in the room using pick.
You found some impure coal in the room using pick.
You found a small chunk of bright red stone in the room using pick.
You found a small chunk of bright red stone in the room using pick.
You found some tin ore in the room using pick.
You found large tin ore in the room using pick.
You found some impure coal in the room using pick.
You failed to find anything in the room using pick.
You found some impure coal in the room using pick.
You failed to find anything in the room using pick.
You failed to find anything in the room using pick.
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

HP:Healthy MV:Draining >
What?!?

I love it htough
Guest

Post by Guest »

made small change to the beetle part:

#TRIGGER {^A massive black beetle digs its way out of the wall!} {remove pick;get @weapon pack;wield @weapon;put pick pack}
#TRIGGER {^A massive black beetle is dead! R.I.P.} {remove @weapon1;wield pick;stat}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#VAR weight1 %4;get ore corpse;stat;mine}
#COND {^You get a chunk of %1 ore from the corpse of a massive black beetle.} {#VAR ore %1}
#COND {^Your height is %1 feet, %2 inches, weight %3 pounds, weight carried %4 lbs, worn: %5 lbs.} {#IF (%4-@weight1=4) {put ore pack;weight1=0;#WRITE 1 You killed beetle in the @room using @pick and it loaded large @ore.;remove @weapon;wield pick} {put ore sack;weight1=0;#WRITE 1 You killed beetle in the @room using @pick and it loaded large @ore.;remove @weapon;wield pick}} {skip|Param=2}
Primal
Posts: 183
Joined: Sun Jan 16, 2005 6:20 am

Post by Primal »

heres a small timesaver also:
#TRIGGER {A hulking trolloc ore merchant puts a chunk of %w ore in an old miner's backpack.} {get ore bag;give ore merchant}
Tweak
Posts: 1
Joined: Tue Apr 14, 2009 4:51 pm

Re: Zmud Scripts

Post by Tweak »

I was wondering if there was a follow script for the map here, and maybe also other map scripts such as flee script and a find script, if not I think for all you scripters this would bring lots of new players because it would make it so much easier to learn, Thanks
Post Reply