cloak for safety
Moderator: Moderators
-
- Noob
- Posts: 3
- Joined: 04 Jul 2011, 15:02
- Noob?: No
cloak for safety
You can see clearly what I'm trying to do.
However, when the portal is seen by the bot, it doesn't cloak.
automacro cloak1 {
console /Portal Exists: ra_fild08 -> ra_fild12 (165, 29) - (0)/
call cloak
timeout 60
}
automacro cloak2 {
console /Portal Exists: ra_fild08 -> ra_fild09 (368, 234) - (0)/
call cloakd
timeout 60
}
automacro cloak3 {
console /Portal Exists: ra_fild09 -> ra_fild08 (27, 238) - (0)/
call cloak
timeout 60
}
automacro cloak4 {
console /Portal Exists: ra_fild09 -> ra_fild05 (29, 343) - (0)/
call cloakd
timeout 60
}
macro cloak {
do ss 135
}
macro cloakd {
pause 3
do ss 135
}
cloakd is a delay before cloaking - so my assassin can get to the portal before uncloaking. This is supposed to allow me to cloak on my way to hill winds to avoid aggros on the maps prior to the hill wind map. I don't know exactly what's wrong, any help is highly appreciated.
However, when the portal is seen by the bot, it doesn't cloak.
automacro cloak1 {
console /Portal Exists: ra_fild08 -> ra_fild12 (165, 29) - (0)/
call cloak
timeout 60
}
automacro cloak2 {
console /Portal Exists: ra_fild08 -> ra_fild09 (368, 234) - (0)/
call cloakd
timeout 60
}
automacro cloak3 {
console /Portal Exists: ra_fild09 -> ra_fild08 (27, 238) - (0)/
call cloak
timeout 60
}
automacro cloak4 {
console /Portal Exists: ra_fild09 -> ra_fild05 (29, 343) - (0)/
call cloakd
timeout 60
}
macro cloak {
do ss 135
}
macro cloakd {
pause 3
do ss 135
}
cloakd is a delay before cloaking - so my assassin can get to the portal before uncloaking. This is supposed to allow me to cloak on my way to hill winds to avoid aggros on the maps prior to the hill wind map. I don't know exactly what's wrong, any help is highly appreciated.
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: cloak for safety
Don't use regexp syntax for console condition if you're providing strings, not regexps.
-
- Noob
- Posts: 3
- Joined: 04 Jul 2011, 15:02
- Noob?: No
Re: cloak for safety
Would you mind providing me an example of how this string should look? I'm not entirely sure what I'm doing here :S
Re: cloak for safety
When you use regex, you put them between //.
When you use the strings, the exact text to match, you put it between "".
Code: Select all
Ex. console /regex syntax/
Code: Select all
Ex. console "String to match. Case-sensitive"
Quit.
Re: cloak for safety
Hey all.
Instead of creating a new thread I thought i would bump this one, as i am trying to achieve the same effect of my assassin cross being able to cloak in fields while walking to my lockmap.
Is using a macro the only way to do this? Can you not achieve the same result via a useselfskill setup in the config file?
If marco is the only way to do it, will i need a separate macro for each different path for different lock maps? for example if i choose morroc field 17 and setup each morroc field warp co-ordinates will i have to setup a separate macro if i choose to change my lockmap to a Rachel field?
Instead of creating a new thread I thought i would bump this one, as i am trying to achieve the same effect of my assassin cross being able to cloak in fields while walking to my lockmap.
Is using a macro the only way to do this? Can you not achieve the same result via a useselfskill setup in the config file?
If marco is the only way to do it, will i need a separate macro for each different path for different lock maps? for example if i choose morroc field 17 and setup each morroc field warp co-ordinates will i have to setup a separate macro if i choose to change my lockmap to a Rachel field?
Re: cloak for safety
If you do it like Astrologic, you'll have to create two new automacros for each field along the way. So, if you change the lockmap, there'll be a new route. You'd have to redo the whole thing for the new route.
It can't be done with useSelf_skill.
You can abstract the macro a little bit. Something like:
control/config.txt
control/macros.txt
It uses the cloak skill everytime Openkore changes map (as long as it isn't to the lockmap or savemap). Also, when he spots a portal, and he's with the cloaking effect and the portal won't take him to the last map, he will leave the cloaking status.
I didn't test it, but the idea isn't hard to grasp. The only problem there is if the bot spots a portal along the way, but it's not the portal he'll go through. If that portal takes him to a map that doesn't belong to his route (and it isn't the last map) he'll leave the cloaking status along the way.
The most efficient way to do this is probably through the source code itself (or a plugin).
It can't be done with useSelf_skill.
You can abstract the macro a little bit. Something like:
control/config.txt
Code: Select all
# Add this line in this file:
lastMap
Code: Select all
automacro cloakRoute {
mapchange *
call {
if ($.map != @config(lockMap) && $.map != @config(saveMap)) {
do ss 135
}
}
}
automacro leaveCloak {
console /Portal Exists: (.+) -> (.+) \((\d+),(\d+)\)/
status EFST_CLOAKING
call {
if ($.lastMatch2 != @config(lastMap)) {
do config lastMap $.map
do ss 135
}
}
}
I didn't test it, but the idea isn't hard to grasp. The only problem there is if the bot spots a portal along the way, but it's not the portal he'll go through. If that portal takes him to a map that doesn't belong to his route (and it isn't the last map) he'll leave the cloaking status along the way.
The most efficient way to do this is probably through the source code itself (or a plugin).
I'm watching my TV or is it watching me?
Re: cloak for safety
Would someone care to explain what this means?
" console /Portal Exists: (.+) -> (.+) \((\d+),(\d+)\)/ "
I tried looking up regex but I don't understand the syntax too well and I was hoping to see if anyone could just explain it to me. I am trying to get this auto macro working for myself as well.
" console /Portal Exists: (.+) -> (.+) \((\d+),(\d+)\)/ "
I tried looking up regex but I don't understand the syntax too well and I was hoping to see if anyone could just explain it to me. I am trying to get this auto macro working for myself as well.
Re: cloak for safety
(.+) -> one or more characters for the portal source
(.+) -> "" portal destination
\( -> a literal (escaped) '(' instead of being used as a regex character
(\d+) -> one or more digits for the x location
(\d+) -> one or mroe digits for the y location
\) -> escaped ')'
(.+) -> "" portal destination
\( -> a literal (escaped) '(' instead of being used as a regex character
(\d+) -> one or more digits for the x location
(\d+) -> one or mroe digits for the y location
\) -> escaped ')'
Re: cloak for safety
I'll help ya : Click here for more infoI tried looking up regex but I don't understand the syntax too well and I was hoping to see if anyone could just explain it to me. I am trying to get this auto macro working for myself as well.
Learn rules