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

Pages: 1 2 [3] 4 5 ... 28
31
New member introductions / Re: Ohhhh how things have changed
« on: August 27, 2015, 09:13:21 PM »
Welcome to SUO!

32
New member introductions / Re: Hello All :-) | I am returning to UO
« on: August 27, 2015, 05:44:48 AM »
Welcome to SUO! 

33
Script Debug / Re: Character Movement
« on: August 25, 2015, 12:41:54 PM »
I am at work ok my phone so forgive the brevity in my response.   You may try changing the tolerance in the move command if it is necessary to hit exactly that tile.  Change the 1 to 0.


Also you may want to try and wrap the move command in a while loop that runs until #charposx = !nX && #charposy =!nY

34
Script Debug / Re: Character Movement
« on: August 25, 2015, 10:12:06 AM »
Sorry for your luck
http://www.easyuo.com/forum/viewtopic.php?p=366467#366467

Here is a list of keys
http://wiki.easyuo.com/index.php?title=OnHotKey

Delete the display ok !Cnt line in the move rail sub.

35
Script Debug / Re: Character Movement
« on: August 25, 2015, 09:08:13 AM »
Okay, You need a rail for each place you want to go.  Setting up the rails could be a pain, but there are ways to automate it but easier to hard code it for short rails, IMO.

Here's an example of what you might like to do.  As long as you are relatively close to your starting node like you say, it should be able to move to the first node without problem.  If not, we can implement 'find starting node' function or something that handles difficult moves...

Code: [Select]


set %RailOneX1 100
set %RailOneY1 300
set %RailOneX2 110
set %RailOneY2 300
set %RailOneX3 110
set %RailOneY3 290
set %RailOneCnt 3

set %RailTwoX1 100
set %RailTwoY1 300
set %RailTwoX2 90
set %RailTwoY2 300
set %RailTwoX3 90
set %RailTwoY3 310
set %RailTwoCnt 3

set %RailThreeX1 100
set %RailThreeY1 300
set %RailThreeX2 110
set %RailThreeY2 300
set %RailThreeX3 110
set %RailThreeY3 290
set %RailThreeCnt 3

while #true
{
   onhotkey 1
      gosub MoveRail RailOne
   onhotkey 2
      gosub MoveRail RailTwo
   onhotkey 3
      gosub MoveRail RailThree
}

halt

sub MoveRail
     namespace push
     namespace local MR , #systime
     
     set !Cnt %1 , Cnt
     set !Cnt % . !Cnt
     set !SX %1 , X
     set !SY %1 , Y
     display ok !Cnt
     
     for !i 1 !Cnt
     {
         set !nX !SX , !i
         set !nY !SY , !i
         set !nX % . !nX
         set !nY % . !nY
         
         move !nX !nY 1 5s   ;you might have to adjust timeout depending on move length
     }
     
     namespace clear
     namespace pop
return


36
Script Debug / Re: Character Movement
« on: August 25, 2015, 08:34:59 AM »
Well, if you're talking short distances with nothing major that is path blocking you can probably use event pathfind, the other option is to use the move function.  Since you don't care the starting point with those functions, it shouldn't be too hard.  Now, if you're talking about navigation through complex problems (a maze, down around the corner of a hall, 5 screens away) then it becomes more problematic.  However, you could rail them all and have it call a rail depending on where it starts. 

Can you describe the conditions a bit more and I can give better insights on what would work safely and be the easiest to implement.

37
General UO Chat / Re: BODs and Sorters
« on: August 24, 2015, 05:54:57 AM »
It's posted near the end of my script thread.  Just fyi.
http://www.scriptuo.com/index.php?topic=10752.msg110560#msg110560

38
Scripting Chat / Re: Plus or Minus...
« on: August 23, 2015, 04:06:43 AM »
You two are just so cute. 

I would do it one step further and make a sub routine.

Code: [Select]
gosub InRange 6 5 1
if #result
   display ok It's in range!
else
   display ok come a little closer baby.
halt

sub InRange
    if abs ( %1 - %2 ) <= % 3
        return #true
return #false

39
OpenEUO Scripts / Re: Kali's Bod Sorter for openEUO
« on: August 21, 2015, 10:55:09 AM »
Thanks, I appreciate the kind words on my script.  Makes me feel good that other people find it as helpful.  It started because I was trying to mod this old Razeil one and didn't like how it worked and how hard it was to customized.  If I recall right, the think even would pull a book, drop a bod, return the book over and over again instead of dropping all the bods for that book at that time.  So these were the things I wanted to focus on- making it customizable for what a person wants AND to make it more efficient.  I am sure there are many ways to problem solve it, but when I wrote it at this time, I was huge into looking up information security, cryptology, and hash functions.  That is the core of this script.  It hashes the bods (value associated) but in hind sight, I could simply concat the values into a string, and I *may* change this. 


i.e.
The bod gets assigned values for
Size (Large/Small)
Quality (Exceptional/Normal)
Material (iron/dull/etc..)
Amt (10/15/20)
Item (Ring/Chain/Plate/blah)

Imagine a small, exceptional, shadow iron ingot, 20, ringmail sleeves
And a small, exceptional, shadow iron ingot, 20, chainmail sleeves

The bod values are { 1,2,3,20,1 } and { 1,2,3,20,2 }
I hash those values
Hash( 1,2,3,20, 1 )
Hash( 1,2,3,20, 2 )

Which returns two values that are different.  The sorter then looks up those hash values which are keys in the index associated with a string, that string is the name of the book.
Index[ Hash( 1,2,3,20,1 ) ] = Book For this Reward
Index[ Hash( 1,2,3,20,2 ) ] = Book for another reward

However, I realize that I could simple use

Index[ "123201" ]
Index[ "123202" ]

But alas, what's done is done and the result probably isn't any different.

What's faster, appending a value to a string or hashing a few values, I'm not entirely sure.

The issue here is that I would be calling a lot of functions
tostring(1)..tostring(2)..tostring(3)..tostring(20)..tostring(1)
veruss

sum = 0
sum = sum * 41 + 1
sum = sum * 41 + 2
sum = sum * 41 + 3
sum = sum * 41 + 20
sum = sum * 41 + 1
sum = sum % 67735

Which is faster? I don't know.  tostring(1) undoubedtly is a mathmatically operation to turn the number value into the ascii (or UTF/UNICODE) value associated with it, and then string concat I have absolutely no idea since I'm unfamiliar with pascal memory management.  In C++ I believe a string is a contigious block of memory so it would involve memory allocation and movement.  In short, would it be worth my effort to make the sorting guts easier for others to understand and an index that is intuitive to look at?  Short answer, it's fast enough so I will probably never change this aspect.


40
Endless Nights' Script Library / Re: ENs - Whats Under My House ?
« on: August 21, 2015, 09:56:13 AM »
WOW, I just ran this for sh*ts and giggles and I have three chests full as crap that are hidden.  How do I get them?  If I click retrieve, my contents can't hold them (They are very heavy)


EDIT: lol, just kidding.  They are on my steps

41
New member introductions / Re: Hello!
« on: August 21, 2015, 09:49:31 AM »
Wilkommen zum SUO!

42
Crafting / Re: TG Crafting Factory 1.7
« on: August 21, 2015, 09:48:59 AM »
I worked on 1.6 yesterday making arrows. Here are a few items.

1. My resource box had everytype of wood in it. and started with regular wood in my backpack. When it was done with the boards in my pack it pulled bloodwood boards from my resource box instead of regular boards. I switched the resource box to a different one and just put boards in and it ran fine.

2. When it finishes a stack of boards in the resource box it stops and says out of resources even though there are several stacks in the box.

3. Ran out of feathers and the script said I was out of boards.



Maybe your feathers were really stiff.

43
OpenEUO Scripts / Re: Kali's Bod Sorter for openEUO
« on: August 21, 2015, 09:34:09 AM »
Well, I can't comment for the accuracy of ghosts index.  Mine was based on the tower of roses table here:
http://tor.bplaced.net/bods-srw.htm

If you look at for instance, small valorite bods, 10/15 sized ones, you have a 40% chance at a dull hammer and 60% chance for a shadow hammer.  In these situations it might not yield what you want/expect. 

With that being said, yes, I am working on swapping my bods today and will sort my next batch.  When I do, I'll try to hunt down my bugs in my next bod sorter version, which I've worked out some of the kinks already.  In this version, it will grab an empty bod book and rename it for you!  No more stopping because it can't find your bod book :D

44
OpenEUO Scripts / Re: Kali's Bod Sorter for openEUO
« on: August 20, 2015, 11:23:27 PM »
Hi Hi,

What were the bods that didn't get placed in a book?  That is strange, I didn't have this problem, but who knows with the different index.  Even in that case, it should havqe errored with a 'table index is nil' message if it couldn't find a book for it.  Also, when it does 'stop', if it prints anything, please let me know and it can help me track down what is happening.  Anyway, I use snicker's bod filler, I'm not sure if he's here on SUO, but I thought he was.  Let me ask, because his bod filler doesn't allow one to fill bods that are in books. 

He did make it 'callable' though (it is euox, not openEUO script) and I wrote a script that manages removing bods from books, calling his filling functions, and then stuffing them back in a book. 

45
New member introductions / Re: Returning to my addiction
« on: August 20, 2015, 10:29:05 PM »
While I think easyUO is very 'up to date' the community here is certainly stronger and more warm and welcoming.  With that, Welcome to SUO! 

The thing I found about scripting was that it was easy to learn from modding other scripts to suit my needs, once you get used to it, writing your own will be much easier.  Also, learning how things are done in UO is helpful to writing your own scripts.  I also find that writing your subs in a way so you can copy/paste them to develop your scripts rapidly. 

What shard do you play on?  What kind of characters do you enjoy playing?

Pages: 1 2 [3] 4 5 ... 28