Rebel attackskillslot and attackcomboslot

International

Moderator: Moderators

Message
Author
ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Rebel attackskillslot and attackcomboslot

#1 Post by ScriptKiddy »

Hey guys,

So i'm trying to get openkore to play my rebel the same way I play ingame. For those of you who don't know, we have a skill called "heat barrel" which gives us increased attack speed and damage for 60 seconds, but at the end of the cool down we cannot move, shoot, use skills or items for 10 seconds. So to maximum the use of this skill we use a little trick where we cast hiding just before the cooldown finishes so we are atleast somewhat protected during those 10 seconds.

I for the life of me cannot get this to work in openkore with the config.txt using the attackskillslot and attackcomboslot. I think it may be too complex for this type of use (there is quite a few status' to track to ensure its done right) but im only a beginner at openkore so thought i would post the question here just incase somebody more experienced can see an obvious reason why this isn't working.

any information or help would be greatly appreciated.

Code: Select all

attackSkillSlot Richs Coin {
	lvl 1
	whenStatusActive
	whenStatusInactive EFST_HEAT_BARREL, EFST_HEAT_BARREL_AFTER, Hiding
	spirit < 10
	isSelfSkill 1
}

attackSkillSlot Heat Barrel {
	lvl 5
	whenStatusActive
	whenStatusInactive EFST_HEAT_BARREL, EFST_HEAT_BARREL_AFTER, Hiding 
	spirit > 1
	inLockOnly 1
	isSelfSkill 1
}

attackComboSlot Hiding {
	lvl 1
	afterSkill Heat Barrel
	waitBeforeUse 55
	whenStatusActive EFST_HEAT_BARREL
	whenStatusInactive  
	isSelfSkill 1
}

attackComboSlot Hiding {
	lvl 1
	afterSkill Hiding
	waitBeforeUse 10
	whenStatusActive
	whenStatusInactive EFST_HEAT_BARREL, EFST_HEAT_BARREL_AFTER
	isSelfSkill 1
}





and here is a bit of the console that shows that it will cast richs coin, then heat barrel, and shows the status', but it wont cast hiding.

Code: Select all

You are casting Richs Coin on yourself (Delay: 0ms)
You use Richs Coin on yourself (Lv: 1)
You lost 100 zeny.
You have 10 spirit(s) now
You are now: Richs Coin Delay (Duration: 3s)
You are now: EFST_POSTDELAY (Duration: 0.98s)
You are casting Heat Barrel on yourself (Delay: 789ms)
You use Heat Barrel on yourself (Lv: 5)
You have 0 spirit(s) now
You are now: EFST_HEAT_BARREL (Duration: 60s)
You are now: Heat Barrel Delay (Duration: 80s)
You are now: EFST_POSTDELAY (Duration: 0.98s)
[100/ 92] You attack Monster Lunatic (0) (Dmg: 1253*2) (Delay: 70ms)
You have gained 3/2 (0.00%/0.00%) Exp
Item Appeared: Clover (0) x 1 (84, 216)
Item Appeared: Feather (1) x 1 (85, 215)
Item Appeared: Carrot (2) x 1 (83, 216)
Target died
You are now attacking Monster Poring (0)
[100/ 95] You attack Monster Poring (0) (Dmg: 1390*2) (Delay: 70ms)
You have gained 2/2 (0.00%/0.00%) Exp
Item Appeared: Jellopy (0) x 1 (99, 204)
Item Appeared: Clover (1) x 1 (99, 205)
Achievement 230201 added or updated.
Target died
You are now: EFST_HEAT_BARREL_AFTER (Duration: 10s)
You are no longer: EFST_HEAT_BARREL
You tried too long to move
You tried too long to move
Failed to take Feather (9) from (117, 227) to (126, 240)
You tried too long to move
You are no longer: EFST_HEAT_BARREL_AFTER
Item added to inventory: Feather (9) x 1 - Event
Calculating random route to: Prontera Field (prt_fild08): 148, 184

hakore
Super Moderators
Super Moderators
Posts: 200
Joined: 16 May 2008, 08:28
Noob?: No
Contact:

Re: Rebel attackskillslot and attackcomboslot

#2 Post by hakore »

You cannot use attackComboSlot with a very long wait time unless the specific attack target by the preceding attackSkillSlot remained alive for that long.

You may work on this:

Code: Select all

doCommand eval $config{useSelf_skill_999_disabled} = 1;;pause 55;;eval $config{useSelf_skill_999_disabled} = 0 {
   whenStatusActive EFST_HEAT_BARREL
   whenStatusInactive Hiding, EFST_HEAT_BARREL_AFTER
   timeout 60
}

useSelf_skill Hiding {
   lvl 1
   whenStatusActive EFST_HEAT_BARREL
   whenStatusInactive Hiding, EFST_HEAT_BARREL_AFTER
   timeout 1
}

useSelf_skill Hiding {
   lvl 1
   whenStatusActive Hiding
   whenStatusInactive EFST_HEAT_BARREL, EFST_HEAT_BARREL_AFTER
   timeout 2
}
The idea is to use Hiding skill when heat barrel status is active, but with a twist. We use doCommand to disable the skill block until after 55 seconds.

Note: You need to identify the index number of the useSelf_skill for the first Hiding skill and use that in place of 999 shown above.

Note 2: not tested, this simply gives you a jump start.
Whatever...

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: Rebel attackskillslot and attackcomboslot

#3 Post by ScriptKiddy »

Thank you very much for the information on how the comboslot works and a huge thank you for the above code as a base to work on. I really appreciate it!

I'm excited to play around with this and hopefully get this bot to act like I do so i can utilize the higher damage and attack speed to bot in higher exp per hour places :D

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: Rebel attackskillslot and attackcomboslot

#4 Post by ScriptKiddy »

This is strange, the console says "Unknown command 'pause'. Please read the documentation for a list of commands.
http://openkore.com/index.php/Category:Console_Command"

But when you check the wiki it clearly shows pause as a relevant syntax for the console commands, and thus should work with doCommands.

hakore
Super Moderators
Super Moderators
Posts: 200
Joined: 16 May 2008, 08:28
Noob?: No
Contact:

Re: Rebel attackskillslot and attackcomboslot

#5 Post by hakore »

Based on this excerpt from Commands.pm:

Code: Select all

		if (($switch eq 'pause') && (!$cmdQueue) && AI::state != AI::AUTO && ($net->getState() == Network::IN_GAME)) {
			$cmdQueue = 1;
			$cmdQueueStartTime = time;
			if ($args > 0) {
				$cmdQueueTime = $args;
			} else {
				$cmdQueueTime = 1;
			}
			debug "Command queueing started\n", "ai";
		} elsif (($switch eq 'pause') && ($cmdQueue > 0)) {
			push(@cmdQueueList, $command);
		} elsif (($switch eq 'pause') && (AI::state != AI::AUTO || ($net->getState() != Network::IN_GAME))) {
error T("Cannot use pause command now.\n");
pause command can only be used in manual AI mode or when AI is off...

If you're comfortable with editing the source, you can remove the test for AI state. However, I'm not particularly sure why it's designed that way, so do so at your own risk.

Otherwise, you may try to create a macro to replace the doCommand block.
Whatever...

ScriptKiddy
Noob
Noob
Posts: 16
Joined: 12 Aug 2017, 06:07
Noob?: No

Re: Rebel attackskillslot and attackcomboslot

#6 Post by ScriptKiddy »

That looks alittle scary for me to be honest. I'm new to open kore!

I really appreciate your help tho. I am now thinking the same as you, i think i need to turn to macros to get this to work.


I've been playing around with automacros for awhile today but couldn't get any of them to work, simply because "pause, delay and timeout" cannot be used properly as far as i can tell? Because both pause and delay seemed to stop botting altogether while waiting to cast hiding. So even tho the automacro worked as a whole (buffed me, waited 50 seconds, cast hiding then cast it again after debuff) there was no point using it because it stopped killing mobs for the whole duration of the buff.

Also i couldn't use timeout because if i try to timeout the automacro it only uses the timeout AFTER a successful trigger of condition i couldn't use the timeout to just break up the casts of the buff and the hiding.

I'm going to keep working on it tho. Maybe i need to use an eventmacro and use custom pearl variables and look ups? Not sure. Just going to keep playing around with it and learning tho!



This is the automacro i've been playing around with but can't get it to work as intended.

Code: Select all

automacro Awesome {
exclusive 1
BaseLevel > 100
StatusActiveHandle EFST_HEAT_BARREL
delay 50
call Hiding
}

macro Hiding {
log Ready for hiding!
do ai manual
do ss 51
pause 10
do ss 51
do ai on
}

Post Reply