Project ideas for Zmud

by Unknown

Back to Mechanic's Corner.

Unknown2004-11-06 22:08:02
I find that a major part of my enjoyment out of ire games comes from writing scripts for the game itself...

but recently i've been kinda running into a writers block kinda thing where it would appear as if theres no longer anything in the game that i would want to write scripts for...

Anyone have any ideas on what i could do for fun?

Im basically up for anything other than autocuring basically.

here are a few things ive done like in the past few weeks just to give you an idea:

getting the automapper to track sprints
implementing a todo list, which does things like pick up corpses and gold
a defup script that puts all of my defenses up from a list


but uh.. yeah if anyone has any neat ideas for a script let me know.
Unknown2004-11-07 15:25:55
Tracking where you land when by virtue of waves/earthquakes/etc you are moved (land in an unknown room, you move a few, and there's only one possible place on the map you could have landed)
Unknown2004-11-07 20:22:26
How about a script to track how much stuff you have between both the rift and your pocketbelts? (I've got such a script going, but not quite finished with it yet.)
Unknown2004-11-07 22:14:02
the thing with being moved.. and tracking that movement is a simple matter if:

the room name is unique
you have the area mapped out and fully configured using your automapper

however, i find that this just isnt the case in a lot of places...
in the ocean for example.. if you're tossed in a random direction and end up in a room with the same name, and often times the same number of exits.. then you're screwed cause theres no longer anything that you can match in the room thats unique.
Unknown2004-11-07 22:19:46
In regards to the post about pocket belts and rift tracking..

for someone like you zarquan.. the rift is a joke to script.. however tedious it might be.

the pocket belt at first look poses a more difficult problem..

-probe pocketbelt-

It has 593 months of usefulness left.
It weighs about 1 pounds and 0 ounce(s).
It bears the distinctive mark of Trader Bob.
A pocketbelt is holding:
15 marjoram
20 chervil
-prompt-

all you would have to do is make class X
put the triggers to capture the variables and herb names in the class.. something like:

#trigger {(%d) (%w)} {#var %2 = %1}

which should take the name of the herb as a variable and put the number of that particular herb in it.

to be safe.. you should just make it so that this class is enabled when you begin the sequence.. and disabled as soon as it sees a prompt.

it gets more complicated when you have multiple pocketbelts to keep track of... but you get the idea.
Unknown2004-11-08 02:53:45
Actually, pocketbelts have a nifty "rift-like" command, BELTLIST, that shows you a nice compiled list of all belts. The challenge then is to get the belts and the rift added up into a single count that you can display in your own table. (If you carry around 4k of something and you split it between rift and pocketbelts, for example.)
mel2004-12-03 11:39:29
Ok .. ive already gotten something like this tracking cooking commodities in the rift
using a collection of triggers looking something like this:
#trigger {You remove (%d) eggs, bringing the total in the Rift to (%d).} {eggs=%2}
Now.. there is another way i could have done this by adding or subtracting %1 from the @eggs variable.. but i found this to be simpler

I have 2 triggers for each commodity I store in the rift one for putting it in and one for taking it out.. i could probably refine it a bit and reduce that to 1 but i have been too lazy to do it tongue.gif

now as for pocketbelts, i havent used them personally but I assume they have a similar message when you take things in and out of them and could be triggered in a imilar way using different variable names belteggs? maybe ..

anyway then to get the total you would just add the 2 variables together

This might not be the neatest way to do it .. but it works wacko.gif
Unknown2004-12-03 22:47:42
Here's the version of my "Gear Script" that I finally ended up using. Comes in handy for all sorts of stuff, but mostly for harvesting and selling herbs.

CODE
#CLASS {Gear}
#VAR BeltCount {}
#VAR RiftCount {}
#FUNC Belt {%if(%iskey(@BeltCount, %1), %db(@BeltCount, %1), 0)}
#FUNC Rift {%if(%iskey(@RiftCount, %1), %db(@RiftCount, %1), 0)}
#FUNC Inv {%eval(@Belt(%1) + @Rift(%1))}
#TRIGGER {You store %d (%w), bringing the total to (%d)} {#addkey RiftCount %1 %2}
#TRIGGER {You remove %d (%w), bringing the total in the Rift to (%d).} {#addkey RiftCount %1 %2}
#TRIGGER {You put (%d) (%w) in your pocketbelt.} {#addkey BeltCount %2 %eval(%1 + %db(@BeltCount, %2))}
#TRIGGER {You get (%d) (%w) from your pocketbelt.} {#addkey BeltCount %2 %eval(%db(@BeltCount, %2) - %1)}
#TRIGGER {You check the contents of your %d pocketbelts:} {#var BeltCount "";#t+ Gear|Pocketbelts}
#TRIGGER {Glancing into the Rift, you see:} {#var RiftCount "";#t+ Gear|Rift}
#CLASS 0

#CLASS {Gear|Pocketbelts} {disable}
#TRIGGER {^%s(%d)%s(%w)$} {#addkey BeltCount %2 %1}
#TRIGGER {^%s(%d)%s(%w)%s(%d)%s(%w)$} {#addkey BeltCount %2 %1;#addkey BeltCount %4 %3}
#TRIGGER {^%s(%d)%s(%w)%s(%d)%s(%w)%s(%d)%s(%w)$} {#addkey BeltCount %2 %1;#addkey BeltCount %4 %3;#addkey BeltCount %6 %5}
#TRIGGER {^%dh, %dm} {#t- Gear|Pocketbelts} "" {nocr|prompt}
#CLASS 0

#CLASS {Gear|Rift} {disable}
#TRIGGER {^  ~ (%w)$} {#addkey RiftCount %2 %1}
#TRIGGER {^  ~ (%w)%s~ (%w)%s~ (%w)$} {#addkey RiftCount %2 %1;#addkey RiftCount %4 %3;#addkey RiftCount %6 %5}
#TRIGGER {^  ~ (%w)%s~ (%w)$} {#addkey RiftCount %2 %1;#addkey RiftCount %4 %3}
#TRIGGER {^%dh, %dm} {#t- Gear|Rift} "" {nocr|prompt}
#CLASS 0
Unknown2004-12-03 22:50:55
Another extremely useful script I wrote (though I'm not sure if it'll work for everyone yet or just me), tracks my lessons in my skills and how far I have to go for my next skill level in everything. There's some rounding error that I haven't fixed yet, so it's sometimes off by one lesson. Oh well, here it is:

CODE
#CLASS {Skills}
#VAR MySkillPercents {}
#VAR MySkillLevels {}
#FUNC SkillLevel {%db(@MySkillLevels, %1)}
#FUNC SkillLevelRemaining {%eval(%db(@SkillLessons, @SkillLevel(%1)) - (%db(@SkillLessons, @SkillLevel(%1)) * @SkillPercent(%1) / 100))}
#FUNC SkillPercent {%db(@MySkillPercents, %1)}
#FUNC SkillTotalRemaining {%eval(%db(@SkillTotalLessons, @SkillLevel(%1)) - (%db(@SkillLessons, %db(@MySkillLevels, %key)) - @SkillLevelRemaining(%1)))}
#VAR SkillTotalLessons {}
#VAR SkillLessons {}
#ADDKEY SkillLessons Inept       7
#ADDKEY SkillLessons Novice      9
#ADDKEY SkillLessons Apprentice  18
#ADDKEY SkillLessons Capable     55
#ADDKEY SkillLessons Adept       89
#ADDKEY SkillLessons Master      111
#ADDKEY SkillLessons Gifted      134
#ADDKEY SkillLessons Expert      177
#ADDKEY SkillLessons Virtuoso    312
#ADDKEY SkillLessons Fabled      380
#ADDKEY SkillLessons Mythical    423
#ADDKEY SkillTotalLessons Inept         1715
#ADDKEY SkillTotalLessons Novice        1708
#ADDKEY SkillTotalLessons Apprentice    1699
#ADDKEY SkillTotalLessons Capable       1681
#ADDKEY SkillTotalLessons Adept         1626
#ADDKEY SkillTotalLessons Master        1537
#ADDKEY SkillTotalLessons Gifted        1426
#ADDKEY SkillTotalLessons Expert        1292
#ADDKEY SkillTotalLessons Virtuoso      1115
#ADDKEY SkillTotalLessons Fabled        803
#ADDKEY SkillTotalLessons Mythical      423
#ADDKEY SkillTotalLessons Transcendent  0
#VAR Teacher {} {}
#ALIAS skills {#show {};#show {%format("&s&15s&s&15s&s", "Skill", " ", "Level", " ", "Lessons to go")};#show {%repeat("-", 60)};#loopdb @MySkillPercents {#show %key%repeat(" ", 20 - %len(%key))@SkillLevel(%key)%repeat(" ", 20 - %len(@SkillLevel(%key)))%format("&3.0n / &3.0n (&5.0n)", @SkillLevelRemaining(%key), %db(@SkillLessons, %db(@MySkillLevels, %key)), @SkillTotalRemaining(%key))}}
#ALIAS learn {~learn %-1;#var Teacher %4}
#TRIGGER {You appear to be (%d)~% of the way} {}
#COND {skill level in the skill of (%w).} {#addkey MySkillPercents %1 %t1} {within|param=1}
#TRIGGER {Common Skills%sRank%sPool} {#t+ Skills|Update}
#TRIGGER {bows to you - the lesson in (%w) is over.} {ask @Teacher %1}
#TRIGGER {Your skill in (%w) has risen to (%w).} {#addkey MySkillLevels %1 %2}
#CLASS 0

#CLASS {Skills|Update}
#TRIGGER {^(%w)%s(%w)%s%w$} {#addkey MySkillLevels %1 %2}
#TRIGGER {To see your abilities within each skill} {#t- Skills|Update}
#CLASS 0
Richter2004-12-03 23:36:10
The pocketbelt scripts are old. I had one that would let me check every one and put it into a nice little table.

How about something fun? Like... On Aetolia I had a dwarf who notched his axe every time he killed someone. This reflected in his description.

Something like

Look at Richer

Richter is a big scary human and his axe has 22 notches on it.

Every time I kill someone, it updates my desc.

*entice*
Unknown2004-12-04 01:11:35
If you want to see a fun script, you should see how I make my herbs ad. These scripts that I've posted here are ones to build other scripts on top of, basically. They allow you to make other cooler scripts from them. I use a single alias to update my market ad with current stock and prices, so it's always correct. Makes my life so much easier!
Unknown2004-12-08 21:28:23
QUOTE(Zarquan @ Dec 4 2004, 11:50 AM)
CODE

#TRIGGER {You appear to be (%d)~% of the way} {}
#COND {skill level in the skill of (%w).} {#addkey MySkillPercents %1 %t1} {within|param=1}

13532


Two things with this trigger:

A ) The "skill level" should be taken out of the condition's pattern, because otherwise it doesn't match properly with some skills (for me anyway).

B ) This doesn't work for specialization skills such as Nihilism (from Cosmic) or Necromancy (from Rituals). Because, say if I learn some Nihilism. When the lesson is over, it will ask the teacher how far in Nihilism I am, and then this trigger will add my percentage through Nihilism to @{MySkillPercents.Nihilism} (I just used the braces so it doesn't look like a typo). The problem is, when I type AB, it will show my percentage for Cosmic, not Nihilism, like this:
Guild Skills..........Rank...........Pool
-------------.........------------...------------
Cosmic.........................Mysticism
..Nihilism

A way to overcome this could be to make a database of all skills, and have their values as their based skills (such as Cosmic for Nihilism), and for skills which do not have a base, just use themselves, e.g.:
CODE
#VARIABLE BaseSkills {Cosmic=Cosmic|Nihilism=Cosmic|Combat=Combat|etc...}

Then, in the trigger from asking how far you are in a skill, change it to:
CODE
#TRIGGER {You appear to be (%d)~% of the way} {}
#COND {skill level in the skill of (%w).} {#addkey MySkillPercents %d(@BaseSkills, %1) %t1} {within|param=1}
Unknown2004-12-08 21:33:46
I knew it wouldn't work for specializations. I made my own workaround, but I figured others could have at least a little fun trying to do that on their own. Looks like you did just that! Thanks for posting it.
Daganev2004-12-09 02:31:59
do a script that tracks essence gained from killing... thats a fun one on the imperian site.
Murphy2004-12-09 13:04:08
Heres a good script....

When you're fully deffed up, have a script that takes stock of all your defs in a list, and say you get someone sitting there stripping your defs (and you dont know which ones are stripped) you hit a trigger or alias that look at your defs and puts the ones back up that you lost.

Getting stripped of your defs is a pain
Unknown2004-12-09 15:34:48
I have a script that does that already (and all my other curing stuff, too). I sell it for 30 credits. tongue.gif
lydin2007-01-01 05:52:01
Here's a challenging one I've never really gotten around to: calculate automapper speedwalks to use the sprint ablility. Harder than it sounds at first.