Page 234 of 235 FirstFirst ... 134 184 224 232 233 234 235 LastLast
Results 2,331 to 2,340 of 2341

Thread: Universal Recovery Script

  1. #2331

    Default

    There's a frozen store at 700, and one other store at 1m for cup of hickory chicory. I wonder why mall_price( $item[cup of hickory chicory] ) isn't updating after discovering the frozen store.

  2. #2332
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Actually, perhaps the problem is that it should break, rather than return after recalculating mall prices.
    We want to remove this store from ALL saved search results, not just the first one we found.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  3. #2333
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Which is to say, if we pass in itemId -1 - all saved searches - we should look for more matches.
    If we pass in a single itemId, we should return after removing the search we found.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #2334
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Code:
    			Iterator<PurchaseRequest> i2 = search.iterator();
    			while ( i2.hasNext() )
    			{
    				PurchaseRequest purchase = i2.next();
    				if ( purchase instanceof MallPurchaseRequest &&
    				     shopId == ((MallPurchaseRequest) purchase).getShopId() )
    				{
    					i2.remove();
    					StoreManager.updateMallPrice( ItemPool.get( itemId ), search );
    					if ( itemId != -1 )
    					{
    						return;
    					}
    					break;
    				}
    			}
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #2335
    Senior Member
    Join Date
    Jan 2014
    Posts
    161

    Default

    This subtraction should probably be an addition:
    Code:
    int mpcost(skill sk) {
    	int cost;
    	if(sk==$skill[lasagna bandages]) // Dang in-combat vs out of combat mp cost reduction for Astral Bracers
    		cost = max(1,6 - mana_cost_modifier());
    mana_cost_modifier() returns a positive value when spells are more expensive, and negative if it's less. With Radiating Black Body™ active:
    Code:
    > ash mana_cost_modifier()
    
    Returned: 3
    Which is an bandage MP cost of nine, but that code calculates three.

  6. #2336
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,268

    Default

    Thanks. I've fixed the mana cost for lasagna bandages.

    What an oddly specific bug for you to discover, but I'm glad you found it.

  7. #2337
    Senior Member
    Join Date
    Apr 2008
    Posts
    124

    Default

    For those looking to temporarily change UR to not cure Hardly Poisoned at All, the necessary surgery is on lines 1580 and 1581 of the script:

    Code:
    		return beset($effects[Hardly Poisoned at All, A Little Bit Poisoned, Really Quite Poisoned,
    			Somewhat Poisoned, Majorly Poisoned]);
    if you take out "Hardly Poisoned at All, ", all your other recovery bits will keep working, without curing that level of poisoning.

    If you have a hottub, it still may cure your poison incidentally, but it'll no longer do so at the beginning of every fight.

  8. #2338
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,768

    Default

    I think this is UR but maybe not.

    Calling the restore settings Low and Target, what happens is that restoration triggers at Low. It is able to restore to something greater than Low but does not actually reach Target. Automation aborts. But when I do nothing but restart automation proceeds because the current value is greater than Low.

    If it is UR then I would like to request a Feature that changes "when to abort" from "abort if Target not achieved after restoration " to "abort if Low not achieved after restoration".

    Thanks.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  9. #2339
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,268

    Default

    If it's UR, the abort message should be, ""Did not fully restore HP for some reason." If the message is different then there's another cause.

    UR should abort whenever it fails to reach the restoration target. Which is what you describe. Which is also your feature request.

    I don't understand your feature request because low is less than target.

    BTW: I'd prefer calling the values trigger and target.

  10. #2340
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,768

    Default

    If it's UR, the abort message should be, ""Did not fully restore HP for some reason." If the message is different then there's another cause.

    UR should abort whenever it fails to reach the restoration target. Which is what you describe. Which is also your feature request.

    I don't understand your feature request because low is less than target.

    BTW: I'd prefer calling the values trigger and target.
    Originally Posted by Bale View Post
    That is the message.

    Sometimes I only care about a minimum value. I'd be glad to restore up to a maximum but as long as I have met the minimum, I don't care that I failed to max out.

    So my request would be to optionally allow the condition "target not met" to not trigger an abort and have "unable to restore to trigger" be an abort condition instead.

    My OCD is bothered by something that starts automation and then allows me to restart WITHOUT DOING ANYTHING!!!!! If I didn't have to do something then why did it abort? :-)

    I suppose if I set trigger to be equal to target I would get the non-abort behavior I want but the last time I did that I did not like the choices UR made to restore. It has been a while since I tried with this but my recollection is that it was choosing higher meat per mp options compared to lower meat per mp options that exceeded the target but did not exceed the max mp.

    The problem occurs with low level but highly skilled and poor characters.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

Similar Threads

  1. Anecdote - Recovery Script not firing between auto-adventures?
    By fronobulax in forum Community Support
    Replies: 1
    Last Post: 02-20-2015, 06:36 PM
  2. Replies: 0
    Last Post: 09-21-2013, 05:50 PM
  3. what are all the ways mafia can consult a script? like recovery, breakfast
    By forgot my password in forum Scripting Discussion
    Replies: 5
    Last Post: 06-11-2009, 09:05 PM
  4. Recovery Script for Hardcore
    By Bale in forum Buff Upkeep Scripts
    Replies: 84
    Last Post: 03-04-2009, 07:17 AM
  5. Very New, Need a MP Recovery Script
    By Willie0248 in forum Scripting Discussion
    Replies: 2
    Last Post: 04-15-2006, 09:30 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
  •