Recent Posts

Pages: [1] 2 3 ... 10
1
Stealth Client / [Python] How to access the current time
« Last post by sharpie on Today at 02:39:06 PM »
Hi! I've been learning Stealth/Python and I've run into a snag. I can't seem to figure out how to actually make a variable with the current time. Most of the stuff in the API gives me name 'xyz' is not defined. I'm sure there's an easy way!

Ex:

I'm trying to use Now in the WaitJournalLine command.

findMsg = WaitJournalLine(Now(), endMsg + "|" + stopMsg, 25000)
2
Razor Enhanced / Re: IDOC House Scanner (OSI/FS)
« Last post by Crisis on September 15, 2018, 08:36:07 PM »
This is for razor enhanced, similiar to uoassist but more features including the ability to add scripts.
3
UOSteam / Re: Program or Plugin to help with Steam Coding
« Last post by Trigs on September 15, 2018, 10:51:16 AM »
That has been a struggle of mine, I'm actually looking to switch to Razor Enhanced... seems very similar except the macro language is python :)
4
UOSteam / Program or Plugin to help with Steam Coding
« Last post by JlM on September 15, 2018, 10:48:11 AM »
Is there a program or a plugin that will help with steam script writing, specifically when making long macros I get lost in the if/end if there are several nested inside each other over and over. Something like if you select the IF it highlights where its closed below with the endif.
5
Razor Enhanced / Re: IDOC House Scanner (OSI/FS)
« Last post by DirtyWZl on September 15, 2018, 09:05:23 AM »
What are you running this script in????
6
Razor Enhanced / Re: Razor Enhanced section
« Last post by 12TimesOver on September 13, 2018, 12:54:26 PM »
Well C# without debugging is like grabbing the engine but dont take the car
Haha! This is my new Skype For Business tag line!! :P
7
Stealth Client / Re: Script not sorting properly (python)
« Last post by Trigs on September 12, 2018, 09:16:11 AM »
I figured it out. I just told it to sort 4 times in a row in the body of code

That's one way to go about it I guess   :-\\  definitely a cludge tho if you just copy and pasted the code a few times !
8
Stealth Client / Re: Script not sorting properly (python)
« Last post by JlM on September 12, 2018, 08:56:23 AM »
Ok found out 'tailor' and book titled Tailor, don't match up. So it adds tailors now but fails to put Smith bods Into that book. How Do I make it loop back to the top to check again if there is still a bod. Or have it cycle it until no more bods are in bag?

Nice, I suspected that was the case :)

As for the new issue... Although I think it could be restructured a bit ( more below ) I don't really see what would prevent it from putting smith books in.

A few things to check:
- Does FoundBlacksmithBods  actually contain info? Or check FindCount() after the FindTypeEx() call, maybe the color could be wrong?
- Does FoundBooks actually contain 2 ( or more ) books?

I'd suggest an approach like this ( warning psuedo code )

Code: [Select]
def findNamedBook(searchStr )
    res = FindTypeEx(8793, 0, Backpack(), False)
    FoundBooks = GetFindedList()
    for book in FoundBooks:
        tooltip = GetTooltip(book)
        if searchStr in tooltip:
           return book
# some error since no matching book found
return 0

tailorBook = findNamedBook('Tailor')
smithBook = findNamedBook('Smith')

res = FindTypeEx(8792, 1155, Backpack(), False)  # Tailor
FoundTailorBods = GetFindedList()
for tbod in FoundTailorBods:
   MoveItem(tbod, 0, tailorBook , 0, 0, 0)
   Wait(100)

res = FindTypeEx(8792, 1102, Backpack(), False)  # Blacksmith
FoundSmithBods = GetFindedList()
for bod in FoundSmithBods :
   MoveItem(tbod, 0, tailorBook , 0, 0, 0)
   Wait(100)


I think it's a little more clear, and avoids nested / redundant loops

I figured it out. I just told it to sort 4 times in a row in the body of code
9
Stealth Client / Re: Script not sorting properly (python)
« Last post by Trigs on September 12, 2018, 08:54:43 AM »
Ok found out 'tailor' and book titled Tailor, don't match up. So it adds tailors now but fails to put Smith bods Into that book. How Do I make it loop back to the top to check again if there is still a bod. Or have it cycle it until no more bods are in bag?

Nice, I suspected that was the case :)

As for the new issue... Although I think it could be restructured a bit ( more below ) I don't really see what would prevent it from putting smith bods in.

A few things to check:
- Does FoundBlacksmithBods  actually contain info? Or check FindCount() after the FindTypeEx() call, maybe the color could be wrong?
- Does FoundBooks actually contain 2 ( or more ) books?

I'd suggest an approach like this ( warning psuedo code ) it might not ( probably wont ) work right off the bat since I'm coding into a browser lol

Code: [Select]
# Function to find a book by name in your pack
def findNamedBook(searchStr )
    res = FindTypeEx(8793, 0, Backpack(), False)
    FoundBooks = GetFindedList()
    for book in FoundBooks:
        tooltip = GetTooltip(book)
        if searchStr in tooltip:
           return book
   # some error since no matching book found
return 0

tailorBook = findNamedBook('Tailor') # find our tailor book
smithBook = findNamedBook('Smith') # find our smith book

res = FindTypeEx(8792, 1155, Backpack(), False)  # Get all tailor bods
FoundTailorBods = GetFindedList()
for tbod in FoundTailorBods:
   MoveItem(tbod, 0, tailorBook , 0, 0, 0)
   Wait(100)

res = FindTypeEx(8792, 1102, Backpack(), False)  # Get all smith bods
FoundSmithBods = GetFindedList()
for bod in FoundSmithBods :
   MoveItem(tbod, 0, tailorBook , 0, 0, 0)
   Wait(100)


I think it's a little more clear, and avoids nested / redundant loops
10
Stealth Client / Re: Script not sorting properly (python)
« Last post by Trigs on September 12, 2018, 05:13:37 AM »
Assuming it's putting BODs in any book, the majority of the code seems to be working.

The only portion in question really is

Code: [Select]
        tooltip = GetTooltip(book)
        if 'tailor' in tooltip:

So I'd print the tooltip print(tooltip) or something to the logger so you can see if that string actually contains "tailor"... and possibly your book is named "Tailor" and that string find is case sensitive

Pages: [1] 2 3 ... 10