Author Topic: ENs buff bar help!  (Read 8427 times)

0 Members and 1 Guest are viewing this topic.

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
ENs buff bar help!
« on: June 06, 2016, 12:43:35 AM »
0
Hey guys ive been messing with a script that trys to med when mana is low however im trying to use ens buff bar to see if my char is meditating but its not working properly. not sure what to do to fix the sub can someone give it a look?

Code: [Select]
Sub mana
if #mana < 30
 {
  medloop:
  event macro 13 46
  wait 11s
  call ScanBuffBar
  wait 10
  if  _Meditation_ in %BuffBarIconNames
   {
   gosub wait
   }
  if #mana < #maxmana
   {
   goto medloop
   }
 }
return

sub wait
Repeat
  wait 1
until #mana = #maxmana
return

not sure what im doing wrong but it ignores the buff and keeps casting med over and over instead of repeating the wait.
« Last Edit: June 06, 2016, 01:43:49 AM by Tana »

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #1 on: June 06, 2016, 11:52:49 AM »
0
well i i ended up using TMs med sub found here http://www.scriptuo.com/index.php?topic=1527.0 id still like to know what i did wrong with ENs scanbuffbar so i can use it in later scripts

Code: [Select]
Sub mana

if #mana < 30
 {
  gosub meditate #true 0
return

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs buff bar help!
« Reply #2 on: June 06, 2016, 12:59:10 PM »
0
Does your Easy ans scanbar in the same folder.

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #3 on: June 06, 2016, 02:09:29 PM »
0
yes ghost my EUO and my scanbuffbar are in the same folder. i double checked that when i was trying to figure out what was wrong with it and sure enough its in there

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs buff bar help!
« Reply #4 on: June 06, 2016, 04:02:18 PM »
0
I testing with this and it work.

First u need to call scan at the begining  just before your main loop.
second. You had a extra space before _ Meditation.


Code: [Select]
call ScanBuffBar
while #true
{
goSub mana
 }
 
 
Sub mana
if #mana < 30
 {
  medloop:
 event sysmessage meditation
  event macro 13 46
  wait 11s
  call ScanBuffBar
  if _Meditation_ in %BuffBarIconNames
   {
   event sysmessage Waiting
   gosub wait
   }
  if #mana < #maxmana
   {
   goto medloop
   }
 }
return

sub wait
Repeat
  wait 1
until #mana = #maxmana
return

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #5 on: June 06, 2016, 06:15:27 PM »
0
ok ghost i tried what you said i still cant get it to work! not sure what im doing wrong at all!! heres the entire script its a simple mastery trainer this one is currently written for taming.

Code: [Select]
set %getpet #true

Call ScanBuffBar
Repeat
if %getpet = #true
 {
 Gosub pet
 }
gosub mana
gosub train
until #false

sub pet
finditem %pet
 if #findcnt < 1
 {
  display Select pet to train on
  set #targcurs 1
  while #targcurs = 1
  {
  wait 1
  }
  set %pet #LTARGETID
 }
set %getpet #false
Return

Sub train
  event macro 15 744
  target 4s
  set #LTARGETID %pet
  event macro 22 0
  wait 20
return

Sub mana
if #mana < 30
 {
  medloop:
 event sysmessage meditation
  event macro 13 46
  wait 11s
  call ScanBuffBar
  if _Meditation_ in %BuffBarIconNames
   {
   event sysmessage Waiting   ;<<<<<<<<<<<<<<<<<< i dont get this system message so the scan buff bar isnt returning a value.
   gosub wait
   }
  if #mana < #maxmana
   {
   goto medloop
   }
 }
return

sub wait
Repeat
  wait 1
until #mana = #maxmana
return


Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs buff bar help!
« Reply #6 on: June 07, 2016, 08:48:02 AM »
0
event sysmessage  ( insert text) allow you see the flow of your sub.   I have add the meditation to see  when and how often it use the skill.   The waiting to see when it just to that part of the sub.  Those msg will appear in the bottom left of your UO window.   That help me debug.

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #7 on: June 07, 2016, 01:24:49 PM »
0
right the message didn't pop up for me telling me that the if statement is returning false, not sure why its returning false tho.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs buff bar help!
« Reply #8 on: June 07, 2016, 01:51:40 PM »
0
did u try to just run that submana alone

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #9 on: June 07, 2016, 06:22:49 PM »
0
i have not. just tried throwing it in the script. ill try just the sub and see if that helps

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: ENs buff bar help!
« Reply #10 on: June 08, 2016, 01:38:46 PM »
0
run this code

call ScanBuffBar
event sysmessage  %BuffBarIconNames


If you get the response of N/A  then the buffbar code is not in the same directory as easyuo and or its not finding the code for some reason.

You are also more than welcome to find and use the meditation sub in my code library's..  sub name meditatefull in file : ens-subs-spellsandrunebooks.txt
« Last Edit: June 08, 2016, 01:49:14 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 TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #11 on: June 08, 2016, 02:54:31 PM »
0
Thanks for the advice en. The file is in the same location as EUO and i actually had the same idea as that and did it and i get nothing. not sure why tho. i have a modded version of TMs mana sub that works i just wanted it to work correctly if i wrote anything else that needed to use the scanbuffbar sub.


EDIT: the result is _
« Last Edit: June 08, 2016, 06:53:15 PM by Tana »

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #12 on: June 08, 2016, 06:56:05 PM »
0
Also i get the variables from scanbuffbar if i do a var dump so it is calling the script.


Another update ran the code call scanbuffbar event sysmessage %BaffBarrIconNames on my samp and it came back with vamp embrace so im guessing its something to do with my master buff.
« Last Edit: June 09, 2016, 01:52:47 AM by Tana »

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: ENs buff bar help!
« Reply #13 on: June 09, 2016, 07:13:27 AM »
0
Ow opps thats exactly what it is .. script fails if their are buffs it doesn't have the codes for ... I have an updated version with all buff codes .. just haven't got around to final test and posting...

Will try and see if i can find the time to fix it today.
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 TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: ENs buff bar help!
« Reply #14 on: June 09, 2016, 10:28:47 AM »
0
Thanks so much EN! I thought maybe i was doing something wrong glad to know my coding was right lol. As an update to my progress i just hit 120 taming from 90 it took me around 3 days doing nothing but using the mastery.

PS. if anyone wants a copy of Taming Mastery Trainer you can check it out here http://www.scriptuo.com/index.php?topic=13808
« Last Edit: June 09, 2016, 10:39:21 AM by Tana »

Tags: Buff  Bar