Kaskus

Games

gathoslankAvatar border
TS
gathoslank
Macro dan Plugin Openkore
buat yg mau share macro dan plugin disini aja..thread ini bukan tempat untuk meminta minta emoticon-Mad: tapi untuk belajar bersama tentang macro dan plugin openkore..

___________________________
jika berkenan ijo-ijo / thanks gpp emoticon-Angkat Beer
0
475.8K
6.4K
Thread Digembok
Mari bergabung, dapatkan informasi dan teman baru!
Ragnarok Online
Ragnarok Online
KASKUS Official
2.1KThread940Anggota
Tampilkan semua post
kriegsmarineAvatar border
kriegsmarine
#94
Quote:


Pause,seperti kata Jexo emang buat mengatasi problem lag yang sering muncul,pasti sering liat kan waktu bot mau autostorage kalo lagi ngelag suka ada tulisan npc tidak merespon.



Oke mari sekarang kita belajar cara membuat macro sederhana
Disini kita mengenal automacro dan macro yang mana keduanya sama sama "macro"

Bedanya adalah automacro berdasarkan trigger atau pemicu yang akan berjalan otomatis tanpa campur tangan kita.

Sedangkan macro adalah suatu cara memerintah bot kita,disamping menggunakan Openkore untuk melakukan tugas tertentu kita dapat menggunakan macro untuk mengontrol perilaku bot

Membuat Macro Sederhana

Sebelum dimulai,akan saya ajukan satu pertanyaan
"apakah kamu sudah terbiasa dengan perintah perintah console ?"
Jika belum ada baiknya kamu kunjungi link berikut yg lebih detail menjelaskan command console

Console Commands
Code:

http://www.openkore.com/wiki/index.php/Console_commands

Chat Commands
Code:

http://www.openkore.com/wiki/index.php/Chat_Commands


Basicnya semua perintah console bisa kamu implementasikan ke macro.

Bagaimana automacro berjalan ?
Code:

automacro Anu {
<kondisi> a
<kondisi> b
panggil macro Itu
}

macro Itu {
do this
do this again
do that
}


So automacro Anu,akan terpicu jika kondisi a,dan kondisi b terpenuhi
saat semua kondisinya terpenuhi maka automacro Anu akan memanggil makro Itu,saat terpanggil maka macro Itu akan mengeksekusi semua perintah yg telah di atur.

Referensi dari Conditions,Special Variable,Trigger Condition

Conditions
Code:

Condition \t Meaning
< \t\tless than
<= \t\tless than or equal to
== \t\tequal to
>= \t\tgreater than or equal to
> \t\tgreater than
!= \t\tnot equal to
~ \t\t<left part> is element of <right part (comma-separated list)>


Special Keywords
Code:

@npc (<x> <y>/;)/
Expands to NPC's ID who's located at (<x>,<y>/;)/, or to -1 if the NPC was not \tfound.
@inventory (<item>/;)/
Searches your inventory for <item> and returns ID or -1 if the item was not found.
@Inventory (<item>/;)/
same as @inventory but returns all matching IDs as a comma-separated list or -1 if the item was not found
@cart (<item>/;)/
searches your cart for <item> and returns ID or -1 if the item was not found
@Cart (<item>/;)/
same as @cart but returns all matching IDs as a comma-separated list or -1 if the item was not found
@storage (<item>/;)/
searches your storage for <item> and returns ID or -1 if the item was not found
@Storage (<item>/;)/
same as @storage but returns all matching IDs as a comma-separated list or -1 if the item was not found
@player (<name>/;)/
looks for a player and returns ID or -1 if the player was not found
@vender (<name>/;)/
looks for a vender and returns ID or -1 if the vender was not found
@store (<name>/;)/
looks for an item in a store and returns ID or -1 if the item was not found
@random ("<argument1>"[, "<argument2>"[, ...]])
returns randomly one of the given arguments
@rand (<n>, <m>/;)/
returns a random number between (and including) <n> and <m>
@invamount (<item>/;)/
returns the amount of the given <item> in inventory
@cartamount (<item>/;)/
returns the amount of the given <item> in cart
@shopamount (<item>/;)/
returns the amount of the given <item> in shop
@storamount (<item>/;)/
returns the amount of the given <item> in storage
@eval (<argument>/;)/
evaluates the given <argument>
@arg ("<argument>", <n>/;)/
returns the <n>th word of <argument> or an empty string if the word index is out of range
@config (<variable>/;)/
returns the value of <variable> specified in config.txt


Trigger Condition
Code:

mapchange (<mapname>|any) [, ...]
Triggers when changing map to <mapname>. If the argument is any then it triggers on any map change.
Comma-separated arguments are treated as OR conditions.

hp <condition> <amount>[%]
triggers when your hp match <condition> <amount> (absolute value) or <condition> <amount> percent (relative value).
Multiple lines are treated as AND Conditions.

sp <condition> <amount>[%]
triggers when your sp match <condition> <amount> (absolute value) or <condition> <amount> percent (relative value).
Multiple lines are treated as AND conditions.

spirit <condition> <amount>
triggers when your spirits match <condition> <amount>.
Multiple lines are treated as AND conditions.

weight <condition> <amount>[%]
triggers when your weight matches <condition> <amount> (absolute value) or <condition> <amount> percent (relative value).
Multiple lines are treated as AND conditions.

cartweight <condition> <amount>[%]
triggers when your cart weight matches <condition> <amount> (absolute value) or <condition> <amount> percent (relative value).
Multiple lines are treated as AND conditions.

zeny <condition> <amount>
triggers when your zeny amount matches <condition> <amount>.
Multiple lines are treated as AND conditions.

soldout <condition> <slots>
triggers when the amount of sold out item slots in your shop matches <condition> <slots>.
Multiple lines are treated as AND conditions.

status [not] <status> [, ...]
triggers when you are [not] <status>.
The statuses "dead" and "muted" are supported additionally.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

inventory "<item>" <condition> <amount> [, ...]
triggers when you have <condition> <amount> of <item> in your inventory.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

storage "<item>" <condition> <amount> [, ...]
triggers when you have <condition> <amount> of <item> in your storage.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

cart "<item>" <condition> <amount> [, ...]
triggers when you have <condition> <amount> of <item> in your cart.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

shop "<item>" <condition> <amount> [, ...]
triggers when you have <condition> <amount> of <item> in your shop.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

base <condition> <level>
triggers when your baselevel matches <condition> <level>.
Multiple lines are treated as AND conditions.

job <condition> <level>
triggers when your joblevel matches <condition> <level>.
Multiple lines are treated as AND conditions.

class <job>
triggers when your jobclass is <job>

spell <spell> [, ...]
triggers when someone casts <spell> on you or you are in it's scope.
Comma-separated arguments are treated as OR conditions.

monster <monstername> [, ...]
triggers when <monstername> is near.
When triggered the special variables $.lastMonster and $.lastMonsterPos are set.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

notMonster <monstername> [, ...]
triggers when a monster appears that is not in the list.
Comma-separated arguments are treaded as AND conditions.

aggressives <condition> <number>
triggers at <number> of aggressives.
Multiple lines are treated as AND conditions.

player ("<playername>"|/<regexp>/[i]) [, <distance> ]
triggers when <playername> is on screen or not more than <distance> blocks away.
Multiple lines are treated as AND conditions.

equipped [<slot>] (<item>|none) [, ...]
triggers when <item> or none is equipped [in slot <slot>]
Slots are topHead, midHead, lowHead, leftHand, rightHand, robe, armor, shoes, leftAccessory, rightAccessory and arrow.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.

var <variable> (unset|<condition> <value>/;)/
triggers when <variable> is either unset or matches <condition> <value>.
Multiple lines are treated as AND conditions.

varvar <nested variable> (unset|<condition> <value>/;)/
triggers when <nested variable> is either unset or matches <condition> <value>.
Multiple lines are treated as AND conditions.

console ("<text>"|/<regexp>/[i])
triggers when <text> is received on console or the text received matches <regexp>.
The i switch means the regexp is case insensitive.
Sets $.lastLogMsg.

pm ("<text>"|/<regexp>/[i]) [, <player>]
triggers when <text> is received by pm [from <player>] or the text received matches <regexp>.
The i switch means the regexp is case insensitive.
Sets $.lastpm and $.lastpmMsg.

pubm ("<text>"|/<regexp>/[i]) [, <distance>]
triggers when a public message [within a distance of <distance>] is received and it is <text> or matches <regexp>
The i switch means the regexp is case insensitive.
Sets $.lastpub and $.lastpubMsg.

party ("<text>"|/<regexp>/[i])
triggers when <text> is received by partychat or the text received matches <regexp>.
The i switch means the regexp is case insensitive.
Sets $.lastparty and $.lastpartyMsg.

guild ("<text>"|/<regexp>/[i])
triggers when <text> is received by guildchat or the text received matches <regexp>.
The i switch means the regexp is case insensitive.
Sets $.lastguild and $.lastguildMsg.

hook <hookname>
triggers when openkore calls <hookname>.

save <hash key>
(use in combination with hook)
saves the value of <hash key> in a variable $.hooksave1 to $.hooksave

run-once (0|1)
When set to 1 the automacro will be deactivated after being triggered.
Use the macro command release to reenable this automacro.

overrideAI (0|1)
When set to 1 the macro ignores openkore's AI. This means it won't pause upon "move" or "status dead".

delay <n>
Waits for <n> seconds before calling the corresponding macro.

timeout <n>
Wait at least for <n> seconds before this automacro can be triggered again.

macro_delay <n>
Overrides the global macro delay setting for the called macro.

priority <num>
Choose which automacros should be checked before others. The smaller <num> is is the sooner the automacro gets checked. If priority is not given, the priority is assumed to be 0 (zero: check first).

exclusive (0|1)
Automacros which have exclusive set cannot be interrupted by other automacros.
As of macro 1.3.0 running macros can be interrupted by automacros by default. To disallow that behaviour either set this option or use the command line option -exclusive

set <variable> <value>
Sets variable <variable> to <value>. You can have multiple set lines per automacro.

call <name>
Calls macro <name> when the automacro is triggered.

call {
<instructions>
}
Runs <instructions> when the automacro is triggered.

orphan <method>
Sets the method of how to deal with orphaned macros.


Implementasi

1.saya mempunyai character level 98,saat dia mencapai level 99 saya ingin dia keluar dari program openkore (quit),bagaimana cara mengimplementasikan ke macro?

Logikanya kita memakai trigger Base level sebagai pemicu ,so mari kita implementasikan

Code:

automacro Logout {
base > 98
call Quit
}

macro Quit {
do quit
{


do quit = lakukan perintah console,coba sekarang juga di console openkore kamu ketik quit so pasti openkore kamu akan di close emoticon-Smilie

hosh hosh hosh "kecapean ngetik"emoticon-linux2emoticon-linux2


Oke mudah mudahan tulisan ini bisa sedikit memberikan ide dan pencerahan buat teman teman yg masih bingung akan macro

Sebelum saya akhiri ada baiknya kita ikuti UAM "Ujian Akhir macro" dulu
buat bro kaskuser yg baca silahkan post jawabannya oke,harus original buatan sendiri yah


Test :
1.Buat macro untuk disconnect selama 5 menit saat terkena status Poison,tapi sebelum disconnect character tersebut harus melakukan ekspresi OMG

Peace (^_^)v
0
Ikuti KASKUS di
© 2026 KASKUS, PT Darta Media Indonesia. All rights reserved.