Holidays

Post your Custom Scripts or Packages.

Moderator: POL Developer

Post Reply
ThisIsMe
Distro Developer
Posts: 101
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Holidays

Post by ThisIsMe »

Hey guys,

I undertook a project recently, a month or two ago which I in usual fashion was side tracked on numerous times. It was written for a shard running POL 096 and as such took quite sometime to figure out how to do certain things since I did not have access to the ever so loverly 'StrTimeFormat' function.

This zip includes a few pkgs not all necessarily tied to the key holidays pkg, the idea behind the holidays pkg is to have automated holiday events start, to set one up is a little wonky I am sure but there is a readme in there to help you set up holidays and it comes predefined with the big ones.

When I ported it to 099 to make use of the 'StrTimeFormat' function I changed the way I compare dates slightly and it has not been fully tested so feel free to drop it in and test it, my major concern is that events that span from say 12-23 to 01-06 might cause some issues as the starting month and day are greater than the ending month and day but I think everything should work out ok.

There may be some test messages in there and you may want to adjust the control.src sleep timer at the top, I think it is set to sleep for 600 seconds or something.

The other pkgs included are an itemsUtil pkg which is required for the holiday pkg if you wish to take advantage of it, it is not documented as i forgot to do so but will in a later release, if you want to store the player's serial on the item you can place a custom element in the item's itemdesc entry:
'AddPlayerSerial 0x1'

It also includes a rotate and flip command because I handle flipping and rotating of items a bit different than I have seen on other shards. I do not maintain a separate cfg file with the different directions, instead I store the rotate information on each item that can be rotated. So any item I believe that is able to be rotated found in this zip folder will be able to if you chose to adopt my method/add it to your own flip command.

I also believe the itemUtils pkg has makeset and addset commands, I left these in as maybe you might find some use from them.

For the most part the itemUtils pkg came from Edwards shard where I added the rotate stuff to it. The rest came from my own personal work for Pangaea which is again under 096 which I then ported, in a rather lackadaisical way to make use of mainly the 'StrTimeFormat' function.

Please test and enjoy, just keep an eye on events and make sure they end when they should, I believe they should but in my zeal to utilize the strtimeformat function I may have wonked something up.
holidays.zip
I know it is probably in rough shape, I plan to update this further once I have a couple things taken off my plate, stupid plate is not big enough!
(146.06 KiB) Downloaded 290 times
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm
Location: Montreal, Canada

Re: Holidays

Post by *Edwards »

Post Reply