Kita submitted a new resource:

White Rabbit - ~Kill the Rabbit~

Looking for a simple and fun quest for your players? Look no further than this script! It spawns a White Rabbit in the world, and players must find and kill the rabbit for a reward. But how can they find it? By asking vendors about the White Rabbit, of course! The answers will be different depending on whether the rabbit is on the same map and region as the vendor, so players can use process of elimination to narrow down the rabbit's general location.

Once players find and kill the White...

Read more about this resource...
 
So nice mini-game!tons of ideas thanks to you and your resource,i just added:

C#:
TimeSpan delay = TimeSpan.FromDays(2);
double hours = delay.TotalHours;
System.Timers.Timer rabbitTimer = new System.Timers.Timer(TimeSpan.FromHours(hours).TotalMilliseconds);

rabbitTimer.Elapsed += (sender, args) => SpawnRabbit();
rabbitTimer.Start();

To try it automatic.
 
Not sure what the timer is for as the rabbit will auto spawn on start up and after each time it is killed, I did however see a chance for multiple White Rabbits to exist if server is shutdown as I didn't save it, will fix that for next update!
 
Is there an easy way for staff to be able to go to (or find) the rabbit? Would be nice to be able to hand out staff rewards on kill.
 
[xmlfind enter Rabbit and hit Search, white rabbit should be listed, and as long as the staff fights the rabbit and not just use [kill, they will be able to get reward!

1683674314472.png
 
Looking at the script... which I'm not the greatest at code... it looks like, after the white rabbit is killed, it should spawn when the next person asks a vendor about it?? Or when the server is restarted? or both? lol long story short, after a player found and killed the first white rabbit xmlfind doesn't show another. So does it spawn only on restart?(I haven't restarted since it was killed.)
 
OK! lol last time I'll bother you! ;) I can't tell from the script where the vendor direction is coming from. But sometimes they say I saw the rabbit 'Mask' from here. other times I've seen 'Left', 'East", so I'm not sure if it's supposed to be 'Right' or 'North' instead of 'Mask' lol I'm using the enhanced client, don't know if that makes a difference. Most of my players use the classic but I like the eye candy of the enhanced when GMing.

Anyway thanks again for this.
 
I'll double check the directions, there are additional enums in direction that are used to differ between walking and running in certain directions and a idle which iirc is masked, I'll update the script this weekend with a patch to make sure it is only using the cardinal directions! Thanks for giving me feedback, I work on many projects at a time and forget to test or fully flesh out code, so thanks and never feel that your bothering me! lol
 
My players reported that they get no drops except the bag of regs. So, I used my GM to pop a player character around and killed 20 or so, and I didn't see any drops either except for the reg bag. I looked through the script and I don't think the AddRabbitLoot is getting called correctly, maybe, lol? Not that great of a coder and some of this newer code makes me scratch my head lol, anyway, I don't think I did anything to make this happen so maybe a bug?
 
Attached file (1.0.0.9) has been updated (no version increase) to fix a typo in the loot generation (Carrot > GoldenCarrot)
 
Not sure if this is a problem I'm having alone, since no one else has reported on it, but still no money or carrot drops. I am assuming that the gold is supposed to drop always?? I killed about 10 of them with a player character and still no gold or golden carrot. I didn't expect a carrot since it's chance of dropping is low but no gold makes me think it's still not working right, for me anyways.

I feel like it may be something I did wrong, this doesn't require Vita-Nex does it?

Anyway, any help getting this to work right for me would be great. thanks for all the hard work going in to this.
 
Not sure if this is a problem I'm having alone, since no one else has reported on it, but still no money or carrot drops. I am assuming that the gold is supposed to drop always?? I killed about 10 of them with a player character and still no gold or golden carrot. I didn't expect a carrot since it's chance of dropping is low but no gold makes me think it's still not working right, for me anyways.

I feel like it may be something I did wrong, this doesn't require Vita-Nex does it?

Anyway, any help getting this to work right for me would be great. thanks for all the hard work going in to this.
I don't think you've done anything wrong, it could be an issue with the event handling in ServUO itself (I will investigate).

The latest update was made by myself to reduce the amount of potential damage it could do to a shard's performance, the code logic itself is true to the intentions of the author, so previous bugs will have also been translated to the new update, with the exception of one thing; the golden carrot lure mechanic.
This mechanic was updated to move it to a less hot code path, processing it on speech wasn't ideal...

I wanted to omit explaining the details of the performance issues to avoid embarrassing Kita, because they do NOT take criticism very well, but apparently the gloves have come off so here we are...

Linq is fine to use, but not when it's being used improperly; it can have serious consequences...
Multiple uses of the Count() extension on collections that already support a Length or Count property is improper as the Count() method causes a complete enumeration of all elements (meaning it has to go through everything in a for-each loop, just to do count++).
Combine that with multiple nested iterations and you start seeing noticeable performance drops.
Multiply this effect by every player who is just chatting in general, nothing to do with the "white rabbit", the speech parsing was spending an unjustified amount of time and resources doing its thing, and then scanning all mobiles in range for rabbits.
It would only take a handful of players spamming speech to cause noticeable issues.

Anyway, no, it doesn't require Vita-Nex, this resource has nothing to do with me other than the latest update, which wasn't sanctioned by Kita, but Kita retains the rights to the idea and the code.

If you can contact Kita directly for support or a previous version of the release, I would recommend doing so.

I don't mind offering general support since I am responsible for the latest code, but I don't intend to take over this resource as my own.
I figured updating it would be better than removing it in response to people's support requests that would otherwise unfortunately go unanswered.
 
@Voxpire - Ok. well, thanks for the explanation. I'm not around here enough anymore to understand the proverbial can of worms I seem to have opened, but I apologize for any trouble I have brought to this site/thread. If you wind up "investigating" the problem with the drops, and find a solution, please let me know in whatever manner you're comfortable with. Thanks again for the time and effort.
 
@Voxpire - Ok. well, thanks for the explanation. I'm not around here enough anymore to understand the proverbial can of worms I seem to have opened, but I apologize for any trouble I have brought to this site/thread. If you wind up "investigating" the problem with the drops, and find a solution, please let me know in whatever manner you're comfortable with. Thanks again for the time and effort.
Absolutely no fault on your part, no need to apologise :)

So the way the loot is set up is that it will only add loot to the one white rabbit that the system spawns, if you spawn them any other way, they're essentially just normal rabbits.

If you use [kill on them, you won't be registered as the last killer, you need to land the killing blow to generate the loot.
 
Would a players pet killing it, or say energy vortex's, count for the player or the pet? lol I have a shard with nearly exclusively all tamers.

That could be the problem because when I was testing it, I also used a pet (with a player character not staff) to kill the white rabbit. (I haven't spawned them other than through the system) and I have seen no drops other than the bag of regs.

I'm off for today, but tomorrow I will kill some with a player character that's not a tamer to see if that fixes it.
Thanks again. :)
 
Would a players pet killing it, or say energy vortex's, count for the player or the pet? lol I have a shard with nearly exclusively all tamers.

That could be the problem because when I was testing it, I also used a pet (with a player character not staff) to kill the white rabbit. (I haven't spawned them other than through the system) and I have seen no drops other than the bag of regs.

I'm off for today, but tomorrow I will kill some with a player character that's not a tamer to see if that fixes it.
Thanks again. :)

That would definitely prevent it from dropping the loot; if the killer is a BaseCreature, it needs to resolve its master as a PlayerMobile and use that reference instead.
 
Confirmed lol I took a player character that was a sword guy, and it works as intended (boy are the tamers going to be mad lol). any help with the correct code for including the tamers would be appreciated. :)
 
Confirmed lol I took a player character that was a sword guy, and it works as intended (boy are the tamers going to be mad lol). any help with the correct code for including the tamers would be appreciated. :)
This should cover it, I'll leave it here as an optional for anyone who wants to update their copy;
Code:
        private static void HandleCreatureDeath(CreatureDeathEventArgs e)
        {
            if (e.Creature == Rabbit)
            {
                var killer = e.Killer;

                while (killer is BaseCreature bc && bc.Controlled)
                {
                    killer = bc.GetMaster();
                }

                if (killer is PlayerMobile player)
                {
                    AddRabbitLoot(e.ForcedLoot, player);
                }

                Rabbit = null;

                SpawnRabbit();
            }
        }
 
Is there a best practice for turning this one "off"? Obviously you could just remove the file, but if the creature was spawned (which it should be) prior to shutting down the server, it's like going to cause some sort of error on restart (would be my guess). Thoughts?
 
Is there a best practice for turning this one "off"? Obviously you could just remove the file, but if the creature was spawned (which it should be) prior to shutting down the server, it's like going to cause some sort of error on restart (would be my guess). Thoughts?
Comment out the entire Initialize() method, that will prevent the event handlers from subscribing.

Entirely removing a type that was previously serialized will simply prompt upon booting and ask if you want to delete all records for that type before proceeding, it doesn't result in permanently corrupted save files.
 
I'm thinking a toggle that would enable/disable might be a nice addition! I'll see what I can do it perhaps post an update for it here.
 
Back