Author Topic: Trick or Treat 2023 with style!  (Read 1681 times)

0 Members and 1 Guest are viewing this topic.

Offline CadumsTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • Cadums has no influence.
  • Gender: Male
  • I said come on Fhqwhgads
  • Respect: 0
  • Referrals: 0
    • View Profile
Trick or Treat 2023 with style!
« on: October 10, 2023, 01:46:48 PM »
0
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:
  • No rails or anything, it will look for NPCs up to 20 steps away and use pathfinding to get there.  When it can't find anyone new to trick or treat with, within 20 steps, it recalls away.
  • Just one runebook, I have it set to use runebook spot 2 for bank, and rune spots 3-16 for trick or treat spots.  You need to let the script know how many runes you have.
  • It will remember all of the NPCs that it tries to trick or treat with, but actively don't support trick or treating.  This means your runs should be more efficient after you make your first couple of rounds.
  • It will bank candy and "special" things in separate containers in your bank.  Or one container, if you select the same container for both.  Not set up to work in housing secures currently.
  • Added functionality to reset the NPC ID list the first time you run the script each day after the server restart, since that refreshes NPC IDs (v1.1)

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!

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
TrickOrTreater-Public_v11.euo
« Last Edit: October 12, 2023, 02:15:49 PM by Cadums »

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 3015
  • Activity:
    3.6%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +206
  • Referrals: 2
    • View Profile
Re: Trick or Treat 2023 with style!
« Reply #1 on: October 10, 2023, 06:28:31 PM »
0
Awesome! I will give this a spin this weekend!

Offline docaw

  • Jr. Member
  • **
  • Posts: 17
  • Activity:
    0.2%
  • Reputation Power: 0
  • docaw has no influence.
  • Respect: +2
  • Referrals: 0
    • View Profile
Re: Trick or Treat 2023 with style!
« Reply #2 on: October 10, 2023, 07:25:12 PM »
0
Thank you!!  For the number of runes, is it the total in the book or total # 3-16?  this is fast and great

Offline CadumsTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • Cadums has no influence.
  • Gender: Male
  • I said come on Fhqwhgads
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Trick or Treat 2023 with style!
« Reply #3 on: October 10, 2023, 08:55:54 PM »
0
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!
« Last Edit: October 12, 2023, 02:00:05 PM by Cadums »

Offline CadumsTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • Cadums has no influence.
  • Gender: Male
  • I said come on Fhqwhgads
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Trick or Treat 2023 with style!
« Reply #4 on: October 27, 2023, 07:35:11 AM »
0
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!

Tags: