Thread: qglobals
View Single Post
  #5  
Old 01-21-2009, 03:13 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

No need to assign a variable to the global, since the global is a variable. This would work better for you, and won't throw up warnings in the logs:

Code:
sub EVENT_SAY {
  if($text=~/hail/i && !defined $qglobals{conversation}){
quest::setglobal("conversation", 1, 0, "F");
quest::say("I will remember you, next time you hail me!");
 }
  elsif($text=~/hail/i && defined $qglobals{conversation}){
quest::say("We have talked before!");
 }
}
Reply With Quote