Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2004, 01:12 AM
ryder911
Hill Giant
 
Join Date: Jun 2002
Posts: 212
Default Question about making a quest.

Im new to perl just trying to learn, can anyone tell me if its possible to make a npc that zones players to the zone that they say. Like a translocator, but instead if you say lguk it ports you to lguk. Im not sure if there would be a way to take what the persn says and turn it into a variable, then put that variable into the zone command.
__________________
Chris---
Reply With Quote
  #2  
Old 12-10-2004, 01:51 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Code:
sub EVENT_SAY
{
  if($text=~/hail/i)
    {
    quest::say("[Lguk]?");
    }
  if($text=~/lguk/i)
    {
    quest::movepc(zoneid,dest_x,dest_y,dest_z);
    }
}
(You must change the parameters for movepc())
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 12-10-2004, 03:10 AM
ryder911
Hill Giant
 
Join Date: Jun 2002
Posts: 212
Default

no, not like that. I mean like ike say theres a NPCcalled Zone Porter. You hail him, then he says, "Whatzone would you like to be ported to.?" And say you repsonde with katta, it ports you to katta, or you say veeshan, it ports you to veeshan, get what I'm saying. Instead of making it like a million if's for each zone, would there be a way to set it up with a variable?
__________________
Chris---
Reply With Quote
  #4  
Old 12-10-2004, 07:32 AM
Scorpx725
Discordant
 
Join Date: Feb 2003
Location: Wish I knew.
Posts: 251
Default

Dont think so.
__________________
* KingMort has left #eqemu
<Richardo> KingDrama has left #EQEMU
<Richardo> the rule my pants!
Reply With Quote
  #5  
Old 12-10-2004, 08:39 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

You could make a quest command that retrieves the zoneid and save coords and then implement it, like:
Code:
sub EVENT_SAY
{
  $zoneid = quest::GetZoneID($text);
  $zonex = quest::GetZoneX($zoneid);
  $zoney = quest::GetZoneY($zoneid);
  $zonez = quest::GetZoneZ($zoneid);
  $client->MovePC($zoneid, $zonex, $zoney, $zonez);
}
However you'd have to write the C++ implementation for it (too busy to write it myself atm, if I have time and you havent written it though i might get to it)
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #6  
Old 12-11-2004, 05:49 AM
Scorpx725
Discordant
 
Join Date: Feb 2003
Location: Wish I knew.
Posts: 251
Default

If anything, FNW should put this into his quest system.
__________________
* KingMort has left #eqemu
<Richardo> KingDrama has left #EQEMU
<Richardo> the rule my pants!
Reply With Quote
  #7  
Old 12-11-2004, 06:14 AM
ryder911
Hill Giant
 
Join Date: Jun 2002
Posts: 212
Default

ok, well I dont no C++ so I guess ill just have to wait until someone gets too it. Thanks for your help guys=)
__________________
Chris---
Reply With Quote
  #8  
Old 12-11-2004, 03:54 PM
Dave987
Discordant
 
Join Date: Jun 2003
Location: England
Posts: 267
Default

Would this work?

Code:
sub EVENT_SAY
{
if ($text =~ /hail/i){
quest::say("Greetings $name! Where can I take you to?");}

if($text != "acrylia" || "airplane" || "akanon" || "akheva" || "arena" || "bazaar" || "befallen" || "beholder" || "blackburrow" || "bothunder" || "burningwood" || "butcher" || "cabeast" || "cabwest" || "cauldron" || "cazicthule" || "charasis" || "chardok" || "citymist" || "cobaltscar" || "commons" || "crushbone" || "crystal" || "cshome" || "dalnir" || "dawnshroud" || "dreadlands" || "droga" || "eastkarana" || "eastwastes" || "echo" || "ecommons" || "emeraldjungle" || "erudnext" || "erudnint" || "erudsxing" || "everfrost" || "fearplane" || "feerrott" || "felwithea" || "felwitheb" || "fieldofbone" || "firiona" || "freporte" || "freportn" || "freportw" || "frontiermtns" || "frozenshadow" || "fungusgrove" || "gfaydark" || "greatdivide" || "griegsend" || "grimling" || "grobb" || "growthplane" || "gukbottom" || "guktop" || "halas" || "hateplane" || "highkeep" || "highpass" || "hohonora" || "hole" || "hollowshade" || "iceclad" || "innothule" || "kael" || "kaesora" || "kaladima" || "kaladimb" || "karnor" || "katta" || "kedge" || "kerraridge" || "kithicor" || "kurn" || "lakeofillomen" || "lakerathe" || "lavastorm" || "letalis" || "lfaydark" || "load" || "maiden" || "mischiefplane" || "mistmoore" || "misty" || "mseru" || "najena" || "necropolis" || "nektulos" || "neriaka" || "neriakb" || "neriakc" || "netherbian" || "nexus" || "northkarana" || "nurga" || "oasis" || "oggok" || "oot" || "overthere" || "paineel" || "paludal" || "paw" || "permafrost" || "powar" || "poearth" || "pofire" || "powater" || "poinnovation" || "podisease" || "pojustice" || "ponightmare" || "potranquility" || "potimea" || "potimeb" || "povalor" || "postorms" || "poknowledge" || "potorment" || "qcat" || "qey2hh1" || "qeynos" || "qeynos2" || "qeytoqrg" || "qrg" || "rathemtn" || "rivervale" || "runnyeye" || "scarlet" || "sebilis" || "shadeweaver" || "shadowhaven" || "sharvahl" || "sirens" || "skyfire" || "skyshrine" || "sleeper" || "soldunga" || "soldungb" || "solrotower" || "soltemple" || "southkarana" || "sro" || "sseru" || "ssratemple" || "steamfont" || "stonebrunt" || "swampofnohope" || "templeveeshan" || "tenebrous" || "thedeep" || "thegrey" || "thurgadina" || "thurgadinb" || "timorous" || "tox" || "trakanon" || "tutorial" || "twilight" || "umbral" || "unrest" || "veeshan" || "velketor" || "vexthal" || "wakening" || "warrens" || "warslikswood" || "westwastes" || arena2")
{
quest::say("Sorry $name, I do not recognise that zone.");}
else{
quest::movepc($text,0,0,0);
}

if($text=~ /!list/i){
quest::say(" acrylia , airplane , akanon , akheva , arena , bazaar , befallen , beholder , blackburrow , bothunder , burningwood , butcher , cabeast , cabwest , cauldron , cazicthule , charasis , chardok , citymist , cobaltscar , commons , crushbone , crystal , cshome , dalnir , dawnshroud , dreadlands , droga , eastkarana , eastwastes , echo , ecommons , emeraldjungle , erudnext , erudnint , erudsxing , everfrost , fearplane , feerrott , felwithea , felwitheb , fieldofbone , firiona , freporte , freportn , freportw , frontiermtns , frozenshadow , fungusgrove , gfaydark , greatdivide , griegsend , grimling , grobb , growthplane , gukbottom , guktop , halas , hateplane , highkeep , highpass , hohonora , hole , hollowshade , iceclad , innothule , kael , kaesora , kaladima , kaladimb , karnor , katta , kedge , kerraridge , kithicor , kurn , lakeofillomen , lakerathe , lavastorm , letalis , lfaydark , load , maiden , mischiefplane , mistmoore , misty , mseru , najena , necropolis , nektulos , neriaka , neriakb , neriakc , netherbian , nexus , northkarana , nurga , oasis , oggok , oot , overthere , paineel , paludal , paw , permafrost , powar , poearth , pofire , powater , poinnovation , podisease , pojustice , ponightmare , potranquility , potimea , potimeb , povalor , postorms , poknowledge , potorment , qcat , qey2hh1 , qeynos , qeynos2 , qeytoqrg , qrg , rathemtn , rivervale , runnyeye , scarlet , sebilis , shadeweaver , shadowhaven , sharvahl , sirens , skyfire , skyshrine , sleeper , soldunga , soldungb , solrotower , soltemple , southkarana , sro , sseru , ssratemple , steamfont , stonebrunt , swampofnohope , templeveeshan , tenebrous , thedeep , thegrey , thurgadina , thurgadinb , timorous , tox , trakanon , tutorial , twilight , umbral , unrest , veeshan , velketor , vexthal , wakening , warrens , warslikswood , westwastes , arena2");
}
}

## Coded by Scary. - Please do not remove this! ##


If not, you can just do what Cisc did, but do it for every single zone -- that WOULD work - I was just trying a shorter way

Alternatively, you could give them the #zone command -- though a quest is customisable (eg. if $level > 20 &amp;&amp; $text =~ /la/ etc. etc.)
__________________
;o)
Reply With Quote
  #9  
Old 12-11-2004, 03:57 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

First,
Code:
|| "westwastes" || ")
Should be
Code:
|| "westwastes")
.

And Second, Its a great zonename parser but movepc() works by zoneid, not zone name :(
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #10  
Old 12-11-2004, 03:59 PM
Dave987
Discordant
 
Join Date: Jun 2003
Location: England
Posts: 267
Default

I knew there was a mistake somewhere :P

And if the $zoneid is said in the $text ( $text = $zoneid ) , it should work? If the $text isn't a $zoneid , then the NPC would say something different.
__________________
;o)
Reply With Quote
  #11  
Old 12-11-2004, 04:03 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Yeah if i said
/say 202

theoretically..
Code:
sub EVENT_SAY
{
  quest::movepc($text,0,0,0);
 }
will zone you to 0,0,0 of the zoneid you /say.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #12  
Old 12-11-2004, 04:05 PM
Dave987
Discordant
 
Join Date: Jun 2003
Location: England
Posts: 267
Default

Which is why " if ($text !=) " any of the zone shortnames, the mob will respond with "Sorry $name, I do not recognise that zone." - ELSE, if it IS recognised, he will move you.

I'm not too sure , as I said in #perl just now, I'm rusty with my perl, I've not used || before , have been away for a while , so will take your word that it's wrong.

But if anybody tests it .... :P
__________________
;o)
Reply With Quote
  #13  
Old 12-12-2004, 03:22 PM
animepimp
Dragon
 
Join Date: Jan 2004
Posts: 860
Default

Its wrong because movepc looks for a number to move them to. Giving it text will fail because it won't be a number.
Reply With Quote
  #14  
Old 12-13-2004, 04:15 AM
Dave987
Discordant
 
Join Date: Jun 2003
Location: England
Posts: 267
Default

In Visual Basic (yes, I know....) you are able to define things as things.
For example

Code:
Dim Akheva as String
Akheva = 1
Sub End
Is there something like this in PERL, allowing you to define something as something?
I would have thought it would be something like
sub EVENT_SAY{

"Akheva" = 1
etc. = etc.

if($text =~ /hail/i){
quest ..... etc. etc.}
}
__________________
;o)
Reply With Quote
  #15  
Old 12-13-2004, 07:50 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

I dont think so, because i dont think you can take the contents of one variable and look for another variable with the name of the text.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
Reply


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 04:26 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3