i only know about the @eval($questList->{$questnumber}->$missions->{monsterid})
is there anyway to check if $quest $questnumber is currently active?
macro subroutine if quest # is active....
Moderator: Moderators
-
- Noob
- Posts: 2
- Joined: 28 Apr 2011, 11:05
- Noob?: No
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: macro subroutine if quest # is active....
Just look into Network::Receive::ServerType0:
Code: Select all
sub quest_active {
my ($self, $args) = @_;
my $questID = $args->{questID};
message $args->{active}
? TF("Quest %s is now active.\n", $quests_lut{$questID} ? "$quests_lut{$questID}{title} ($questID)" : $questID)
: TF("Quest %s is now inactive.\n", $quests_lut{$questID} ? "$quests_lut{$questID}{title} ($questID)" : $questID)
, "info";
$questList->{$args->{questID}}->{active} = $args->{active};
}
-
- Noob
- Posts: 8
- Joined: 28 Jul 2011, 09:35
- Noob?: No
Re: macro subroutine if quest # is active....
Code: Select all
macro test{
log @eval ($::questList->{4142}->{active})
}
Code: Select all
[macro] test error: error in 1: @eval($::questList->{4142}->{active}) failed
Can someone help?
-
- Noob
- Posts: 8
- Joined: 28 Jul 2011, 09:35
- Noob?: No
Re: macro subroutine if quest # is active....
Never mind, I found out that macro plugin seems to have a bug in handling nulls. I tried things around, and I came up with this.
Code: Select all
sub subQuestActive{
my ($inputID) = @_;
if ($questList->{$inputID}->{active} == ""){
return 0
}
return $questList->{$inputID}->{active};
}
macro test{
log subQuestActive(9027)
}