Page 234 of 234 FirstFirst ... 134 184 224 232 233 234
Results 2,331 to 2,337 of 2337

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,010

    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,010

    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,010

    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
    135

    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,254

    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
    123

    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.

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
  •