Openkore: [Help w/ Macro] Priest buff non-Party members via Emotions

Created on 31 Dec 2017  路  3Comments  路  Source: OpenKore/openkore

Hello there OpenK team,

It's my first time working with macros and I'm having quite fun learning the language. Sometimes guild members and non-Party players ask for buffs, so I gathered some info from GitHub and the forums.
For now, the Priest is able to buff anyone who says pubm messages, but the problem is I cannot make my macro react to Emotions such as /heart, /help, etc. The macro is as follows:

macro buff {
do sp 34 "$.lastpub"
pause 1
do sp 29 "$.lastpub"
}

automacro SupportOthers {
pubm /baps|buffs|buf|buff|buffa|buff me|buff pls|buff me pls|ye|yes|blessing|bless|agi|bap|bup|hel/i, 8
status Blessing
status Increase Agility
sp > 30%
run-once 1
}

The problem here is - how can I get the automacro to detect Emotions, the same way he detected public messages? User fadreus posted something I found interesting, but everytime I try to use it, my OpenK simply crashes and won't work unless I remove his lines. His code was:

automacro Heal {
console /Help/
call {
do sp 28 @player ($.lastPlayerName)
do sp 28 @player ($.lastPlayerName)
}
}

Why does my Priest client crashes when I use his solution? Is it missing something?
Thanks in advance and I hope everyone has a great end of the year!

Most helpful comment

there is no official way of get the emoticons
but i've saw a code that used this:
console /\[dist=(.*)\] (.*) \((\d+)\): (.*)(Pfft)(.*)$/
console /\[dist=(.*)\] (.*) \((\d+)\): (.*)(Panic!)(.*)$/

i think that with this you can try something

All 3 comments

@nipodemos god of eventmarco .

there is no official way of get the emoticons
but i've saw a code that used this:
console /\[dist=(.*)\] (.*) \((\d+)\): (.*)(Pfft)(.*)$/
console /\[dist=(.*)\] (.*) \((\d+)\): (.*)(Panic!)(.*)$/

i think that with this you can try something

Why does my Priest client crashes when I use his solution? Is it missing something?

I usually don't give straight answers
I often only give the idea how to do it since macro is FREEDOM. XD

That macro is incomplete.
If you put log do sp 28 @player ($.lastPlayerName) you can see why it crashed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

comdevx picture comdevx  路  3Comments

lututui picture lututui  路  5Comments

baskedue picture baskedue  路  5Comments

ncplay91 picture ncplay91  路  4Comments

Keeynt picture Keeynt  路  4Comments