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-22-2006, 01:40 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Quick question

How would I access $name-made variable from quest_globals?

I can use $name to make the global, but I can't figure out how to define it for use in a script.
Reply With Quote
  #2  
Old 12-22-2006, 03:30 AM
sesmar
I built it I will Support it!
 
Join Date: Jun 2005
Location: Michigan
Posts: 214
Default

If you could give an example of what you are trying to accomplish it might help with figuring this out.
__________________
Reply With Quote
  #3  
Old 12-22-2006, 04:29 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Code:
quest::setglobal("$name","2","3","F");
will put the players name into quest_globals

but if I look for it again to compare;
Code:
if (($text=~/hail/i)&&($name==2)){
It doesn't see it - I think I need to convert $name into text first then use the text, and don't know how.
Reply With Quote
  #4  
Old 12-22-2006, 07:01 AM
sesmar
I built it I will Support it!
 
Join Date: Jun 2005
Location: Michigan
Posts: 214
Default

You want to do it like this:

Code:
if (($text=~/hail/i)&&(${$name}==2)){
At least in regular perl that will work.

This is what I used to test it:
Code:
$var1 = "var2";
$var2 = "Testing";

print "$var1 \n";
print "${$var1} \n";
print "$var2 \n";
__________________
Reply With Quote
  #5  
Old 12-22-2006, 08:43 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Got it Sesmar, thanks - ran perfect.
here's what I fixed;


Well, I have to Link it because the post won't take such a large pl;
http://www.nahunta.org/~angelox/files/Vahlara.pl

Vahlara now will only give you one charm, you don't get the dupe message and the "here's the charm" text goes away. Also, when you zone out, since you can't come back anymore, the exit tutorial guy deletes the global.
If you decide to try it out, the "emoter npc's" in the script are not in the current posted database. This should fix them up;
Code:
INSERT INTO npc_types VALUES (189119,"_","",60,127,1,11,23400,0,10,0,1,1,1,0,0,0,0,100,480,"",0,61,0,0,0,0,0,1,0,0,0,0,0,1.25,245,245,245,245,245,0,1,1,1,1052,0,0,-25,0,299,299,299,299,299,299,299);
INSERT INTO npc_types VALUES (189120,"_","",60,127,1,11,23400,0,10,0,1,1,1,0,0,0,0,100,480,"",0,61,0,0,0,0,0,1,0,0,0,0,0,1.25,245,245,245,245,245,0,1,1,1,1052,0,0,-25,0,299,299,299,299,299,299,299);
also the globals for amote and bmote have to be initialized else you get swamped in emoter npcs;;
Code:
INSERT INTO quest_globals VALUES (153,0,0,189,"amote","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (154,0,0,189,"bmote","2",0) ON DUPLICATE KEY UPDATE value=2;

Anyways I'm almost ready to put out another DB update - I got a lot more work done on Gunthak too.
Reply With Quote
  #6  
Old 12-22-2006, 10:12 AM
sesmar
I built it I will Support it!
 
Join Date: Jun 2005
Location: Michigan
Posts: 214
Default

Glad to hear that worked for you.
__________________
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 12:09 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3