OpenKore / openkore

A free/open source client and automation tool for Ragnarok Online
http://openkore.com
Other
1.28k stars 1.04k forks source link

Hunting board eventMacro #2221

Closed easywolf closed 6 years ago

easywolf commented 6 years ago

Hi everyone, I tried to put the eventMacros.txt with the hunting board code and somehow it didn't work. Please let me know if there's any problems in code?

control/eventMacros.txt

automacro BoardQuest1 {
exclusive 1
priority 1
timeout 120
BaseLevel > 75
QuestActive QuestID1, QuestID2
macro_delay 3
call {
    if (&questCompleteCount(QuestID1) == 1 && &questCompleteCount(QuestID2) == 1) call Quest1

    log Quest not Completed yet
    }
}

macro Quest1 {
log completed quest of Quest1
do conf lockMap mapID
lock BoardQuest1
}

###################################################################################################################

automacro BoardQuest2 {
exclusive 1
priority 2
timeout 120
BaseLevel > 75
QuestHuntCompleted QuestID1 MobID1, QuestID2 MobID2
QuestActive QuestID3, QuestID4
macro_delay 3
call {
    if (&questCompleteCount(QuestID3) == 1 && &questCompleteCount(QuestID4) == 1) call Quest2

    log Quest not Completed yet
    }
}

macro Quest2 {
log completed quest of Quest2
do conf lockMap mapID
lock BoardQuests2
}

###################################################################################################################

automacro BoardQuest3 {
exclusive 1
priority 3
timeout 120
BaseLevel > 75
QuestHuntCompleted QuestID1 MobID1, QuestID2 MobID2, QuestID3 MobID3, QuestID4 MobID4
QuestActive QuestID5, QuestID6, QuestID7
macro_delay 3
call {
    if (&questCompleteCount(QuestID5) == 1 && &questCompleteCount(QuestID6) == 1 && &questCompleteCount(QuestID7) == 1) call Quest3

    log Quest not Completed yet
    }
}

macro Quest3 {
log All quests completed!
do respawn
do move mapID #(map where the hunting board is)
do talknpc X Y NPCResponseSequence #for example c c r1 c r17 n
do talknpc X Y NPCResponseSequence
... #and so on until you turned in all quests
do talknpc X Y NPCResponseSequence #this last line is to take all the quests again once turned in
do conf lockMap mapID #should be the map the whole macro chain started in.
release all
do relog 3
}

And here's the false report

[eventMacro] Ignoring automacro 'BoardQuest3'
[eventMacro] Error in condition 'QuestHuntCompleted'
[eventMacro] Error type: Wrong condition syntax ('QuestID1 MobID1, QuestID2 MobID2, QuestID3 MobID3, QuestID4 MobID4')
[eventMacro] Error code: 'List member 'QuestID1 MobID1' has an invalid quest ID 'QuestID1''.
[eventMacro] Ignoring automacro 'BoardQuest1'
[eventMacro] Error in condition 'QuestActive'
[eventMacro] Error type: Wrong condition syntax ('QuestID1, QuestID2')
[eventMacro] Error code: 'List member 'QuestID1' must be a quest ID or a variable name'.
[eventMacro] Ignoring automacro 'BoardQuest2'
[eventMacro] Error in condition 'QuestHuntCompleted'
[eventMacro] Error type: Wrong condition syntax ('QuestID1 MobID1, QuestID2 MobID2')
[eventMacro] Error code: 'List member 'QuestID1 MobID1' has an invalid quest ID 'QuestID1''.
c4c1n6kr3m1 commented 6 years ago

http://openkore.com/index.php/EventMacro

read!!!!!!!!!!!!

alisonrag commented 6 years ago

you are just copying and pasting the eventmacro.

did you read what you are pasting?

you have to rewrite all QuestID with the Quest ID that you are wanting to do