PDA

View Full Version : smartmonk change



Tgo01
05-02-2016, 08:19 PM
Someone asked me to update ;smartmonk because apparently the script never takes advantage of the fact that you have excellent positioning against your target, rather you set what your default attack will be and it will always use that attack unless there is a "follow up" attack message, in which case it uses that.

I'm pretty sure the author of this script no longer plays and no one has claimed ownership of the script on the repo but I really don't want to be responsible for this script because, well I just don't!

Anyways for anyone who wants to update their version of the script to take advantage of excellent positioning here is what you can do.

Change line 94 from this:

return matchwait('returns to normal', 'It looks like somebody already','What were you referring to?', 'followup jab', 'followup punch', 'followup grapple', 'followup kick', 'Roundtime')

to this:

return matchwait('returns to normal', 'It looks like somebody already','What were you referring to?', 'followup jab', 'followup punch', 'followup grapple', 'followup kick', 'excellent positioning', 'Roundtime')

Then if you want jab to be your default attack when you have excellent positioning (I don't know why you would but yeah...)

Change line 195 from this:

elsif ( @msg =~ /followup jab/ )

to this:

elsif ( @msg =~ /followup jab|excellent positioning/ )


For punch change line 206 to:

elsif ( @msg =~ /followup punch|excellent positioning/ )

For grapple change line 217 to:

elsif ( @msg =~ /followup grapple|excellent positioning/ )

For kick change line 228 to:

elsif ( @msg =~ /followup kick|excellent positioning/ )

Remember only change ONE of the above lines, depending on which attack you want to use when you have excellent positioning. Then whichever one you decided to use make sure you move that whole bit of code to after the kick bit (unless you want to use kick then just leave that code where it is.)

For example if you want to use punch when at excellent positioning move the following code:



# Punch Vulnerability was found
elsif ( @msg =~ /followup punch|excellent positioning/ )
@currently_tiered = true
echo "Fight On - Punch and msg = #{@msg}" if @debug == 1
echo "Punch Vulnerability Found" if @debug == 1
ambush_or_attack_with("punch")
#attack_with("punch")
@msg = check_match_conditions
waitrt?
fput "stance defensive"
fight_on


To right after all of this code:



# Kick Vulnerability was found
elsif ( @msg =~ /followup kick/ )
@currently_tiered = true
echo "Fight On - Kick and msg = #{@msg}" if @debug == 1
echo "Kick Vulnerability Found" if @debug == 1
ambush_or_attack_with("kick")
#attack_with("kick")
@msg = check_match_conditions
waitrt?
fput "stance defensive"
fight_on


Then what you do is set your preferred attack in the setup menu to whichever attack you want to use to tier up (most likely jab.)

How ;smartmonk would run after this is if you do not have excellent positioning and there are no followup attacks then you will use your "preferred attack."

If there is a followup attack it will always use the followup attack no matter what.

If you are at excellent positioning and there are no followup attacks then it will use whichever attack you added the "excellent positioning" bit to.

loxe
05-03-2016, 08:30 AM
ok i have a question about editing in general... some scripts when you open them up everything is laid out nicely and i can see what is going on and follow my way through it. Others like (smartmonk) when i open it up all i get is a huge mish mash and it is mindboggling to try to work through. let alone find line 94. is there something i can do to format the script in my notepad so i can actually read and follow what is going on.

mostly i am asking because i have been learning and trying to make my own scripts but sometimes it really helps to be able to look through another script that has a similar ability to what im trying to do and get ideas.

Hazado
05-03-2016, 09:53 AM
Download notepad++


Sent from my iPhone using Tapatalk

m444w
05-03-2016, 09:57 AM
ok i have a question about editing in general... some scripts when you open them up everything is laid out nicely and i can see what is going on and follow my way through it. Others like (smartmonk) when i open it up all i get is a huge mish mash and it is mindboggling to try to work through. let alone find line 94. is there something i can do to format the script in my notepad so i can actually read and follow what is going on.

mostly i am asking because i have been learning and trying to make my own scripts but sometimes it really helps to be able to look through another script that has a similar ability to what im trying to do and get ideas.

If you are trying to read/write code, you need something with syntax highlighting and not just "Notepad".

I would checkout: https://www.sublimetext.com/3

and use sublime text to open the .lic files and then map them to the `ruby syntax` using "View" > "Syntax" > "Open all with current extension as" > Ruby

There are a lot of other tools you can add as plugins for Sublime Text to make your life easier.

For example: https://packagecontrol.io/packages/Pretty%20Ruby

If you do find any packages you like on packecontrol.io you need to install packagecontrol itself to have access to them:

https://packagecontrol.io/installation

But someone has already written a blog post and walk through that is far better than I can explain in this format. Just google "top plugins for Sublime Text 3 and rubyists" or something.

Alashir
05-03-2016, 09:45 PM
Download notepad++


Sent from my iPhone using Tapatalk

wow, that was easy and looks great. thanks