HELP PLEASE!

by Ialie

Back to Mechanic's Corner.

Ialie2005-12-11 05:35:03
Can someone tell my why my autosipper isn't working?

#CLASS {AutoSipper}
#ALIAS show_info {#mxp ~* %-1 *~}
#ALIAS sc {#t+ sc_health;#t+ sc_mana;#t+ sc_ego;~sc;#alarm +2 {#t- sc_health;#t- sc_mana;#t- sc_ego}}
#ALIAS score {sc}
#ALIAS sipon {#if (@AutoSip = 0) {#var AutoSip 1;show_info AutoSipping - ON;#var ElixirBalance 1;auto_sip}}
#ALIAS sipoff {#if (@AutoSip = 1) {#var AutoSip 0;show_info AutoSipping - off}}
#VAR HealthPanic {1000}
#VAR Panicking {0} {0}
#ALIAS auto_sip {#if (@AutoSip = 1 and @ElixirBalance = 1 and @SippingHMB = 0) {#if (@Health <@@MaxHealth - @HealthSip) {auto_health} {#if (@Mana <@@MaxMana - @ManaSip) {auto_mana} {#if (@Ego <@@MaxEgo - @EgoSip) {auto_bromide}}}};#if (@Health <= @HealthPanic) {panic} {Panicking=0}}
#ALIAS panic {#if (@Panicking = 0) {Panicking = 1;stand;dismount;burrow below}}
#TRIGGER {You have recovered equilibrium} {#if (@Panicking = 1) {stand;dismount;burrow below}} "" {disable}
#TRIGGER {You are surrounded by utter darkness, and can see nothing.} {Panicking = 2}
#ALIAS auto_health {#if (@medicinebag=1) {touch bag} {drink health};#var SippingHMB 1;#alarm "siphmb" +2 {#var SippingHMB 0;auto_sip}}
#ALIAS auto_mana {sip mana;#var SippingHMB 1;#alarm "siphmb" +2 {#var SippingHMB 0;auto_sip}}
#ALIAS auto_bromide {sip bromide;#var SippingHMB 1;#alarm "siphmb" +2 {#var SippingHMB 0;auto_sip}}
#ALIAS resetelixir {#untrigger elixtimer;#untrigger siphmb;#var SippingHMB 0;#var ElixirBalance 1}
#VAR Health {4118}
#VAR Mana {4118}
#VAR Ego {3620}
#VAR MaxHealth {4205}
#VAR MaxMana {3566}
#VAR MaxEgo {3140}
#VAR HealthSip {300}
#VAR ManaSip {1500}
#VAR EgoSip {1000}
#VAR AutoSip {1} {0}
#VAR ElixirBalance {1} {1}
#VAR SippingHMB {0} {0}
#VAR medicinebag {1} {1}
#TRIGGER "sc_health" {Health%s:%s(%d)/(%d)} {#t- sc_health;#var Health %1;#var MaxHealth %2} "" {disable}
#TRIGGER "sc_mana" {Mana%s:%s(%d)/(%d)} {#t- sc_mana;#var MaxMana %2;#var MaxWillpower %4;#var Mana %1;#var Willpower %3} "" {disable}
#TRIGGER "sc_ego" {Ego%s:%s(%d)/(%d)} {#t- sc_ego;#var MaxEgo %2;#var Ego %1} "" {disable}
#TRIGGER "prompt" {^(%d)h, (%d)m, (%d)e} {#var Health %1;#var Mana %2;#var Ego %3;auto_sip} "" {nocr|prompt}
#TRIGGER {You {take a drink|down the last drop} from} {}
#COND {{The potion heals and soothes you|Your mind feels stronger and more alert|Ah, the soothing bromides help strengthen your ego}.} {#if (@SippingHMB = 1) {#var ElixirBalance 0;#alarm "elixtimer" +6 {#var ElixirBalance 1}}} {within|param=1}
#TRIGGER {You may drink another health, mana, or bromide potion} {resetelixir;auto_sip}
#TRIGGER {You may use another health, mana, or bromide potion, or medicine bag.} {resetelixir;auto_sip}
#TRIGGER {You hold your hands in the air and pray to the stag totem for succor.} {medicinebag=1}
#TRIGGER {Your medicine bag crumbles into dust.} {medicinebag=0}
#TRIGGER {You touch your medicine bag and feel your wounds close and heal.} {#if (@SippingHMB = 1) {#var ElixirBalance 0;#alarm "elixtimer" +6 {#var ElixirBalance 1}}}
#CLASS 0
Terenas2005-12-11 06:05:24
QUOTE(Ialie @ Dec 11 2005, 05:35 AM)
Can someone tell my why my autosipper isn't working?

#ALIAS auto_sip {#if (@AutoSip = 1 and @ElixirBalance = 1 and @SippingHMB = 0) {#if (@Health <@@MaxHealth - @HealthSip) {auto_health} {#if (@Mana <@@MaxMana - @ManaSip) {auto_mana} {#if (@Ego <@@MaxEgo - @EgoSip) {auto_bromide}}}};#if (@Health <= @HealthPanic) {panic} {Panicking=0}}
235384



Might be your problem. I'd make it (@maxhealth - @healthsip) to see if it does anything.
Ialie2005-12-11 07:47:11
Wooot! Thank you I love you!
Sylphas2005-12-11 08:04:08
@foo will return the value of the variable foo. @@foo will return the value of whatever variable name @foo's value is.

Mostly, this problem comes up with lists. foo is the variable. @foo is the -value- of the variable.
Ialie2005-12-11 08:09:42
Can someone make me a script that constant shows me a display of the potions I have and updates its self once I use POTION LIST?


I'd like to see. something like


Health X 1
Mana X 1
Bromide X 1
Frost X 1
Antidote X 2 or something like at all times.
Daganev2005-12-11 08:17:11
Go to the Critical thread, and look on the right, is that what you mean?
Terenas2005-12-11 08:19:37
Something like that can easily be made by turning a vialcapturing class on to capture each potion and storing them into separate variables when you do potionlist and turning itself off once you saw all your vials. Then whenever you want, just #show the variables to see how many of each vials left and if you had any empties. My vial tracking is really crude and simplistic, if you want a flashy or comprehensive one, I'd ask someone with Thorgal's system.
Daganev2005-12-11 08:23:07
Thorgal's system does not come with a vial counter.
Terenas2005-12-11 08:34:57
I'm referring to this post a while back by Syrienne.

QUOTE(Syrienne @ Jul 9 2005, 01:39 AM)
Thought I'd offer to sell a little Vial/Venom counter I just made if anyone might want one. Its for Zmud of course and really not that hard to use.. it gives you a readout after you POTIONLIST of how many of each vial/venom you have and how many sips/applications are left. Makes vial tracking a bit easier. Just PM me!
Coincidentally its also apart of the Thorgal system package if you want to buy that! Go Thorgal!
150678


Munsia2005-12-11 08:42:39
Ya i've been looking for a counter as well for potions. I always am running low on potions but I have so many vials it's hard to sort through em
Daganev2005-12-11 09:17:11
hmm, well I had to make my potion counter by hand, when I bought Thorgal's system.

Its actually quite simple, however the hard part is dealing with buttons because those have to be positioned person by person.

I believe the trigger is something like..

#alias pl {#t+ potioncounter; ~pl; #wait 3000; #math potiontotals (@healthpotion + @manapotion + @mendingpotion..etc...; #t- potioncounter}
.... meh, was going to write the trigger but realized I hadn't memoized it, you need about 17 triggers for the counter. but the command for the trigger is {#add healthvial 1; #gag} for the health vial trigger. You need one for each type of vial and then one extra for "empty"

Then just have your buttons do "Health: @healthvial" for the captions.
Munsia2005-12-11 09:22:39
I'td be easier for a list instead of buttons for me... alias showpotions to show the current number of all potions
Sylphas2005-12-11 09:27:48
Lemme log in quick, I should be able to whip something up in about 5 minutes. I already have an alias to tell me what I'm out of, shouldn't be much to tweak that.
Xenthos2005-12-11 09:29:15
QUOTE(Sylphas @ Dec 11 2005, 05:27 AM)
Lemme log in quick, I should be able to whip something up in about 5 minutes.  I already have an alias to tell me what I'm out of, shouldn't be much to tweak that.
235465



Well, I already IMed the script I wrote up for it a while ago, so you don't need to unless you want it for yourself as well.

Or if mine doesn't work for her for some reason, I suppose.
Sylphas2005-12-11 10:22:50
I hate looping through database variables, I really, really do. Taking longer than I thought to output it, but I've got all the data just fine.
Sylphas2005-12-11 10:24:04
QUOTE(Xenthos @ Dec 11 2005, 05:29 AM)
Well, I already IMed the script I wrote up for it a while ago, so you don't need to unless you want it for yourself as well.

Or if mine doesn't work for her for some reason, I suppose.
235466



*grin* I like having things to work on, keeps me in shape. Also, it's a handy thing to have for my system, and it's nice having options. Not to mention that I usually prefer the way I code things, aesthetically, to most other people.
Sylphas2005-12-11 10:54:39
Here's what I came up with. As a bonus, it matches the look and feel of my other scripts, mostly.

CODE

#CLASS {Starshine|Vialcount}
#ALIAS countvials {
 #T+ vc_getdata
 #T+ vc_automore
 #T+ vc_output
 #T+ vc_gag
 #VA vialcount ""
 potionlist
 }
#VAR vialcount {}
#VAR list_vials {allheale|bromide|choleric|fire|frost|healing|liniment|mana|melancholic|mending|phlegmatic|quicksilver|regeneration|sanguine|sugar|vitae|absinthe|aleutian|anatine|anerod|botulinum|calcise|chansu|charybdon|contortrin|crotamine|dendroxin|dulak|escozul|hadrudin|ibululu|inyoka|mactans|mantakaya|mellitin|morphite|niricol|saxitin|senso|tetrodin|antidote|sulfur|salt}
#VAR list_gems {coral|diamond|emerald|gems|jade|moonstone|opal|pearl|ruby|sapphire|turquoise|bloodstone|garnet|amethyst}
#VAR hLine {%repeat( "-", %1)}
#VAR leftpad {%if( %len( %1) < %2, %repeat( " ", %eval( %2 - %len( %1)))%1, %if( %len( %1) > %2, %rightback( %1, %2), %1))}
#TRIGGER "vc_getdata" {^%d%sa{n|} {@list_gems} vial%s*({@list_vials})*%s%d%s%d$} {
 #ADD vialcount.%1 1
 #GA
 } "" {disable}
#TRIGGER {} {}
#TRIGGER {} {}
#TRIGGER "vc_automore" {Type MORE to continue reading. ~(%d~% shown~)} {
 #GA
 more
 } "" {disable}
#TRIGGER "vc_output" {Total Vials:} {
 #T- vc_getdata
 #T- vc_automore
 #T- vc_gag
 #GA
 #ALA +1 {
   #MXP ~

   #MXP ~ ~Vialcount~~
   #MXP @hLine(19, darkblue)
   #LOOPDB @vialcount {#MXP ~@leftpad(%key, 13):~ ~%val~}
   #MXP @hLine(19, darkblue)
   }
 #T- vc_output
 } "" {disable}
#TRIGGER "vc_gag" {^~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*$} {#GA} "" {disable}
#COND {^Id%sVial%sPotion%sSips%sMonths$} {#GA} {disable}
#COND {-------------------------------------------------------------------------------} {#GA} {disable}
#COND {^~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*$} {#GA} {disable}
#CLASS 0
Gwylifar2005-12-11 14:50:00
I have an equipment counter thingie that works for herbs and vials, and also can give a report of what needs to be restocked based on a low-water and high-water mark system. Ialie, if you want it, contact me directly.

I wonder about that double-at-sign. The export you gave me originally of your working system had that in it. Must be some weird quirk of the export.
Munsia2005-12-12 03:56:09
QUOTE(Sylphas @ Dec 11 2005, 06:54 AM)
Here's what I came up with.  As a bonus, it matches the look and feel of my other scripts, mostly.

CODE

#CLASS {Starshine|Vialcount}
#ALIAS countvials {
 #T+ vc_getdata
 #T+ vc_automore
 #T+ vc_output
 #T+ vc_gag
 #VA vialcount ""
 potionlist
 }
#VAR vialcount {}
#VAR list_vials {allheale|bromide|choleric|fire|frost|healing|liniment|mana|melancholic|mending|phlegmatic|quicksilver|regeneration|sanguine|sugar|vitae|absinthe|aleutian|anatine|anerod|botulinum|calcise|chansu|charybdon|contortrin|crotamine|dendroxin|dulak|escozul|hadrudin|ibululu|inyoka|mactans|mantakaya|mellitin|morphite|niricol|saxitin|senso|tetrodin|antidote|sulfur|salt}
#VAR list_gems {coral|diamond|emerald|gems|jade|moonstone|opal|pearl|ruby|sapphire|turquoise|bloodstone|garnet|amethyst}
#VAR hLine {%repeat( "-", %1)}
#VAR leftpad {%if( %len( %1) < %2, %repeat( " ", %eval( %2 - %len( %1)))%1, %if( %len( %1) > %2, %rightback( %1, %2), %1))}
#TRIGGER "vc_getdata" {^%d%sa{n|} {@list_gems} vial%s*({@list_vials})*%s%d%s%d$} {
 #ADD vialcount.%1 1
 #GA
 } "" {disable}
#TRIGGER {} {}
#TRIGGER {} {}
#TRIGGER "vc_automore" {Type MORE to continue reading. ~(%d~% shown~)} {
 #GA
 more
 } "" {disable}
#TRIGGER "vc_output" {Total Vials:} {
 #T- vc_getdata
 #T- vc_automore
 #T- vc_gag
 #GA
 #ALA +1 {
   #MXP ~

   #MXP ~ ~Vialcount~~
   #MXP @hLine(19, darkblue)
   #LOOPDB @vialcount {#MXP ~@leftpad(%key, 13):~ ~%val~}
   #MXP @hLine(19, darkblue)
   }
 #T- vc_output
 } "" {disable}
#TRIGGER "vc_gag" {^~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*$} {#GA} "" {disable}
#COND {^Id%sVial%sPotion%sSips%sMonths$} {#GA} {disable}
#COND {-------------------------------------------------------------------------------} {#GA} {disable}
#COND {^~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*$} {#GA} {disable}
#CLASS 0

235473


This would be nice if it wasnt for the fact it doesnt list potions... huh.gif just gives numbers