Vadi Sipper for Achaea

Share your scripts and packages with other Mudlet users.
User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Vadi Sipper for Achaea

Post by Vadi »

This is the Mudlet version of the free Vadi Nexus sipper for Achaea.

This sipper will allow for health and mana sipping prioritization, as well as auto-moss eating, and the script also offers a pause function.

Syntax for using the script:

sipinstall - do this first to set the script up or you want to reset it.
hh - toggles sipping prioritization.
pp - toggles the pause feature.
tr - toggles tracking of health and mana gains and losses.

The sipper is syncronysed by checking score - it will sip mana or health when either falls 300 below maximum, and it will eat moss when health or mana falls below 800 maximum. These values can be adjusted in the score trigger. After you've imported the script, search your settings for the following trigger line:

^Health: (\d+)/(\d+) Mana: (\d+)/(\d+)$

and replace the number values highlighted here:

#set maxhealth $2
#set maxmana $4
#set siphealth = $maxhealth-300
#set sipmana = $maxmana-300
#set mosshealth = $maxhealth-800
#set mossmana = $maxmana-800

with your preferred values.

Note: You need to enable the "Fix new text to be on its on line" option in the main window settings for this to work (on all IRE games).
Attachments
VadiSipper.xml
(14.48 KiB) Downloaded 2113 times

Janalon
Posts: 11
Joined: Mon Apr 20, 2009 8:53 pm

Re: Vadi Sipper for Achaea

Post by Janalon »

Beautiful, Mudlet worked like a charm to IMPORT this script. I could not believe how easy it was! Now, I have several questions regarding the Sipper script.

I play on Lusternia and know that all the mentions of moss will need to be changed over to sparkleberry. Could this be as easy as to open the script in a notepad editor and replace every mention of moss with sparkleberry? I would also need to find the sparkleberry balance trigger lines as well... right?

Secondly, it is possible to heal using magical scrolls (which, I believe, also health health/mana/ego); but these scrolls only carry 50 charges. Is it advisable adding a scroll balance to the script?

Finally, if I can manage to tinker the Vadi Sipper to work with Lusternia, would I be able to upload the .Xml here?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Vadi Sipper for Achaea

Post by Vadi »

Janalon wrote:I play on Lusternia and know that all the mentions of moss will need to be changed over to sparkleberry. Could this be as easy as to open the script in a notepad editor and replace every mention of moss with sparkleberry? I would also need to find the sparkleberry balance trigger lines as well... right?
I suppose so. You can edit either the xml file, or just edit the stuff directly in Mudlet.
Janalon wrote: Secondly, it is possible to heal using magical scrolls (which, I believe, also health health/mana/ego); but these scrolls only carry 50 charges. Is it advisable adding a scroll balance to the script?
You could; see how moss was done and that should set you up.
Janalon wrote: Finally, if I can manage to tinker the Vadi Sipper to work with Lusternia, would I be able to upload the .Xml here?
Sure. Just on a separate thread :)

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Vadi Sipper for Achaea

Post by Vadi »

New sipper uploaded, updated by naftali.

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: Vadi Sipper for Achaea

Post by naftali »

Took the code for this and some code grabbed from Vadi's sample ATCP script, stitched the two together with some code of my own, and voila! A sipper that uses ATCP. The advantage is that now your current health/mana variables (and any scripts/gauges that use them) will stay updated during blackout! This should work for Mudlet 1.0.6 or any 1.0.6 pre-release (I made it on 1.0.6pre6 for Mac). This wont work for Mudlet 1.0.5 and down, since it doesn't support ATCP!

Usage:
sipinstall - resets everything. You don't need to use this when you log in, only if your balances get messed up.

the rest is just like above:
hh - toggles sipping prioritization.
pp - toggles the pause feature.
tr - toggles tracking of health and mana gains and losses.

Since this uses ATCP, it will always know your correct max health and mana, and correct your sip values dynamically when you level up, get runes, wear artifacts, etc. By default sipping values are 300 below max and moss is 800 below max. To change these, go to the CharVitals script in the Sipper folder and change the stuff that looks like this:

sipper.siphealth = status.max_health - 300
sipper.sipmana = status.max_mana - 300
sipper.mosshealth = status.max_health - 800
sipper.mossmana = status.max_mana - 800

I left a comment for you there so you can find it easier, the script looks a little messy because it combines a few different parts of Vadi's sipper into one script, and also because I used tables to store the variables.

Enjoy!
ATCP Sipper.xml
(12.83 KiB) Downloaded 1032 times

Dhaed
Posts: 12
Joined: Wed Feb 03, 2010 3:55 pm

Re: Vadi Sipper for Achaea

Post by Dhaed »

How would I go about coloring the () gray and the up changes green and the down changes red?

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: Vadi Sipper for Achaea

Post by naftali »

Here's how you would go about it - I actually like how the script looks much better this way.

First, copy the following function into the CharVitals script:
Code: [show] | [select all] lua
function echoChange()
	moveCursorEnd("main")
	if sipper.healthdifference == 0 and sipper.manadifference == 0 then return end
	insertText("(")
	if sipper.healthdifference > 0 then
		moveCursorEnd("main")
		fg("green")
		insertText(string.format("+%d Health", sipper.healthdifference))
		resetFormat()
	elseif sipper.healthdifference < 0 then
		moveCursorEnd("main")
		fg("red")
		insertText(string.format("%d Health", sipper.healthdifference))
		resetFormat()
	end
	if sipper.healthdifference ~= 0 and sipper.manadifference ~= 0 then
		moveCursorEnd("main")
		insertText(", ")
	end
	if sipper.manadifference > 0 then
		moveCursorEnd("main")
		fg("green")
		insertText(string.format("+%d Mana", sipper.manadifference))
		resetFormat()
	elseif sipper.manadifference < 0 then
		moveCursorEnd("main")
		fg("red")
		insertText(string.format("%d Mana", sipper.manadifference))
		resetFormat()
	end
	moveCursorEnd("main")
	insertText(")")
end
Then replace the part of the main CharVitals script that looks like "if sipper.tracking = 1 then blah blah blah end" with the following:
Code: [show] | [select all] lua
	if sipper.tracking == 1 then
		sipper.healthdifference = status.current_health - sipper.prev_health
		sipper.manadifference = status.current_mana - sipper.prev_mana

		tempLineTrigger(1,1,[[echoChange()]])
	end
And that should do it! Any other formatting changes you want to make you should be able to do fairly simply by editing the echoChange() function.

Dhaed
Posts: 12
Joined: Wed Feb 03, 2010 3:55 pm

Re: Vadi Sipper for Achaea

Post by Dhaed »

Works perfectly. Thank you!

Wennef
Posts: 43
Joined: Sun Apr 11, 2010 3:48 am

Re: Vadi Sipper for Achaea

Post by Wennef »

In the scripts part, vadi sipper (the first one posted)
healbalance = 1
priority = 1
tracking = 0
mossbalance = 1

healthdifference = 0
manadifference = 0
send ("score")
when does send("score") gets sent?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Vadi Sipper for Achaea

Post by Vadi »

Hm... actually before you're even connected and right after mudlet starts :P

Post Reply