ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: billtcat on January 15, 2011, 04:51:59 AM

Title: Need help making a change
Post by: billtcat on January 15, 2011, 04:51:59 AM
I have this script that applies an enhancing rune to the item in a bag right now it sets the runes to target a particular item

set %runebagid SVBSYMD
set %itembagid RWNKTMD
set %itemtype XFR
set %runetype QWL

How would I change it so set %itemtype XFR would applie to multiple items in the bag not just a particuar one?

I have tried adding two or more types but it only enhance the first one


Bill The Cat
Title: Re: Need help making a change
Post by: Kalaka on January 15, 2011, 06:21:56 AM
XFR_WHATEVERUWANT_WHATEVERELSE I think.
Title: Re: Need help making a change
Post by: dxrom on January 15, 2011, 12:06:35 PM
You would need to create a table.

something like (and don't  copy/paste these values, they are merely hypothetical)

%toApply XFR_ASD_FGH_QWE_RTY_ZXC_VBN_DSA_GFD_ETC

then you would have your script apply the enhancing runes to %toApply. Then every item which has an ID of XFR_ASD_FGH_QWE_RTY_ZXC_VBN_DSA_GFD_ETC will get enhanced.
You need to create a table, or a list because without it, your script wouldn't know what to apply it too. Scripting makes things easier, but it takes alot of time and work to make that automation happen :D
Title: Re: Need help making a change
Post by: billtcat on January 16, 2011, 06:13:49 AM
so there is nothing like a wildcard I can use to say enhance "everything" in the bag?


Bill
Title: Re: Need help making a change
Post by: dxrom on January 16, 2011, 11:41:34 AM
Hmm, there might be... It's something I'd need to really look into though. I'll let you know if I find anything though.
Title: Re: Need help making a change
Post by: gimlet on February 12, 2011, 11:25:23 AM
I was just looking at  Whisp's Master of Loot and he moves everything in a bag to another bag
maybe his approach would work here if you already have not solved the problem.
Title: Re: Need help making a change
Post by: Scrripty on February 12, 2011, 12:26:07 PM
If you're SURE everything in the bag is something you want to enhance or whatever you are doing, you can use a wildcard.  Here's the way it works.  This is NOT using your variables.

Code: [Select]
set %enhanceBag %idOfBagWithItemsToEnhance
finditem * C_ , %enhanceBag
{
  for #findindex 1 #findcnt
  {
    CODE TO ENHANCE ITEMS IN %enhanceBag HERE
  } 
}

That will find EVERYTHING in your enhance bag and try to enhance it.  Even tools and such tho... if you're using that bag for ANYTHING other than just enhancing the items inside it, you might need to find another way. :)  Otherwise you'll enhance everything inside the bag including all the items you want to enhance this way.
Title: Re: Need help making a change
Post by: gimlet on February 12, 2011, 12:56:12 PM
Hey Twinkle McNugget thanks - i had forgotten that - me bad