Search results

  1. T

    desc_item.php from $item?

    i didn't realize there was a difference between the item id and the description id, good to know :)
  2. T

    desc_item.php from $item?

    to_int should work... do you have an example of where it didn't?
  3. T

    Namespaces?

    I've noticed that a lot of times people need to rewrite their code because of naming conflicts (like when they import zlib) I was wondering how hard would it be to add namespaces to kolmafia? Maybe it would look something like this namespace my_namespace { void my_function () {...} ...
  4. T

    CanAdv -- check whether you can adventure at a given location

    I second that, I'd be willing to do some work on it if you put it in SVN
  5. T

    Algebra in ASH?

    Ok here's a version with the testing functions factored out and caky's "\\s+" change. If you had any more changes you should merge them with this one, and then we can have the mods move this thread
  6. T

    Algebra in ASH?

    Might want to hold off a little bit since we've made a lot of changes lately. Once we combine all our changes and factor out the test functions into an example script then we can ask them to move it.
  7. T

    Algebra in ASH?

    I agree that the test and the main should be taken out. But I would say that the eval_rpn_character is an important part of the library. That way people who want to do calculations with different stats and stuff can do it quick and easy without having to specify a long list of variables.
  8. T

    Algebra in ASH?

    matches still didn't work. I don't know if the switch is faster, but it does look a little neater so I swithed it. Also cleaned up the eval_rpn_character function a bit. Are there any other variables you think we should add by default? (updated the file in my previous post)
  9. T

    Algebra in ASH?

    Yeah as far as I can tell, it's not supported by mafia. They might have it by another name or something. Yeah true, guess there's no need to worry as long as it's only in scripting discussion. So what else do you think we should add/change?
  10. T

    Algebra in ASH?

    Yeah, it probably does speed it up too. Ah ok, in that case matches is definitely better for this situation. EDIT: huh, looks like the matches() function isn't working so I used find, and I wrote the is_operator without so many ^ and $ "^(\\+|-|\\*|/|\\^|if|max|min|not)$" I know I said I...
  11. T

    Algebra in ASH?

    Thanks, you seem quite knowledgeable about all this regex and matcher stuff, it certainly makes the code a lot neater :D Does that second regex need the start and end characters? (^ and $)
  12. T

    Yeah, I think it would make sense to post it so other people can access and use it.

    Yeah, I think it would make sense to post it so other people can access and use it.
  13. T

    Aggregate reference expected

    here's your problem (on line 63) foreach i in need_it[j] The problem is that need it is a map of items, but need_it[j] is a single item. So you're trying to iterate over an item. And it's saying that it expects a map and not an item you can remove the file now, if you don't want it out yet ;)
  14. T

    Aggregate reference expected

    Could you post the file here so I can take a look?
  15. T

    Width of & [php]

    You could try writing a greasemonkey script for it, not sure how easy or hard that would be. It's possible that someone has already written something similar for another forum.
  16. T

    Automated Puttyfarming

    This is actually just part of my farming script (specifically the part that deals with puttyfarming) packaged on its own for people who want to puttyfarm but don't want to deal with the rest of my script. Basically just farms your putty for the day until it's all used up. Includes support for...
  17. T

    Request- Auto-attack and Spooky Putty Sheet

    I just wrote a farming script and it has a part that automatically fights your putty monster and re-putties it 5 times. the puttyfarming part is in a seperate file from the main farming script so it can be run on its own if you don't want to bounty hunt and meat farm. here's my script...
  18. T

    Algebra in ASH?

    The regex looks good to me. I had no idea there was a whole matcher class. I'm sure that'll come in handy when I'm writing other scripts too. Not that it's a big deal, but could you simplify the function like this, to save space? boolean is_numeric(string test) { return...
  19. T

    CanAdv -- check whether you can adventure at a given location

    Don't get discouraged, zarqon. I think it's a really good idea for a script. I'll help :D
  20. T

    CanAdv -- check whether you can adventure at a given location

    It's telling me that Drunken Stupor and St. Sneaky Pete's Day Stupor are missing locations, thought it looks like there's some code that's supposed to handle them: // check drunk-only locations before doing drunkenness check if (my_location() == $location[St. Sneaky Pete's Day Stupor]) return...
Back
Top