perl script
Ok, heres a perl script I set up for weather for an invisible mob. Everything seems to run fine when I #repop the zone. The initial weather change can occur and the timer starts which repeats a random weather change. However, for some reason, whenever I first enter a zone (dynamic zones) and everything pops for the first time, it always starts raining. Since #repop works and reads the script correctly I cant understand what the problem is. Can anyone help? Heres the code:
Code:
sub EVENT_SPAWN { |
going to try it next by setting 2 timers instead of 1
|
I imagine that its probably due to my zones being dynamic. Maybe because of my save zone state option being on? Is there any way around this?
|
You have alot of issues with that script, Im surprised it even runs(will have nothing to do with dynamic zones though).
Not sure why you use quotes in this function... Code:
quest::rain("int(rand(80))"+1); Code:
quest::rain("rand(int(80))"+1); } Code:
sub EVENT_SPAWN { |
ahh i didnt even notice the rand/int swtich, thanks
|
everything seems to work with the changes you suggested, thanks a whole lot!
|
OK, the random weather code caryatis posted is awesome, but for some reason when i use it, clients randomly crash in the zone. I have tried to figure out what is causing the issue with this script but i cant. My first guess was that the weather intensity value was too high , but unfortunately with my testing I found that not to be the case. It is happening regardless of the weather intensity. Does anyone know what could be causing this?
|
i noticed when manually changing weather with Gm command, is that when you change from rain to snow, or from snow to rain- the client will crash.
So i suggest always set weather to 0, if its about to change from one type to another so if its raining - stop rain first, then start snow |
Ive already had that accounted for in my code. To make sure, I added weather to stop for snow and rain right when the timer goes off before any random numerals are given. Still confused as to what the problem is.
|
it seems as it doesnt happen when I repop the zone with the gm command, but only happens randomly when zoning into the zone with the script for the invisible npc.
|
With more testing, it appears the issue is only when i set weather to run off a timer rather then just a static weather change upon invisible mob spawn. It also only happens when zoning into the zone with the weather script. The everquest debug log file shows the following:
Code:
Entering main loop. Any ideas? |
All times are GMT -4. The time now is 07:29 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.