Random scripts

by Anisu

Back to Mechanic's Corner.

Anisu2007-09-05 12:54:11
Here are some random zmud and cmud scripts I made that might or might not be usefull.
On top of these I also have a herbrift system for cmud, but after comparing it to Lendren's script I have decided I will only give it to his customers. (it is not as advanced as his but it pretty much works the same way)

Alchemy system -zmud
-------------------
A very simple alchemy script that automaticly adds the herbs to the alembic and will warn you when adding items fails, also a small (not fool proof) security to prevent adding more then 10 batches to the alembic.

commands:
alchemy (rift) : this command starts the filling of the alembic
am: when the previous part of the script asks you to do this, you can use it to actually brew
fill: fill your items ofcourse
kegrepeat: repeat the alchemy command but at a set amount of 10 and no outrifting
needwhat : displays the herbs needed for a single refill.

note:
I only populated up until absinthe because that is all I have on my alt. To add other potions simple make a database variable with the name creation and populate them like the rest.
Anisu2007-09-05 16:21:11
Potionlist - zmud (cmud available on request)
----------
A simple potionlist that tracks howmany sips of each potion you have left (is missing absynthe)
This is by far not done yet, I am still thinking about how to track sippage, but am stuck on tracking sip and empty by dominate

commands:
pl: do potionlist and record, shows what vials need urgent refilling.
potionreport: shows how many sips of each potion you have left, does NOT do potionlist

note:
the variable 'nopotion' is really a toggle in my curing system to prevent me from trying to sip things I do not have, it also adds a warning to my prompt
the variable 'potions' contains the list of warning values

CODE
#CLASS {potionlist}
#ALIAS pl {
  #TEMP {^Id%sVial%sPotion%sSips%sMonths} {
    #res potionlist
    #T+ potionlisttriggers
    }
  potionlist
  }
#ALIAS potionreport {#if (%1=%null) {
    #say %ansi( green)Potions:
    #say %ansi( green)--------
    #loopdb @potions {#say %key: %db( @potionlist, %key) sips}
    #loopdb @potions {
      #if (%db( @potionlist, %key) < %val) {
        #if @potionfirsttime {
          #sayp %ansi( red)URGENTLY NEED:
          potionfirsttime=0
          }
        #sayp %key" "
        }
      }
    #say
    potionfirsttime=1
    #loopdb @potions {
      #if (%db( @potionlist, %key) > %val AND %db( @potionlist, %key) < 20) {
        #if @potionfirsttime {
          #sayp %ansi( yellow)Want to restock:
          potionfirsttime=0
          }
        #sayp %key" "
        }
      }
    #say
    potionfirsttime=1
    } {#say You have @potionlist.%1 %1}}
#VAR outpotion {} {}
#VAR potionfirsttime {1} {1}
#VAR potionlist {fire6mending50bromide50phlegmatic49liniment50melancholic50sanguine50frost50choleric50love50regeneration50allheale50quicksilver50vitae50healing62mana50antidote50} {}
#VAR potions {choleric10sanguine10phlegmatic10melancholic10liniment10fire10frost10healing50bromide50mana50antidote10mending10love10regeneration10quicksilver0vitae0}
#CLASS 0
#CLASS {potionlist|potionlisttriggers} {disable}
#VAR potionliststayalive {0} {0}
#TRIGGER {a potion of allheale%s(%d)} {#if %iskey( @potionlist, allheale) {potionlist.allheale=%eval( @potionlist.allheale + %1)} {potionlist.allheale=%1}}
#TRIGGER {quicksilver%s(%d)} {#if %iskey( @potionlist, quicksilver) {potionlist.quicksilver=%eval( @potionlist.quicksilver + %1)} {potionlist.quicksilver=%1}}
#TRIGGER {a love potion%s(%d)} {#if %iskey( @potionlist, love) {potionlist.love=%eval( @potionlist.love + %1)} {potionlist.love=%1}}
#TRIGGER {a potion of bromides%s(%d)} {#if %iskey( @potionlist, bromide) {potionlist.bromide=%eval( @potionlist.bromide + %1)} {potionlist.bromide=%1}}
#TRIGGER {a choleric purgative%s(%d)} {#if %iskey( @potionlist, choleric) {potionlist.choleric=%eval( @potionlist.choleric + %1)} {potionlist.choleric=%1}}
#TRIGGER {a potion of frost%s(%d)} {#if %iskey( @potionlist, frost) {potionlist.frost=%eval( @potionlist.frost + %1)} {potionlist.frost=%1}}
#TRIGGER {a mending salve%s(%d)} {#if %iskey( @potionlist, mending) {potionlist.mending=%eval( @potionlist.mending + %1)} {potionlist.mending=%1}}
#TRIGGER {a potion of mana%s(%d)} {#if %iskey( @potionlist, mana) {potionlist.mana=%eval( @potionlist.mana + %1)} {potionlist.mana=%1}}
#TRIGGER {a phlegmatic purgati%s(%d)} {#if %iskey( @potionlist, phlegmatic) {potionlist.phlegmatic=%eval( @potionlist.phlegmatic + %1)} {potionlist.phlegmatic=%1}}
#TRIGGER {a melancholic purgat%s(%d)} {#if %iskey( @potionlist, melancholic) {potionlist.allheale=%eval( @potionlist.melancholic + %1)} {potionlist.melancholic=%1}}
#TRIGGER {liniment%s(%d)} {#if %iskey( @potionlist, liniment) {potionlist.liniment=%eval( @potionlist.liniment + %1)} {potionlist.liniment=%1}}
#TRIGGER {a potion of fire%s(%d)} {#if %iskey( @potionlist, fire) {potionlist.fire=%eval( @potionlist.fire + %1)} {potionlist.fire=%1}}
#TRIGGER {an antidote potion%s(%d)} {#if %iskey( @potionlist, antidote) {potionlist.antidote=%eval( @potionlist.antidote + %1)} {potionlist.antidote=%1}}
#TRIGGER {elixir vitae%s(%d)} {#if %iskey( @potionlist, vitae) {potionlist.vitae=%eval( @potionlist.vitae + %1)} {potionlist.vitae=%1}}
#TRIGGER {a potion of healing%s(%d)} {#if %iskey( @potionlist, healing) {potionlist.healing=%eval( @potionlist.healing + %1)} {potionlist.healing=%1}}
#TRIGGER {a regeneration salve%s(%d)} {#if %iskey( @potionlist, regeneration) {potionlist.allheale=%eval( @potionlist.regeneration + %1)} {potionlist.regeneration=%1}}
#TRIGGER {a sanguine purgative%s(%d)} {#if %iskey( @potionlist, sanguine) {potionlist.sanguine=%eval( @potionlist.sanguine + %1)} {potionlist.sanguine=%1}}
#TRIGGER {^Type MORE to continue reading. ~((%n)~% shown~)$} {potionliststayalive=1}
#TRIGGER {^(%n)h,*} {
  #if (@potionliststayalive) {
    potionliststayalive=0
    more
    } {
    #T- potionlisttriggers
    #loopdb @potions {
      #if (%iskey( @potionlist, %key)=0) {
        potionlist.%key=0
        #additem outpotion %key
        }
      #if (%db( @potionlist, %key) < %val) {
        #if @potionfirsttime {
          #sayp %ansi( red)URGENTLY NEED:
          potionfirsttime=0
          }
        #sayp %key" "
        }
      }
    #say
    potionfirsttime=1
    #loopdb @potions {
      #if (%db( @potionlist, %key) > %val AND %db( @potionlist, %key) < 20) {
        #if @potionfirsttime {
          #sayp %ansi( yellow)Want to restock:
          potionfirsttime=0
          }
        #sayp %key" "
        }
      }
    #say
    potionfirsttime=1
    }
  }
#CLASS 0