Results 1 to 5 of 5

Thread: CCS inside a script

  1. #1
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    358

    Default CCS inside a script

    If I'm fighting in Itznotyerzits Mine, and I want to use a different skill for each dwarf, how can I script that?

    I know about "combat_macro", and how to use it (I think), but how can I script a custom combat for multiple monsters?
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

  2. #2
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    358

    Default

    string olfact_goth(int round, monster opp, string text) {
    if(opp != $monster[Goth Giant])
    return get_ccs_action(round);
    if(round == 1 && have_effect($effect[On the Trail]) < 1)
    return "skill transcendent olfaction";
    return get_ccs_action(round - 1);
    }

    adventure(5 , $location[giant castle], "olfact_goth");

    found this.
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

  3. #3
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    358

    Default

    I'm trying to script the road to the white citadel.

    I'm stuck on the choice adventure "Life Ain't Nothin But Witches and Mummies", which has a choice adventure 1st, then 2 more "choice" adventures, where the only choice is to click "ok/continue"

  4. #4
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    806

    Default

    I wrote a script for that once... here it is and here is how I did it:

    PHP Code:
    boolean WhiteCastle() {
        
    //set to always kick in the front door (it is quicker)
        //set_property("choiceAdventure931","3");
        
        
    cli_execute("create * opium grenade");
        
    cli_execute("conditions clear");
        
        
    string qgw get_property("questG02Whitecastle");
        
    buffer page;
        while (
    qgw!="finished") {
            switch (
    qgw) {
            case 
    "unstarted":
                
    page visit_url("guild.php?place=paco");
                
    page run_choice(1);
                break;
            case 
    "started":
                
    adventure(1,$location[Whitey's Grove]);
                break;
            case "step1":
            case "step2":
            case "step3":
            case "step4":
                if (item_amount($item[opium grenade]) < 2) { buy(5,$item[opium grenade],2222); }
                adventure(1,$location[The Road to the White Citadel]);
                break;
            case "step5":
            case "step6":
                //abort("kill the witch!");
                page = visit_url("adventure.php?snarfblat=413");
                if (contains_text(page, "Playing Fetch")) { page = run_choice(1); }
                if (contains_text(page, "value=\"Kick in the front door\"")) { page = run_choice(3); }
                if (contains_text(page, "value=\"Screw it, kick in the front door\"")) { page = run_choice(1); }
                if (contains_text(page, "value=\"So much for the direct approach.\"")) { page = run_choice(1); }
                if (contains_text(page, "Combat: Round")) { page = run_combat(); }
                break;
            case "step7":
            case "step8":
                //abort("explore the chests");
                page = visit_url("adventure.php?snarfblat=413");
                if (contains_text(page, "Playing Fetch")) { page = run_choice(1); }
                if (contains_text(page, "value=\"Investigate the chests\"")) { page = run_choice(1); }
                if (contains_text(page, "value=\"Open the first chest\"")) {
                    if (contains_text(page, "value=\"Leave the treasure chamber\"")) {
                        page = run_choice(4);
                    } else {
                        page = run_choice(1);
                    }
                }
                if (contains_text(page, "value=\"Examine some more chests\"")) { page = run_choice(1); }
                if (contains_text(page, "value=\"Return to the chests\"")) { page = run_choice(2); }
                if (contains_text(page, "Combat: Round")) { page = run_combat(); }
                break;
            case "step9":
                adventure(1,$location[The Road to the White Citadel]);
                break;
            case "step10":
            case "step11":
                page = visit_url("shop.php?whichshop=whitecitadel");
                page = visit_url("guild.php?place=paco");
                break;
            }
            qgw = get_property("questG02Whitecastle");
        }
        
        if (qgw=="finished") { return true; }
        return false;
        


  5. #5
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    358

    Default

    I wrote a script for that once... here it is and here is how I did it:
    Originally Posted by ckb View Post
    very interesting. I'm going to take parts of your script, and see if I can meld them with mine, and try to get mine to work.

    If mine doesn't work, then I'll just use yours! No sense in reinventing the wheel.

    I do have a few tweaks in mine that I will keep in. If you haven't done the meatcar quest, it won't run the script, and it will only buy upto the needed 10 opium grenades.
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

Posting Permissions

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