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

Archive::Development Archive area for Development'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 01-16-2004, 08:36 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default perl quests calling c functions

One of the problems with calling a perl quest is that once the script is entered, it lacks the ability to interact with the server that called it. I have a way to fix this, but before I go through the trouble of typing it all out, I'd like to hear feedback.

The basic rundown is this:

1. Create the glue code in c/c++ to tie the zone server and perl together.
2. Create a shared library and a perl module to access it.

Here's one test script I've been using:

Code:
use Mytest;

sub EVENT_SAY {
  if ($text =~ /Hail/) {
    quest::say("Me hopes you gots yer club.");
    if (&Mytest::hasItem($charid, 6621)) {
      quest::say("HAR HAR YOU GOTS IT!");
    }
    else
    {
      quest::say("Dat tew BAD. Yew gots no clubs!");
    }
  }
}
BTW, there is also a new exported variable in this example, $charid.

What I'd like to know is if someone (Eglin?) is already working on this, or has a better way to do it. Anyway, if you want more info or not, let me know.
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 12:05 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