Author Topic: Help me understand why this doesn't always work...  (Read 5775 times)

0 Members and 1 Guest are viewing this topic.

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Help me understand why this doesn't always work...
« on: February 02, 2014, 08:18:26 PM »
0
Ok, here's a very simple piece of code that I've been experimenting with:

Code: [Select]
event macro 50 3 ;
wait 1s
contpos 160 120
wait 1s
halt

Event macro 50 3 will open my pet's healthbar just fine.  If his healthbar is NOT up prior to running this, then it does exactly what I mean it to do.  It opens his healthbar, and then positions it at the proper x,y.

However, if his healthbar is ALREADY OPEN - the contpos moves my backpack to the contpos x,y coords.

I'd appreciate it if you would tell me why this happens.
 :-[

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #1 on: February 02, 2014, 09:08:03 PM »
0
Because the focused cont is your backpack and not the pet's healthbar. It's refreshed when a new container is opened, if something is already open, then it doesn't refresh. You have to close your pet's health bar first then open it again for it to become to focus. #another-problem-stealth-doesnt-have.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Help me understand why this doesn't always work...
« Reply #2 on: February 02, 2014, 09:57:20 PM »
0
...#another-problem-stealth-doesnt-have.
lol
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #3 on: February 03, 2014, 11:23:16 AM »
0
Ok, but shouldn't Event macro 50 3 (which opens the pet's healthbar) force the last container to be that healthbar if nothing else has received any clicks prior to contpos?

Offline Xanderyum

  • Full Member
  • ***
  • Posts: 143
  • Activity:
    0%
  • Reputation Power: 2
  • Xanderyum has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #4 on: February 03, 2014, 01:22:48 PM »
0
- aren't allowed in the new hipster's invented #'s (hashtags) era. 
#sorrymanhadtocallyououtonthat

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #5 on: February 03, 2014, 02:37:18 PM »
0
#doh



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #6 on: February 04, 2014, 10:53:10 AM »
0
Your better bet would be to just drag out the healthbar and have the script wait until you click on the healthbar. Then Position it. Mind you if you move the health bar or move your cursor over the Health it will not give a proper reading. For doing things like that OEUO and Stealth are much better than EUO.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline ximan

  • Jr. Member
  • **
  • Posts: 98
  • Activity:
    0%
  • Reputation Power: 1
  • ximan has no influence.
  • Respect: +16
  • Referrals: 1
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #7 on: February 04, 2014, 12:14:00 PM »
0
shouldn't Event macro 50 3 (which opens the pet's healthbar) force the last container to be that healthbar if nothing else has received any clicks prior to contpos?

It would be nice if it did, however the gump opened by the 'new targeting system' macros behaves differently than status gumps opened manually.  Pretty sure it has a different #contname as well.  I'm not sure though; had a spectacular raid failure a while back that hosed a bunch of VM's, and haven't felt like piecing it all back together so you might want to test that assertion before depending upon it.  As others have pointed out, most of the other scripting environment handle gumps/gump-info better, even in oeuo they're something of a pain (but at least you can enumerate them all...)
« Last Edit: February 04, 2014, 12:17:11 PM by ximan »

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #8 on: February 04, 2014, 04:17:40 PM »
0
Try turning off the Targetting System and turning it back on when it does that.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #9 on: February 04, 2014, 09:10:49 PM »
0
shouldn't Event macro 50 3 (which opens the pet's healthbar) force the last container to be that healthbar if nothing else has received any clicks prior to contpos?

It would be nice if it did, however the gump opened by the 'new targeting system' macros behaves differently than status gumps opened manually.  Pretty sure it has a different #contname as well...

Yea, I noticed that tonight.  If I pull my Cu's bar myself, it disappears when I mount it.  However, if I use 50 3 to pull it, and then mount the pet, the damn health bar stays there.  Wow...
I'll have to remember to look at the #contname when I get on again, but all healthbars are NOT created equally....

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #10 on: February 04, 2014, 09:13:41 PM »
0
Try turning off the Targetting System and turning it back on when it does that.

Good thought, manwinc, but the result is the same.

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #11 on: February 04, 2014, 10:53:12 PM »
0
#nextcontposx or whatever the command was
What you witness -- is whatver..
uogamers hybrid.

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #12 on: February 05, 2014, 12:11:41 AM »
0
#nextcontposx or whatever the command was

Have you ever looked at what the current container is while things are changing on the screen ingame?  I mean, even the numbers that float up when damage is being taken are shown as containers. (Damage is even in the name of the container   :)  )

So, nextCPos has never been worth much considering how often the client sees stuff as a container, since at any given moment the next container can (and more often than not, does) change...

What continues to confuse me is how event macro 50 3 can be responsible for opening a healthbar (container), and yet - when you use #contpos the moment after you invoke event macro 50 3  - it will virtually always ignore that container {healthbar} if it was already open and moves on to whatever last container had the focus. But if it's not open prior to invoking 50 3, it always treats it as the last open container...  

And I just don't see how that works...

*** Edit ***  I'm now wondering if event macro 50 3 (in addition to popping open the healthbar) also sets it as the last container open - but it doesn't do this if it is already open???  Could this be the case?
« Last Edit: February 05, 2014, 12:37:58 AM by Grandewd »

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: Help me understand why this doesn't always work...
« Reply #13 on: February 05, 2014, 10:38:05 AM »
0
How about just working with the quirks.. ie dont try and move it if it doesnt reopen, presume you moved it the first time you opened it.

Code: [Select]
event macro 50 3 ;
wait 1s
if #contid = <put the appropriate id here>
  {
  contpos 160 120
  wait 1s
   }
halt
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 GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Help me understand why this doesn't always work...
« Reply #14 on: February 05, 2014, 10:08:36 PM »
0
Thanks for helping me understand why this happens, and for giving me direction.  I appreciate it...

Tags: