Well, what are you trying to do with the item counts? it works like this:
sub EVENT_ITEM {
if($itemcount{13198} == 4 && $itemcount{13199} == 3){
quest::say("Thanks for the 4 of this and 3 of this!");
quest::summonitem(2300);
quest::givecash(0,0,2,1); #format is: pp,gp,sp,cp - this is 2s 1c
quest::exp(200); }
}
That's hypethetical of course, but you get the idea. You can also use the numbered items instead of itemcounts, which is nicer imho..
also, itemcounts are really only there if you intend on handing in stacks of items in certain slots. With the item # format, it's easier for what you need to do. Remember, item1 = slot1 (in the trade window), and item2 = slot 2 respectively... and so on.
The changes reflected, would appear to be something like this:
sub EVENT_ITEM {
if($item1=="12345"){ #12345 being the item #
quest::say("Nevermind my text, take my item!");
quest::summonitem(2300);
quest::givecash(0,0,2,1); #format is: pp,gp,sp,cp - this is 2s 1c
quest::exp(200); }
}
That'll work. Also remember, that for some reason, perl likes 2 blank spaces at the end of the questfile. Don't ask me to explain why, I just know that's what it wants.
Secondly, if you're using the newest eqemu build, you can name your questfiles "npcname.pl" now. So, say for instance I wanted to do priest of discord questfile, who's server name is "Priest_of_Discord", the questfile would then be "Priest_of_Discord.pl" . This eliminates the hassle of figuring out which questfile goes with what.
Now, on to your teleporter quest. Watch your syntax.. perl isn't forgiving, and will hiccup on a single error (causing your quest to not load). Case in point:
sub EVENT_Say {
Make sure, especially calling a function that you preserve the case
sub EVENT_SAY {
Now, to format your quest to work..firstly, your movepc function is way off. This has 4 arguments: zoneid, x, y, z ... you haven't specified a zoneid, so your format would probably flop you around the zone... and probably under the world.
#Teleporter Janen .. Halas
#by Laviathon
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Hello There, $name i am Janen Porter i have the power to send traveliers such as your self to many destinations, what destination are you interested in ? [The Overthere] , [Estate of Unrest].");
}
if($text=~/The Overthere/i){
quest::say("Very Well off you go !");
quest::movepc(93, -4263, -241, 240);
}
if($text=~/Estate of Unrest/i){
quest::say("Very Well off you go !");
quest::movepc(63, 52, -38, 3); }
}
To get the zoneid, open up your db in mysql-front or some other mysql frontend, and open up the zone table. Locate the zoneid column. For a list of some more commonly used perl functions, check this post out (Thank you FatherNitWit):
http://www.eqemulator.net/forums/vie...=perl+commands
Be really careful about your syntax, I can't stress this enough. Make sure every quest::function(blah,blah) line ends with a semicolon ( ; ) and you make sure your upper/lower case letters are consistent. When in doubt, the zone.exe window your playing in will spit out what's wrong with the questfile on bootup, as it dynamically "compiles" them upon zone bootup.
Lastly, have fun
