<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE muclient > <muclient> <plugin name="Ratter" author="Keldar" language="vbscript" purpose="Display ratting info" save_state="y" date_written="2003-11-15" date_modified="2004-06-06" requires="3.32" version="1.1" id="152d7cdff704e856e0c00d58"> <description trim="y"> <![CDATA[ This simple plugin will display the basic statistics of your ratting. It uses the Info bar for display, and can show either counts for each type of rat you have slain so far, or their gold worths. The commands to use it are: ratter on|off - turn the Ratter on or off, turning it off resets the current count ratter nums|gold - defines whether the plugin will display amounts or gold values of rats sr * - * stands for a ratman's name, sends 'sell rats to *' ]]> </description> </plugin> <triggers> <trigger name="RatPickup" enabled="n" regexp="y" match="^You have slain (?:a|an) (baby rat|young rat|rat|old rat|black rat), retrieving the corpse\.$" script="CountRats" group="RatTriggers" keep_evaluating="y" sequence="10" ></trigger> <trigger name="RatGiven" enabled="n" regexp="y" match="^(?:.*?) gives you the corpse of (?:a|an) (baby rat|young rat|rat|old rat|black rat)\.$" script="CountRats" group="RatTriggers" keep_evaluating="y" sequence="10" ></trigger> </triggers> <aliases> <alias name="ratter_switch" enabled="y" regexp="y" match="^ratter (on|off|nums|gold)$" sequence="100" script="Ratter" /> <alias name="sellrats" enabled="y" match="sr *" sequence="100" ><send>sell rats to %1</send></alias> </aliases> <variables> </variables> <script> <![CDATA[ dim displayMode displayMode = 1 '1 displays amounts, 2 - gold values dim ratPrice(5) 'This array holds prices for different rats ratPrice(0) = 7 'baby rat ratPrice(1) = 14 'young rat ratPrice(2) = 21 'rat ratPrice(3) = 28 'old rat ratPrice(4) = 35 'black rat dim ratNums(5) 'This array holds the number of different rats you've killed ratNums(0) = 0 'baby rats ratNums(1) = 0 'young rats ratNums(2) = 0 'rats ratNums(3) = 0 'old rats ratNums(4) = 0 'black rats sub Ratter(name, output, wildcs) select case wildcs(1) case "on" world.EnableTriggerGroup "RatTriggers", 1 DisplayInfo world.Note "Ratter plugin is ON" case "off" world.EnableTriggerGroup "RatTriggers", 0 world.InfoClear world.InfoBackground "lightgrey" dim i for i = 0 to ubound(ratNums) ratNums(i) = 0 next displayMode = 1 world.Note "Ratter plugin is OFF" case "nums" displayMode = 1 DisplayInfo case "gold" displayMode = 2 DisplayInfo end select end sub sub CountRats(name, output, wildcs) select case wildcs(1) case "baby rat" ratNums(0) = ratNums(0) + 1 case "young rat" ratNums(1) = ratNums(1) + 1 case "rat" ratNums(2) = ratNums(2) + 1 case "old rat" ratNums(3) = ratNums(3) + 1 case "black rat" ratNums(4) = ratNums(4) + 1 end select DisplayInfo end sub sub DisplayInfo world.InfoClear world.InfoFont "FixedSys", 12, 0 world.InfoColour "white" world.InfoBackground "black" dim totalNums, totalGold, i totalNums = 0 totalGold = 0 for i = 0 to ubound(ratNums) totalNums = totalNums + ratNums(i) next if (displayMode = 1) then world.Info "Total: " & cstr(totalNums) & " | " world.Info "Baby rats: " & cstr(ratNums(0)) & " | " world.Info "Young Rats: " & cstr(ratNums(1)) & " | " world.Info "Rats: " & cstr(ratNums(2)) & " | " world.Info "Old rats: " & cstr(ratNums(3)) & " | " world.Info "Black rats " & cstr(ratNums(4)) elseif (displayMode = 2) then for i = 0 to ubound(ratNums) totalGold = totalGold + ratNums(i)*ratPrice(i) next world.Info "Total: " & cstr(totalGold) & "gp | " world.Info "Baby rats: " & cstr(ratNums(0)*ratPrice(0)) & "gp | " world.Info "Young Rats: " & cstr(ratNums(1)*ratPrice(1)) & "gp | " world.Info "Rats: " & cstr(ratNums(2)*ratPrice(2)) & "gp | " world.Info "Old rats: " & cstr(ratNums(3)*ratPrice(3)) & "gp | " world.Info "Black rats " & cstr(ratNums(4)*ratPrice(4)) & "gp" end if end sub ]]> </script> </muclient>
Comments
You say you've figured out how to install it, but could you explain what you're doing precisely?
Also, could you host the xml file somewhere so I can see it?
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
that's what i'm afraid of
Here's the instructions from his forum:
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Do you know much about Lua? It wouldn't be too difficult to make one.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
i can try and learn, though.
Trigger would go something like:
pattern:
You have slain a black rat.
script:
if blackrats == nil then blackrats = 0 end
blackrats = blackrats + 1
ratgold = ratgold + 35
First line says if the variable doesn't exist, make it and set it to 0. Then add one to the variable. Do the same for all types of rats. Remember those variable names! You'll need them in the alias.
Then your alias, let's say a pattern of:
^ratgold$
(a caret, ^, means start of line and a dollar sign, $, means end of line)
And a script of, say...
(tip on what's next - two spaces adjacent means 'combine' for strings (text) - also, \n is a 'newline')
echo ("Rat gold: " .. ratgold .. "\n")
echo ("Black rats: " .. blackrats .. "\n")
echo ("Old rats: " .. oldrats .. "\n")
...etc for each type of rat using the variables you made in the triggers
Then you want an alias to reset it. Maybe ^ratreset$
script is simple:
echo ("Rat gold tracker reset!\n")
ratgold = 0
blackrats = 0
oldrats = 0
...etc for each type of rat using the variables you made in the triggers
Post here if you run into any trouble making this! It's a good start on learning lua. You could make it a lot shorter/better using things like tables and functions, but they're not necessary! Can learn them later.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Thank you for your help I'll definitely give it a try.
if blackrats == nil then blackrats = 0 end
Should be
blackrats = blackrats or 0
Edit: aren't you html? Can you even use lua on html?
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
That said, both are solid, so whatever you prefer would work.
While correct, I prefer starting simpler. Explaining what 'or' does is a little more difficult that if statements. Not a lot, but I usually start with basics.
@Alcaro - What 'or' is doing is looking at the left side. If it's 'true' - which means anything but false or nil - then it returns that. If it is false or nil, it returns the right side instead.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Mush: prepare to do a lot of stuff yourself.
Actually ratting... ouch.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
On a serious note, I enjoy the ritual of ratting. If you catch enough, they add up and you don't have to wait for them to respawn. Plus you don't have to deal with anyone bashing on "your" territory.
http://wiki.mudlet.org/w/Manual:Introduction
Ratting might not be great gold but it's a great project for a script! Good luck!
Assuming you kill a rat every 10 seconds on average*, then you'll be making about 6k gold per hour. You can get more than that in 5-10 minutes of questing in Ulangi (or several other areas, but Ulangi is the most popular and probably the easiest to learn. Actar is a good alternative if you're level 20-40ish and the animals on Ulangi are a little too strong for you).
*You won't kill a rat every 10 seconds on average. Sometimes you won't even kill a rat every minute; you'll be wandering for 10 minutes, triple-checking to make sure you actually have rats on, and wondering if maybe the entire subdivision was already cleared out in the past hour.
Butterflies are worse. Even if you had a room full of infinite red admiral butterflies, and you miraculously succeed on every attempt to catch one, you would only be able to get 12k gold per hour (around half of what Ulangi or similar gold-questing areas will get you). In reality though, you'll miss a lot (I'd very roughly estimate an average of around 2 attempts to catch a red admiral butterfly, more for the more valuable ones), and at least 70% of your time will be spent looking for butterflies rather than catching them, so you could probably manage 1k-2k gold per hour. As I've said before:
Seriously though, it's a great start to scripting. I Ratted for nearly 400 years, nothing wrong with it...10 rats = 1 mutton chop. You do, what you need to do!
Begging for spare change, @Sena...this is my new gold machine!