EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Auto Zone Controller Scripts w/installer help! (https://www.eqemulator.org/forums/showthread.php?t=40758)

purpose 07-14-2016 08:39 PM

Auto Zone Controller Scripts w/installer help!
 
Moved from http://www.eqemulator.org/forums/sho...d=1#post249992

Trying to implement zone controller.

Installed Windows Server installer, followed setup and server runs great.

Used the updater to pull most recent binaries (option 11).

Using this guide http://www.eqemulator.org/forums/showthread.php?t=37660 I created a global_player.pl, global_npc.pl and zonecontroller.pl (none of them exsisted, only global_player.lua).

Tried with them in quests/global, didnt work. Tried them a template folder I made, still not working.

Stuck... any ideas?

Thanks!

Uleat 07-14-2016 08:43 PM

Not sure on the totality of the issue..

..but, if you have both lua and perl scripts, the lua takes precedence and the perl is not invoked.

purpose 07-14-2016 08:52 PM

Ah okay, for some reason I thought that it would just invoke the lua first and then the perl.

For a person starting out, would it be best to attempt to translate the required code into lua or change the global_player.lua to perl?

N0ctrnl 07-14-2016 09:01 PM

As a practical matter, it's whatever you're most comfortable with that supports all the functions you need. Pretty much as simple as that.

Quote:

I created a global_player.pl, global_npc.pl and zonecontroller.pl (none of them exsisted, only global_player.lua).
Also, make sure you have zone_controller.pl (or 10.pl).

purpose 07-14-2016 10:33 PM

Ah okay, I am starting to understand a bit better (I think).

So according to

Quote:

== 12/29/2015 ==
Akkadius: Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
- Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua
- This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10
- Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC)
- EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables:
$spawned_entity_id
$spawned_npc_id
- EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables:
$killer_id
$killer_damage
$killer_spell
$killer_skill
$killed_npc_id
This guide http://www.eqemulator.org/forums/showthread.php?t=37660is now outdated, and the script for zonecommander (now should be zone_commander) needs to have the new variables ($spawned_entity_id, $spawned_npc_id, etc) used. Also, it used ID 50 and the new ID is 10.

Am I on the right track?

As an aside, I did a complete reinstall of the windows server compile, and didnt realize in its default state it WAS spawning zone_commander without me having to add the NPC in the database or implement the .pl files.

Still a bit confused as I cant find the zone_commander under the database npc_types ID 10, but the NPC is spawning!!

Akkadius 07-14-2016 11:33 PM

I don't know where you're getting the word 'zone_commander', it's zone_controller

Before when the original scaling plugin was written you needed to create your own zone_controller NPC

Now it is just implemented within the server itself to spawn zone_controller in every zone. This NPC does NOT exist in the database, it is a floating NPC in the zone that represents a script that controls zone based events.

You can retrofit the old system for id 10, but you will have to do it yourself.

purpose 07-14-2016 11:42 PM

Yes, zone_controller, just a mistake on my part. Commander sounded so... important like.

Thank you Akkadius, seems alot simpler now.

Just have to figure out how to rewrite the scaling script to include the new variables.

Cheers.

purpose 07-15-2016 11:51 AM

Working through this slowly (should be my nickname).

Just a couple questions:

1- now that the zone_controller is spawned already, I dont need the global_npc.pl spawn entry, correct?

2- retrofitting the old system, is it as simple as replacing the references in global_player.pl from 50 to 10, and replacing the references in the zone_controller.pl from zonecontroller to zone_controller?

I did source the cust_npc_scale_tables.sql.

Maybe Im in over my head, but what you have created seems like such an amazing tool!!


All times are GMT -4. The time now is 06:23 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.