Openkore.com

OpenKore Forums
It is currently 21 Nov 2017, 15:18

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: eventMacro QuestHuntCompleted Condition
PostPosted: 17 Aug 2017, 07:55 
Offline
Noob
Noob

Joined: 16 May 2009, 09:11
Posts: 2
Hello,

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

Code:
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


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 20 Aug 2017, 03:18 
Offline
Noob
Noob

Joined: 12 Aug 2017, 06:07
Posts: 16
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.


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 03 Sep 2017, 03:45 
Offline
Noob
Noob

Joined: 12 Aug 2017, 06:07
Posts: 16
Code:
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?


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 08 Sep 2017, 05:01 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 349
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!


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 09 Sep 2017, 19:52 
Offline
Noob
Noob

Joined: 12 Aug 2017, 06:07
Posts: 16
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:
if (&questCompleteCount(62750) == 1) {
    call AxeKobold
should absolutely work.


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 10 Sep 2017, 05:44 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 349
no ifs in automacro...

_________________
Please use pin function for uploading your file contents!


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 19 Sep 2017, 11:30 
Offline
Noob
Noob
User avatar

Joined: 30 Jun 2011, 12:25
Posts: 5
Location: Brazil
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.


Top
 Profile  
 
 Post subject: Re: eventMacro QuestHuntCompleted Condition
PostPosted: 21 Sep 2017, 07:01 
Offline
Noob
Noob

Joined: 12 Aug 2017, 06:07
Posts: 16
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:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group