Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Quick question on Custom Combat

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    23

    Default Quick question on Custom Combat

    Hey all! I have what is probably the stupidest question ever....

    I've been using mafia for quite a while, but I know absolutely nothing about scripting. I've tried to find the answer in the forums, but I don't understand about 97.5% of what I'm reading. I managed to set up & use some simple combat scripts, but my question is, can I use "if" in a CCS? I want mafia to automatically siphon my happy medium when the aura turns red, so would something like this work? I should add, I found this in the KoL forums "macros" thread.

    if happymediumglow red skill siphon spirit
    skill entangling noodles
    skill candyblast
    skill candyblast
    skill ravioli shurikens
    attack with weapon
    Any help would be HUGELY appreciated.

    Story

  2. #2
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    That would work just fine with a small modification:
    Code:
    if happymediumglow red
    skill siphon spirit
    endif
    skill entangling noodles
    skill candyblast
    skill candyblast
    skill ravioli shurikens
    attack with weapon
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesn’t work. /Bob Fitch, Blizzard

  3. #3
    Junior Member
    Join Date
    Jul 2009
    Posts
    23

    Default

    Wow, that WAS a simple fix! I can't wait to try it out tomorrow. I've been just using 2-3 adventures at a time until the familiar icon shows the orange aura picture, then adventuring manually until it turns red. Thank you!

  4. #4
    Senior Member Raven434's Avatar
    Join Date
    May 2007
    Location
    Virginia
    Posts
    460

    Default

    In a similar vein, why does this abort after every combat?

    I just want it to abort when the glow is blue and kill everything else until I get there:

    [ default ]
    try to steal an item
    if happymediumglow blue
    abort after this combat
    endif
    attack with weapon

    Thanks!

  5. #5
    Developer roippi's Avatar
    Join Date
    Aug 2010
    Posts
    2,663

    Default

    Concerns for macros in CCS


    • A macro's abort command needs to be encased in quotes because abort is also a legal CCS command. That's why all aborts in the previous example were quoted.
    more here

  6. #6
    Senior Member Raven434's Avatar
    Join Date
    May 2007
    Location
    Virginia
    Posts
    460

    Default

    Grazi!

  7. #7

    Default

    Why does this not work?
    Code:
    if happymediumglow red 
    skill siphon spirit 
    endif
    consult WHAM.ash
    It will use siphon spirit every combat, regardless of the glow. I'm sure I'm missing something basic. Help much appreciated.

  8. #8
    Developer jasonharper's Avatar
    Join Date
    Sep 2008
    Location
    Oklahoma
    Posts
    1,122

    Default

    Using "consult" prevents macrofication of your CCS, and the "if"/"endif" commands you're using exist only in KoL's combat macro language - they're simply ignored, otherwise.
    In game: Seventh (#363053), originally a Seal clubber. I am the Ap'ostle of Ak'gyxoth! (Or is that Ap'ostrophe?)

  9. #9

    Default

    Ah, so it's a case of getting one or the other but not both. Thanks. Now to beg Winterbay to incorporate this into WHAM.

  10. #10
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,223

    Default

    I believe it will work if you add a few quotes. Like this:

    Code:
    "if happymediumglow red"
    skill siphon spirit 
    "endif"
    consult WHAM.ash
    That will tell mafia to do exactly what you said, without trying to interpret it.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


Similar Threads

  1. Quick question re: load_html
    By InfiniusDev in forum Community Support
    Replies: 1
    Last Post: 10-06-2012, 02:28 AM
  2. Quick question regarding drinks
    By Stardock in forum Scripting Discussion
    Replies: 4
    Last Post: 12-22-2010, 05:28 PM
  3. A Quick Question
    By gregmasta in forum Scripting Discussion
    Replies: 1
    Last Post: 07-06-2009, 06:04 PM
  4. Quick question...
    By TinaMarieF in forum Scripting Discussion
    Replies: 2
    Last Post: 04-23-2007, 06:55 PM
  5. Syntax question with regards to custom combat
    By juiblex in forum Scripting Discussion
    Replies: 6
    Last Post: 01-27-2007, 11:34 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
  •