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

EventMacro Timeout Random #2485

Closed eprabotmesmo closed 5 years ago

eprabotmesmo commented 5 years ago

hello have some way to use eventMacro with random timeout? example

$timeout = int rand(21) automacro start { BaseLevel > 0 priority -1 exclusive 1 timeout $timeout call { log is running } }

sctnightcore commented 5 years ago

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

$timeout = int rand(21) // wrong

Nipodemos commented 5 years ago

i'll test this now

Nipodemos commented 5 years ago

you can't. eventMacro doesnt support this

you can use a workaround, but it is not good...

automacro start {
    BaseLevel > 0
    priority -1
    exclusive 1
    call {
        $var = &rand(1,10)
        pause $var
        log is running
    }
}
c4c1n6kr3m1 commented 5 years ago

in old macro plugin you have access to the parameters but in eventMacro ....:confused:

eprabotmesmo commented 5 years ago

you can't. eventMacro doesnt support this

you can use a workaround, but it is not good...

automacro start {
    BaseLevel > 0
    priority -1
    exclusive 1
    call {
        $var = &rand(1,10)
        pause $var
        log is running
    }
}

openkore pauses all actions

Fadreus commented 5 years ago

I wonder why not using the forum. I see this thread has no benefits here for openkore. :thinking: Anyway, the solution is just to overrideAI


automacro start {
    BaseLevel > 0
    priority -1
    run-once 1
    overrideAI 1 <---put here
    call {
        set overrideAI 1 <---or put here, any
        $var = &rand(1,10)
        pause $var
        log is running
        release all
    }
}