Page 51 of 222 FirstFirst ... 41 49 50 51 52 53 61 101 151 ... LastLast
Results 501 to 510 of 2218

Thread: BatBrain -- a central nervous system for consult scripts

  1. #501

    Default

    By the way, here's my horrible version that seems to actually work (kinda).

    Main Issues:
    1) Not really macroable, I'm just exploiting BatBrain's damage formulas (biggest issue, it takes like 15 seconds per combat)
    2) Since I didn't know how to get the maximum possible damage, I took the expected damage and multiplied by 1.5 (number picked out of the air)
    3) If I wasn't using this in aftercore, I'm pretty sure I would get beaten-up because it takes 8-12 rounds per combat.
    4) Pretty sure I'm using some square peg in round hole programming.


    Code:
    import "SmartStasis.ash";
    
    //don't want to use any combat items except a seal tooth
    boolean only_tooth(advevent a) {
    	matcher aid = create_matcher("(use )(?:(\\d+),?(\\d+)?)?",a.id);
    	if(aid.find())
    	{
    		switch(aid.group(1)+aid.group(2)) {
    		case "use 2":  
    			return false;
    		}
    		return true;
    	}
    	return false;
    }
    
    advevent attack_downto(int targethp)
    { 
    	sort opts by -dmg_dealt(value.dmg);
    	foreach i,opt in opts 
    	{ 
    
    		if (	(dmg_dealt(opt.dmg) == 0) ||
    				(monster_stat("hp") - ceil(dmg_dealt(oneround(opt).dmg))) < targethp ||
    				(opt.id == get_action("attack").id) ||
    				only_tooth(opt))
    		{
    			continue;
    		}
    		
    		//if it isn't a seal tooth, multiple by 1.5, just to make sure we don't go below 24
    		//by accident
    		if(opt.id != "use 2" && opt.id != "skill 3020" &&
    		   (monster_stat("hp") - ceil(dmg_dealt(oneround(opt).dmg))*1.5) < targethp)
    		{
    			continue;
    		}
    		
    		print("Attack action chosen: "+opt.id,8);
    		print("Should deal: "+dmg_dealt(oneround(opt).dmg));
    		return opt;
    	} 
    	
    	return new advevent; 
    }  
    
    boolean main(int initround, monster foe, string pg)
    {
    	//init page
    	page = act(pg);
    
    	//always stun
    	enqueue(get_action($skill[entangling noodles]));
    	
    	while (monster_stat("hp") > 24)
    	{		
    		enqueue(attack_downto(24));
    		macro();
    		reset_queue();
    		print("Monster HP:"+monster_stat("hp"));
    	}
    	
    	reset_queue();
    	print("Should be at 24 HP, Comboing now.");
    	enqueue(get_action($skill[Disco Dance II: Electric Boogaloo]));     
    	enqueue(get_action($skill[Disco Dance of Doom]));     
    	macro(get_action($skill[Disco Face Stab]));   
    }
    Last edited by Stardock; 11-30-2011 at 11:04 PM.

  2. #502

    Default

    3) If I wasn't using this in aftercore, I'm pretty sure I would get beaten-up because it takes 8-12 rounds per combat.
    Originally Posted by Stardock View Post
    I doubt it could be done in under 8 rounds in a run that's serious enough where disco bleeding isn't a major waste of resources (one where you're running a good amount of +ML). With under 20 skills hardcore permed, it probably isn't feasible or worth the MP cost.

    Also, boo for reminding me that I should probably be doing this now that vcrisis isn't the main combat strategy.

  3. #503

    Default

    Yeah, it's actually worth a surprising amount of substats over the course of a run. I do softcore runs mostly so mp/skills aren't an issue. Dying because I'm running 100+ ML is an issue.

  4. #504

    Default

    Oh, I was looking at the wrong character then. Still, I have a feeling that the MP cost involved makes it not worthwhile even if you're being fueled by a Crown of Thrones. That looks like around 40 extra MP/fight, which you'll need to fund with seltzer at least some of the time, and the 320 meat could have been used to buy 2.4 mainstat instead of getting 3 overall substats.

  5. #505

    Default

    Yeah, in practical application what I would do is probably only use it if I had a surplus of mp and a potato type familiar. Otherwise I'd call bale's script. But that part is pretty easy to handle.

  6. #506
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,804

    Default

    I still mostly stand by my code for this application -- it considers your survivability and any other sources of damage, and will even use options like Entangling Noodles to prolong your life. The only change I would make would be to submit each action after enqueueing it, so all you'd have to do is change the while loop line like so:

    PHP Code:
    while (enqueue(attack_downto(24)) && !contains_text(page,"WINWINWIN")) macro(); 
    Last edited by zarqon; 12-01-2011 at 06:15 AM.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Woss | Om****est (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  7. #507
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Oh dear. It seems that kneebutt does not actually give +20 to hit. Yeah, the wiki and all common knowledge was wrong. It appears that the bonus to hit is probably twice your level with a maximum of 20. Sadly not much low level spading was done on this in the dark days before fisting.

    Also, your current script seems to disallow the unarmed bonus for kneebutt. That's a mistake. Master of the Surprising Fist is definitely effective on kneebutt. So... you'll want to fix that for hitchance() something like....

    Code:
    case 2015: case 2103: attack = my_stat("Muscle") + (unarmed() && have_skill($skill[master of the surprising fist]) ? 20 : 0) + min(my_level() * 2, 20); break;
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  8. #508
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,036

    Default

    That could explain why my level 7 myst class was missing so much with his kneebutts that spamattack said to use. Well that and the fact that the script didn't take hitchance into account at all for skills, only basic attacks, so now it rejects anything that has a hitchance of less than 75%.
    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

  9. #509

    Default

    Oh dear. It seems that kneebutt does not actually give +20 to hit. Yeah, the wiki and all common knowledge was wrong. It appears that the bonus to hit is probably twice your level with a maximum of 20. Sadly not much low level spading was done on this in the dark days before fisting.
    Originally Posted by Bale View Post
    Did you collect some data? For now I started up a thread for that.

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

    Default

    Sorry, no solid data. This is based upon the experiences of myself and some clannies in HCN who have been noting the rate of misses with Kneebutt when it should have been a certain hit. (It was the "that should NOT have been too much ML" kind of spading.)

    Real spading (the kind with numbers and statistics) is seriously needed.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


Similar Threads

  1. Feature - Implemented random_attributes not being passed to consult scripts
    By DoctorRotelle in forum Bug Reports
    Replies: 9
    Last Post: 02-07-2019, 01:53 PM
  2. Replies: 25
    Last Post: 04-05-2015, 07:20 PM
  3. Feature - Implemented Duplicate scripts cause "not found" error for consult scripts
    By nightslide in forum Bug Reports
    Replies: 6
    Last Post: 06-10-2013, 07:07 PM
  4. Multiple consult scripts?
    By fxer in forum Scripting Discussion
    Replies: 2
    Last Post: 03-04-2013, 08:43 PM
  5. Passing variables to consult scripts from the ccs
    By Captain Kirk in forum Custom Combat Settings
    Replies: 0
    Last Post: 08-17-2008, 05:53 AM

Posting Permissions

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