PDA

View Full Version : 0.5.0 Quests - Updated 20 November


mollymillions
11-16-2003, 09:32 PM
I have a collection of quests available for 0.5.0 standard databases. Download them from http://users.tpg.com.au/adslipjo/index.html .
I will update the Quest Reprocessor download for the latest version that converts 0.4.4 quest files to be 0.5.0 compliant.

Kroeg
11-17-2003, 01:28 AM
Awesome!! This helps me out tremendously. Man, thanks a lot :D

Kroeg
11-17-2003, 01:40 PM
I've tried using your quest file reprocessor, but it gives me an error:
"Failed [Microsoft][ODBC Driver manager] Data source not found and no default driver found"

What have I done wrong here? :)

Eglin
11-17-2003, 02:25 PM
I've tried using your quest file reprocessor, but it gives me an error:
"Failed [Microsoft][ODBC Driver manager] Data source not found and no default driver found"

What have I done wrong here? :) Assuming you have all else setup correctly, try making sure your firewall isn't preventing mysql and the client from making a tcp/ip connection.

Kroeg
11-17-2003, 02:49 PM
I run a server constantly and successfully. The problem seems that I don't have a supporting driver installed in my odbc driver manager. The problem is, I don't know what I'd need (there are several hundred different types of odbc drivers). :?

Lurker_005
11-17-2003, 04:54 PM
I'm guessing you need the mySQL odbc drivers installed. check www.mysql.org

mollymillions
11-17-2003, 07:10 PM
You may not be able to connect to a remote database, even with the MyODBC 3.51 installed (MyODBC 3.51 is mentined as a requirement in the read me). I havnt tested remote connections, but if you need this functionality let me know and i will ensure its working.

mollymillions
11-17-2003, 07:18 PM
I would be really happy if itemcount() would work. I have been using this in the quests i write in expectation of the day its actually implemented in the code.

mollymillions
11-17-2003, 07:18 PM
[Damn that bloody web page timeout]

Kroeg
11-18-2003, 12:56 AM
woops :) installed myodbc 3.51 and it worked like a charm. Thanks for your quick response :D

Kroeg
11-18-2003, 01:16 AM
I tried the tool out, and it seems to leave off some things:

On a few quest files, it left off the ';' before the '}' at the end of the line.. others added the ';' but didn't put a space between ';' and '}'.

it's outputing quests like this:

EVENT_SAY {
if($1- =~ "Hail") {
say("Hey. hey. hey! Welcome to the Fool's Gold. Don't bet more than you can afford to lose. pal! You don't want to end up like ol' [Kevlin].");}
}

The format it correct with the ';' at the end of the line (on this one), but no space between ; and } at the end of the line... this causes syntax errors. If it looked like this:

EVENT_SAY {
if($1- =~ "Hail") { say("Hey. hey. hey! Welcome to the Fool's Gold. Don't bet more than you can afford to lose. pal! You don't want to end up like ol' [Kevlin]."); }
}

It would surely work everytime. On this one, there's only a lack of one space to make it work, but other quests are missing the ';' at the end of the line before the space and '}'.

Still, awesome job on this tool :D

Edgar1898
11-18-2003, 01:22 AM
I would be really happy if itemcount() would work. I have been using this in the quests i write in expectation of the day its actually implemented in the code.

It does...

mollymillions
11-18-2003, 03:04 AM
Excellent, I will try harder.

Cheers Kroeg, I made the mod you suggested, it still wont handle more than one function per line though.

Kroeg
11-18-2003, 09:42 AM
Amazing Molly... you've really helped me out a lot. I can't thank you enough for deciding to share this (it saves a LOT of time). I just tested it out, and all the quests it fixed, WORK! Great job! You saved me about 2--4 hours of tedious work. Thanks again! :D

mollymillions
11-18-2003, 07:23 PM
No worries. In general people are pretty stingy when it comes to sharing their quests around lately, but i hope to change that.
The collection i have posted has a lot of dodgy quests included, i will attempt to ensure they are all kosha and repost soon, with some new additions.
----------------------------------------------------------------------------------

I have updated the quests collection, 99% are now OK to run.

Also updated the reprocessor, the 0.5 compatability should now work for 101% of quests (I think I see my pigs taxiing, ready for take off).

Darkrider
11-20-2003, 02:01 AM
I must ask, is this a project ment to copy EQ live's quests? If not is there such a project? Thank you for your time.

mollymillions
11-20-2003, 02:41 AM
Yes, they are at least based on the live quests, some created by myself but mostly collected over time from other sources, bless em. Most are incomplete but add a live feel to a server.

I would encourage others to release the brilliant quests they have written, and i have many works in progress to add (mainly Freeport and Queynos quests at the moment).

Darkrider
11-20-2003, 03:10 AM
Just an idea. A simple form where you can input zone name and mobID, then have boxes for: When player says "" then Mob says / does "". When Player gives "" then mob says / does "". Also above those lines a few requirded status field check boxes. "must be" Race/Class/Level/Faction. Then after it is filled out it could save the quest file to the correct loaction/ file name. If I knew more about the quest file formation I would hammer one out in VB. Hrmmm I may download the quest pack and start working on that. Maybe even add the item list to it with a search function to make finding the item#'s faster. And the Long to short zone name list. With this tool opened and the allakhazam quest list a team might be able to code over all of the quests in short order ( less than 6 months). My coding is very rusty so I don't count that I'll get this tool working, but I'll give it a go and see if I can shock myself.

a_Guest03
11-20-2003, 03:39 AM
What is needed first is a standard quest parsing system. The front end can come second. I also suggest NOT writing the entire thing in VB. If we do write it, it should be in a language that can be ported to Linux as well as Windows.

The quest code is currently being discussed and may be moving to perl. If this is the case, a graphical program could simply parse it. We could write one for Win32 binaries and one for linux/*bsd binaries.

If I could code, I'd write an input/output program that could be fed into a kde- or gnome-linked program as well as a Win32 (VB or whatever) program.

Eglin
11-25-2003, 04:26 AM
On a few quest files, it left off the ';' before the '}' at the end of the line.. others added the ';' but didn't put a space between ';' and '}'.
it still wont handle more than one function per line though.
Attached is the perlscript that I've been using to convert scripts into perl. Even if you choose to continue using the native scripting engine, I think you may find this useful. It can be easily modified to suit your needs (if it doesn't already). If you don't already have Perl, I recommend getting the Activestate (http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl) distribution. It is a small, free download.

#!/usr/bin/perl -w
#convert scripts from .qst to .pl
#usage: ./convert.pl [questdir]
use File::Find;
use strict;
sub convert
{
my $infile = $_;
(my $outfile = $infile)=~s/qst$/pl/;
print "Converting file: $infile -> $outfile\n";
if(!open IN, "$infile") {
warn $!;
return;
}
if(!open OUT, ">$outfile") {
warn $!;
return;
}
while(<IN>)
{
#remove stray backslashes
s|\\|\?|;
#change /yada yada yada/ comment lines to #yada yada
s|^/(.*)/\s*$|#($1)|;
#prefix each event block w/ "sub"
s/^(EVENT_)/sub $1/;
#change $1/$1- (etc) notation to instead match against $text
s/\s*\$\d-?\s*=~\s*\"(.*?)\"/\$text=~\/$1\/i/;
s/\$\d-?/\$text/;
#change itemcount syntax
s/if\(\$itemcount\(\"(\d+)\"\)\s*==/if\(\$itemcount\{$1\} && \$itemcount\{$1\} ==/;
#change summonitem syntax to seperate args w/ commas
s/summonitem\((.*?\")\s+(\".*?)\)/summonitem\($1, $2\)/;
#change commands to have a quest:: prefix and be seperated by semi-colons (;)
s/(say|emote|shout|spawn|echo|summonitem|castspell|d epop|cumflag|flagnpc|flagclient|exp|level|safemove |rain|snow|givecash|pvp|doanim|addskill|me)(\(.*?\ ))/quest::$1$2;/g;
print OUT $_;
}
close IN;
close OUT;
}
@ARGV = qw(.) unless @ARGV;
find( sub {/^.*\.qst\z/s && convert("$_")}, @ARGV);


If you need to ensure that quests are using valid database references, you can use something like the following. I used ODBC here, but if you install the DBD::mysql module, you can go directly through mysql.

#! /usr/bin/perl -w
use strict;
use File::Find ();
use DBI;

my $dbh= DBI->connect("DBI:ODBC:yourdsnname","yourusername","yourpassword") or die "Got error $DBI::errstr when connecting to db\n";
#my $dbh= DBI->connect("DBI:mysql:yourdsnname","yourusername","yourpassword") or die "Got error $DBI::errstr when connecting to db\n";

# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, './quests');
exit;


sub wanted
{
if(/^.*\.qst\z/s)
{
if(!open(SCRIPT, $_))
{
warn $!;
return;
}
while(<SCRIPT>)
{#summonitem("19629");
if(/summonitem\(\"(\d+)\"\)/)
{
my $rv = $dbh->do("select * from items where id = $1");
if(!$rv)
{
warn "Can't execute query: $dbh->errstr $!";
return;
}
if($rv == 0E0)
{
print "Error: summonning non-existant item (#$1) in $File::Find::name\n";
}
}
}
close SCRIPT;
}
}

By using the techniques in these two scripts, you should be able to mold your quest scripts to whatever format you desire.

Kroeg
11-25-2003, 11:38 AM
wow, thanks a lot eqlin.. I'm going to try this. :D

mollymillions
11-25-2003, 07:46 PM
So can I assume that the Pearl scripting support is included in the 5.1 release - i didnt notice it mentioned in the changes (I haven't downloaded the source yet, but the last time I updated CVS the Pearl implementation seemed to be included as diff so I assumed it wasn't merged).
Keep up the good work Eglin, its been very stimulating reading your posts and the resultant discussions (I fear you will be absorbed into the dev team and will no longer need to post ideas on these pages and I will be back to reading the standard 1017, etc, error messages).

rockocool
12-04-2003, 10:07 AM
These quests seem to be broken with 0.5.1. They work perfectly for 0.5.0, but not with 0.5.1. How can we make it work again?

mollymillions
12-04-2003, 01:16 PM
The old quest system does not work with versions above 5.0 (on Win32 platform anyway, and i have not used 5.2). Any file with a .qst extension in the quest folders will cause the zone to crash.