Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Something Stupid

  1. #11

    Default

    Quote Originally Posted by Brute View Post
    Did you check to see if there is an 'e' somewhere before the other match string when you do a look at the west gate?
    I have a feeling subsets will match before the larger set. That is, if you're matching "There are a lot of dicks in here" and "lot," then "lot" will always match first. In this case, he's matching "e" when "e" certainly appears within the other match, which would explain why it always goes to the same place. That's why I think if you use "." it will work; "." must show up after the first match has processed, as long as the first match is the first sentence.
    Razzle them. Dazzle them. Razzle dazzle them.

  2. #12

    Default

    For a wizard script, can't you just flip the order of the match statements? Just put the general one second so the specific one matches first.

    EDIT: As a follow-up, isn't this the perfect time to totally ditch wizard scripts and just switch to using lich?
    Last edited by DaCapn; 09-03-2011 at 03:49 PM. Reason: Labeled

  3. #13
    Join Date
    Apr 2005
    Location
    Close enough to Pittsburgh
    Posts
    1,723

    Default

    Quote Originally Posted by vamosj View Post
    Don't worry boardergeek, I used yours and made the lich script.... I would still like to know for future reference if anyone has an idea bout the stormfront script and why it's not working..
    match strings are prioritized in the order they're listed... You're matching for the letter "e" and then the next line, you're matching for something that includes the letter e. The second match will NEVER fire. NEVER. SF does honor some regular expression syntax, but at that point, you may as well just write it in Lich and have full regexp capabilities.


    In memory of Ken "Zzentar" Dumas.

    Gibreficul

    AIM = Lord Gibreficul

  4. #14

    Default

    Thanks for the input there Mr. Gib.. I've started looking at the lich scripting and so far the pieces are not falling together for me. Programming is always a puzzle for me that once I find the right piece, then everything starts to fall into place. I tried to do something small such as altering the ;keepalive to retrigger my current SF script but so far it's not working.

    Code:
    #!/usr/bin/env ruby
    # All this does is wait for the 'YOU HAVE BEEN IDLE TOO LONG' message (waitfor is case insensitive), send a 'look' to the game, and echo a timestamp.
    
    setpriority(-2)
    n = 0
    while true
    	waitfor "you have been idle too long"
    	fput "drop hammer"
    	fput "drop bar"
    	fput "out"
    	fput "/hammertime"
    	n += 1
    	echo "TIMESTAMP ##{n}: #{Time.now}"
    	waitfor "****************NOD TO CONTINUE, HIT ESC TO EXIT*****************"
    	fput "nod"
    end
    I'll read more about the coding later.. I do vba programming in excel but you can at least step through that to see how things are working... This one I just need to dig a little more into the books...

  5. #15
    Join Date
    Apr 2005
    Location
    Close enough to Pittsburgh
    Posts
    1,723

    Default

    the error in that script you posted is the waitfor line... that line will NEVER happen... and escape doesn't terminate lich scripts. I think you wanted echo or respond there.

    Trick to Ruby, as with any programming language, is the syntax. Any text/string needs to be quoted... That was the big barrier I had to get over. After that, it was adding small pieces little by little, and eventually look back and realize I have the ability to do a lot of previously complex things without a lot of effort. If you haven't done so already, find a GOOD text editor, Notepad++ is popular, my personal preference is Textpad. Both have syntax highlighting for Ruby... those highlights are priceless when you're starting out.


    In memory of Ken "Zzentar" Dumas.

    Gibreficul

    AIM = Lord Gibreficul

  6. #16

    Default

    Quote Originally Posted by Bobmuhthol View Post
    It's been a while but I think you can match against "Obvious exits" because it necessarily appears after the first line of the West Gate description. This should only fail if a room doesn't have an "Obvious exits" line, which I'm not sure is ever the case; if it is, then you might try matching against "." since the description phrase should still be matched first.

    Obvious exits for indoors rooms, obvious paths for outdoors.
    Quote Originally Posted by Fallen View Post
    Drew's priorities - Merchanting > Roleplaying > Cybering > Being AFK > Cybering > Hunting
    (wrathbringer78) I think that's it. Viril is one big obnoxious ambient script.

  7. #17

    Default

    Too tired.. Getting my threads mixed up.. This was suppose to be for my forging hammers hangup... But thanks for the feedback...

Similar Threads

  1. Stupid name, stupid person.
    By AlahnnaDenale in forum Character Complaints
    Replies: 20
    Last Post: 08-26-2004, 04:37 AM
  2. TIJAY IS A STUPID STUPID RETARD AND I HATE HIM!!!!!!!!!!!!
    By Drew2 in forum Character Complaints
    Replies: 41
    Last Post: 04-27-2004, 01:12 PM
  3. This Is Stupid
    By Varsus in forum Game Mechanics
    Replies: 13
    Last Post: 03-22-2004, 12:20 PM
  4. Am I stupid?
    By Brat8525 in forum Social Forum
    Replies: 17
    Last Post: 12-30-2003, 08:39 AM
  5. Stupid names + stupid outfits = BAD RP
    By Jenisi in forum Nuisances and Annoyances
    Replies: 80
    Last Post: 07-20-2003, 08:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •