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.


Messages - BobOzarius

Pages: 1 ... 4 5 [6] 7
76
Scripting Chat / Re: Placing misc words into an array
« on: January 29, 2017, 01:16:25 AM »
If you've already broken apart the #property into sections, you can name your variables what you're searching for, and set them to #true. Like if you're looking for very specific things.

Code: [Select]
set %arrayMonitor #true
set %arrayBike #true
set %arrayKleenex #true
set %arrayCamera #true

Then when you break apart your #property string, or you could even use the whole #property, and you get your result from each part, you can do some code like this:

Code: [Select]
for %I 1 %numberOfStringChunks
{
  gosub breakStringApartRight
  set %stringChunk n/a
  if %array . #result = #true
    set %stringChunk #result
  if %stringChunk = n/a
    display The variable is not in the #property.
  if %stringChunk <> n/a
    display The variable is in the #property.
}

Then you can use the %stringChunk variable if it's found to be in the #property in any way you like, in a variable to find what you are looking for in #property, or perform an action based on that item because it's the #result from earlier in the script, and it's in the #property.

77
UO Reference Information / Re: How do people find the gump
« on: January 19, 2017, 02:39:37 PM »
You'll see a lot of that in older scripts. I'm pretty sure #contkind was the only way to address gumps at first. So a lot of older scripts used #contkind.

78
Script Debug / Re: Multi client targeting
« on: January 15, 2017, 01:32:36 PM »
Until you prove it with code, it's still just your opinion that namespace is better with 3 to 5 clients. Consider this the challenge to prove it with script.  ;)  I'd like to see how you'd do it.

As far as the "how", this is the framework that Ghost is talking about from our long lost Cerveza:

http://www.scriptuo.com/index.php?topic=1130.msg8916#msg8916

I was around in 2009 when Cerveza posted that TM. I just haven't played UO much since.  I guess no one is up for a coding challenge!   :'(  I think I might just have to write tandj a script to do it for him.  If you'd like a bit more help tandj just say the word, and I'll whip you up something that will work for you pretty well. I have tamer accounts so I should be able to make something that attacks on the luck character and waits to send in the non luck clients easily. Personally I'd probly just keep those clients unpartied, so the one character gets high luck drops, and the others get low and mid range luck drops. What are you killing? It shouldn't be hard to make it auto attack and target attack friendly either. Using swap of course. The script above should do most of that. But I didn't know at the start you needed one client to attack first.

79
Script Debug / Re: Multi client targeting
« on: January 15, 2017, 08:07:22 AM »
Until you prove it with code, it's still just your opinion that namespace is better with 3 to 5 clients. Consider this the challenge to prove it with script.  ;)  I'd like to see how you'd do it.

80
Script Debug / Re: Multi client targeting
« on: January 14, 2017, 10:18:33 PM »
     Maybe I wasn't clear. I'd like to see an example because I'm very sure namespace isn't going to be the best option in this situation. Gbot won't show me anything new I don't know about namespaces. Assuming that Ghost thinks uoxl swap is a bad idea, then he must be saying that using multiple scripts with global namespaces, on each individual client, is a better option. I don't agree. Namespaces are a bit slow at transferring data. But if he can show me an example that proves his point, that applies to the original posters needs, I'll be happy to check it out and see if he's right. The op did ask for help. I can rewrite it with globals and multiple scripts if you'd like to compare. But I was hoping Ghost would prove his point with some code. For the benefit of the original poster.

     Say you have 5 accounts, and you're using one account to transfer info to each of the other 4 accounts with namespace globals, there is a slight pause in the transfer of data to the global namespace, and when other scripts in other tabs can read it that isn't present when you swap. Swapping is very speedy. And when you set a standard variable in easyuo, it's available immediately to any other client that you swap to, no namespace "lag." I think it all depends on the number of clients too, because there is a slight lag between the time it takes to swap between the first client and back around to the first client. If you're using 10 clients, namespace might be better. 6 or under? Swap is the way to go. If  you look at the example I posted, you'll see why it's a better option I think. Also it assumes he's moving the clients around manually using 1 mouse and each separately. Using my way they'd have to stay on screen with each other. I could edit it to make that not necessary pretty easily though. Tandj wasn't too clear on what he wanted it to do. So I just threw something together. If you have a better idea with namespaces though, I'm sure tandj would appreciate seeing multiple options.

81
Script Debug / Re: Multi client targeting
« on: January 13, 2017, 06:55:07 PM »
Please show me an example of global namespace that is faster than the swapping code above and does the same thing. I'd like to see it if you have one.

You guy love the client swap,  let me suggest other option, call namespace Global.   With this you can pass any king of information inside the same EasyUO. 

here something you can read http://www.scriptuo.com/index.php?topic=1130.0   to help you out. 

82
Script Debug / Re: Multi client targeting
« on: January 13, 2017, 03:39:31 PM »
So on a new monster, set a timer to have the #clinr of that client attack first, and set a timer to have the other clients attack 10 seconds after or something.  Should be very easy to do.

if #charid = %characterWithLuck && %attacktimer . #charid < #sysTime && %targetfound = #false... or something similar. Then have that character attack, and set a however many second timer you want to keep the other clients from attacking until that timer is up and the same monster is still found.  Shouldn't be too difficult. Then it will only attack with multiple clients if the monster lives long enough too. Tons of ways to do it easily.

83
Script Debug / Re: Multi client targeting
« on: January 13, 2017, 02:13:33 PM »
Why set one type? Why not put all types in it?  You can put in decision making to determine what to attack based on whatever you like. I like everything to be auto. There's no reason you can't add a target and auto button. Auto ON. Auto OFF. Target ON. Target OFF. The %targets variable can hold more than one type. Put in 100 types. The way I wrote this, it should attack a monster every second, unless the monster is still there when the attack timer is up, then it should set a timer for 10 seconds, but keep checking if the same monster is still there, and only reattack every 10 seconds, and if it dies, then it will refind another monster to attack. Or should anyways. That was the plan when I started writing it. And it should attack on all your open clients.

84
Script Debug / Re: #FINDCNT incorrect value
« on: January 13, 2017, 12:20:46 PM »
It can also be that some spawn will spawn in areas where you can't see them, but the script picks them up. You should check their z-height. There is a lot of other info in the #findindex of the monsters you can't see that can help you debug what's going on. Post the info for all the items for each #findindex. Maybe there's something in there that can help.

85
Script Debug / Re: Multi client targeting
« on: January 13, 2017, 12:12:31 PM »
That wait 20 you have in there is not very efficient for multi client scripting. Since you're swapping, there's no real need to wait after the attack, just set a timer for that client, which is about the speed you can attack at on multiple clients, and swap, and when you return to that client, check the timer to see if it's up again, and you're able to attack. The whole time, checking for spawn, and monsters you can attack with your pet. Including people. I wrote this very quickly, but it should constantly update your target with either the monster your clients are attacking, or once that monster is dead, it will attack a new monster. Not sure it works, haven't tested, but it's close. To be complete, you probably should set your #ltargetkind also. I'm just a noob and always forget to do that until it messes up.

Code: [Select]
set %targets ;Put target types here
set %range 10
for %i 1 #cliCnt
{
  set %attackTimer . #charid #systime
  set %targetFoundTimer . #charid #systime
}
repeat
    set %targetFound n/a
    set %target1 n/a
    finditem %targets g_ , %range
    if #findcnt > 0
    {
      for #findindex 1 #findcnt
      {  
        if #findid = %target
        {
          if %targetFoundTimer . #charid < #sysTime
            set %targetFoundTimer . #charid #systime + 10000
          set %targetFound #findid
          break
        }
        set %target1 #findid
      }
    }
    if %target1 <> n/a
      set %target %target1
    if %targetFound <> n/a
      set %target %targetFound
    else
      set %targetFoundTimer . #charid #sysTime - 1
  for %i 1 #clicnt
  {
    if %target <> n/a && %attackTimer . #charid < #systime && %targetFoundTimer . #charid < #systime
      gosub attackTarget
    uoxl swap
  }
until #false

sub attackTarget
  msg $all kill$
  set #ltargetid %target
  target 1s
  event macro 22
  if %targetFound <> n/a && %targetFoundTimer . #charid < #systime
    set %targetFoundTimer . #charid #systime + 10000
  set %attackTimer . #charid #systime + 1000
return

86
Scripting Chat / Re: Client status
« on: January 07, 2017, 09:40:51 AM »
#clilogged = 0 means you are logged out. Not dead. A small but important distinction.  ;)

87
Scripting Chat / Re: Event Property multi application questions
« on: December 17, 2016, 04:30:47 AM »
I've never experienced anything like that myself. The only thing I've ever seen is partial properties. And the way to beat that, is to find something near the end of the property that is common to all the properties you are doing, and ensure that is found on each property. You can also count dollar signs. Say you do an event property, and all the items you are scanning will have at least 8 mods on them,  you can do an event property, then do a str count on it, and see if there are at least 8 $'s in the property before continuing. Most of this is usually caused by some sort of lag, and/or latency issue, like dropped packets, or partial packets.

88
Scripting Chat / Re: looting EM items and rares
« on: December 10, 2016, 07:32:05 PM »
Use a whitelist. Hard code types you don't want to loot. Same with things you want to loot. And prioritize them based on want. One finditem and you can try to loot everything one after another. Without doing any other finditems.  And just crank your lpc up to find and prioritize things by type that are found.

89
Scripting Chat / Re: looting EM items and rares
« on: December 10, 2016, 01:48:14 AM »
Vacuuming up items as quickly and efficiently as possible is always going to be your best bet, unless you specifically know there is an item worth picking up, even then, 3 other people are probably vying for that item also. Just loot as fast and as much as you can. Don't do even property or things that slow down searches.

90
Scripting Chat / Re: Pulling the new point value from bods?
« on: December 04, 2016, 08:42:03 PM »
I assumed getting the point value directly would be easy... I know, assume nothing right  ::)

Parsing the point value is very easy, and very fast. But it's an in game action clicking a bod. It would end up being faster to just use #property and setting up variables with the info you need based on the property.

Pages: 1 ... 4 5 [6] 7