Thread: Qglobal problem
View Single Post
  #4  
Old 05-30-2006, 06:55 PM
ylosh
Sarnak
 
Join Date: Jan 2006
Posts: 39
Default

update npc_types set qglobal=1 where id=(ambassador dumont npcid);
quick example, maybe it'll help you.
Code:
  sub EVENT_SAY {
    if ($text=~/hail/i) {
  	if ($monkey == 1) {
  	  quest::say("global is set");
  	}
  	else {
  	  quest::say("hello there");
  	}
    }
  }
  
  sub EVENT_ITEM {
    if (plugin::check_handin(\%itemcount, 1001 => 1)) {
  	quest::say("here is your quest global");
  	quest::setglobal("monkey",1,0,"Y1"); #option 0 - this npc, this player, this zone for 1 year
    }
    plugin::return_items(\%itemcount);
  }
Reply With Quote