 |
forums
|
| View previous topic :: View next topic |
| Author |
Message |
Fnord7
Joined: 08 Aug 2004 Posts: 193
|
Posted: Mon Nov 29, 2004 1:11 am Post subject: Current Revison: 190, 26 July 2008 |
|
|
Revision 190, 26 July 2008
http://www.brandybuck.com/kolbot/kolbot-190.tar.gz
Repaired town_sendgift.
Fixed inlined links in kmail (previously truncated kmail when hit)
Added shore last adventure recognition.
Added new_login_hook
Better support for compact mode (auto shifting out of it...)
Added start_rollover_hook
Modified boxes of sunshine, candy heart detection (chat)
Added period to allowed chars in effects.
slgfairy
Overhauled main loop.
Changed how outgoing messages are displayed in logs.
Added potential logging of HTML in LogUserAgent.
Added login delays for recent sessions not logged out.
Blessed/cursed by The RNG (#1000000)
clan forum posting
terrarium
removed duplicate item/effect parsing code
new filter for dev. code
handling dvorak's revenge
much more detail of combat/adventure results
hidden city
clean up charpane reading
database of players/ids now regenerated slowly in case players get deleted
more modern quests
bhh support
modern ascension history
Overloaded UserAgent class that logs stats.
Parsing KoL pages:
Edits to run on 1/5/2008.
V for vivala effects in chat.
KMail:
Valentines changes.
Extra characters in candy hearts.
Personalized mugs.
Changes to inventory pages.
Equipping outfits
Adventuring/Combat screens.
Hidden city
White Citadel
Effect names that start with symbol characters.
Some familiars.
Basement support
Support for custom titles.
Mall stores
Quest page.
Doc Galaktik's
Ascension histories.
Display cases.
Including subjects in clan message board posts.
Equipping items (accessories) into specific slots.
Minor changes to cocktail crafting, cooking, smithing...
Using SGEEAs
New channels, new message types.
Automatic discovery of unknown items is still broken.
Enjoy.
Revision 179, 1 February 2007
http://www.brandybuck.com/kolbot/kolbot-179.tar.gz
When "logging in," checks to be sure that achieved user was desired one.
Matches carols as buffs.
Smile of Mr. A removed (only boxes now).
Candy heart recognition added (chat and mail).
Reading of items in Hagnk's.
Changed clan members administration.
Shirts added to unequip possibilities.
Cleaned up response matching (parse_response).
Charpane and charsheet parsing more detailed.
Cleaned up item description parsing.
Chat messages are private by default.
Heart necklaces, cream pies, candy hearts recognized as chat message types.
http://www.brandybuck.com/kolbot/kolbot-176.tar.gz
Finally the pwd hash is in the charpane! This means that lchat no longer needs to be used to get it, and characters that haven't passed the literacy test can be used. The login script (new, secure version only) uses this now. Additionally, there is a check to see that the character 'logged in' is the same as that expected in the config->{user} field.
Minor changes:
various kmail errors caught
gift box opening improved
knoll (innabox and plunger) interface added
new (with familiar) ascension page is read
Items database treatment revised to allow extra columns in the database table to be passed through to the in-script data structures.
Revision 173, 30 October 2006
http://www.brandybuck.com/kolbot/kolbot-173.tar.gz
Better handling of nightly maintenance (proper polling)
New secure login cde (KoL change)
no_redirect flag to die on attempted server redirects
{local_reset} function added to ensure()
Chat processing patterns tinkered, including
Bet fixed, WANG fixed, toilet_paper, cream_pie added
town_sendgift with (do_it => 0) will return available gift types
kmails with valentines better than current (but differently than traditionally) read
comma removal fixed in places
clan_whitelist add function added
damage dealing better caught
effects in charpane fixed (KoL change)
Action.pm: user_id used if user is unavailable and a user is needed
Revision 172, 30 September 2006
http://www.brandybuck.com/kolbot/kolbot-172.tar.gz
Important changes:
KoLBot::KMail structure changed! Instead of separate @id and @number arrays, there is now @items that contains references to Item's, (or a similar hash structure). The 'new' constructor will properly convert from old to new format, but otherwise the old arrays are completely deprecated.
More minor/transparant changes:
Secure login is used by default (and works well, except when KoL changes around it). Forcing the old login is possible by setting KoLBot->config->{login_old}.
Items::get_item returns a copy, rather than the deep global, Item class, so you can modify it, and stick fields like 'number' in. Which many things now make use of.
read_kmail completely overhauled. Deals with reading kmail after attached gift boxes have been opened (new fields insidenote, i_meat, and i_items). read_kmail now sticks in the UTC time. This will only work if the setting of the time zone in the account is the default "-500" though "-500" actually means "-700".
Update flags for get_items: by default, no advanced matching is done. Flags in Items->{config} can be set for updating the items information. With {update} set, the inventory is loaded to attempt to identify the item (name/id/description) and the internal Items class database is updated. Setting {update_db}, an external DB database is also updated. The per-invocation {no_check} flag can be used to skip all of this, in case you don't believe the item in question might have been added.
town_sendgift also expects an array of Item's.
koltime() advances the day in the moments between rollover and 0000 in the KoLBot clock.
Additems in managestore now takes an array of hashes of form
$bot->managestore(action => 'additem',
items => [{ id => 1,
number => 1,
price => 10_000,
limit => 0}]);
Semicolon added to match gray coloration in reading mall searches.
&displaycollection, &search_player, &item_image_url, and &get_item_description functions by ePete included. See his post for more info.
Revision 155, 17 September 2006
http://www.brandybuck.com/kolbot/kolbot-155.tar.gz
Important changes: method of re-logging in after various disconnects completely overhauled. For those using internals, {url_i} is no longer used, the site array is rotated. Also, the site currently connected to (due to redirects) may not be one listed in the site list. A few days of testing shows this is reasonably robust. Rotation never occurs by itself in Chatbot.pm
Setting a flag {update => 1} in Items->config will allow the bot to dynamically update a database based item table instead of dying when a new item is found. Further developments to this are expected.
.
Substitutions in Actions work better, including substitutions in meat.
Better matching of 23/FNORD items.
More PVP result matches.
Save custom outfits.
Make meatpaste/etc.
Use starcharts.
More NPC stores.
Much more detailed combat result parsing (but probably breaks with new descriptions).
Goblin king, rats, bonerdagon adventuring.
Multiple use (dual funk-slinging) in battle.
Overhaul of charpane and charsheet.
Quest log parsing.
Untinker
Rafflehouse reading.
Arena reading.
Rules properly initialized internally.
login() and ensure() functions rewritten to deal with one minute, 15 mintute limits, and one hour server redirect.
heartbeat slightly changed to be overloadable in inhertited classes, scan_hook_pre, _mid, and _post added.
In get_inventory, flag added to avoid using Items::get_item, since it can now call it back.
combine_for_inventory function added that returns inventory without the mess.
Number added to Items::get_inventory to distinguish plurals.
Item::as_string now includes plural.
Removal of unused database fields in Items::
"takegoodies" from clan stash fixed (I hope).
search_mall() now includes a "grayed" flag for each entry, indicating whether the entry is grayed out in the search results.
Last two from tomek (though the search_mall functionality is different).
Revision 142, 17 June 2006
http://www.brandybuck.com/kolbot/kolbot-142.tar.gz
Current year changed from 14 to 13
login_quiet added as a config option
Brick chat messages recognized.
Brick mail doesn't break.
curse (brick) interface added
combine() now returns an inventory list
lots of results pages added in parse_response()
get_inventory works with images, also will return equipped items if asked
choice adventure interface added
minor formatting corrections
familiar read from charpane
skill list read from charsheet
hermit interface added
sewer interface added
store interface added
Warning if a rule doesn't match any established message types.
Corrected reading plurals from item files.
Revision 140, 6 June 2006
http://www.brandybuck.com/kolbot/kolbot-140.tar.gz
KOL CHANGE: the clan stash display and interface have been changed. This release allows the accessing of the new page.
CODE BREAKING CHANGE: the fight() and adventure() functions will no longer return $rv=2 when you are in an encounter. See below
Complete details (only KoLBot.pm changed):
clan_stash() modified to meet new display and form submission code. Currently supports only one item at a time.
Reponses parsed for equip();
Large overhauls in parse_response(), the code that parses most responses.
One NPC Store and the entrance cavern added, responses common to those.
Identification of "choice" adventures added.
$prods->{choice_value} will be set to the choice adventure id.
$prods->{'choice_$i'} for each choice will be set to the text for that choice.
This combat information is actually part of parse_response() as well.
Combat overhauled. Specificially fight() and adventure() that use this code will no longer return $rv = 2 when an encounter to fight still exists. Rather, they will set $prods->{in_combat} = 1;
Twiddling thumbs added.
Combat wins/misses robustified.
koltime() is set to return a kol year as well. We are currently in year 14.
bounty_hunter() will read the bounty hunter page
galaktik() will let you buy stuff at that NPC store.
ascensionhistory() will read/parse the ascension history of a player
Revision 138, 27 May 2006
http://www.brandybuck.com/kolbot/kolbot-138.tar.gz
IMPORTANT: KMail reading was broken with the addition of years to the readout. I've changed the code to read the year, and removed the heuristic rules for figuring out which year is meant.
Also changed:
Stench damage bonus read
Matching for "You shouldn't be here."
create_item marked as obsolete
Revision 136, 6 May 2006
http://www.brandybuck.com/kolbot/kolbot-136.tar.gz
If you are using Chatbot.pm, the first few changes are important.
Files changed: KoLBot.pm, Chatbot.pm, Rule.pm, catbot.pl
add_rules MUST be used for Rule.pm rules, rather than sticking them in to $bot->{rules} directly. Rule.pm no longer checks message type/channel. Instead, rules are put in (perhaps multiple) appropriate queues in Chatbot.pm, and only the rules queue appropriate for the message type/channel is used. This improves chatbot's CPU usage by at least a factor of 4. (Compiled-once patterns in closures are still used for user/message matching.)
catbot.pl was changed to match this usage.
Corrected and standardized " as " when reading mail/etc.
KoL's account_contactlist.php dramatically changed. Revised reading contact/ignore lists, as well as the code for removing entries for these lists to be compatible with the new versions.
Item names that include parentheses now are matched. Plurals of these items aren't. (I think it's only the stone tablets and instant house this affects, which should never be pluralized, newbiesport uses ™ instead of (TM).)
Effects in parse_results are matched.
Effects in the full (not compact) charpane are read.
Added an unequipall() function.
Revision 131, 22 April 2006
http://www.brandybuck.com/kolbot/kolbot-131.tar.gz
Incorporated tomek's changes to char pane reading since it now uses css styles.
Fixed some typos in item matching code (opening giftboxes, etc.)
Revision 130, 21 April 2006
ESSENTIAL CHANGES:
Changing of item matching code to use new itemdesc() code rather than whichitem= code. I think this was done across the board. I need to centralize things like this.
Legacy code remains, as kmail sent before today will still have the old code in it.
Minor:
Rollover detection works in some semblance.
Made emote detection more robust.
Added chat recognition of clan leadership.
Added chat recognition of someone using a WANG on you.
Better gothy and haiku multilines.
Remove debugging.
Colors proper in Jick/Skully messages.
Proper link matching for haiku.
Change to local time for rollover prediction.
Various case insensitivities.
Addition of 23 FNORD and 37 in a row matching.
Detection of undefiled cyrpt parts.
Trick or treat code added.
Clan message board function.
New combat adventure matching.
Elemental damage bonus matching.
Revision 127, 26 February 2006
http://www.brandybuck.com/kolbot/kolbot-127.tar.gz
ITEMS.TXT FORMAT CHANGED: now id desc name [: plural]
items_update.pl <items.txt >items1.txt may be used to create the new file
The colon separates singular from plural
General cleanup
Gift box opening: open_gift(item_id => XX)
account_contactlist() returns people on contact list and ignored
add_ignore(user => NAME|ID) ignores a user
remove_ignore(user_id => ID) unignores a user
multiuse(ITEM_ID,QUANT[,check response]) uses the use multiple interface
Monster name formatting changed in game, matched.
store_log() returns an array ref of hash refs to sales from store
read_mail() now returns item names read directly from the mail, new field "rawmsg" (ep2)
Removed some debugging code
Added chat recognition for MMG betting, clan buffs, clan hall announcements, trade offers (ep2)
Catch an occasional chat message that was missed.
Support for multi-line messages (Haiku and Gothy, after ep2)
Clan buff purchases have added pwd hash and now work again.
New stats from profile page (ep2)
'clan' is now a fallback default channel for some things.
Failed work toward rollover detection.
Better chat matching: trade offer cancellation, gothy, haiku, perhaps Toot's haiku-in-any-channel.
More profile fields read in showplayer(): no player, gender, clan, store, display case.
Revision 119, 12 January 2006
http://www.brandybuck.com/kolbot/kolbot-119.tar.gz
Works with current kmail interface
Grey sickness parsed
More efficient parsing in rules, uses closures
Some DB commands now properly use finish()
Catbot demonstration added
Support for loathing2 domains
Default from inventory when sending gift packages
Rotation of kmail dates to those before November being 2006, those after 2005. (Were all 2004 before.)
Added green to acceptable colors in matches.
Revision 112a, 23 November 2005
A few minor changes with items, dates, and Chatbot.pm
Works with current mail format
My subversion isn't working right now, so poor versioning name.
Revision 112, 6 August 2005
- Plurals accepted in most places they occur.
- DB based item list allows plurals
- Gift package sending
- Reads new, paned inventories
- Many new chat features included, including mod announcements
- Many small formatting changes in the kingdom included
Revision 98, 22 April 2005
- Use and equip item now password hashed, as well as drinking and eating
- Slight change to fonts in chat messages
- Limiter now handles midnight based resets
- Lots of small stuff with Chatbot.pm sub-package
Revision 85, 21 January 2005
Most of the changes suggested below have been included
- KMail slightly simplified, and working with changes made
- Cook and cocktail routines overhauled
- Now take named arguments
- Return all items created
- Returns text for failures, exploding boxes
- Make reagent and noodles should work
Revision 83 released 11 January, 2005
Big changes: new password hash reading/setting, kmail months now correct.
Previous: 69
Last edited by Fnord7 on Sat Jul 26, 2008 10:28 am; edited 32 times in total |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Wed Jan 12, 2005 12:08 am Post subject: |
|
|
It'd probably be good if you put a link to version 85 here also.
Last edited by tomek on Fri Jan 21, 2005 8:17 pm; edited 2 times in total |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Wed Jan 12, 2005 5:42 pm Post subject: |
|
|
Also, there's a bug in this version (it was there in 69, but I didn't report it).
In KolBot.pm in sub make_scrumptious_reagent (and make_dry_noodles), the test for the class fails. It currently reads ('pm' for the dry_noodles):
| Code: | | if($bot->class ne 'sr') |
It probably should read:
| Code: | | if($bot->{config}->{class} ne 'sr') |
At least it works when I make that change. |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Sun Jan 16, 2005 5:56 am Post subject: |
|
|
One more fix.
You made a change to the cook sub in KoLBot.pm (in 69 already I think) to add the quantity parameter to the call, but it was not also added to the mix subroutine.
Although, rather than setting a default (and only) quantity of 1, I find it moe useful to have a default of 1 that I can override with an optional prameter, much like makemax was optional. You'll probably want to do it properly with a keyword parameter, as opposed to a positional parameter, but here's what I have for now:
| Code: | sub mix {
my $bot = shift;
my $item1 = shift;
my $item2 = shift;
# AWM not debugged
# if max and qty are to be used, we need a way to encode both
my $quantity = shift;
my $makemax = shift;
($quantity) or $quantity=1; # assumed 1 if not specified
my $url = $bot->url . 'cocktail.php';
$bot->ua->max_size(0);
my $args =
[ pwd => md5_hex($bot->config->{password}),
action => 'combine',
item1 => $item1,
item2 => $item2,
quantity => $quantity
];
($makemax) and push @$args,('makemax' => 'on'); # only set if specified
my $response = $bot->ua->post($url,$args);
delete($bot->ua->{max_size});
# Again, it might be useful to check for other failures
$response->is_success or die "HTTP " . $response->status_line;
}
|
I do exactly the same with cook and smith (smith is also useful for me have in KoLBot.pm). |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Mon Jan 17, 2005 3:49 pm Post subject: |
|
|
Another change.. It looks like the make_noodle and make_reagent routines need to change to skill.php instead of campground.php now.
Also... could you add an indicator in the return from cook and mix about whether there was an explosion and/or how many items actually got made? (currently there is no return value). |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Fri Jan 21, 2005 2:28 pm Post subject: |
|
|
| I have a problem with versions 83/84 and multi line kmail. Apparently any message with multiple lines is being flagged as unreadable. The format obviously changed again recently. |
|
| Back to top |
|
 |
Fnord7
Joined: 08 Aug 2004 Posts: 193
|
Posted: Fri Jan 21, 2005 5:29 pm Post subject: |
|
|
I first noticed it this morning. Working on it now.
Edit: fixed. I didn't track down what had changed, just made the matching more flexible and it worked. | tomek wrote: | | I have a problem with versions 83/84 and multi line kmail. Apparently any message with multiple lines is being flagged as unreadable. The format obviously changed again recently. |
|
|
| Back to top |
|
 |
Fnord7
Joined: 08 Aug 2004 Posts: 193
|
Posted: Sat Aug 06, 2005 4:46 pm Post subject: |
|
|
| Bumped for version 112 |
|
| Back to top |
|
 |
Fnord7
Joined: 08 Aug 2004 Posts: 193
|
Posted: Wed Nov 23, 2005 12:16 am Post subject: |
|
|
| Version 112a |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Tue Dec 27, 2005 7:35 pm Post subject: |
|
|
| It looks like kmail changed again with the new servers??? KoLBot.pm dies on me when trying to read new messages. |
|
| Back to top |
|
 |
CDMoyer
Joined: 28 Dec 2005 Posts: 2
|
Posted: Wed Dec 28, 2005 2:07 am Post subject: |
|
|
| tomek wrote: | | It looks like kmail changed again with the new servers??? KoLBot.pm dies on me when trying to read new messages. |
It's primarily the change to green. Also, some of the code depends on the host being kingdomofloathing.com.
I've got a diff for both of those, and also fixing the gif package interface to work with the new "from hagnk's option.". It also checks for the "Nobody wants to receive an empty package" error from the gift shop interface.
I just hacked in a global BLUE variable, as Jick said it will go back to blue soon.
Here's the diff in context format:
http://cmoyer.dyndns.org:8080/~cmoyer/kmail_diff.txt |
|
| Back to top |
|
 |
tomek
Joined: 12 Aug 2004 Posts: 44
|
Posted: Wed Dec 28, 2005 8:09 am Post subject: |
|
|
| Appears to work fine. Thanks! |
|
| Back to top |
|
 |
CDMoyer
Joined: 28 Dec 2005 Posts: 2
|
Posted: Mon Jan 02, 2006 7:45 pm Post subject: |
|
|
| Code: |
- my $f_blue = '<font color="?'.$BLUE.'"?>';
+ my $f_blue = '<font color="?blue"?>';
|
Oops. Silly me, private messages didn't turn to green. |
|
| Back to top |
|
 |
Fnord7
Joined: 08 Aug 2004 Posts: 193
|
Posted: Wed Jan 11, 2006 10:17 am Post subject: |
|
|
I've been on holiday, similar changes have been involved in a new version.
One more bug: the code that reads KMail currently only reads the first page, even when asked to read more, I'm going to take care of this tonight and then release the code.
I've used (blue|green) for most of the code so that it should work seamlessly as the colors are changed back (as some seem to be changing at different times). |
|
| Back to top |
|
 |
Fnord7
Joined: 08 Aug 2004 Posts: 193
|
Posted: Thu Jan 12, 2006 12:09 am Post subject: |
|
|
Not enough time to release, but fixed, along with blue/green things.
Pagination coding changed, as well as the signifier I was using for more than one page.
Temporary current: http://www.brandybuck.com/kolbot/KoLBot.pm.gz |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|