revloc02c
12-07-2011, 01:46 AM
Here's one way to initialize a qglobal:
sub EVENT_SPAWN {
quest::set_proximity($x - 50, $x + 50, $y - 50, $y + 50);
}
sub EVENT_ENTER {
if(!defined $qglobals{some_nice_qglobal}) {
quest::setglobal("some_nice_qglobal", 0, 5, "F");
}
}
Does setting a proximity utilize more resources? than say just checking for the qglobal whether the PC initiates with the NPC by saying something or giving an item, like so:
sub EVENT_SAY {
if(!defined $qglobals{some_nice_qglobal}) {
quest::setglobal("some_nice_qglobal", 0, 5, "F");
}
# ...other EVENT_SAY code...
}
sub EVENT_ITEM {
if(!defined $qglobals{some_nice_qglobal}) {
quest::setglobal("some_nice_qglobal", 0, 5, "F");
}
# ...other EVENT_ITEM code...
}
...or is there another better way altogether?
Or does it even matter?
sub EVENT_SPAWN {
quest::set_proximity($x - 50, $x + 50, $y - 50, $y + 50);
}
sub EVENT_ENTER {
if(!defined $qglobals{some_nice_qglobal}) {
quest::setglobal("some_nice_qglobal", 0, 5, "F");
}
}
Does setting a proximity utilize more resources? than say just checking for the qglobal whether the PC initiates with the NPC by saying something or giving an item, like so:
sub EVENT_SAY {
if(!defined $qglobals{some_nice_qglobal}) {
quest::setglobal("some_nice_qglobal", 0, 5, "F");
}
# ...other EVENT_SAY code...
}
sub EVENT_ITEM {
if(!defined $qglobals{some_nice_qglobal}) {
quest::setglobal("some_nice_qglobal", 0, 5, "F");
}
# ...other EVENT_ITEM code...
}
...or is there another better way altogether?
Or does it even matter?