Author Topic: WeaverAssistant  (Read 4164 times)

0 Members and 1 Guest are viewing this topic.

Offline welgillTopic starter

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
WeaverAssistant
« on: September 02, 2009, 03:21:35 PM »
0
Ok now that I have a basic script going I guess it should go here.
I have a couple of problems that are stumping me
1) It seems it is ignoring the return commands it just goes on to next area
2) it keeps opening the buffbar over and over usualy to different place than setup

Other than that it casts the spells long way to go but its definitly coming along will post the code here let me know if you see something that might be screwing me up

Updated to 1.5 bit of a rewrite
Code: [Select]
;==================================
; Script Name:WeaverAssist  
; Author:Welgill
; Version: 1.5
; Client Tested with:
; EUO version tested with:1.5
; Shard OSI / FS:Osi
; Revision Date:
; Public Release:
; Global Variables Used:
; Purpose: Script will keep spellweaving buffs up to date and active will also keep bless going
; Script requires EN's ScanBuffBar subs that can be downloaded from this URL http://www.easyuo.com/forum/viewtopic.php?t=28548 or http://www.scriptuo.com/index.php?topic=1508.msg11033#msg11033
;==================================
set %mana 50
gosub setup
main:
repeat
if #TARGCURS = 0
gosub buffs
if #TARGCURS = 1
gosub waiting

until #CHARGHOST = yes
while #CHARGHOST = yes
goto main

sub buffs
Call ScanBuffBar.txt
  set %ae _ArcaneEmpowerment_  NOTIN %BuffBarIconNames
    if %ae = #true
  {
    Gosub Ae
   }
wait 2s
return  
  set %at _Atunement_  NOTIN %BuffBarIconNames
    if %at = #true
  {
    Gosub At
   }
wait 2s
return
  set %GoR _ArcaneEmpowerment_  NOTIN %BuffBarIconNames
    if %GoR = #true
  {
    Gosub GoR
   }
wait 2s
return
  set %GoL _GiftOfLife_  NOTIN %BuffBarIconNames
    if %GoL = #true
  {
    Gosub GoL
   }
wait 2s
return
sub GoL
if #MANA < %mana
{
  gosub Med
}
Event Macro 15 615
  target 4s
Event Macro 23 0
return

sub GoR
if #MANA < %mana
{
  gosub Med
}
Event Macro 15 602
  target 4s
Event Macro 23 0
return
sub Ae
if #MANA < %mana
{
  gosub Med
}
Event Macro 15 616
wait 2s
return
sub At:
if #MANA < %mana
{
  gosub Med
}
Event Macro 15 604
wait 2s
return
sub setup
event macro 8 1
  wait 5
  contpos 650 0
  wait 5
event macro 8 2
  wait 5
  contpos 650 500
  wait 5
event macro 8 7
  wait 5
  contpos 615 330
  wait 5
Call ScanBuffBar.txt 1 493
return
sub med
repeat
if #MANA < %mana
wait 30
until #MANA > %mana
return

sub waiting
wait 60
return
« Last Edit: September 03, 2009, 01:52:25 PM by welgill »

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: WeaverAssistant
« Reply #1 on: September 02, 2009, 08:04:07 PM »
0
You dont have a loop in teh script thierfor the script reaches the last line .. and starts over constantly.

Try this - Remove gosub main from the setup sub and replace gosub setup with below
Code: [Select]
;==================================
Initevents  ; <-- this does nothing .. old dead command
gosub setup

set !ExitScript #False
Repeat
  Gosub Main
  wait 20
Until !ExitScript = #True
Halt

« Last Edit: September 02, 2009, 08:06:17 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline welgillTopic starter

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: WeaverAssistant
« Reply #2 on: September 02, 2009, 08:22:27 PM »
0
absolutly great EM never would have thought of a loop there
ok now to hit the cast wait and the spell cooldowns woot

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: WeaverAssistant
« Reply #3 on: September 03, 2009, 04:57:52 AM »
0
welgill, good start. I recommend you drop by the Script Tutorial section and read up. Some basic "flow" information in there that will help you to organize your script better.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline welgillTopic starter

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: WeaverAssistant
« Reply #4 on: September 03, 2009, 01:11:02 PM »
0
will do Cerveza

Offline welgillTopic starter

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: WeaverAssistant
« Reply #5 on: September 03, 2009, 02:15:19 PM »
0
Ok I have found the cooldown timer for Gift of Renewal.
It is 2 1/2 min or 150 sec or so from end of spell.
What would be the best way to start a timer when the buff bar scanner doesnt see the icon there any more without getting stuck in just that sub so it can keep other spells up while waiting?

oh and did a bit of a rewrite to improve flow and some other minor improvments

Scrripty

  • Guest
Re: WeaverAssistant
« Reply #6 on: September 03, 2009, 05:20:31 PM »
0
absolutly great EM never would have thought of a loop there
ok now to hit the cast wait and the spell cooldowns woot

Another thing you could do is put that med check into each check to cast each specific spell, and if the spell needs to be cast, then check to see if there's enough mana, and if there's NOT enough mana, set the %med to whatever that SPECIFIC spells mana - lmc) requirement is. :)  That way it meds to that spells mana requirement as fast as possible and the script is more efficient... does that make sense? :)  You could also have a med active check so med doesn't get interrupted...  Like a repeat until %mana = !manarequiredforspecificspell then continue type deal. :)  Not sure how you want to use this script tho, I didn't read the top of the script.  I should do that.
« Last Edit: September 03, 2009, 05:23:27 PM by Scripty »

Offline welgillTopic starter

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: WeaverAssistant
« Reply #7 on: September 03, 2009, 05:23:26 PM »
0
I am not the best at paying attn to things while i fight so it just keeps buffs active while hunting
and I fixed the med loop and the mainloop thanks to a tutorial in our AWSOME tutorial section :)
<gratutitous butt kissing not intended Cerv>

Scrripty

  • Guest
Re: WeaverAssistant
« Reply #8 on: September 03, 2009, 05:31:13 PM »
0
I am not the best at paying attn to things while i fight so it just keeps buffs active while hunting
and I fixed the med loop and the mainloop thanks to a tutorial in our AWSOME tutorial section :)
<gratutitous butt kissing not intended Cerv>

Well UPDATE THE SCRIPT IN THIS THREAD! haha  It's hard to help if we're working with old code.  Here's my curse weapon sub that casts curse weapon and updates it's timer so the script will cast it on time every time.  I have an equation that calculates !CurseWepCastTime then I just add that to #sysTime and then have the script recast when it's timing is up.

Code: [Select]
 sub CurseWeapon ; 7 mana
    menu get 25 ; Curse Weapon
    IF #menures = #true
    {
      chooseSkill chiv
      IF !CRWTimer > #sysTime || #mana < %mana_required_0
      {
        IF #mana < %mana_required_0 && !WarningDelay < #sCnt
        {
          SET !WarningDelay #sCnt + 5
          EVENT exMsg #charId 3 55 Low Mana Curse Weapon!
        }
        RETURN
      }
      gosub UpdateTitleBar
      menu delete status
      menu font color red
      menu font bgcolor gray
      menu text status 225 177 Casting Curse Weapon!
      event Macro 15 104
      SET !CRWTimer #sysTime + !CurseWepCastTime
      gosub ls
      SET !CWCount !CWCount + 1
      RETURN
« Last Edit: September 03, 2009, 05:39:56 PM by Scripty »

Offline welgillTopic starter

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: WeaverAssistant
« Reply #9 on: September 03, 2009, 05:33:51 PM »
0
so instead of having it check buffbar for Gift of life and gift of renewal just have it cast whenever the cooldown alows
thats a good idea will work out the subs tonight

Scrripty

  • Guest
Re: WeaverAssistant
« Reply #10 on: September 03, 2009, 05:42:20 PM »
0
so instead of having it check buffbar for Gift of life and gift of renewal just have it cast whenever the cooldown alows
thats a good idea will work out the subs tonight

Yea you just have it loop through the cast sub, and if the timing isn't up, you return out.  And if the timing IS up, you recast.  Simple.  You have to check the sub a lot tho.  Which shouldn't be a problem if it's just a looping script to make sure that all the spells stay cast.

Tags: