Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-25-2004, 12:37 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default perl quest EMU simulator

Hello,

here is a small thing that can be used to test and debug perl quests. i hope this can be useful.

It is a perl script that loads and run perl quests. It understands some basic commmands like #zone, #listnpcs, ... and allows to simulate quests much like the server. You can use it interactive (perl -w itest.pl), or batch ('cat myscript.txt | perl -w itest.pl').



There are a few special commmands (to simulate GUI interaction):
!target <id> ; selects a target
!give <item> <item> ; ... is giving an item
!givecash <cp> <sp> <gp> <pp> ; is giving cash
!attack ; make you attack the npc
!echo (on|off) ; allows echo on / off of commands, for batch use
!timer ; triggers the timer. Note there is no real timing, quest::settimer and quest::stoptimer only give you information messages
!whoami give information about the vars you export (charid, uguild, race, name, ...)
!perl <foo bar> execs the perl script 'foo bar'. e.g. !perl $name="my new name" changes your name
!verbose <0-9> ; changes verbose level. Useful for debugging

!edit <filename> edits filename. It uses the EDITOR env variable (or vi if not set) to launch editor. if no filename is given, the quest file for current target is edited. if no such file, edits a new one. If no target, ...
Note : quests are reloaded before each event is triggered. So editing a quest file and triggering an event triggers the new event directly.

#kill, #zone, #level, #viewnpctype, #listnpcs, #npcstats, and
/say, /shout, /emote, /ooc, /gsay /quit, and maybe a few others are already in the simulator.

simple quest::foo functions are done. Look at the quest.pl file if you experience something strange.


To run it, you need :
db.ini, quest directory tree, the various plugin.pl and default.pl files
and the files ./itest.pl, ./EQ/dbaccess.pl and ./quest.pl from the archive there

The simulator is read-only on the DB, EXCEPT for quest_globals, that get affected

if you want color, make sure you have Term::ANSIColor package in your perl INC, else simply uncomment first lines in itest.pl

To change your character's info, alter the variables in the beginning of the itest.pl file,or do a command like
Code:
!perl $ulevel=23
Below are a few scripts that should work with ~std~ DB (i think it's MW_052 or ...)

for example
Code:
!verbose 1
!echo on
#zone freporte
!target 5482
!attack
#kill
!target 1221
Hail
Howdy, today ?
!give 18745
will produce :

Code:
EQEmu test >!verbose 1
verbose level now : 1
EQEmu test >!echo on
EQEmu test >#zone freporte
 changing to zone freporte
Current zone is now : East Freeport
EQEmu test >!target 5482
EQEmu test >!attack
Zamel shouts 'Hey! Brent da Kopy attacked me.'
EQEmu test >#kill
Zamel shouts 'I'll get you back Brent da Kopy!'
EQEmu test >!target 1221
EQEmu test >Hail
Elisi_Nasin says, 'Listen. this is a pretty busy [operation] I run here.  I certainly don't have any spare time to sit around and chit-chat with you all day. got it?'
EQEmu test >Howdy, today ?
EQEmu test >!give 18745
Elisi_Nasin says, 'Welcome to the Coalition of Tradesfolk underground. We like to keep a low profile around here and not draw any unneeded attention to our operations. you following me? I hope so. for your sake. Anyways. Nestral T'Gaza is in charge with helping out our newest members. Go see her as soon as you get a chance.'
you receive 1 items of type 13568, aka Brown Faded Tunic*
You gain experience (100)
other example :
Code:
; testing some system calls

!echo on
!verbose 1
#zone qeynos
!target 205
/say hail
!target 5482
Hail
What aqueducts ?
What beasts ?
!give 13713
/ooc why do NPCs never say goodbye ?
Farewell
#zone 3
/quit
[/code]
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:06 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3