Hobopolis chatbot script

Grotfang

Developer
[size=+1]Musician 1.5[/size]

[size=+1]Removed. (Check last post)[/size]

So, I've described previously how adventuring in hobopolis at the correct time for speed runs could be troublesome for me, due to time differences, and as a result I have created a script that allows me to leave my character online overnight and be controlled externally. This was inspired by Alhifar's cagebot script, which first made me wonder if this was possible, and I have borrowed some of his code to use in this script. Cheers, Alhifar!

It is still being refined, but I have added options to the top so individuals can change aspects of the script. I assume the use of phials to get elemental alignment (this will be changed in later versions) and the phial you use can be changed. In addition, it needs to know how many hobos you wish to kill at once when instructed (starts set to 162, but can be changed). Also, I will in later versions allow people to choose the names of the ccs they use, so they can use ones they have made already.

The current instructions are:

"sewer" - does the sewers

"parts" - gets hobo parts

"hobo" - tries to get a single part

"tent" - gets to the tent

"mosh" - This takes a mosher character into the tent to mosh (use "tent" to get them there and change is_mosher to true).

"play" - Will go in the back.

"leave" - Will step down.

Requirements:

sewer ccs (CLEESH or similar)
hobopolis ccs (must be able to get a part each time)
hobopolis outfit
tent outfit (must include class instrument)
hobo code binder (preferably with 20 glyphs)
rock salt (unless set to false - one of the options)
enough of the relevant phials

Setup:

Code:
set chatbotScript=musician.ash

I will add a personal disclaimer: this script is not intended to allow multis into hobopolis. It fulfills a niche use that I have encountered in my own playing of the game and is aimed at individuals in smaller clans who may find it hard to get a full 8 people online at once in hobopolis.

Any advice, criticism, and so on is warmly welcomed!

Version 1.5: Added a "status" command to get status feedback. Counts tents and feeds into chat. Big cleanup on code. Removed user_confirm box. Prints if you are using an outdated version.
Version 1.4: Changed commands to support builds since 7665 (where chat_reply disappeared into a cloud of smoke). It also exits nicely now so doesn't require a refresh after the play command. Basically, it works perfectly now. Both of my users can rejoice ;)
Version 1.3: Tent now works as expected. Split the sewer and collecting parts into two commands and gave a command for the mosher.
Version 1.2: Supports manual control, will buy phials if needed and select element instead of phial.
Version 1.1: Checks class for instrument, checks phial for effect. Only one operator. Also added check_version
Version 1.0: Original Version.
 
Last edited:

Grotfang

Developer
Updated the script. It now works out what instrument to expect, as well as knowing what effect your chosen phial should give. In addition, I added a string that allows you to ensure that only one person (selected by you in the options) can send you commands. If anyone else tries to send you a command they will be politely told they are not allowed and their name as well as what they sent will be printed to the CLI.
 

codster62

Member
Very nice script. The automation would be nice, but I definately plan on using this script. Also, I beleive you should set up the way the script kills hobos like this.

1. Prompt you for the amount of adventures wanted to spend on hobo killing.
2. Visit Richard to see what hobo parts are needed most.
3. Aquire the appropriate phial. There should be four booleans on this. And also, make sure it checks inventory as well to make sure appropriate phials cannot/can be found.
a. DIY Phials
b. Buy from mall
c. Pull from Clan stash
d. Pull from Hagnk's.
4. Check to see if player is a Sauceror or not. If the player is a sauceror and has appropriate equipment, adventure 15 turns in hobopolis, then check hagnks's again to see which part is needed. If the player is not a sauceror, then adventure 5 turns then check Hagnk's.
5. If the player(For some reason) runs out of the set amount of adventures, then prompt to either use EatDrink.ash, or DIY booze making. I haven't use this script yet, but if you haven't modified the script correctly, and you run out of adventures, the script might auto-abort. Like I said, I have not ran this yet.

Anyways, I always like seeing your scripts! Good luck, and you have probably already done most of the stuff I suggested, but there is a few ideas just in case.

Best of Luck,
Cody/CoolBufferBot(In-Game)
 

Grotfang

Developer
Thanks for the feedback! I have posted my newest version.

To address your points:

1. No can do. It is a chatbot script, so no prompts. That stuff has to be entered beforehand, and the appropriate section to edit is

Code:
int dead_hobos = 162;

found in the "EDITABLE STUFF" section.

2. This is for speed runs, so you should have an element assigned to you. Again, chatbot script, so enter in:

Code:
item phial = $item[phial of hotness];

In the new version of the script, I have changed the choice to "desired_element" with the script working out the rest.

3. That one is very useful and a similar idea has already been added to my latest version.

4. It already calculates how many turns of <element>form your phials should give:

Code:
int phials_to_use()
{
	int turns_of_form = 5;
	if( have_skill( $skill[Impetuous Sauciness] ) )
	{
		turns_of_form = turns_of_form + 5;
	}
	if( my_class() == $class[sauceror] )
	{
		turns_of_form = turns_of_form + 5;
	}
	int phial_number_full = dead_hobos / turns_of_form;
	int phial_number = ceil( phial_number_full );
	return phial_number + 1;
}

A very simple check, I know, but it uses this to work out how many phials you will need to kill your desired number of hobos. As for adventuring 15 times, etc, I check status constantly throughout. I don't see how any other method is preferable. Again, you shouldn't need to check Richard, as you should only be going for one element.

5. Interesting, but I don't really like the idea too much. Again, this script is intended more for the world of hamster runs, so not having enough adventures smacks of being unprepared. I think it is reasonable to expect people to eat, drink and spleen before setting this script up. I also don't want to add breakfasting to this, as I fear this would encourage people to set up bots specifically intended to automate hobopolis. The intention is for this script to allow players who can't make times due to real life restrictions to still feel that they are part of speed runs. It is not intended to nanny people.


Some of your ideas are really quite useful and I will definitely look to work them in! I will look to add an ability to respond and send information to the operator if the chatbot runs out of adventures. In addition, checking Hangks for phials and trying to make them if possible are really good ideas and could save quite a bit in the way of meat. I already have on my to-do list adding flavour of magic to the script to avoid purchasing phials if you are a pastamancer (or other class with that skill permed).

If you want to use this script to automate hobopolis normally, just change "desired_operator" to your own username and call the script normally, entering your name and, probably, "sewer" into the pop-up boxes. Make sure you have set the editable conditions correctly though. I'm not sure it is ideal for that purpose, but it will work.
 

codster62

Member
Awesome! Thanks, and this sounds like a wonderfull script. I actually don't know if I will be using this, do to our clan doing mostly casual runs, but this is a great script for anybody who wants to do hamster runs. I am looking forward to seeing improvements, although the script is good already. Thanks for walking me through it.

Cody
 

Grotfang

Developer
I know this isn't exactly the most used of scripts, but I thought I would post simply to point to the new, fully functioning version now up. I have fixed the issue with the tent, so it works as expected. In addition, I added the "parts" and "mosh" commands. "Parts" is now used after "sewer", as sewer only does the sewers (I know! Who'd have thunk it...) and parts is now used to collect parts.

Tent will now get moshers and players to the tent (it doesn't require an instrument equipped if "is_mosher" is set to true). Mosh can be used to get a moshing player who is at the tent to mosh.

I decided against checking Hagnks and closet for phials, etc. It felt too much like nannying...

By the way, just in case there is anyone interested who thinks "Hey, I can make the elemental damage using flavour of magic/equipment/combat items", then remember mood can give flavour of magic, setting your hobopolis outfit correctly gives equipment alignment and CCS can cover combat items and skills. Just set your element to physical and it won't use phials.
 

Grotfang

Developer
For the whole two people who use this script:

Chat_reply has been replaced with chat_private and chat_clan, where appropriate. This is to accommodate the change made here. Also, I have replaced abort(); with exit; in the 0 condition, so if you do abort from a choice condition being set to 0 (an unlikely situation, I know... given the script forces you to do this) then subsequent commands (eg. "leave" after "play") will actually work! Sorry it took so long to sort this out.

tl;dr The script works... again.
 

Grotfang

Developer
Today we took a group through hobopolis for a hamster run, using a character that was completely dependent on this script - no human involvement on his end.

Turn count of 1071, not a single mistake.

Long story short, it works.

I have removed the comments above saying it is in beta/being altered, etc. Anything from now on can be viewed simply as refining the code.
 

Grotfang

Developer
1.5 released. It now records tents using a daily property (_tentShows). Also records status, so a status check can be gained by sending "status" in a PM. Desired operator only, though.

Previously, an outdated version would mean a user confirm box ("Continue, Yes or No?"). This seemed unwise, so it now simply prints into the CLI.

Big code cleanup. Moved some stuff that was repeated into their own little functions. Also fiddled with order of commands in the code. Superficial changes with no functional difference.

Final additions are:

  • You can name your overkill and tent outfits. Check editable settings
  • You can add the ability for your controller to log you out after the event. May be useful for some
  • Desired operator no longer needs to be a clan mate. However, bear in mind chat_private may not work if they aren't whitelisted and you haven't removed the appropriate lines in your source code
 

mottsy

Member
sorry guys :(

From Multi Czar (#6) [reply] [quoted]
Date: Friday, November 06, 2009, 06:19AM
I haven't seen that before. The spirit of the dungeon rule is one character per player, so that script would be against that sine it allows one player to control multiple characters. Using it could lead to getting accounts disabled.
 

Grotfang

Developer
I was under the impression that provided it wasn't used as a means to get multis into the dungeon it was fine - in essence, provided only people who would be eligible to go in together normally were using it, that was ok.
 

Grotfang

Developer
Multi Czar said:
I discussed this with Jick (and others), and we all agreed on this.

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.

I am removing this script from the forums. If you have already downloaded it, then I leave it to you to decide what to do with it.
 
Top