Help - Search - Members - Calendar
Full Version: Zmud Scripts
Achaea's Forums > Off-Topic > Tech Support > Client Help
Kui_leises
I have been working on my own system. the one thing thats killing me is i can not figure out how to make an auto-sipper. I have been working at it now for 2 days and just getting confused. im new to scripting. I need something that I can easily edit to work with my own variables.

perhaps if anyone wants to add other scripts for general use as well.

most of my own work isnt worth posting but if i make something decent i'll put it up

thanks in advance

I am working with Zmud 7.21
TheMrDecan
(%d)h, (%d)m *-

if %1 < @hpsip then sip hp else if %2 < @manasip then sip mana

simplest form
Caelan
QUOTE (Kui_leises @ Jan 14 2009, 01:44 AM) *
I have been working on my own system. the one thing thats killing me is i can not figure out how to make an auto-sipper. I have been working at it now for 2 days and just getting confused. im new to scripting. I need something that I can easily edit to work with my own variables.

perhaps if anyone wants to add other scripts for general use as well.

most of my own work isnt worth posting but if i make something decent i'll put it up

thanks in advance

I am working with Zmud 7.21



TREVIZE:

CODE
#CLASS {Prompt_Tracking}
#ALIAS track_prompt {#if (%1=%null) {#if (@hmtrack) {hmtrack=0;#say %ansi( 7)Tracking off.} {hmtrack=1;#say %ansi( 7)Tracking on.}} {#if ("%1"="on") {#if (@hmtrack=1) {#say %ansi( 7)Tracking is already on.} {hmtrack=1;#say %ansi( 7)Tracking on.}} {#if ("%1"="off") {#if (@hmtrack=0) {#say %ansi( 7)Tracking is already off.} {hmtrack=0;#say %ansi( 7)Tracking off.}} {~track %1}}}}
#VAR hmtrack {0} {0}
#VAR pval {}
#ADDKEY pval healthcheck {}
#ADDKEY pval manacheck {}
#REGEX "hmewtrack" {^(\d+)h, (\d+)m, \d+e, \d+w [exbkdc@]*\-$} {#if (@hmtrack=1) {#if (@pval.healthcheck!=%1 OR @pval.manacheck!=%2) {#sayp %ansi( 7)~[;#if (@pval.healthcheck!=%1) {#sayp %ansi( %if( %1<@pval.healthcheck, 12, 10))%if( @pval.healthcheck<%1, +)%eval( %1-@pval.healthcheck)h};#if (@pval.healthcheck!=%1 AND @pval.manacheck!=%2) {#sayp " "};#if (@pval.manacheck!=%2) {#sayp %ansi( %if( %2<@pval.manacheck, 12, 10))%if( @pval.manacheck<%2, +)%eval( %2-@pval.manacheck)m};#sayp %ansi( 7)~]}};pval.healthcheck=%1;pval.manacheck=%2} "" {nocr|prompt}
#CLASS 0



DUSTY:
CODE
#CLASS {Autosip}
#ALIAS sip_priority {#IF (%lower( %1)="health" or %lower( %1)="mana") {#SAY Sip priority modified to sip %proper( %1) first.;#VAR sip_priority %lower( %1)} {#SAY Improper sip value.}}
#ALIAS check_autosip {#if (@balance_elixir!=1 & @sipping_status=1 & @health>0) {#if (@sip_priority=mana) {#if (@mana<(@maxmana-(@maxmana/6))) {sip mana} {#if (@health<(@maxhealth-(@maxhealth/6))) {sip health}}} {#if (@health<(@maxhealth-(@maxhealth/6))) {sip health} {#if (@mana<(@maxmana-(@maxmana/6))) {sip mana}}}}}
#ALIAS autosip {#IF (%lower(%1)="off") {#var sipping_status 0;#SAY Autosipping has been disabled!} {#var sipping_status 1;#SAY Autosipping has been enabled!;check_autosip}}
#TRIGGER {You may drink another health or mana elixir.} {#var balance_elixir 0;check_autosip}
#TRIGGER {{The elixir heals and soothes you.|Your mind feels stronger and more alert.|The elixir flows down your throat without effect.}} {#var balance_elixir 1;check_autosip}
#CLASS 0
Pernicios
QUOTE (TheMrDecan @ Jan 14 2009, 06:42 AM) *
(%d)h, (%d)m *-

if %1 < @hpsip then sip hp else if %2 < @manasip then sip mana

simplest form



So uh......



Ya..... horrible.. horrible code....
Trendor
I don't think he read this part. unsure.gif

QUOTE (Kui_leises @ Jan 14 2009, 06:44 AM) *
I am working with Zmud 7.21
Trevize
QUOTE (Caelan @ Jan 14 2009, 08:26 AM) *
TREVIZE:
CODE
#CLASS {Prompt_Tracking}
#ALIAS track_prompt {#if (%1=%null) {#if (@hmtrack) {hmtrack=0;#say %ansi( 7)Tracking off.} {hmtrack=1;#say %ansi( 7)Tracking on.}} {#if ("%1"="on") {#if (@hmtrack=1) {#say %ansi( 7)Tracking is already on.} {hmtrack=1;#say %ansi( 7)Tracking on.}} {#if ("%1"="off") {#if (@hmtrack=0) {#say %ansi( 7)Tracking is already off.} {hmtrack=0;#say %ansi( 7)Tracking off.}} {~track %1}}}}
#VAR hmtrack {0} {0}
#VAR pval {}
#ADDKEY pval healthcheck {}
#ADDKEY pval manacheck {}
#REGEX "hmewtrack" {^(\d+)h, (\d+)m, \d+e, \d+w [exbkdc@]*\-$} {#if (@hmtrack=1) {#if (@pval.healthcheck!=%1 OR @pval.manacheck!=%2) {#sayp %ansi( 7)~[;#if (@pval.healthcheck!=%1) {#sayp %ansi( %if( %1<@pval.healthcheck, 12, 10))%if( @pval.healthcheck<%1, +)%eval( %1-@pval.healthcheck)h};#if (@pval.healthcheck!=%1 AND @pval.manacheck!=%2) {#sayp " "};#if (@pval.manacheck!=%2) {#sayp %ansi( %if( %2<@pval.manacheck, 12, 10))%if( @pval.manacheck<%2, +)%eval( %2-@pval.manacheck)m};#sayp %ansi( 7)~]}};pval.healthcheck=%1;pval.manacheck=%2} "" {nocr|prompt}
#CLASS 0

That is useful. But it's not an autosipper. smile.gif It displays the difference between your last and current health and mana.

Off the top of my head, here's an overly simple autosipper. If you use it and it doesn't work, let me know and I'll try and fix it up. Sips at 2k on health or mana, easily changed by editing sipath and sipatm.
CODE
#var sipatm {2000}
#var sipath {2000}
#var sipbal {1} {1}
#var sipping {0} {0}
#regex {^(\d+)h, (\d+)m} {#if (@sipping=0 & @sipbal=1) {
#if (%1<sipath) {sipping=1;sip health} {#if (%2<sipatm) {sipping=1;sip mana}}
}} "" {nocr|prompt}
#regex {^(?:Your mind feels stronger and more alert|The elixir heals and soothes you)\.$} {sipbal=0;sipping=1}
#regex {^You may drink another health or mana elixir\.$} {sipbal=1;sipping=0}
Caelan
QUOTE (Trevize @ Jan 14 2009, 05:48 PM) *
That is useful. But it's not an autosipper. smile.gif It displays the difference between your last and current health and mana.



rofl.gif Wow.. I knew there was one script I titled wrong... laugh.gif my bad
Trendor
Sorry about not getting back to you on that system. I haven't been feeling well past few days(gall bladder acting up. yay!). Anyway, I'll look over what you sent me and write up a sipper to work with what you have. Don't worry. It'll be simple. tongue.gif



Edit: @Kui
kazu00
Here's one I wrote for a friend of mine awhile back, not really great, but it will get you by.

#CLASS {sipper}
#ALIAS sconfig_mhealth {mhealth=%1}
#ALIAS sconfig_mmana {mmana=%1}
#ALIAS sconfig_healthp {healthp=%1}
#ALIAS sconfig_manap {manap=%1}
#VAR sipb {0}
#VAR mhealth {3334}
#VAR mmana {3580}
#VAR sipping {0}
#VAR phealth {100}
#VAR pmana {99}
#VAR chealth {3334}
#VAR cmana {3570}
#TRIGGER {(*)h, (*)m, (*e)} {chealth=%1;cmana=%2;#math phealth {@chealth*100/@mhealth};#math pmana {@cmana*100/@mmana};#if (@phealth<@healthp and @sipb=0 and @sipping=0 and @anorexia=0) {sip health;sipb=1;sipping=1};#if (@pmana<@manap and @sipb=0 and @sipping=0 and @anorexia=0) {sip mana;sipb=1;sipping=1}}
#TRIGGER {The elixir heals and soothes you} {sipb=1;sipping=1}
#TRIGGER {Your mind feels stronger and more alert} {sipb=1;sipping=1}
#TRIGGER {You may drink another health or mana elixir} {sipb=0;sipping=0}
#CLASS 0
#ALIAS rs {#t+ sipper}
#TRIGGER {You have been slain by} {#T- sipper;sipping=0;sipb=0}

Use the first 2 aliases to set your max health and mana, then use the second two to configure the % you want to sip at.
Kui_leises
thanks for the help everyone smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.