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

Pages: [1] 2 3
1
Scripting Chat / Re: Automated Traveler
« on: January 13, 2022, 01:15:55 PM »
I have done this before in UOSteam with escorts specifically. There are several text commands, one I think is `location`. They will then state where they would like to go that are super helpful.

What I did was I had several runebooks with the escort locations all marked. I would recall to a known location where escorts spawned, clear my journal, ask where they'd like to go, and then do the command to accept. I would then loop through the names of the locations and had them saved in a list correlating with the list of runebook rune slots where I had the info marked. I would then gate travel using the correct rune, get my money, and double-click to get back to safety (because some of the locations are to dungeons, best not to stick around).

The way to fully automate this is to then have your character wait the necessary timeout to grab another escort, have them say the command again, and, if you do not get a response back, move on to the next location in a runebook full of escort locations.

Your script will look something like this:
```
initialize lists and variables

while not dead or overweight and have necessary reagents:
    for each spot in escort runebook:
        recall to escort location

        while asking location returns a message signifying that an escortable NPC is within range,
            accept escort
            parse location to travel
            cast gate travel and select correct rune in escort location runebook
            double-click moongate at relative x 0, y 0
            pause for escort timeout (You could instead have the character macro something else during this time or craft)
```

The one part that will be tricky is banking unless you want to have a check to see whether you have a certain amount of gold or you are below a threshold on the reagents to know when to bank or if you are in a specific part of your rotation in your escorts book where it's close enough to a bank to use it.

This is doable in EasyUO, UOSteam, UOOrion, and the Stealth client. I think Razor wouldn't be able to handle it without some pretty clever workarounds.

2
Stealth Client / Stealth Crashing Error 0xEEDFADE
« on: November 24, 2015, 03:32:41 PM »
I was having a lot of weird issues with a miner bot that I had created. It'd run perfectly through a few runebooks, and then, out of nowhere it'd error out by giving a C++ library runtime error which caused stealth to crash. I tried everything I could possibly think of. I double and triple checked my code. The only thing I got from my stealth error log files was this:
Code: [Select]
An exception raised at <<24 November>>, 01:54:10:315
Access violation at address 00000000 in module 'Stealth.exe'. Read of address 00000000
(FFFFF000){Stealth.exe } [00000000]

Call stack:


I talked to Vizit0r, the current programmer for stealth, and he wasn't too helpful or thrilled. He kept wanting to say that it was an issue with stealth's internal python interpreter, and that using an external wrapper would help. I'm using boydon's wrapper now, and when I run my code it's giving me three error pop-up windows:

The first error window I get has this:
Code: [Select]
Error, New ReturnValue incoming, but previous not used yet! Report to developer now!

The second,
Code: [Select]
Error, Packet parsed incorrectly
The third,
Code: [Select]
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "AutoMiner.py", line 410 in <module>
File "C:\Users\Vlek\Desktop\py_stealth.py", line 2457, in GetX
  return stealth_dll.Script_GetX(ObjID)
WindowsError: [Error 250477278] Windows Error 0xEEDFADE


I looked up the error code I'm getting, and stackoverflow is saying that it's a delphi error message that's being called. Considering this always crashes my stealth, I'm thinking it's a Stealth bug. It looks like there may be something weird with stealth.GetX, and I'm thinking there might be some weird memory issues as well based on the stackoverflow posts that I had seen for the memory access error I was getting.

Can anyone shed some light on what the hell is going on, any possible ways I could test what is really the case, or even an answer to this problem?

3
Stealth Client / Re: [Release] Stealth Python wrapper [UPDATED 2014-08-21]
« on: November 24, 2015, 02:34:28 PM »
Sorry! I figured it out on my own.

One thing though, it looks like your

On line 2259,
Code: [Select]
def FindTypeArrayEx(ObjTypes, Colors, Containers, InSub):
should be:
Code: [Select]
def FindTypesArrayEx(ObjTypes, Colors, Containers, InSub):

4
Stealth Client / Re: [Release] Stealth Python wrapper [UPDATED 2014-08-21]
« on: November 24, 2015, 09:36:06 AM »
I know it has been over a year, but I never was able to use the wrapper. I'm having significant, weird issues with stealth not liking my scripts that are entirely legal python code.

I understand I have to use something like cx_freeze to put these into executables, but, when I do that, I was getting a silent error that the script.dll wasn't included. I tried adding it into the archive file that gets generated with the executable in cx_freeze, but then it doesn't error out at all. It just runs the program forever in the background if I try to use it or run it through stealth.

I mean, I froze literally this for crying out loud:
Code: [Select]
import py_stealth as stealth
stealth.UOSay('Hello world!')

And it was playing forever without having put anything in game.

I guess what I'm asking is, can I get a brief tutorial on how to properly create an executable using this thing? I think that's where I'm messing up.

5
UOSteam scripts / Re: UOSteam Auto Attack
« on: November 19, 2015, 10:50:38 AM »
This is something I created to help quickly attack without the
need of always double clicking. Very rarely do I have to use
double click any more. I use it with middle mouse button.
I do not PvP so not sure about reds. For PvM it does the job well.
Enjoy!

Code: [Select]
@Getenemy 'murderer' 'Enemy' 'criminal' 'gray' 'closest'
if @findobject 'enemy'
  autotargetobject! 'enemy'
  attack! 'enemy'
endif
@clearusequeue
@cancelautotarget

You got some weird stuff happening in there. Honestly, this is all you need:
Code: [Select]
@getenemy 'enemy' 'gray' 'criminal' 'murderer' 'humanoid' 'closest'
//If it's the case that our enemy is on screen,
if @inrange 'enemy' 16
  attack 'enemy'
endif

6
Stealth Client / Re: Unable to Close Trade Windows
« on: November 19, 2015, 10:39:48 AM »
Note  to self:

Never respond to a post from Viek ever again.
I don't like to criticize people I haven't looked into. I thought I'd look at your posts, and I found that you have absolutely no idea what you're doing in UOSteam either. How did you get to be the moderator?

7
UOSteam / Re: UOS Randomly losing data.
« on: November 19, 2015, 10:33:47 AM »
I've been having some issues with steam basically forgetting my loot list, certain macros, and completely stopping to loot.  Just wondering if anyone else has had these issues with the program before? It's really bizarre that it just happens for what seems like no reason at all.

I've run every version, and I haven't had too too many issues with losing stuff. The only issues I've had in regards to that is when I've crashed UOSteam. It doesn't appear to do profile saving on crash cleanup, so I'll lose whatever information I've changed. The best way to guard against what you're saying is to have adequate checks in your scripts to make sure, if you don't want the information (if not listexists), then it should remake the list with the information it needs. Considering this check is not expensive, it should be in the beginning of every one of your scripts when listed data is required.

8
UOSteam / Re: Help with auto target
« on: November 19, 2015, 10:29:07 AM »
This script is very, very confused. You shouldn't need to play with warmode, and you're using 'last' target which can cause issues because 'last' can include your friendlies as well as enemies. It's better to use 'enemy' in this case. Regardless, if they have magic reflect on, this isn't going to end well for you. You might want to do a check in the middle of your script to see if you're paralyzed and do some counter measures if you are. Also, usually people wait a while before throwing an explosion potion. I'd suggest having it in another macro if possible, but if you want a one-and-done script then you'd probably want to do some waiting after using the potion.

You should have a targeting macro like this:
Code: [Select]
@getenemy 'enemy' 'gray' 'criminal' 'murderer' 'closest'
if @inrange 'enemy' 16
  headmsg "You're attacking me!" 'enemy'
endif

And then this is my version of what you're trying to do.
Code: [Select]
//Before we run through this long code, lets check
//if we even have an enemy on screen.
if @inrange 'enemy' 16
  cast 'paralyze'
  waitfortarget 15000
  target! 'enemy'
  pause 500
  if @findtype 0xf0d 'any' 'backpack'
    useobject 'found'
    waitfortarget 15000
    target! 'enemy'
  else
    sysmsg 'You do not have any explosion potions!'
  endif
  attack 'enemy'
else
  sysmsg 'Your enemy was not on screen'
endif

9
UOSteam / Re: need big help with explo macro
« on: November 19, 2015, 10:10:45 AM »
i play on a sever that doesnt allow injournal and has a alternating timer on pots betweeen 4 and 3 second..

Gimlet has no idea what he's talking about. Sysmsg is a command that displays the given string as a system message in the lower left-hand corner of one's screen. It's not a check that can be used instead of injournal. Honestly, if you can't use injournal, you're out of luck if you want it to throw the potion with less than a second to go. The best you can do is something like this:

Code: [Select]
//Stupid explo chucker by Vlek
//It's stupid because we can't use injournal to inform our script
//when to throw!
//
//We gotta check to see if we even have an explosion potion first
if @findtype 0xf0d 'any' 'backpack' 1 2
  useobject 'found'
  //You're going to have to play with this pause until you get it as close as possible on the 3 second one.
  //The four second one will have like a 1 second delay after being thrown. This is unfortunately unavoidable
  //Based on your statement that injournal messages are completely unusable.
  pause 2750
  //I don't know how far you can throw explosion potions off the top of my head,
  //but you need to check whether or not that person is even on screen (16) at the very least!
  if @inrange 'last' 16
    target! 'last'
  else
    //If it's the case we have no target, you may want to consider throwing this away from you
    //This is a random tile that's far enough away that it won't hurt. You can fudge the numbers
    //To your liking.
    targettileoffset 3 3 0
  endif
else
  sysmsg "You do not have any explosion potions!"
endif

10
UOSteam / Re: my first macro doesn't repeat
« on: November 19, 2015, 09:51:44 AM »
I know this is almost a year old, but for anyone that stumbles across this post might find this information helpful if they're also stuck.

There are two ways to loop in UOSteam, you can use the "loop" checkmark in the script tab (not recommended), or you can do for or while loops (recommended). In this case, you want to perform your poisoning until it is the case that you're either dead (can't gain or perform actions while you're dead), or you have gained 100 poisoning (No need to waste any materials after that). There are of course other cases where we'd want to quit our loop, like if we don't have anymore poison potions, but we can use the "break" statement for that.

Another point is that, instead of hardcoding serial numbers, it's more helpful to use promptalias to have the player target what they want to use. This allows the script to be used universally between characters without being changed.

The version you presented is also only able to deal with that specific poisoning potion. You may want to include the different poisoning potions by searching for specific ones using the findtype nested within an if statement with all of the different poisoning levels. You'd want to only include the poison potion selection part inside the if statement as everything else remains the same.

Our code then would look something like this:
Code: [Select]
//Example Poisoning Trainer by Vlek, Leader of the Bloodskulls
promptalias 'objtopoison'
if not @findalias 'objtopoison'
  sysmsg 'Please restart the script and select an item to poison'
  stop
endif
while not dead and skill 'poisoning' < 100
  useskill 'poisoning'
  waitfortarget 15000
  //This is only good for THIS specific poison level.
  //You either have to change it manually, or make your
  //script smarter to determine which to use based on your
  //poisoning skill level. (if skill 'poisoning' < 50), etc.
  targettype! '0xf0a' 'any' 'backpack'
  waitfortarget 15000
  target! 'objtopoison'
  pause 750
endwhile


11
Stealth Client / Re: Unable to Close Trade Windows
« on: November 19, 2015, 09:21:24 AM »
From Logical Point this is correct, you may need to check if you could try to use gump functions (untested) to close the trade.
What do you mean "From a logical point"? Logically, when someone cancels a trade, that means they get rid of it. As for using gump functions, that was my next guess. I tried using all of the gump functions I could find, but none of them seem to even be able to detect that the trade window was even there. It seems stealth is supposed to be able to handle multiple trades at once due to completely wonky Russian sphere server performance. I believe it's not dealing with normal trades correctly due to it trying to deal with non-standard sphere stuff.


Quote from: gimlet
I don't know stealth - but how about just sending escape ie ESC
I sincerely hope you didn't get your 4k post count by offering this level of unhelpful information. You obviously don't know the first thing about stealth. Thanks anyway.

12
Stealth Client / Unable to Close Trade Windows
« on: November 15, 2015, 03:24:00 PM »
I have run into another interesting problem. Stealth does not seem able to close certain things like trade windows. I used what I thought was the most appropriate function, CancelTrade, but that only removes the checkmark from the player's accept trade box. Is there another function I should be using to do this?

13
Stealth Client / Re: Getting Shown Versus Real Skill
« on: November 12, 2015, 04:03:04 PM »
You guys aren't understanding. It's not something stealth isn't currently seeing. I shouldn't even have mentioned the server I'm playing on because it's the vanilla RunUO system that's at play. I want the information that's in the current skill column. See the picture.


14
Stealth Client / Getting Shown Versus Real Skill
« on: November 11, 2015, 08:19:21 AM »
I'm playing a Pre-AOS server that has skill bonuses based on stat points. It appears that steatlh.GetSkillValue only returns the real skill level. Is there a way to receive the value under the "Current" column in the Skills tab of stealth?

15
Stealth archive / Re: Stealth Python Console
« on: October 07, 2014, 07:51:33 PM »
You're misinterpreting what I said. I want to make a tkinter window, much like idle, that is a console, much like idle, that can take python code and perform it in game.

Pages: [1] 2 3