EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   Spawn NPC from global_player.pl (https://www.eqemulator.org/forums/showthread.php?t=42731)

strugglegenerator 12-01-2019 03:14 PM

Spawn NPC from global_player.pl
 
I'm trying to spawn a Translocator NPC (Gandalf) at my player character when I shout the word "Gandalf" from any zone. This is the code I put into global_player.pl, but it's not working:

Code:

sub EVENT_ENTERZONE {
$client->quest::unique_spawn(2001017,0,0,1985,-2243,-75);
}

I'm having a really hard time. I don't know how to spawn the NPC, nor do I know how to get it to spawn at the player instead of at the coordinates. I feel like I'm close, but obviously I have no idea what I'm doing. Coding is my weakness so I rely heavily on reverse engineering someone else's similar code, which is why I have been sifting through other scripts in the quests folder trying to find one that spawns an NPC at the player (like how pet's spawn when summoned) but it's proven illusive.

Can anyone point me in the right direction?

joligario 12-01-2019 04:11 PM

Do you also have a global_player.lua?

strugglegenerator 12-01-2019 04:56 PM

Yes sir I have a global_player.lua file too

Huppy 12-01-2019 09:09 PM

global_player.lua (or any .lua script) will rule over the .pl scripts, if you have two with same name. disable/rename the .lua one for the .pl to become active.


All times are GMT -4. The time now is 04:55 PM.

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