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 - alaskan

Pages: [1] 2
1
Stealth Client / Re: Stealth not recognizing gumps? (Python)
« on: September 05, 2015, 04:40:37 PM »
Sorry its been a while since I've hopped on UO or Stealth for that matter but have recently rekindled the fire. If I run into the issue again I will try to explain the function to the best of my ability. Thank you though for the replies, I really do appreciate the help I get from this community, its awesome :D.

2
Stealth Client / Re: Stealth not recognizing gumps? (Python)
« on: April 30, 2015, 09:32:49 PM »
I do have the latest build of Stealth and I use the wrapper for my Python scripting (Python 3.3.0). Basically when I'm waiting or trying to reply to certain gump ID's it seems as though Stealth doesn't recognize the gump ID even though that's the exact ID that is given to me when I bring up the gump info. So far I've only ran across this issue with two gumps, haven't really tested other gumps but I was just curious like I said if anyone else has experienced this as well or maybe if it's just something I'm missing or just something that I don't have configured properly (wouldn't be the first time hehe).

3
Stealth Client / Stealth not recognizing gumps? (Python)
« on: April 29, 2015, 11:03:32 PM »
Has anyone else ran into Stealth not recognizing gump ID's with python? I have two functions for waiting for gumps and replying to gumps (thanks to Chrome) but it seems as though Stealth doesn't recognize some gumps. Just curious if this was just happening to me or if it has been happening to other people as well.

4
Scripting Chat / Re: Trying to wrap my brain around the infamous STR command
« on: September 19, 2014, 10:35:19 AM »
Aye, lol guess I'll look over their tutorials a couple more times  :)

5
Scripting Chat / Trying to wrap my brain around the infamous STR command
« on: September 18, 2014, 10:54:54 PM »
Not trying to step on any toes with this post and just in advanced I do use/love TM's CLAW script, one of the best looting scripts I've seen. For myself though I'm trying to get better with EUO in general and it seems I've still much to learn lol. Which brings me to this topic. I somewhat understand strings and how powerful they can be when used properly, especially in looting purposes. I've taken this sub that I found on the EUO website and tailored it a little for learning purposes. I've tested this sub and it works superb for evaluating the "sum" of the pre-sub variables (%1 %2 %3 etc. not sure if that's the correct terminology lol). I'm trying to only evaluate the intensity of one item for looting vs. the intensity sum of all the items. I will post this "modified" sub (credit was given where credit is due) and if someone wishes to see the full script I have no problem posting it. I just want to understand using the str command fully. Any and all help is much appreciated  :D.

Code: [Select]
gosub getprop blah blah blah
sub getprop

  ;This sub was written by JackD. I merely added modifications
  ;
  ;

  namespace push
  namespace local getprop
  set !0 %0
  set !1 %1
  set !2 %2
  set !3 %3
  if !0 > 0 && !1 <> N/A
  {
    finditem * C_ , %1 ; corpse from my script
    if #findcnt < 1
      return %total
    set !oldlpc #LPC
    set #LPC 10000
    set %total 0
    set !line % . !0               
    goto L , !0
L5:                                      ; Assuming this part stores blah and stores it into the string
    set !line !4 , #spc , !line
L4:
    set !line !3 , #spc , !line
L3:
    set !line !2 , #spc , !line
L2:
    set !line !1 , #spc , !line
L1:
    set !line $ , !line , #spc
    str len !line
    set %len #strRes
    for #findindex 1 #findcnt
    {
      event property #findid
      if !line in #property
      {
        str pos #property !line
        set %pos #strRes + %len
        str mid #property %pos 5
        set %prop #strRes
        str pos %prop $
        set %pos #strRes - 1
        str left %prop %pos
        set %tempval #strRes
        str pos %tempval %
        if #strRes > 1
        {
          set %pos #strRes - 1
          str left %tempval %pos
          set %tempval #strRes
        }
        set %total %total + %tempval           ; I believe this tallies up all the integers for blah
      }
    }
    set #LPC %oldlpc
    namespace clear
    namespace pop
    return %total
  }
  namespace clear
  namespace pop
return 0

6
Script Debug / Re: Problem with if statements?
« on: June 06, 2014, 02:02:17 PM »
Quote
In yours, why are you dropping it to the ground? Sorry for all the questions, just understanding the mechanics well is the only way to truly get the logic correct Smiley

X
Ok cool yeah I'll take a look at yours and see what I'm doing wrong with mine hehe. I'm trying to drag the harvested flax into one of my bags after the find count is equal to 10.

7
Script Debug / Re: Problem with if statements?
« on: May 29, 2014, 09:27:38 AM »
Yeah, sorry it sounds like flax is very similar to cotton then. I have about 10 crops and yeah they're static in-game. I have %flax1 and %flax2 just set to the different types of flax, %flax1 is the first type of flax before it's "harvested" and %flax2 is the type that it is after it's been harvested once.

8
Scripting Chat / Re: Tutor?
« on: May 11, 2014, 06:43:05 AM »
I will definitely look into once I feel competent enough with EUO that way I have a better sense of script flow and where and what to put in the script. I will also contact pearls at that moment as well hehe, thanks once again  :)

9
Script Debug / Problem with if statements?
« on: May 11, 2014, 06:36:58 AM »
Code: [Select]
;====================Harvest=====================
sub Harvest
  FindItem %flax1 G_0
  set #lobjectid #findid
  while #findcnt > 0
  {
    Event Macro 17 0
    wait 3s
  }
  FindItem %flax2 G_0
  set #lobjectid #findid
  while  #findcnt > 0
  {
    Event Macro 17 0
    wait 3s
    finditem %bundle C_ , %backpack
    set #lobjectid #findid
    if #findcnt = 10
    {
      exevent drag #findid #findstack
      wait 10
      exevent dropc %hboh
      wait 10
      if #charposx = 2282 && #charposy = 1708     ;First Crop
      {
        event macro 5 1
      }
      if #charposx = 2282 && #charposy = 1707  ;Second Crop
      {
        event macro 5 7
      }
      if #charposx = 2281 && #charposy = 1707    ;Thrid Crop
      {
        event macro 5 7
      }
      if #charposx = 2280 && #charposy = 1707   ;Fourth Crop
      {
        event macro 5 7
      }
      if #charposx = 2279 && #charposy = 1707     ;Fifth Crop
      {
        for %next 0 2
          event macro 5 1
      }
      if #charposx = 2279 && #charposy = 1705     ;Sixth Crop
      {
        event macro 5 3
      }
      if #charposx = 2280 && #charposy = 1705     ;Seventh Crop
      {
        event macro 5 3
      }
      if #charposx = 2281 && #charposy = 1705     ;Eigth Crop
      {
        event macro 5 3
      }
      if #charposx = 2282 && #charposy = 1705     ;Ninth Crop
      {
        event macro 5 1
      }
      if #charposx = 2282 && #charposy = 1704     ;Tenth Crop and moves to Spinning Wheel
      {
        for %next 0 2
        {
          event macro 5 1
        }
        wait 5
        for %next 0 2
        {
          event macro 5 7
        }
        wait 5
      }
    }
  }
return
Ok so I'm writing a flax harvest script and it harvests the flax just fine but then it doesn't drag and drop the %bundle to %hboh and doesn't move to the next crop. I'm sure I'm missing something or don't have something written correctly. Any and all help is much appreciated. Thanks in advance guys  :)

10
Scripting Chat / Re: Tutor?
« on: May 11, 2014, 04:00:33 AM »
Quote
Learning Stealth with Pascal Script is easy like easyuo:)

Can you write in pascal with Stealth itself or would you need a third party software? I know you don't really need visual studio for C# but I got it anyway just because I feel like it's easier to write with. Also I don't even what pascal is but if it's as easy to learn as EUO then I might have to check it out hehe, though I'm still learning EUO as is  :). I'm kind of one of those people that once my mind is set on something I'll try to my best to do anything I can to achieve it.

11
Scripting Chat / Re: Tutor?
« on: May 10, 2014, 09:57:37 AM »
Quote
You may want to look into Stealth if you're going to take time to learn anything, Cheffe seems to be one midlife crisis away from dropping EUO. (Can't say I blame him, really. Nearly everything over on easyuo.com goes vastly unappreciated by the users)
   
Aye I would love to learn Stealth, I've watched Orich's tutorial and I've been watching some education videos as well on C# but I think Stealth might be out of my grasp as of right now. I've been told EUO is fairly easy to learn and I think I'm grasping it for the most part so far. I appreciate every script/snippet that anyone has ever made, it has helped me to learn a lot about EUO but when I'm writing my own I still get a little stuck on what exactly to put. I have the base outline but can't seem to make the code work properly sometimes, trial and error are my closest acquaintances right now while learning/writing hehe. 

12
Script Debug / Re: Having problems using last target
« on: May 08, 2014, 02:57:03 AM »
Code: [Select]
  repeat
    {
      set #targcurs 1   
    }
  until #targcurs = 0

This Bit Above Won't give you very consistent Results. What you are literally doing is forcing a target cursor 10x a second. So if you click something and it isn't right at the "Until #Targcurs = 0" Then it will just spit out another Cursor.

Code: [Select]
set #targcurs 1
While #targcurs = 1
wait 1

or

Code: [Select]
set #targcurs 1
Repeat
wait 1
Until #Targcurs = 1


That will help you with the container portion.
Brackets are also redundant inside of Repeat Untils, but they don't hurt anything for them to be there.

I also don't see you setting %Container in the sub itself.

Code: [Select]
  repeat
    {
      set #targcurs 1
    }
  until #targcurs = 0
  set #ltargetid %container
  set #ltargetkind 1
  event macro 22 0

After you get the #Targcurs = 0, you are probably wanting to set the %Container to the #ltargetid

Code: [Select]
set #targcurs 1
Repeat
wait 1
Until #Targcurs = 1
set %Container #ltargetid
set #ltargetid %container
set #ltargetkind 1
event macro 22 0
wait 20 ;<- A delay so the container can actually open before you check for bandages.
; Plenty of Coders have Subs for waiting for Things to happen like containers opening you can steal that are more reliable
; Than random Delays.


Sorry still new to writing for easyuo, i'm still a newbie in training lol. You answered my dilemma and helped me solve the issue of setting the target bag as the variable. The pause after opening the %container makes sense as well. I still have a lot to learn but I'm very grateful for all the helped I've received from everyone on here and who knows maybe one day I can get TM's stamp of approval on a script one day hehe. Well thank you very much good sir  :)

13
Script Debug / Re: Having problems using last target
« on: May 04, 2014, 05:32:33 PM »
I've tried using event macro 58 and no luck  :(. We have backpacks on my shard that can hold a 60k stack of one item so i'm trying to set that container as the container to look in but have it universal for everyone and just not specific to me. We can apply bandages to ourselves even if they're not in our "main" backpack.

14
Script Debug / Having problems using last target
« on: May 04, 2014, 05:14:25 PM »
Hey guys trying to make a healing script for the free shard that I play on. I'm having issues using the last object that was selected by my target prompt. Please help  :)
Code: [Select]
;========Select Bag with bandis=========
display Choose your bag that contains bandages
if #dispres = ok
{
  repeat
    {
      set #targcurs 1
    }
  until #targcurs = 0
  set #ltargetid %container
  set #ltargetkind 1
  event macro 22 0
  finditem ZLF C_ , %container
  if #findcnt > 0
  {
    set #lobjectid #findid
    goto mainloop
  }
  else
    if #findcnt < 1
  {
    display Couldn't find any bandages
    halt
  }
}

15
Scripting Chat / Re: Tutor?
« on: April 27, 2014, 05:11:28 PM »
Ok cool thanks so much and hopefully I can become good enough one day to make some contributions to this site  :D

Pages: [1] 2