ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Hollywood_Shono on January 05, 2010, 04:05:17 PM

Title: A Script For Bag Of Sending....
Post by: Hollywood_Shono on January 05, 2010, 04:05:17 PM
Is there anyone that has a script for bag of sending or who would be willing to take the time if its not to difficult to create one. I would like a basic script that checks for Silver. Waits till you hit 5,000 silver then uses the bag of sending on it and if you get the attacked message it auto sends whatever silver you have left. Im more concerned with the 5,000 but if you can both wonderful I'd be willing to pay for this script to be made if needed.

Thank You,

Hollywood
Title: Re: A Script For Bag Of Sending....
Post by: Scrripty on January 05, 2010, 04:47:18 PM
Is there anyone that has a script for bag of sending or who would be willing to take the time if its not to difficult to create one. I would like a basic script that checks for Silver. Waits till you hit 5,000 silver then uses the bag of sending on it and if you get the attacked message it auto sends whatever silver you have left. Im more concerned with the 5,000 but if you can both wonderful I'd be willing to pay for this script to be made if needed.

Thank You,

Hollywood

Get that karma up I'm sure someone will write ya somethin... :)
Title: Re: A Script For Bag Of Sending....
Post by: NObama on January 05, 2010, 06:00:52 PM
As Twinkle McNugget says, you'll find all sorts of people willing to help if you get that Karma up.

I'll even get you started.  The keys to your question will be:

#finditem
#findstack
#findkind
#findid
event macro

and perhaps:
#weight
#journal


...plus the bag of sending subs that are already posted in any one of a dozen forms on these forums.  TM and Cerveza code up all sorts of exceptional snippets.

 :)
Title: Re: A Script For Bag Of Sending....
Post by: Scrripty on January 05, 2010, 07:10:00 PM
Not to mention the bos subs that are all over EUO's site... :)
Title: Re: A Script For Bag Of Sending....
Post by: DeadIssue2 on January 05, 2010, 08:04:39 PM
Not to mention the script your looking for has already been written.....
Title: Re: A Script For Bag Of Sending....
Post by: 12TimesOver on January 05, 2010, 08:22:21 PM
Not to mention that I really enjoy a good BBQ, I mean seriously, how much more satisfying does it get then a well prepared, pulled pork sandwich with a sweet but spicy BBQ sauce lathered over the layers of tender meat topped with a chilled, pert cole slaw? Am I right? Anybody? Huh? Am I?

Title: Re: A Script For Bag Of Sending....
Post by: Hollywood_Shono on January 06, 2010, 10:56:47 AM
I like BBQ's  :o
Title: Re: A Script For Bag Of Sending....
Post by: Hollywood_Shono on January 06, 2010, 11:07:13 AM
Not to mention the script your looking for has already been written.....

Thanks for writing the script DeadIssue, now will it send silver if it see's another person come down or your being attacked?

Also instead of Max weight what would i change to send silver when it reach's 5,000
Title: Re: A Script For Bag Of Sending....
Post by: DeadIssue2 on January 06, 2010, 07:41:00 PM
I am taking a look at the one i wrote some time ago. I will try and rewrite it to fit your needs. When I wrote it, I made it so that if either you took damage or if there were no more monsters around to fight (ei. someone lured them away and they are  waiting for a GM to ban you) that it would find silver , send it , and log. It would even log out at server down to save your pets. But a lot of it has changed , so I am updating it. I will try and give it the 5k silver option and not by weight. Those commands are kind of new to me but I am getting some help understanding how that works. Do not expect this quickly, as I will only work on this when I have spare time.
Title: Re: A Script For Bag Of Sending....
Post by: Endless Night on January 06, 2010, 08:26:19 PM
untested on the fly code

Code: [Select]
gosub Countsilver
IF #result > 5000
   display ok yes i got 5k+ silver sweet cha ching

Sub CountSilver
  set !SilverCount 0
  finditem <what is the SilverType put it here> C_ , #backpackid
  If #findcnt > 0
   {
   For #findindex 1 #findcnt
      {
       set !SilverCount !SilverCount + #findstack
      }
    }
Return !SilverCount
Title: Re: A Script For Bag Of Sending....
Post by: Hollywood_Shono on January 07, 2010, 03:21:45 AM
Nice endless i'll add this in and test it out today

Thanks for writing the 5000 +1 karma from me!
Title: Re: A Script For Bag Of Sending....
Post by: DeadIssue2 on January 09, 2010, 11:20:54 AM
EN

Your silver counting snippet is, I believe, one of those core scripting principles that can be utilized in so very many different ways. I want to make absolutely sure I understand what your doing line by line and how it interacts. Would you mind taking this opportunity to explain these 10 lines in detail esp. what it is doing after the line:

finditem CPF C_ , #backpackid.

I ask because I might not be the only person who could learn something from this.

Thank you.
Title: Re: A Script For Bag Of Sending....
Post by: Endless Night on January 09, 2010, 11:50:21 AM
Title: Re: A Script For Bag Of Sending....
Post by: DeadIssue2 on January 09, 2010, 12:01:27 PM
Thank you so much!!!!!

I thought I understood it but I have now been corrected and I will be able to use this now.

Thanks
Title: Re: A Script For Bag Of Sending....
Post by: Endless Night on January 09, 2010, 03:17:14 PM
Glad i could help .. once you get your head around #findindex .. it all becomes so easy :)