ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Cerveza on December 23, 2008, 10:18:22 AM
-
;============================================================
; Script Name: SUO Combat Companion
; Author: Cerveza
; Version: B2.0
; Shard OSI/FS: OSI/FS
; Revision Date: 03/27/2009
; Purpose: Control Repetative Combat Actions
;============================================================
; ____ _ _ __ _ ___
; / __/ ___ _ _(_)_ _ | |_\ \ / / _ \
; \__ \/ _| `_| | ` \| _/ / \ \/ \ \
; __/ \ (_| | | | |) | | \ \_/ /\_/ /
; \____/\__|_| |_| _/\__| \___/\___/
; |_|
; |C|o|m|b|a|t| |C|o|m|p|a|n|i|o|n|
;============================================================
; Revision History:
; v1.0b - First Beta Release
; v2.0b - Reorganized loop to remove evil goto's
; - Added auto honor and attack
set %version 2.0b
;============================================================
; THIS IS A BETA COPY, NOT A RELEASE
;
; If you want to give this a try, make
; sure to post your results, both good
; and bad. If you want to help with
; this project, please PM me on SUO.
;
;============================================================
Remember, this is a BETA! I haven't fully tested this at all.
History: Once there was an auto honor script, and a lightning strike script, and a curse weapon script, and a... well you get the idea. I was running several scripts at the same time to accomplish basic Sampire functions. This is a compilation of those scripts in one.
SUOCC is TM's Healing Commander and TM's CLaW Looter aware. That means this script will wait if either of those scripts are active. This script is also "enemy aware". It shouldn't just keep casting these combat spells if there's nothing around.
The setup sucks, yes. But it's necessary for later when a menu gets added. Speaking of which, someone could step up and volunteer to make a menu for this. I'm not sure I'll ever have the time.
In a nutshell.... SUOCC has:
Curse Weapon - duration based on Spirit Speak skill
Enemy of One - duration based on user setting
Evasion - timer set for OSI shards
Divine Fury - user setting for when to cast
Lightning Strike - auto
Trapped Crate - for breaking paralysis
Honor single target - user sets hotkey*
Cure/Heal/Refresh pots - timer for heals, note during setup ONE HANDED WEAPONS ONLY!
*Automatic Honor and Attack isn't implemented in this version. I will include it when I have a chance to test it further.
User settings found in the script:
; --==:: Setup ::==--
sub setup
set %delay_eoo 120 ; time in seconds for Enemy of One
set %delay_evasion 20 ; time in seconds for Evasion
set %delay_heal_pot 10 : time in seconds for heal potions
set %mana_eoo 20 ; mana level to use Enemy of One
set %mana_ls 20 ; mana level to use Lightning Strike
set %mana_curse 7 ; mana level to use Curse Weapon
set %mana_evasion 10 ; mana level to use Evasion
set %mana_divine 15 ; mana level to use Divine Fury
set %hp_pot_heal 40 ; hit point level to drink Heal
set %st_pot_stamina 60 ; stamina level to drink refresh
set %key_hotkey_honor F10 ; hotkey for Honor
set %st_df_stamina 100 ; stamina level to cast Divine Fury
set %monster_auto_honor TC_UE_PI_FD_ ; swoop, miasma, sebrix/lissith
Future: I need to add in the auto honor, some more pixel things like momentum, counter attack, etc., and of course a menu with savable settings. Some checks later on to ensure certain actions were performed would be pretty nice as well. And, whatever you guys want added to it.
Remember feedback is critical and this is a SUO script. Meaning I don't care what you do to it for improvements as long as you post your work here to share with others.
UPDATE: 03/27/2009
v2.0b - Reorganized loop to remove evil goto's
- Added auto honor and attack
-
Can't wait to test this out on my wammy, whats left of him.
-
Back to the topic....
You might look at marrying the icon setup from your code with what I did in my Bushido script. It remembers your locations, and tests the icon validity.
I'll check it and include.
-
ok tried to play with this tonight and it seems to be in a constant loop of pause once you go through the setup of what you want the script to do. not sure if this is intended or not at this point.
-
Did you have something targetted? Something attacking you?
What was it looping? Just paused or waiting for an #enemyID?
It's supposed to do nothing until something is targetted or targeting you.
-
Could there be that annoying time where some ID gets stuck in the #ENEMYID?
-
i was killing deamons in ish. i tried it again and still nothing after the setup when i step through it with f8 it gets stuck here:
TM:
repeat
;event sysmessage #sCnt2 ; timer for testing purposes
if #MENUBUTTON = pause
gosub pause_script
gosub Check_Status
if #RESULT = #TRUE
goto TM
which is line 36
-
Well, here's the sub routine and the setup for it...
sub Check_Status
namespace copy TM_HEAL from global TM_healer
namespace copy TM_loot_in_progress from global TM_loot
wait 5
if #targCurs = 1 || #lLiftedKind = 1 || !TM_HEAL = #TRUE || !TM_loot_in_progress = #TRUE
return #TRUE
return
set !TM_HEAL = #FALSE
set !TM_loot_in_progress = #FALSE
If your not using TM's Healer or Looter then the variables should remain #FALSE and the script should continue. The sub also checks for the target cursor and any items being dragged on screen.
Just rem out the gosub check section and see what happens.....
; gosub Check_Status
; if #RESULT = #TRUE
; goto TM
-
Anyone get behind a menu on this one yet? I'm still toying although feeling like this needs to be the last "lip service" I give it before actually doing.
X
-
Iwould build a menu for it but I have no freaking idea how to build them.....I need to get around to teaching myself.
-
Okay I have been trying to mess with this all day but I keep just gettin gmyself killed as the script doesn't appear to be doing anything for some reason. I have tried messing with the #enemyid and the FindCnt for it as well but no luck. I just can't figure out why it doesn't want to play well with me :(
-
I spent less then 1 minute in game and got it working. If your dying using this, perhaps you shouldn't be fighting whatever you are while testing.
I changed this:
sub Check_Status
namespace copy TM_HEAL from global TM_healer
namespace copy TM_loot_in_progress from global TM_loot
wait 5
if #targCurs = 1 || #lLiftedKind = 1 || !TM_HEAL = #TRUE || !TM_loot_in_progress = #TRUE
return #TRUE
return
to this:
sub Check_Status
namespace copy TM_HEAL from global TM_healer
namespace copy TM_loot_in_progress from global TM_loot
wait 5
if #targCurs = 1 || #lLiftedKind = 1
return #TRUE
return
For some reason the TM globals are returning TRUE even when their respective scripts aren't running.
I'll see if I have some time to play with this in the next week or so. Edit that sub and try it again.
-
Actually there's a bit of a bug in that routine. There's a return value for the positive instance, but no return value for the failure. So really for the sub to be correct, you need to do this:
sub Check_Status
namespace copy TM_HEAL from global TM_healer
namespace copy TM_loot_in_progress from global TM_loot
wait 5
if #targCurs = 1 || #lLiftedKind = 1 || !TM_HEAL = #TRUE || !TM_loot_in_progress = #TRUE
return #TRUE
return #FALSE
otherwise, you're not really sure what was in the value of #RESULT.
you can simplify that by
sub Check_Status
namespace copy TM_HEAL from global TM_healer
namespace copy TM_loot_in_progress from global TM_loot
wait 5
return #targCurs = 1 || #lLiftedKind = 1 || !TM_HEAL = #TRUE || !TM_loot_in_progress = #TRUE
-
Cool, I was thinking that it defaulted to a #FALSE unless it was #TRUE in the sub.
I'll update it when then forums stabilize.
-
That very well coudl have been my problem, I was in a pretty crappy mood trying to test it and when I got killed the second time by a wyvrn because I didn't start my healing script I just got pissed off lol so relaly my testing was pretty limited but it does seem that if there was a stuck true statement in there that would have caused my problem.
-
Updated script with the sub as corrected by TM.
Removed some errant postings in thread.
Snuck all this in during one of the forums limited uptimes :P
-
BTW, I didn't actually test those changes but they did seem logical. dunno.
-
Me neither, but your right, looks good on paper :)
-
Ok tried the latest one and everything seems to be working well. Cant wait for the honoring part to be implimented. One question i had was is there a reason you didnt put consecrate weapon in? That would really help on killing sucubusses. Is anyone working on a menu for this? I know it was mentioned but..
-
The fixes put in place resolved my problems as well my char just sucks so I sitll get killed pretty easily but overall great so far I just gotta ge tmy stupid char to not suck lol.
-
12x mentioned he would make a menu, but if he doesn't want for some reason, i would do it ;) I'm am menu freak btw, giving every litte senseless script a menu... just say something
-
Your welcome to add a menu to this script.
I have one drawn up, I'll post it tomorrow.
-
I thought this was pretty slick...
(http://www.scriptuo.com/smf/index.php?action=dlattach;topic=62.0;attach=320;image)
-
That looks really good Cerveza. I haven't messed with this much since I've been busy doing Champs or trying to. I'd for sure like to try this on Miasma and see how it works.
Very nice Avatar too. I might have to steal that one from you if you don't mind. :-\
-
As I have stolen, so shall I be stolen from.
-
that looks very nice man cant wait
-
very nice menu.. can't wait to see that implimented. I still need to figure out how i'm gonna set my wammy up.
-
That's my problem I can't figure out a good way to get my whammy setup, currently I get killed on a regular basis :(
-
Life leech is your life's blood. Without it you die.
Stamina leech is almost as important. Your swings slow, your life leech slows, you die.
Mana leech isn't as important. You'll be leeching back enough mana from Wraith Form to keep your specials and Lightning Strike going.
I'd recommend a weapon with Life and Stamina Leech. Hit lower attack would finish off an awesome weapon. You already have hit lower defense on your glasses, and your hit chance should be near max at all times with lightning strike.
Max defense chance (I mean MORE then 40%, more like 60!), and max your resists, or the resists necessary for your 'prey'. Get a quick ONE handed weapon with HLL, HSL, HLA, DI on it. Take 50+ refresh pots with you. Figure out your "break points" for swing speed. At what stamina your swing speed slows one 'click' and set it up to auto drink a refresh when you reach that level.
Utilize Lightning Strike all the time, counter attack all the time, and Evasion ONLY when you need it. Like when your stamina is taking a hit, use Evasion to get the potion drank. If you rely on evasion constantly, you will die because of the delay.
Try to NEVER run off to heal. You hit - you heal. If you run off, you'll get zapped while trying to Spirit Speak. Most deaths occur while running away. And these deaths could have been avoided if you'd kept calm, drank a TR and held ground.
I'll see about working that menu in sometime. The biggest issues I have are:
Some attacks are exclusive: if you select one, a different one must be de-selected
Saving the options and recalling them from a file
Recalling the options in the setup of the script
Enabling the menu without delaying the main loop of the script
-
Nice tips Cerv, I think this will help me a great deal as I was running without a good suit, no HLD at all (no M&S glasses), without the right weapon, and no TR pots. So basically, I was doing everything wrong except maybe the template LOL.
Really looking forward to testing this when I'm done training up a couple of mule skills and finishing my current project (a multi-library turn-in inspired by a resurrected Sorrowmaster script, probably not as exciting nowadays as it would have been a while back but it's a current obsession so I have no choice but to go with it).
XII
-
yes I agree, I'm definitely going to hit up that post when I'm ready to pick my whammy back up. I finally got my scrappers recipe, I just need the courage to pickup my warrior and find the right armor, and learn how to key up for dread.
-
You know it doesnt actually tell you to have a weapon in hand, I can see where some would get comfused :) just kidding man
-
Next version will have an additional check...
sub khameleon_checker
display yesno Will you be using a weapon?
if #dispRes = yes
{
display ok ARM IT YOU TWIT!
return
}
if #dispRes = no
{
display ok What? Your going to kill them with harsh language?$GET A WEAPON YOU TWIT!
halt
}
return
-
phew, and I thought I was gonna Get Flammed for that Post
-
Updated: Reconfigured the mainloop to remove any evil goto's. Added the much desired Auto Honor and Attack sub.
As always, if you use this please report how it worked for you. Positive and especially Negative responses are needed to ensure this script is working as intended.
-
I've run the Companion two times on Miasma now for the main purpose of gaining some honor. I just had to make sure I was at least 1-2 tiles away from Miasma to the auto honor working. If your too close there's not enough time to target before inflicting damage. I mainly used EoO and Curse Weapon and I was able to farm Miasma all day long.
I'll keep testing it out and playing with it and see if I can find any hiccups in it. I'm not sure if there will be any conflicts if you use 'everything' that it the script has to offer.
I think a real good test for this script would be to use it on Dreadhorn and see what happens...
Cerveza have you put this up against DH?
-
Nope, I put up a "this lite" though... worked well.
Please, if you use it, report how it did. Feedback is the only way of knowing if something is broke.
-
I'm gona have to look through this one to get some ideas on how to improve my for tamers Cerv, though My tamer script is great for Chiv/Archer/Tamer templates im still working on the magery templates as well. Maybe even come up with ways for users to build a customized template setup somehow.
-
hmmmm, this project sounds mildly familiar.... ;D
*downloads current version*
-
I know this is an old post but tried it out and EoO and lightning strike worked, but it did not do the primary ability or counter attack.
-
I know this is an old post but tried it out and EoO and lightning strike worked, but it did not do the primary ability or counter attack.
You're probably going to need to try and figure this out yourself. Cerveza hasn't been active here for a few years now.
-
Don't want to promise anything, but I will look at it when I have some spare time.
-
Look to me that Cerveza add some feature in preparation of menu implementation. So you could change between LS,or primary. but he never get around it.