View Single Post
  #7  
Old 01-10-2010, 01:17 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I haven't ever really played with the quest plugins in the plugins folder, so maybe they already do what I am wanting to do. Though, it is my understanding that you have to restart the whole server to get new plugins to take effect.

If plugins can already do it, then I will just get started on some new plugins I guess lol.

Here is an example plugin I have in my plugins folder (I do not currently use it):

soulbinders.pl
Code:
#!/usr/bin/perl

sub soulbinder_say {
	my $text = shift;
	if($text=~/hail/i){
		quest::say("Greetings $name. When a hero of our world is slain  their soul returns to the place it was last bound and the body is reincarnated. 
As a member of the Order of Eternity  it is my duty to [bind your soul] to this location if that is your wish.");
	} elsif($text=~/bind my soul/i) {
	    quest::say("Binding your soul.  You will return here when you die.");
	    quest::selfcast(2049);
	}
}
If this is doing what I think it is, then I should be able to call that just by doing the following in any NPC script:

TestNPC.pl
Code:
Sub EVENT_SAY {
	plugin::soulbinder_say($text);
}
LOL, if that is true, then I will be bonking myself for not looking into plugins a long time ago. Then, we will just need a way to reload the plugins without having to restart the server to start using the changes/additions.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 01-10-2010 at 05:08 AM..
Reply With Quote