Random Race
I need something but I cannot accomplish it! Basically, I need an npc to spawn. Once he spawns, he/she changes to a random race/gender (Race range is from 1 - 12) (Gender Range 0 - 1). This is what I've got so far.
Code:
sub EVENT_SPAWN { Code:
sub EVENT_SPAWN { |
Ya, it can't work while spawning, because it doesn't have the ID and stuff fully done at that point. But, you can always make a timer and have it run 1 second after it spawns and it will let you do just about anything you want from that point. Lemme know if you need any help with setting up the timer.
|
I have tested the timer idea in the past. It does not work for me. :( Not even this works..
Code:
sub EVENT_SPAWN { |
Did you try going into zone, killing an npc and waiting for it to spawn and see what it does?
I personally know currently there is an issue with size where when I multi box unless all my toons are in the zone if one zones in after will have default size viewed for players who were shrunk/big. Strange bug but if this was the case of illusions as well (havn't tested this) code might work but require a respawn while you are actually physically in the zone/near mob. Kind of like that question "If a tree falls in the woods and no one hears it does it make a sound?". Well in EQ shrink/grow spells don't make a sound if no one is in zone to witness it. Other then this code looks fine to me from programming stand point. Only other thing I can suggest is instead of phsically trying to change its race/size, you could have it immediatly cast an illusion and custom grow/shrink spell on itself. But like I said, spell wise out of zone players who zone in will not see the size difference. |
Ahh.. Illusion is a good idea but I dislike the idea about 'casting'. There has to be a different way to go about things. Size is kept when players zone in. They see the correct size + changed race. Trevius, do you have any ideas mate?
|
Here is an example of a quest that I currently use and know that it works:
Code:
#Explosive Storm Code:
my $randomrace = quest::ChooseRandom(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); Here is another example I use with random Race changing: Code:
sub EVENT_ITEM { |
All times are GMT -4. The time now is 04:57 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.