ScriptUO

Official ScriptUO EasyUO Scripts => Submit your Script => Topic started by: Cadums on October 10, 2023, 01:46:48 PM

Title: Trick or Treat 2023 with style!
Post by: Cadums on October 10, 2023, 01:46:48 PM
So there are a few trick or treat scripts out there, but nothing that really did what I wanted.. so I decided to cobble together my own!  I've been using EUO scripts for a long time now.. but got into the game so late, there hasn't been a lot of inspiration to create something because everyone has done a great job before me.. so I was excited to come up with something.

A few things it does:

Things I've learned:
Concatenating persistent variable names between the comma and dot operators is the worst, it definitely gave me the most trouble.  In the end.. I just didn't concat anything, so my persistent variables don't have pretty names, but they are dynamic per character.  Good enough, I'm over it!
Title: Re: Trick or Treat 2023 with style!
Post by: Crisis on October 10, 2023, 06:28:31 PM
Awesome! I will give this a spin this weekend!
Title: Re: Trick or Treat 2023 with style!
Post by: docaw on October 10, 2023, 07:25:12 PM
Thank you!!  For the number of runes, is it the total in the book or total # 3-16?  this is fast and great
Title: Re: Trick or Treat 2023 with style!
Post by: Cadums on October 10, 2023, 08:55:54 PM
Hey, glad it's working for someone other than me!  Ok, so it's the total runes..  Basically the trick or treat runes are randomly picked between 3 and whatever your end rune is, so 3-16 with a full book (setting the variable to 16).

I know rune #1 isn't really used in the script.. that's my home rune in my book  ::)

I'm thinking mobiles IDs must reset (or more likely, the whole mobile) after server restart, which means the persistent variable I'm using to store those will just grow and grow and grow.  Hmm, I'll have to add a time check or something to prune that the first time you run after a server restart.

I've put out v1.1 update.. to grab the time you run the script and try to figure out if the last time you've ran it was before the server restart.  If so, it will prune the SYNTOT<charID> registry key, so that doesn't just grow and grow and grow!
Title: Re: Trick or Treat 2023 with style!
Post by: Cadums on October 27, 2023, 07:35:11 AM
I hope this has been working alright for the handful of people who downloaded it!

I have ran into a couple cases where the script doesn't handle things as nice as it could- nothing that has got it stuck, but I think the major thing is getting some checking to see if your recalling is failing due to the tile being occupied.  There's a million examples of how to deal with that out there, I just need to get some time to incorporate that before the event is over!