Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Grandewd

Pages: 1 [2] 3
16
** Note **.  For any of you who frequent the Mainboard over at EasyUO, you'll note that I also posted this there - 5 mins ago. Hope you don't mind my also posting it here, but the brains here are IMO as good as anything over there... And that says a lot.  Anyway, here's that post:

With all you excellent scripters here, some among you are also probably quite savvy tech-wise - and I'm hoping you can help me figure this one out.
I posted this over on Stratics/Tech forum last Friday, with zero response to date.  I'm trying to figure out how this can be my system, and not UO/UOAssist.
When UO is loaded via UOAssist, my UO client balloons until it crashes.  Memory leak comes to mind. This does not happen if UO client is loaded alone, and it does not happen to any other application that I have watched - only UOAssist.
I have already tried deleting all the user-config data that UOAssist keeps both in the doc folder and in the UOAssist folder, but that changed nothing....

Situation/data in the image:


17
Script Debug / Is it possible
« on: February 13, 2014, 07:33:11 PM »
Is it possible to have one script pause another script?

18
Script Debug / Help me understand why this doesn't always work...
« on: February 02, 2014, 08:18:26 PM »
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.
 :-[

19
Script Debug / Corgul's Handbook giving me fits
« on: November 15, 2013, 03:56:36 PM »
I can use the following to drop my Tome of Lost Knowledge onto my PD and it works every time.

Code: [Select]
set %Tome QLIPOND
finditem %Tome C_ , #BACKPACKID
exevent drag #findID
wait 1s
exevent droppd
halt

but when I try the same simple script (with the variable names and their associated ID's properly assigned) for my Corgul's Handbook (another spellbook) it never drops it and it always get's stuck in my hand... What is causing this?

20
Clear this up for me, once and for all pls...

 If "if" is satisfied by a single condition are brackets required - (that may be the wrong syntax, so let me show you what I'm trying to say........

Can I do this:

Code: [Select]
If #findcnt = 0
     do this one thing   <<<< this doesn't have to be bracketed, right?
else
do this thing    <<<<<and do I need a bracket for these 3 here?
do this thing
do etc....

Or do I have to do this:

Code: [Select]
If #findcnt = 0
  {
   do this one thing
  }
else
  {
   do this thing   
   do this thing
   do etc....
 }

21
Script Debug / This should be simple, but apparently not for me....
« on: October 12, 2013, 08:43:40 PM »
Ok, I'm making Axes on my max'd out Blacksmith for my Lumberjack.  Since weapons seem to die at the speed of light here on Siege, I'm going to supply him with only the longest lasting axes...

So, in the process of making a script to trash axes that aren't of a certain durability - I need to look at the properties of each one and keep or trash it based on whether or not it's durability is more than 65.

I've pondered this for the best part of an hour now, and can't come up with a way to do that....  I mean, I know I don't have to tell it about each possibility - as in -

Code: [Select]
if 65 in property || if 66 in property || if 67 in property - blah blah blah
Right?

I know there's a way to say:  "If the Durability line shows anything less than 65, then do this..." without having to explain every single instance of a value beyond 65....

I'm working hard to not let this go past being annoyed.... HELP!

***Edit***  As I re-read my post to make sure it said what I wanted it to, I got to thinking about why it's possible to enjoy a thing sufficiently to overcome the seemingly endless state of frustration that scripting holds for me.... I think it's just the mental clarity that problem solving seems to provide, most especially when a problem is solved (and even when I'm not the one to solve it). For me it comes down to a simple choice:  Do I give up and say to hell with it, or do I ask people that are more advanced than I am - for help filling in what's missing in my thought process... And when one of you manages to explain it to me so that I actually understand, that makes my brain feel just really nice....

So here I am, just sayin...........

22
Script Debug / This one last thing I need to fix....
« on: October 10, 2013, 02:39:29 AM »
Probably most of you here already have a sub to do this, but maybe not all...  

Anyway, after all these years of knocking tables over, and bashing into walls and even occasionally running over the edge of my houses foundation - I decided that it was really stupid that I didn't write a little sub to ALWAYS have me WALK in my house - without me having to hit a freekin' key or click a menu every damn time... I mean if we can write scripts that fight or mine or whatever for us, then we should certainly be able to have our char always walk when he/she's in the damn house (and other places to, like the bank) - AUTOMATICALLY.

So I sat down and look'd at the wiki and it dawned on me that we have an event macro toggle for walk/run (I know - it's assigned to my F9 key and a button on damn near every menu I've got)...
And then I said to myself, hmmmmm.... that shows up as a message whenever it's toggled.... So why not have a sub that hits that toggle and then acts according to what it tells me?

And by jove, it works almost perfectly....

Here's where TM or EN or one of you elites can help me perfect this little bugger.... I have to almost try to get it to fail, but it will fail the way it is - which is, of course, unacceptable...

Here's what it does wrong:  

IF I run it 2 or 3 times in a row, (so nothing is in the journal besides the walk/run off/on message) it will take the wrong action and switch wrongly.
I'm sure that it has to do with my usage of TM's TravelFromRunebook sub that it depends on to check the journal message....
What would be the correct parameter in this case?

Here's the sub:

Code: [Select]
Sub WalkAtHome
event macro 32 0 ;run On/Off
wait 3
gosub TM_AdvJournalScan WalkRun VALID_ADVANCE now_on
  if #RESULT = #TRUE
     {
     event macro 32 0 ; Toggle it Off
     wait 3
     }
  else
     {
     wait 1
     }
Return

I know how Kal In Ex would code this....  His script would say:  "If you're on any one of the tiles within this boundry, then you will walk." 

Well, he's smarter than I am when it comes to this stuff...

23
Script Debug / Up-to-date list of char types?
« on: October 06, 2013, 09:44:56 AM »
Anybody have an up-to-date list of char types?
 ::)

24
Script Debug / Which is faster?
« on: September 30, 2013, 08:03:01 PM »
Ok, this may be another somewhat silly question - but since I'm probably getting famous for them by now - I figure I've got nothing to lose..   ;D

So here goes:

Which one of these is the fastest? (Of course each does exactly the same things).

A macro created with the Options tab on the UO PD.
A macro created with UOAssist.
A macro created with EUO or oEUO.
A macro created with the EC.

Flame away....

Now - Of course I'm not talking about the complexity of scripts available to EUO or oEUO users, I'm talking about the basics (switching weapons, drinking pots, things like that).
I'm getting tired of playing on a different playing field than a couple of the people that have PK'd me recently.  I'd like to at least be as fast, not that it's going to help me that much...

25
Script Debug / Ignoreitem's kickin' my arssssss...
« on: September 27, 2013, 01:38:49 PM »
Here's what I'm trying to do:

I'm writing a small script that shows the current count of all the various potions in my backpack in a small menu window.  No big deal.  Well, EA (in all their infinite wisdom) decided that Invis potions and Confusion potions should use the exact same type.  Ok, no big deal - I'll just use propertys to separate them out. But once it finds the first OUF (type for both potions) it ignores the second.

Well, for my semi-solvent old brain - it's turned into a big deal that's driving me batty.  Kindly have a look at what I have and tell me what I'm doing wrong.

Code: [Select]
finditem OUF C_ , #BACKPACKID
for #findIndex 1 #findcnt
{
 event Property #findID
   if Confusion in #property
   {
   set %confusion #FINDSTACK
   ignoreitem #findid
   }
   else
    if Invisibility in #property
    {
    set %invis #FINDSTACK
    ignoreitem #findid
    }
}
else
wait 5

26
Script Debug / Using a 2nd instance of EUO questions...
« on: September 23, 2013, 01:07:01 PM »
Can't believe it's taken me all these years to discover the ability to use a 2nd EUO client, geez... :-[

I just never thought about it, and ran several scripts in a single version. Now that I'm more actively using 2 UO clients (mostly for a mage/healing follower) - I'm thinking that running each UO clients scripts in it's own EUO instance only makes sense. And it also should preclude any possibility of variables, etc. bumping into each other. (Yes, I know namespace addresses this, but I really don't want to convert a bunch of perfectly good scripts to all namespace variables - call me lazy, I can live with that.  :) )

So, are there any drawbacks to this? Anything I should watch out for? Any other suggestions in this regard?
 ???

27
Script Debug / Best method to get the focus back on the client?
« on: September 16, 2013, 04:54:36 PM »
If you use EUO Menu's, then you are familiar with the fact that when you click a button, the act of doing so takes your "focus" off of the client window. So if you're using a button to do something like, oh say - Provoke something - then your first click will be to get your "focus" back on the client window, before you can click on your targets. It's taken a while for this to become annoying to me, but now it is.

My question is: What's the best way to include in your script getting the client window's "focus" back? Right now I'm just doing a single click on the client window to accomplish this. Isn't there a more "elegant" way?

28
Script Debug / Differentiating between an item in hand or in backpack
« on: September 13, 2013, 04:06:09 PM »
I need to know if my char is holding an item or if that item is simply in his backpack.
For instance:

Code: [Select]
finditem %someitem #CHARID
will find %someitem in my hand if it's there, but also in my backpack if it's in the top level.
The item is a spellbook and will ALWAYS be in one or the other of those 2 places. If it's in his hand, I need to drop it with event macro 24 2. But, if it's in his backpack - I need to ignore it.

How can I tell where my %someitem currently is?

I suppose I could see if it's in his backpack with:

Code: [Select]
finditem %someitem C_ , #backpackID
and then act accordingly, but is this the only way to tell if it's in his hand or not???

 :(

29
Script Debug / Is this the correct usage in this one line of code
« on: August 31, 2013, 06:30:41 PM »
Ok, here's that one line of code:   
Is this proper:

Code: [Select]
if #chardir <> 2 & #charX <> %mastX

or do I need to add parenthesis, as in:

Code: [Select]
if ( #chardir <> 2 ) & ( #charX <> %mastX )
or are both acceptable?

 :-[  :-\  ::)

30
I'm still making my massive all in one daily menu and would sure like to use graphic files in it. But I'm stuck trying to implement "Menu Image File" successfully. I posted this first on EasyUO out of respect for Cheffe and all he has done for our amazing game... But, I'm also posting it here because of the often present brainpower at this url....   8)

and if doin' this wasn't so much fun - I swear I'd get a life.... But all good things do come to an end, and I'm pretty close to the end of all the fun about now.....   :roll:

I've tried every Menu command that I can find in the docs - but I can't implement ( menu Image File ) in my menu.  
The definition of menu Image File says:  

Quote
The menu Image File command loads an external image file at position x/y within the specified image.  
name is a valid EUO name. it should match the name used with the menu Image Create command.
The X and Y values provided to this command are relative to within the Image created with the menu Image Create command, not the window itself. Therefore, menu Image File Test 0 0 test.bmp will place the image at the top right of the image container, not the top right of the window.
filename must be a valid path to an existing file.

For one thing - how does an image at 0 0 get anywhere near the top RIGHT of the window, unless the window is transparent and the writing is on the OTHER side? And what, exactly, constitutes a "valid EUO name"?   I mean.....

Pages: 1 [2] 3