Some question with active quests
Posted: 13 Sep 2016, 04:42
Hi all,
First problem:
I have the following code but I can never seem to use the $aaa variable for comparison.
The result I get is:
It only prints $aaa, but the if statement where $aaa == 1 never gets executed to print success.
I have tried using return "1" (with double quotes) if ($aaa == "1") but it never worked. I have also tried many other instances to try to get this to work but to no avail. Could someone please help?
Second problem:
I am trying to execute a relog if the console does not show "You are casting Teleport on yourself" after the line "Teleporting due to idle"
This is the code I have:
I am doing a negative look ahead to see if "You are casting Teleport on yourself" appears right after the line "Teleporting due to idle", if there is no such line, call relog. This does not seem to work and would be grateful if anyone could shed some light.
First problem:
I have the following code but I can never seem to use the $aaa variable for comparison.
Code: Select all
macro testcarat{
$aaa = subQuestActive(13042)
log $aaa
if ($aaa == 1) log success
}
sub subQuestActive{
my ($inputID) = @_;
if ($::questList->{$inputID}->{active} == ""){
return 0
}
return 1;
}
Code: Select all
[macro log] 1
I have tried using return "1" (with double quotes) if ($aaa == "1") but it never worked. I have also tried many other instances to try to get this to work but to no avail. Could someone please help?
Second problem:
I am trying to execute a relog if the console does not show "You are casting Teleport on yourself" after the line "Teleporting due to idle"
This is the code I have:
Code: Select all
automacro unstuck {
console /Teleporting due to idle\n(?!You are casting Teleport on yourself)/
call {
do relog
}
}