PDA

View Full Version : Perl enableing your database?


jimbox114
07-30-2004, 03:15 AM
I have read some of the threads about perl, but none of them seem to actually say HOW to enable your database to use perl? I am ready to start adding some simple quests (basically about as complex as turn 4 items in get a item and a response), however it seems I can't use any of the editors (such as cfe) or perl without enableing my database to support it. I have created several custom NPC'S and items in my database and so I don't want to use a whole new database.

Also if I am pretty much screwed and can't simply enable perl in my database, what would I look to in order to make any type of quest?

Draupner
07-30-2004, 03:44 AM
you have to enable perl in the source not in the db
http://www.eqemulator.net/forums/viewtopic.php?t=12827
end of first post will tell you how to

jimbox114
07-30-2004, 08:53 AM
Between figureing how to set up perl, and trying to get perl into my emu, id just assume not use it if I don't have to.

Isn't there a way to do it without the use of Perl? I seen some info about a .qst system, but it talks about useing it in a older release of the emu. If I knew where to do the editing I could get by with editing some sample scripts I have seen posted aroudn the forums. There is only plans for a couple of simple Turn X items in to receive Y item in return (like the bonechip quest basically).

sotonin
07-30-2004, 09:26 AM
as far i've i know. .QST doesnt work anymore with emu. and hasn't for ages.

Cisyouc
07-30-2004, 10:21 AM
Just use Perl, its very simple (most of it).

jimbox114
07-31-2004, 06:53 AM
I don't understand where to put the commands in at this guide talks about:

Right now by default perl is not enabled when you compile. You will need to define EMBPERL for perl quests, and/or EMBPERL_PLUGIN for perl plugins (remember plugins require IO::Scalers) ** What is a IO::Scaler?? How do I define EMBPERL??**

To create another build configuration with perl support in VC++6
open the server (or zone) project **What do I Open??**
menu-- build,configurations
select zone-win32-Release and press add
set the configuration name to Relase with Perl
set copy configuration from zone-win32-Release
menu-- build,set active configuration
select zone-win32-Relase with Perl
menu-- Project, settings
Select c/c++ tab
with the category pulldown reading General add ,EMBPERL,EMBPERL_PLUGIN to the end of the Preprocessor defines
Change category to Preprocessor and put c:\perl\lib\core in the Additional include Directories
select the link tab
change the category to input and put c:\perl\lib\core in the Additional library path
Close window
menu-- project, add to project, files
select zone\embparser.cpp make sure it has insert into: zone selected
do the same for embperl.cpp embparser.h and embperl.h

Now you can build a zone.exe with or without perl support. It will put the zone.exe with perl in a sub directory of the zone source. This is how I set it up so that it worked. If there is a "proper" way please let me know.

I have no idea what this is telling. Like most of the instructions on this site they are vague to a inexperienced programmer and don't actually tell you where to go to actually put these commands in. Im sure if you actually knew what software to open up in order to put these commands in, it wouldn't be too bad.

sotonin
07-31-2004, 07:04 AM
Give up jimbox.

You have no business messing with the developer's releases. These are intended for programmer's only.

cofruben
07-31-2004, 07:04 AM
are you using microsoft visual c++ 6.0?if yes I can help you,if not im sorry.

jimbox114
07-31-2004, 08:41 AM
Give up jimbox.

You have no business messing with the developer's releases. These are intended for programmer's only.

I see because you say give up I should just delete everything I have done to my eq server and just say heck with it. Because I need some help here and there

I know you are good about helping others at this site. Well Im sorry if this sounds rude, but if all your going to do is treat me like I am a incompetent fool who has to call dell everytime he gets a error on there PC, then just stop posting in my threads. I am trying my best and am making progress, and I don't need the likes of you constantly downing me. Nobody forces you to read my threads, and nobody forces you to reply to them. You act like I am a AOL noob who has to call tech support to turn my PC on or something.

sotonin
07-31-2004, 11:07 AM
open the server (or zone) project **What do I Open??**

The above quote shows that you have no business with the dev releases, if you can't even figure out which file u need to open. When it clearly says the "Project" file.

I've watched your posts over and over, and they are always pretty much hold my hand and help me make a server. If you don't know how to open a file in a compiler, make changes and compile, you don't need to be using the dev releases. It's that simple.

jimbox114
07-31-2004, 11:23 AM
open the server (or zone) project **What do I Open??**

The above quote shows that you have no business with the dev releases, if you can't even figure out which file u need to open. When it clearly says the "Project" file.

I've watched your posts over and over, and they are always pretty much hold my hand and help me make a server. If you don't know how to open a file in a compiler, make changes and compile, you don't need to be using the dev releases. It's that simple.

Yea I ask for a simple answer here and there, once I find out what it is I remember it. Half the problems I have had putting a server together is reading obsolete help topics. Right now I know there is at least 3 different topics showing how to set up a server. Each one of these shows different databases to use and most of them leave you with a database that does not work with the current emu. That is the main problem I was having to start off with. Once I finnally found the right database files to use, and found the "AC" fix I had no trouble getting the server up.

I have seen how to program the quests in, it actually looks fairly simple once you have your database perl enabled. But If I have to own a expensive program like VB I can pretty much forget about perl enableing my current database. And I don't really want to start over after I have added so much to the database now.

Then I ask for something simple like "How do I make X zone the starting zone?" I get a vague response like "Edit your start_zone in the database." Instead of the simple type world.exe startzone X, which is all I needed.

What is the big deal about asking for a detailed answer of what to do? In the time you have spend telling me Im not good enough, a person probably could have wrote a book about how to set all of this server up. Im sure Im not the only person out there who has these questions. I mean I see some of the most simplest of questions answered in the tutorial section, yet I am deemed a fool for not knowing something like this.

Cisyouc
08-02-2004, 03:05 PM
database perl enabled
/cringe
You dont need to enable your database for perl, you must mean the source. The only thing you might want to do is add the globals table if its not already in there... other than that...
I mean I see some of the most simplest of questions answered in the tutorial section, yet I am deemed a fool for not knowing something like thisI'm the first one to admit I'm not good with C++ and compiling, and I took my shot at it and crashed and burned >.<.

I used the guides fine setting up my server with a precompiled version, I just didn't have people walk me through finding the most up-to-date link. My suggestion is to use the precompiled binaries available around the fourms to use, because if you cant compile them you aren't going to be able to edit them. There are plenty of databases out there, use search. /shrug.

jimbox114
08-03-2004, 08:20 AM
Oh ok, now it all makes sense..well sort of. I had thought it was the actual database you had to change to enable perl. I followed through those guides and think I about got it set up. I installed the IO thing and ran the test command and it checked out good. I downloaded the 7-25-04 release of the emu, that seems to have fixed my item shifting problem. However I am still having trouble with perl. When I boot5zones it boots them up without closeing, however it can't find a file, as can been seen in this screenshot below. I went ahead and made a quest file to see if it would work anyways, and it didn't. I have a npc with the id 281059 in Freportw. So I made a folder called \eqemu\freportw\ and made the notepad file 281059.pl. I basically for test purposes did a direct copy of the bonechip quest from another thread, and as expected the npc does not talk. Is there something I did wrong with installing perl perhaps, or do I need to make a dummy file for this somewhere?

http://www.netacs.net/~jimbox114/perl2.jpg

Derision
08-03-2004, 08:25 AM
You can ignore the plugin.pl error.

Assuming your zone.exe is in c:\eqemu, your quest file should be in c:\eqemu\quests\freportw, not c:\eqemu\freportw

jimbox114
08-03-2004, 10:37 AM
You can ignore the plugin.pl error.

Assuming your zone.exe is in c:\eqemu, your quest file should be in c:\eqemu\quests\freportw, not c:\eqemu\freportw

I had it in the write folder, I just mistyped it in the above post. I went in and made several .pl files for various npc's in various zones. Out of about 7 that I made I got 2 working and 1 partically working. I have double checked there npcid's and they all checkout. The 2 that work are simple scripts that have them say something to you when you hail them, and thats it. The one that somewhat works is a script where you can say something to trigger something else to be said. I can say 1 of the 2 commands and get a response from it. Here is a example:

Example 1 (this one works except when I say god):
sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("What do you want from me mortal? Are you here to [test] your strength against me, or do you think your a [God] now? Well speak up, I do not have the time for the likes of you $race now speak up!");}
if ($text=~ /test/i){quest::say("Well if you wish to fight me, draw your blade and strike me. I have slain many adventures who have wandered into my domain, do you honestly think you are any different? Go on, Strike me if that is what you want to do.");}
if ($test=~ /god/i){quest::say("Ha, you have got to be jokeing? Well if you were I guess I could permit you passage to the sacred grounds, but I hardly see any reason for me to do that. Now begone, I don't wish to deal with the likes of you anymore!");}
}

I went back looking for the infamous spaces after a line, and I removed all of them. However removeing them didn't seem to help anything. My Bonechip quest don't work period, it says:

sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("Hail there stranger. As you might know I am Fronglo. As a new recruit I recommend hunting around the area of Freeport West here. Maybe you would like to [help] me with something?");}
if ($text=~ /help/i){quest::say("Its just me and my family want to go watch the Match tonight at the Arena here in Freeport. However there is hordes of [morons] over there acting like fools and blocking the enterance. Try as we might we just can't get around them.");}
if ($text=~ /morons/i{quest::say("Yes they come in all shapes and sizes. If you can show me proof of the demise of four of those morons, I would be happy to reward you with a nice piece of armor.");}
}
sub EVENT_ITEM
{
if ($itemcount{1430} == 4){quest::say("WOW! You did it, Praise be to Mar!! - I knew that you wouldn't let me down. Now as promised here is your just reward. And may it serve you well my friend!");
quest::exp(325);
quest::summonitem(68234);}
}

I guess I got everything installed correctly, otherwise none of my quests would work right?

Derision
08-03-2004, 10:43 AM
Example 1 (this one works except when I say god):
sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("What do you want from me mortal? Are you here to [test] your strength against me, or do you think your a [God] now? Well speak up, I do not have the time for the likes of you $race now speak up!");}
if ($text=~ /test/i){quest::say("Well if you wish to fight me, draw your blade and strike me. I have slain many adventures who have wandered into my domain, do you honestly think you are any different? Go on, Strike me if that is what you want to do.");}
if ($test=~ /god/i){quest::say("Ha, you have got to be jokeing? Well if you were I guess I could permit you passage to the sacred grounds, but I hardly see any reason for me to do that. Now begone, I don't wish to deal with the likes of you anymore!");}
}


You have test instead of text in that one which would explain why when you say 'god' it doesn't work.

jimbox114
08-03-2004, 12:13 PM
That does explain that. I looked real close at my others and I noticed all of them had a ) missing in them. Hopefully that takes care of it. Thanks for the assistance, think its fixed (knocks on wood).

Cisyouc
08-03-2004, 12:16 PM
to get rid of the plugin error just rename a blank txt document plugin.pl and im not sure where you put it in, i have it in C:/EQEMu and C:/EQEMu/Quests/ and I dont get the error any more.

animepimp
08-03-2004, 02:51 PM
Well I'd say your second quest is failing because /morons/i{quest:: is missing a ), should be /morons/i){quest::. Check the output of zone.exe after you zone into there, it will tell you if a quest fails to load.

jimbox114
08-03-2004, 03:52 PM
Aye I went through there and noticed alot of them was missing the ) I got them all working now. Thanks. Things are looking good on there now.