eventMacro QuestHuntCompleted Condition

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Post Reply
Message
Author
Coukapecker
Noob
Noob
Posts: 2
Joined: 16 May 2009, 09:11
Noob?: Yes

eventMacro QuestHuntCompleted Condition

#1 Post by Coukapecker »

Hello,

I am trying to get a quest return automacro to trigger when the quest itself has been completed.

Code: Select all

automacro finishedPickyQuestTrigger {
	QuestHuntCompleted 7123 1049
	exclusive 1
	run-once 1
	call finishedPickyQuest
}

macro finishedPickyQuest {
	#Code here to return quest
}
I believe the syntax is correct, yet it never seems to trigger even though the quest is complete.

I was reading about https://github.com/OpenKore/openkore/pull/914, but am unsure how to use &questCompleteCount to trigger the automacro. Anyone have any ideas?

Coukapecker

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: eventMacro QuestHuntCompleted Condition

#2 Post by ScriptKiddy »

This is fairly new so alot of us newbies are having trouble with this too.

Just keep experimenting and wait and hope that someone more advanced with these posts up their new board quest auto macros or an explanation of how to use the new syntax.

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: eventMacro QuestHuntCompleted Condition

#3 Post by ScriptKiddy »

Code: Select all

automacro KoboldQuests {
exclusive 1
timeout 60
  if (&questCompleteCount(62750) == 1) {
    goto AxeKobold
  }

  if (&questCompleteCount(62751) == 1) {
    goto HammerKobold
  }

  if (&questCompleteCount(62753) == 1) {
    goto ArcherKobold
  }

  if (&questCompleteCount(62752) == 1) {
    goto MaceKobold
  }

macro AxeKobold {
do ai manual
pause 3
do is Butterfly Wing
pause 3
do move lighthalzen 192 159
pause 3
do talknpc 192 161 c c r1 c r0 c c r0 n
pause 3
do talknpc 192 161 c c r0 c r0 n
do ai on
}

macro HammerKobold {
do ai manual
pause 3
do is Butterfly Wing
pause 3
do move lighthalzen 192 159
pause 3
do talknpc 192 161 c c r1 c r0 c c r1 n
pause 3
do talknpc 192 161 c c r0 c r1 n
do ai on
}

macro ArcherKobold {
do ai manual
pause 3
do is Butterfly Wing
pause 3
do move lighthalzen 192 159
pause 3
do talknpc 192 161 c c r1 c r0 c c r3 n
pause 3
do talknpc 192 161 c c r0 c r3 n
do ai on
}

macro MaceKobold {
do ai manual
pause 3
do is Butterfly Wing
pause 3
do move lighthalzen 192 159
pause 3
do talknpc 192 161 c c r1 c r0 c c r2 n
pause 3
do talknpc 192 161 c c r0 c r2 n
do ai on
}
The above code results in the following message:

"control\macros.txt: ignoring 'if (&questCompleteCount(62750) == 1) {' in line 4 (munch, munch, unknown automacro
keyword)
control\macros.txt: ignoring 'goto AxeKobold' in line 5 (munch, munch, unknown automacro keyword)
control\macros.txt: ignoring line 'if (&questCompleteCount(62751) == 1) {' in line 8 (munch, munch, strange block)
control\macros.txt: ignoring line 'if (&questCompleteCount(62753) == 1) {' in line 12 (munch, munch, strange block)
control\macros.txt: ignoring line 'if (&questCompleteCount(62752) == 1) {' in line 16 (munch, munch, strange block)
[macro] hooking to AI_pre
[macro] automacro KoboldQuests triggered.
[macro] automacro KoboldQuests: call not defined."




Any ideas whats going on here? According to the github these syntax should be able to be understood but its spitting out a munch munch error? Has anybody had any luck updating their board quest automacros to work for the new way of checking for completed quests?

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: eventMacro QuestHuntCompleted Condition

#4 Post by Mortimal »

u use macro plugin - macros.txt
u need use eventMacro - eventMacros.txt

and there is a lot of other things read manual to event macro...
Please use pin function for uploading your file contents!

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: eventMacro QuestHuntCompleted Condition

#5 Post by ScriptKiddy »

Mortimal wrote:u use macro plugin - macros.txt
u need use eventMacro - eventMacros.txt

and there is a lot of other things read manual to event macro...
As far as I can tell from the event macro wiki page, the only things wrong was not using eventMacro.txt, and the "goto" function not working with eventmacros and i need to change it to "call".

After these changes it still does not work. I tried "eventMacro", "autoMacro" and even just "macro" and added an "automacro" function inside of the macro.txt to try and call on the "eventMacro" but none of this works.

Not really sure whats going on here. because according to the eventMacro wiki

Code: Select all

if (&questCompleteCount(62750) == 1) {
    call AxeKobold
should absolutely work.

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: eventMacro QuestHuntCompleted Condition

#6 Post by Mortimal »

no ifs in automacro...
Please use pin function for uploading your file contents!

alisonrag
Developers
Developers
Posts: 13
Joined: 30 Jun 2011, 12:25
Noob?: No
Location: Brazil

Re: eventMacro QuestHuntCompleted Condition

#7 Post by alisonrag »

use tis plugin
Some servers won't send the killing mission goals until a certain action is made (like killing a mob).
This plugin fixes that by saving a list of all killing quest goals.
https://github.com/OpenKore/openkore/tr ... llcountFix
Image

"Can take everything, just can not take the good things I already did to the one I love."
Charlie Brown Jr.

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: eventMacro QuestHuntCompleted Condition

#8 Post by ScriptKiddy »

Actually there is a way to get this to work!

A big thank you to Nipodemos over on github for posting this code. I've tested it for the last 12 hours now and it works flawlessly!

Code: Select all

automacro KoboldQuests {
exclusive 1
timeout 120
BaseLevel > 100
QuestActive 62750, 62751, 62753, 62752
macro_delay 3
call {
    if (&questCompleteCount(62750) == 1) call Kobold "r0" "axe"

    if (&questCompleteCount(62751) == 1) call Kobold "r1" "hammer"

    if (&questCompleteCount(62753) == 1) call Kobold "r3" "archer"

    if (&questCompleteCount(62752) == 1) call Kobold "r2" "mace"

    log Quest not Completed yet
    }
}

macro Kobold {
log completed quest of $.param[1]Kobold
do is Butterfly Wing
do move lighthalzen 192 158
do talknpc 192 161 c c r1 c r0 c $.param[0] c r0 n
do talknpc 192 161 c c r0 c $.param[0] c r0 n
do relog 10
}
Now I will say that the "do relog 10" was needed for me because what happens is when the quest is turned in and then the quest picked up again, it wont recognize that the quest is refreshed, it returns a result of "quest 0/0" and thinks its complete. So the relog fixes it. Without the relog it get's stuck in an infinite turnin loop.

So obviously you can change the code to suit whatever board quests you want.

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 724
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: eventMacro QuestHuntCompleted Condition

#9 Post by fadreus »

Now I will say that the "do relog 10" was needed for me because what happens is when the quest is turned in and then the quest picked up again, it wont recognize that the quest is refreshed, it returns a result of "quest 0/0" and thinks its complete. So the relog fixes it. Without the relog it get's stuck in an infinite turnin loop.
This PR fix quest status upon taking anew (Worked for iRO Renewal)
https://github.com/OpenKore/openkore/pull/1276

I am trying to get a quest return automacro to trigger when the quest itself has been completed.
This PR fix QuestHuntCompleted & QuestHuntOngoing for IRO
https://github.com/OpenKore/openkore/pull/1442

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

Post Reply