Author Topic: KoLmafia Related Questions / Greasemonkey / Scripting and automating KoL  (Read 8870 times)

Black_Cat

  • Lamz0r N00b
  • *
  • Posts: 21
Re: One Click Wossname script for Mafia
« Reply #15 on: February 18, 2008, 11:15:12 PM »
I can vouch for it.  I have used it successfully on a multi.  *UN*successfully on Black_Cat in an earlier version.

The advice to read everything 3x is a good idea.
Heart: 20%
Diamond: 34%
Spade: 24%
Club: 22%

Black_Cat

  • Lamz0r N00b
  • *
  • Posts: 21
KoL Mafia - Conditional Script?
« Reply #16 on: February 18, 2008, 11:18:11 PM »
For the life of me, I can't find a conditional script or CCS for my poor HC multi.

He's a Sauceror and Mafia doesn't seem to have built-in support to intelligently cast Saucy Salve.

Basic logic

attack
if health < 35% cast saucy salve
if health > 75% stop casting saucy salve
attack

It's killing me from an annoyance perspective.

Nothing on any of the forums to really suggest a good / simple way to do this.

Thanks.
Heart: 20%
Diamond: 34%
Spade: 24%
Club: 22%

Black_Cat

  • Lamz0r N00b
  • *
  • Posts: 21
Re: KoL Mafia - Conditional Script?
« Reply #17 on: February 18, 2008, 11:27:16 PM »
http://kolmafia.sourceforge.net/combat.html

Customization is designed only to depend only on the monster you are currently fighting -- it is not meant to allow for strategies that a person changes based on remaining health or mana. Advanced customization on this level means that the resulting scripts are difficult to read, which defeats the point of this feature's introduction.
   
However, in the event that you wish to make use of such advanced customization, there is an undocumented "consult" command which can be used in these scripts -- for more information on how consult scripts work, you will need read through KoLmafia's source code. Do not request documentation of this feature or assistance with this feature; it will not be provided.


A glimmer!

 ::)
Heart: 20%
Diamond: 34%
Spade: 24%
Club: 22%

Black_Cat

  • Lamz0r N00b
  • *
  • Posts: 21
Re: KoL Mafia - Conditional Script?
« Reply #18 on: February 18, 2008, 11:50:49 PM »
This is actually from a Pastamancer posting, but might be a good start...

Call this in your CCS as:
[ default ]
1: consult something.ash

~~~~~~~~~~~~~~~

void main(int iRound, monster eek, string sText){
   if ( my_hp() < my_hp() * 0.30 ) {
      print("Ouch!");
      if ( my_mp() >= mp_cost( $skill[Lasagna Bandages] ) ) {
         print("Bandaging...");
         use_skill( $skill[Lasagna Bandages] );
      } else {
         print("MP insufficient... trying to recover MP...");
         if (item_amount( $item[magical mystery juice] ) > 0 ) {
            print("Drinking a juice...");
            throw_item( $item[magical mystery juice] );
         } else {
            print("No juice, attacking");
            attack();
         }
      }
   } else {
      if ( my_mp() >= mp_cost( $skill[minor ray of something] ) ) {
         print("MP sufficient... casting skill.");
         use_skill( $skill[minor ray of something] );
      } else {
         print("MP insufficient... trying to recover MP...");
         if (item_amount( $item[magical mystery juice] ) > 0 ) {
            print("Drinking a juice...");
            throw_item( $item[magical mystery juice] );
         } else {
            print("No juice, attacking");
            attack();
         }
      }
   }
   return;
}


Too sleepy...

I'll mod this tomorrow night and post the test results.
« Last Edit: February 18, 2008, 11:54:31 PM by Black_Cat »
Heart: 20%
Diamond: 34%
Spade: 24%
Club: 22%

achtung5

  • C.H.U.M.
  • ******
  • Posts: 2461
  • don't taze me, bro!
    • achtung5's Website
Greasemonkey/Javascript/Mafia
« Reply #19 on: April 05, 2008, 07:46:25 PM »
While I am not good enough at these kinds of things to pull them together myself, I was just checking out some scripts that help people out, and I thought I'd share them with you.

1) Tard's Greasemonkey Scripts

Summary: Tabbed interfaces reminiscent of KoLMafia, but found in your Firefox browser. Arena Trainers, Naughty Sorceress spoilers, and more. If you want to sift through the discussions about it, they can be found here.

2) SomeStranger's Greasemonkey Scripts

Summary: On top of maintaining Tard's scripts, SS finds the time to write some of his own. "Looter or Not?" checks Looters of Loathing for you. "Toplinks" adds some very useful links to the top of your browser, and the automated buff buyer gets buffs for you when you need them (from the Otorian buffbots, I believe)

3) The KoLMafia Script Repository

Summay: Don't trust these as much as the others, because while some good ones are in there, others can completely mess you up and don't work. Only use scripts that other people have given positive feedback. Personally, I write my own very basic scripts and don't bother with trying to automate the entire level 11 quest, but I believe there is such a script on the forum.

---

I'd love it if the community got together and wrote some scripts! Feel free to post them here. Also, if you run across any good scripts, please forward them to us.

DISCLAIMER: These scripts do NOT always work, and have NOT been completely tested. I am just trying to help you guys out by compiling some of the ones I personally reccomend.

EDIT: Maybe this should go in the Computer Geek Lair.
« Last Edit: April 05, 2008, 07:48:40 PM by achtung5 »

oblivion2k

  • Lamz0r N00b
  • *
  • Posts: 13
Re: Greasemonkey/Javascript/Mafia
« Reply #20 on: April 20, 2008, 01:09:36 AM »
I use nearly all of tards scripts, and I recommend them for people who have already ascended at least a few times. Just don't get the spoiler scripts and use them for your first pre-ascension run. That's just not cool.

Zaranthos

  • Administrator
  • C.H.U.M.
  • *****
  • Posts: 3290
Re: ach's guide to mafia (for beginners)
« Reply #21 on: April 20, 2008, 11:18:02 AM »
I'm going to lock this topic for the simple reason that achtung started another one which I'll merge with an old one someone else started. It would be nice if people used the search function and posted in an existing thread instead of starting new ones all the time.  :-\

http://www.sevenlances.net/forum/index.php?topic=430.0

teh_bigquack

  • 1335 HaXx0r
  • *****
  • Posts: 531
  • Bigquack (#589045)
Re: Mafia Related Questions / Greasemonkey / Scripting and automating KoL
« Reply #22 on: April 23, 2008, 07:13:48 AM »
I use Greasmonkey at home (i.e. for weekend play) and would recommend downloading the Mr Script, the battlefield script and the semi-rare counter (if you play hardcore).  You really don't need anything more than that :)

Of course, the easiest way to keep a track of the battlefield for the wossname is just to put on a buff for the required number of turns and to use that as a tracker - 333 cans of hairspray anyone?
I can move, move, move any mountain.

Zaranthos

  • Administrator
  • C.H.U.M.
  • *****
  • Posts: 3290
Re: Mafia Related Questions / Greasemonkey / Scripting and automating KoL
« Reply #23 on: June 08, 2008, 12:43:32 PM »
Some basic KoLmafia troubleshooting tips for people that have or have had problems with it.

- You have to have the Java Runtime Environment installed. Get it here: http://java.sun.com/javase/downloads/?intcmp=1281

- Windows has to be able to run the .jar file version if that's what you're using. Some programs like WinRar can hijack the .jar file extension and open it instead of running it using JRE (Java Runtime Environment). If that happens or Windows isn't running it you need to edit the file types and set Java to run .jar files. Check here: http://windowstipoftheday.blogspot.com/2005/10/setting-jar-file-association.html

- Newer Java versions auto-update and don't uninstall the old versions. This is messy and causes problems for some people. Uninstall all the old Java versions from add/remove programs in the control panel.

- Sometimes uninstalling Java/Netbeans/JDK and re-installing is needed to fix Java problems.

- Sometimes you need to manually delete the Java cache folders. Sample location on Windows XP: C:\Documents and Settings\Main\Application Data\Sun\Java (substitute your account name/login for Main). For Vista/Windows 7 - C:\Users\(account name)\AppData\LocalLow\Sun. If you wipe out all the folders in \Java you might have to re-install Java so it's a good idea to uninstall Java first, then delete them, then re-install Java.

- Spyware/Ad-ware/Viruses can make everything run like crap. If you don't keep your computer clean don't expect it to run anything right. http://www.sevenlances.net/forum/index.php?topic=694.0

- Typing "clear" in the gCLI window will clear the CLI log which can speed things up. Clearing the results from the Tools menu sometimes helps also. Closing the relay browser and opening it again can sometimes help if things seem unusually slow.

- Typing "gc" in the gCLI window will force a Java garbage collection routine to run. This is an undocumented command that can make things run better if mafia is getting bogged down.

- Sometimes KoLmafia is buggy. Try a newer/older version.

- Sometimes KoL is just slow. Can't help you here. Try playing in the early morning hours (USA time) when fewer people are on. After rollover is the worst time to play if you don't like lag.

- If KoLmafia sucks up too much CPU it's usually because something is wrong. You can try some of the above tips or set its process priority lower in the Windows Task Manager (CTRL-ALT-DEL). Don't set it too low or it won't run right, but lowering it when it isn't behaving nicely can prevent it from bringing the rest of your computer to a halt.

KoLmafia probably isn't heavily optimized (yet) so it may not run well on slower computers or computers with less RAM.

Edit: New Java versions now remove the previous version when updating. The early 6 versions and older did not.
« Last Edit: April 03, 2011, 11:47:04 AM by Zaranthos »

Neon_Samurai

  • Lamz0r N00b
  • *
  • Posts: 37
KOL Mafia (the question that will no doubt cement my n00b-ness)
« Reply #24 on: August 30, 2008, 02:11:36 PM »
Ok so apologies in advance if I'm asking one of those questions that everyone who comes through here asks but I've done a quick search of the forums and I can't find an answer.

What is KOL Mafia?

I've seen a bunch of you refer to it here (Pac asked me if I was familiar with it while I was babysitting his Paclings) and generally in a context that makes me think that I shouldn't need to ask and that I should already know what you're talking about.

But I don't.

So take pity on my lack of experience or my broken brain or the fact that it's five am here and I type this having returned from clubbing as I re-hydrate before going to bed. In short whatever excuse it takes to avoid your eternal scorn I am currently in possession of.

Someone drop some knowledge on me please?

sheling

  • C.H.U.M.
  • ******
  • Posts: 1467
  • sheling: English, but messed up.
Re: KOL Mafia (the question that will no doubt cement my n00b-ness)
« Reply #25 on: August 30, 2008, 02:21:38 PM »
http://forums.kingdomofloathing.com:8080/vb/showthread.php?t=88408

The thing I will say about KoL mafia is that you really shouldn't get it until you've done a few manual ascensions. And this is for a number of reasons:

1. You'll miss out on a bunch of content. While certain quests and mobs may be overly familiar, there's no way to see the "entire game" (Basic SC outlay) until you've done at least 4 ascensions (your first, then one as each sign), not to mention the additional familiar-opened zones such as the Moulin Rouge. You may not think the jokes are funny, but you'll not learn anything about the game if you fully automate it from day one.

2. You won't know how you want to play the game. Do you want to speed ascend? Take some HC or BM runs? Perhaps make a bunch of meat? Mafia does what you tell it to do. If you don't know what to tell it, it'll just mess up a bunch of turns and steal your enjoyment.

3. You won't learn any of the tips, tricks and short-cuts that you pick up my manually playing. Mafia's good, but it won't know whether you want to pre-farm items you'll need to ascend, how to trigger specific adventures or whether it's better to buff non-com boost or monster level (for example).

In short, you need to know the game before you need mafia. It does save a lot of work and effort and it does automate a lot of things. But it's incredibly easy to get wrong and will reduce the amount of hands-on interaction you have with the game.

Of course, others may disagree; that's just my tuppence worth. Read the thread I linked to and see for yourself.

Edit: Another link (pulled right out of mafia) which may be of use:
http://forums.kingdomofloathing.com:8080/vb/showthread.php?t=140340
« Last Edit: August 30, 2008, 02:30:35 PM by sheling »
[23:00] sk1j thinks shel is just a big spoon wielding breast-monster.

Shiverwarp

  • Spam Witch
  • ****
  • Posts: 386
    • Uber Melons (TF2 Server and Clan)
Re: KOL Mafia (the question that will no doubt cement my n00b-ness)
« Reply #26 on: August 30, 2008, 02:24:27 PM »
I almost never use mafia to auto adventure, only when I want to farm some place I've been a hundred times.  Castle, bounty, etc.

I use the relay browser, the chat interface, and the item interface and that's about all.

Neon_Samurai

  • Lamz0r N00b
  • *
  • Posts: 37
Re: KOL Mafia (the question that will no doubt cement my n00b-ness)
« Reply #27 on: August 30, 2008, 02:37:46 PM »
Ah, I made the mistake of searching "KOL mafia" not "KoLmafia" and that thread didn't turn up.

Thanks Sheling.

I have to admit that given my current goal (getting all the familiars - or at least as many as possible) the idea of automated meat farming sounds pretty attractive (given that it seems that I will need to buy many of the hatchlings from the mall) but I shall take your advice and ascend once in each class before I look at utilising it.

Thanks for the link.

EDIT: Actually realised I only searched here and the KoL Wiki at coldfront, not at KoL itself. Double n00b points bonus!
« Last Edit: August 30, 2008, 02:42:57 PM by Neon_Samurai »

pacone

  • C.H.U.M.
  • ******
  • Posts: 1626
Re: KOL Mafia (the question that will no doubt cement my n00b-ness)
« Reply #28 on: August 31, 2008, 02:33:43 AM »
Yup, mafia is best used when you have to do something repetitive and boring, but otherwise I prefer to adventure manually :D some jokes still make me laugh, two (three?) years later :D
All your l00t are belong to us.

Zaranthos

  • Administrator
  • C.H.U.M.
  • *****
  • Posts: 3290
Re: KoLmafia Related Questions / Greasemonkey / Scripting and automating KoL
« Reply #29 on: November 08, 2008, 01:27:08 PM »
One-Click Wossname script here. Posted link that Xenthes sent me. :)

http://kolmafia.us/index.php/topic,1395.0.html