Cagebot

Alhifar

Member
Cagebot Version 1.4.0

Without further adieu, here is the much requested (at least by Bale) Cagebot script.

Simply type "set chatbotScript=cagebot.ash" into the CLI, set whether you want to use rock salt, set up a "cage" ccs and wait for someone to /msg you!

My current "cage" ccs is simply:
Code:
[default]
1:skill cleesh
2:attack with weapon

Commands:
get in the cage - sends bot into the cage
you're free - removes bot from cage after it has been flooded
join <clan> - makes bot join a different clan
For the following three commands, please send the bot the item first, or it will not be able to consume
eat [<n> ]<food> - tells bot to eat a given food
drink [<n> ]<booze> - tells bot to drink a given booze
use [<n> ]<item> - tells bot to use a given spleen item or potion
status - replies with where the bot currently is
turns/consumables - replies with bot's current turns, fullness, drunkenness and spleen
help - displays this list of commands

When the bot begins to head toward the cage, it will notify the sender, and can be asked by status where it is.
When the bot reaches the cage, it will notify the sender, and announce itself in clan chat.

As always, any suggestions or bug reports would be very welcome.

-----
Version History
1.0 - First released
1.2 - Added "status" and "you're free" commands
1.2.1 - Bug fix, thanks to Plorg
1.3.0 - embeddedtower has informed me that the grates and valves don't take adventures if 20 are already used.
1.3.1 - Bug fix, thanks to mredge, asthetic changes to the code -- use regexes instead of ugly string parsing.
1.4.0 - Huge update
 

Attachments

  • cagebot.ash
    16.3 KB · Views: 129
Last edited:

mredge73

Member
Found an infinite loop:
How do you fix this?


[5215] A Maze of Sewer Tunnels
Encounter: sewer gator
Round 0: shivermetimbers loses initiative!
You lose 158 hit points

buy 1 chunk of rock salt for 478 each from 1760878 on 20090601
You acquire an item: chunk of rock salt

use 1 chunk of rock salt
You acquire an effect: Fresh Scent (duration: 10 Adventures)

[5216] A Maze of Sewer Tunnels
Encounter: <a class=nounder href="campground.php">your campsite</a>.

[5216] A Maze of Sewer Tunnels
Encounter: <a class=nounder href="campground.php">your campsite</a>.

[5216] A Maze of Sewer Tunnels
Encounter: <a class=nounder href="campground.php">your campsite</a>.

[5216] A Maze of Sewer Tunnels
Encounter: <a class=nounder href="campground.php">your campsite</a>.
 

Alhifar

Member
I think that may be a mafia bug, in addition to a bug in the script. You are (apparently) beaten up, and Mafia thinks that the text where it tells you you are too beaten up to adventure is an encounter. In any case, the script didn't take into account any chance of being beaten up, I was always a high enough level to assure initiative when I was testing it.

As I went into the script to make those changes, I found a few other things that could be changed for the better. I'll have the script updated within an hour, hopefully.

EDIT: And it's updated. Glad to see that somebody is actually using it!
 
Last edited:

mredge73

Member
thanks for the update, I am using it to build a clan chatbot with the ability to go into the cage. I did not know of the heal beating up Cli.

Waring: In it's pure unedited form it has several typos in it.

Hey, can you explain the matcher data type and how it is used, this is the first time I have seen something like that.
Another question, when running the script what do you have mafia do so that you won't get automatically logged off due to inactivity?

thanks
 

Alhifar

Member
Mafia automatically sends the /idleoff command to chat.

As well, the matcher data type is currently best explained (other than create_matcher() ) here. Scroll down to java.util.regex in the top left and look through the documentation from there. I have thought of writing a short guide for those who don't want to read through the java documentation, maybe I'll do that tonight.
 

Grotfang

Developer
Hope you don't mind, but I added made a couple of additions when I checked this out:

Line 49

Code:
if( contains_text( page_text , "Combat" ) run_combat();

Should read

Code:
if( contains_text( page_text , "Combat" ) ) run_combat();

Line 169

Code:
grates = grates + 1;

And Line 173

Code:
valves = valves + 1;

Both grates and valves are undefined. I simply added

Code:
int grates=0; int valves=0;

After Line 160.

Line 197

Code:
if( my_hp() < ( my_maxhp() * get_property( "hpAutoRecovery" ).to_float() )

Should read

Code:
if( my_hp() < ( my_maxhp() * get_property( "hpAutoRecovery" ).to_float() ))

And finally there should be an additional } at the very end.

I don't know whether any of that is useful. Can I just say; awesome script! Cheers!
 

Alhifar

Member
Okay, massive update to this particular script. I've been running it with pretty much this exact version for the last few days, and it's handled it pretty much flawlessly. A bunch of new features have been added to facilitate multiple dungeons per day, and allowing the operator to not need to touch the character once it is started

I would recommend turning off buying from the mall when using this script.
 

jwylot

Member
Thanks for posting this. Wasn't there another cagebot script posted last year sometime which was withdrawn eventually because of disapproving looks from Jick and Multi Czar?
 

mredge73

Member
Not that I know of, I have used a modified version of this one since it was released.
Maybe you are thinking of the musician script that was pulled voluntarily by it's author.
 

Grotfang

Developer
Thanks for posting this. Wasn't there another cagebot script posted last year sometime which was withdrawn eventually because of disapproving looks from Jick and Multi Czar?

I pulled a more comprehensive hobopolis script suite. As far as I'm aware, cagebots will probably be tolerated. Ultimately cage sitting doesn't really add to the collective experience of hobopolis and would therefore not really run counter to their intentions.
 

Pantsless

New member
My personal take on this script:

Bob sends commands to cagebot to adventure in Earl's dungeon: Fine.

Earl sends commands to cagebot to adventure in Earl's dungeon: Abuse. Don't do it. Might even be treated more harshly than normal dungeon multi abuse, because it looks like an attempt to circumvent IP tracking.
 

Grotfang

Developer
Pantsless. The following is quoted from a kmail from Multi Czar about my script suite intended to fully automate hamster runs:

Nothing in this breaks any rules since it is still one account per person. No punishment will be used against anybody that uses this.

However, we all agree that this goes against the spirit of what Hobopolis is meant to be. It was designed to be a teamwork area, and this script takes that away. It is not against the rules, but we are all kind of sad that it exists.

This is why I pulled the script. Developers being sad was not my intention and I didn't want to produce something they wouldn't be happy with. The caveat on runs (to avoid multi-abuse) was that all the players were from independent characters. Cagebots are characters other players have set aside to help out others in basements. It seems fairly apparent that a cagebot won't be used to assist in the same basement as its owner (presumable with the same IP) is in. I don't follow why allowing it to always behave this way should be considered unfair.

I have three points here:

  1. Cage sitting is an example of teamwork. Providing a cage sitting character does cost time and resources
  2. Cage sitting in and of itself is not interesting. It involves adventuring until you hit the cage and then doing virtually nothing. You are completely unable to interact with the kingdom in any meaningful way beyond chat
  3. Refusing automation for this process can make smaller clans suffer more. It is hard enough to find enough people to do runs. If someone in the clan wants to help out, but can't make the time, this is a really nice way for them to be involved. I know I've had situations before where I haven't been available for half a run, so had to remove myself, and it was nice knowing I could still do something useful.

For some clans, this could give a slightly unfair benefit. Clans who can host a designated bot that is taken in every time will never have to find someone to cage sit -- I concede that. But for some clans, this sort of tool allows them to experience hobopolis content in a way they would otherwise not be able to. The group dynamics aren't detracted from, since the cagebait is not a band member in most runs.
 

jwylot

Member
There have been discussions on this topic in my clan in the past and I admit that I have resisted having a cagebot mainly because I felt it took something away from the whole Hobo experience, We are large enough to find a volunteer for speed runs and for casual runs, it seems unnecessary.

However, the appearance of Elf Ally changed things totally for us. We have thrown Hobo open to everyone and dropped the usual requirement for payment for boss drops. We have also encouraged newer folk to dip their toes in the sewer water. As a result, we've been running up to 15 instances a day and while Elf Alley persists, a cagebot makes a lot of sense.

I would add that the bot runs from my IP and is the only one of my characters to adventure in the clan dungeon. I do encourage folk who are not planning to adventure in a given instance to trigger the bot to avoid the situation where the person triggering the bot then benefits himself.

I did write to Multi Czar but I guess he is busy with other stuff right now. Thanks guys for your input.
 
Top