Hello all.
Ive been working on a custom server for a few weeks trying to learn the quest system and I created the following script for a "Magus" type NPC.
Code:
sub EVENT_SAY
{
if($text=~/Hail/i){quest::say("Hello, Traveler. Welcome to Luclin. As I am going through my spells here I can teleport you somewhere if you wish to [leave] here.");}
if($text=~/leave/i){quest::say("I can take you to the [Plane of Tranquility], the [Sunset Temple], the [Bazaar], The [Temple of Marr],the [Halls of Honor], the [Plane of War], [Tipt], and [Vex Thal].");}
if($text=~/marr/i){quest::say("Well, $name, thats quite a rare request. I'll need to see some kind of Stone of Marr to transport you there. I'll return it, of course.");}
if($text=~/tranquility/i)
{
quest::say("May Tranquility be forever with you. Good luck, $name.");
quest::movepc(203,0,0,0);
}
if($text=~/bazaar/i)
{
quest::say("Remember,buy high once and awhile, $name.");
quest::movepc(152,0,0,0);
}
if($text=~/honor/i)
{
quest::say("Remember your lessons of Valor in the First Temple, $name");
quest::movepc(211,0,0,0);
}
if($text=~/War/i)
{
quest::say("Be Tacticious, $name");
quest::movepc(211,0,0,0);
}
if($text=~/vex thal/i)
{
quest::say("Remember your lessons of Valor in Vex Thal, $name");
quest::movepc(158,0,0,0);
}
if($text=~/tipt/i)
{
quest::say("In the Chambers of the Rebellion, be Valorious, $name");
quest::movepc(289,0,0,0);
}
if($text=~/sunset/i)
{
quest::say("Assist the members of New Tanaan, $name!!");
quest::movepc(26,0,0,0);
}
}
sub EVENT_ITEM
{
if ($item1 == 1000)
{
quest::say("Wow! Here is your renewed Stone of Valor. Remeber your lessons in the Fourth Temple!!");
quest::summonitem(1000,50);
quest::movepc(220,-3,1034.50,396.75);
}
}
When I use any of the port commands 9 out of 10 times the zone crashes. When I close EQ I see this message in an error window titled, "Microsoft Visual C++ Runtime Library"
Quote:
Buffer overrun detected!
Program: C:\EQEMu\Zone.exe
A buffer overrun has been detected which has corrupted the program's internal state. The program cannot safely continue execution and must now be terminated.
|
Is my quest file corrupt or something? Or is there just too many commands to handle?