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

Pages: [1] 2
1
Scripting Tutorials / Re: Healing Script
« on: September 27, 2018, 09:03:31 AM »
So lets say I want to use this to heal one of my other guys on a different account. So this guy just sits back and heals him while the other guy beats on something.

How do I pull the second character as the target?

Is there a way to make the script look for a name?

Can I also make this target mobs in a similar manner?

A quick / dirty implementation of healing a second person would be like:

Code: [Select]
set %otherChar SOME_ID

<mainloop same as before>

sub heal
   set #LTARGETID %otherChar
   event macro 15 3
   wait 12
   event macro 22 0 ; target last target
   wait 5
   return

<similar for cure>

Attacking is a little different, but similar to the above.

Code: [Select]
set #LTARGETID %monsterID
event macro 27 0 ;; attack last target

I don't think there is a built in way to find chars by name, but I think some combination of:

Code: [Select]
set %humanType IS ;; theres some other types too
finditem  %humanType G_6 ;; search all around you with in 6 tiles
for %ind 1 #FINDINDEX
   event property #FINDID
   if Trigs in #PROPERTY
      set %otherChar #FINDID

I haven't tested it, or even tried it but that should give you some ideas to get started on both fronts.

2
Scripting Tutorials / Re: Healing Script
« on: September 27, 2018, 07:17:29 AM »
The stuff to repeat goes between the repeat and until

Code: [Select]
repeat
   if C in #charStatus
      gosub cure

   if #hits < #maxhits
      gosub heal

until #CharGhost = Yes

3
Scripting Tutorials / Re: Healing Script
« on: September 27, 2018, 07:14:36 AM »

4
Scripting Tutorials / Re: Healing Script
« on: September 27, 2018, 07:07:13 AM »
Few issues with your script.

You have Repeat but you do not tell it what to repeat and until when.  You need to always have Repeat with an Until statement.

Second issue is you will run out of bandages REALLY fast.  You have no way of telling it to wait until it has attempted the full heal or cure.  So it will spam your bandages.  You need to have it either read your journal or set up the timing so that after it uses the bandages it waits a bit to try another one.

This is using magery to heal, not bandages. Definitely agree with having a Until Statement though

I'm also not sure what "Mainloop" is doing there. It's one quirk with EUO that I'm not really a huge fan of... you can pretty much put gibberish in spots and it just moves on like nothing happened.

5
Script Debug / Re: Skill check issue
« on: September 19, 2018, 12:05:41 PM »
Code: [Select]
repeat
{
   ; some code
   ; goes here
}
until #skill > %someValue

Or whatever "until" condition you want. I'm not sure if that's the issue

I assumine you are calling something like:

Code: [Select]
chooseSkill Tink

in one of those subfunctions as defined here: http://wiki.easyuo.com/index.php?title=ChooseSkill

6
UOSteam / Re: Program or Plugin to help with Steam Coding
« 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 :)

7
General UO Chat - Freeshard edition / Re: What free shard do you play?
« on: September 15, 2018, 09:52:18 AM »
I have recently tried 5 different free shards and I was able to connect and create characters on all but this one.

I am selecting this:




I appreciate the detailed info to debug and multiple attempts, definitely want people to be able to get connected. More people the better :D

Could you try giving the client thats avail for download from the LC site a shot? http://lostcityshard.com/ultima-online-free-shard-client-download/

I'm not 100% sure if the suggestion that  it should work with razor is still valid or not, but I am using the downloaded version and that seems to be a smoking gun :)

Here's my razor config:


Seems like my img isn't working ... I have <Path>\The_Lost_City_shard\client.exe selected. and the uo folder as <Path>\The_Lost_City_shard\

8
General UO Chat - Freeshard edition / Re: What free shard do you play?
« on: September 14, 2018, 05:08:16 PM »
I tried again with razor enhanced and uosteam but no luck. I am using 84.255.205.74 and port 2593.

Hmm I just tried with razor enhanced and it worked for me, that is the correct IP / Port.

When you select client through RE, which client are you selecting?

9
General UO Chat - Freeshard edition / Re: What free shard do you play?
« on: September 14, 2018, 10:32:08 AM »
No such luck  :'(

I tried UOSteam, Razor Enhanced, and the original Razor and the same thing on all of them. They are all set to admin as well.

I'm sure it's super frustrating :(

Mind giving it a shot again? I talked to the owner and he mentioned that he recently put a bunch of new deco on top of the bank ( where you spawn when creating a new char ) that might have been causing some crashes.


10
Stealth Client / Re: Script not sorting properly (python)
« 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 !

11
Stealth Client / Re: Script not sorting properly (python)
« 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

12
Stealth Client / Re: Script not sorting properly (python)
« 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


13
Scripting Tutorials / Re: Failing Hard
« on: September 10, 2018, 10:55:29 AM »
Nothing stands out at a quick glance

It's usually really helpful to step through the code to see what's not working. With the code stopped, you can hit F7 or F8 to step through the code line by line, one of them will "step in" to subs and follow the code, the other will just call the sub.

So while your char is damaged, and you have the EUO window up / focused you could hit F8 F8 F8 and walk through the code line by line, you should be able to logic mistakes or calls that are not working as intended.

I'll try to remember to test it out at home tonight

14
General UO Chat - Freeshard edition / Re: What free shard do you play?
« on: September 10, 2018, 06:39:08 AM »
I'm currently on Lost City

Not really close to OSI, but it's a fun shard with some unique stuff.... a small but dedicated player base that has seen some new faces around!

PM Triggers if anyone ends up playing :)

I tried to check it out but was totally unsuccessful. When creating a character, it keeps freezing up after choosing my skills and stats. I tried to create a forum account to see what was what but they are apparently using an old version of captcha and it no longer gives anything so I cannot create an account.

Ah that's unfortunate. I'll poke the GMs if I see one on about the freezing issue.

Not sure about the captcha, the forums are fairly dead though!

15
General UO Chat - Freeshard edition / Re: What free shard do you play?
« on: September 09, 2018, 09:32:45 AM »
I'm currently on Lost City

Not really close to OSI, but it's a fun shard with some unique stuff.... a small but dedicated player base that has seen some new faces around!

PM Triggers if anyone ends up playing :)

Pages: [1] 2