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

Pages: 1 2 3 [4]
46
New member introductions / Re: BadManiac Introduction
« on: March 10, 2010, 07:32:20 PM »
Next version of the looter will use the imbuing unravel score system for evaluation. Gives everyone a REAL number, something they can actually figure out.
My current personal version uses two numbers, how many mods, and how many percent of max intensity each mod should be. But it's still an arbitrary scale. The imbuing system is fixed and permanent and global, so everyone can use values they understand.
My original system, still in the public version, was just based on my personal opinion about how useful mods were... Not very easy for others to understand :p

47
New member introductions / Re: BadManiac Introduction
« on: March 10, 2010, 06:26:16 PM »
I'd gladly share the script if we can make it into a full on miner with all the trimmings. It's rudimentary at the moment to say the least.

48
Scripting Chat / Re: Follow sub
« on: March 10, 2010, 06:24:36 PM »
Ok, here's the original script posted on EUO.com: http://www.easyuo.com/forum/viewtopic.php?p=189786
Saves me posting the full description again.

The whole thing is recursive too, so if the pathfind fails, but is yet within it's timelimit, it will call itself to get around large obstacles like mountains and player houses.
For lulz try pathfinding straight through a large town like Britain. For Epic Lulz try to pathfind across an ocean (to an island from mainland) and set a really long timeout, It'll keep tying, persistent bastard that it is ;)


But the interesting bit for this task is the ScaledLine sub. Which I originally wrote a full fixed point square root function for, until I realized that all 8 directions are the same distance according to the UO client...
Take this grid: (works better in monospace font)
123
456
789
in the real world, moving from 1 to 9 is a longer distance than moving from 7 to 9. Diagonal, hypotenuse and all that. In UO it's the same distance. A right triangle where side A and B are of equal length would have an equal length hypotenuse too (wrap your head around that for a bit :P ). So that simplified the math required almost infinitely.

So here's a sub you can use alongside the pathfinding sub(s) to do what you want, right out of the box.
Note that you could use event pathfind instead of calling my sub here, or even move, if the distance is always reasonably short.

Interesting things are the ScaledLine sub, which takes two sets of coordinates, X1, Y1 and X2,Y2, and a distance, it returns a XXX_YYY formatted set of coordinates *distance* tiles away from X1,Y1 along the straight line to X2,Y2.
Sub XYReadout simply changes those to separate variables, saves a few lines of code.
Code: [Select]
;#############################
;# KeepDistance Sub
;# %1 is the target to keep at distance
;# %2 is the distance to keep
;#############################
SUB KeepDistance
SET !target %1
SET !distance %2
FINDITEM !target
IF #FINDKIND = -1
RETURN
IF #FINDDIST <> !distance
{
GOSUB ScaledLine #FINDX #FINDY #CHARPOSX #CHARPOSY !distance
GOSUB XYReadout #RESULT targx targy
GOSUB Distance #CHARPOSX #CHARPOSY !targx !targy
GOSUB BMPathfind !targx !targy 0
}
RETURN

49
New member introductions / Re: BadManiac Introduction
« on: March 10, 2010, 05:52:21 PM »
Actually most of my full scripts already have equivalent (almost as good :P ) scripts up here already, like the heartwood quester and library donation scripts.
I'll probably be posting subs and snippets for everyone to use. Altho there is that non rail based pathfinding lumberjacking script, or the mining script prototype that recalls to anywhere near any mountain and then follows the mountain wall around autmatically and mines completely rail less... ;)

And of course I do requests, and I'm always up for community/group projects.

I saw we put TM and the Claw in a dungeon with BM and his looter....let them duke it out!
Can I use my personal tweaked non public looter version? ;D
Actually in all honesty, TM and the Claw would win. TM's evaluation method can be faster since it can be done with string comparisons and less math, which is EasyUO's least favorite subject, and the Claw will be more precise IF you do set up all the rules properly. But if anyone argues that the Claw is easier to use I'll gladly take on the challenge.

BM's looter: *click* done ;)

50
Scripting Chat / Re: Follow sub
« on: March 10, 2010, 04:29:55 PM »
I need a following sub routine that will stop X tiles short of the followed target.
I'll be giving you exactly that as soon as I get home today. Watch this space.

You can use my Automagic Pathfinding sub along with a component sub from it called "ScaledLine" to achieve what you're trying to do. I initially wrote it to use in rail engines, for resource gathering scripts, they often use move, so you need very precise routes between for example tree's and other obstacles. I wanted to use Event Pathfind instead, but it can only pathfind a small distance (depending on your update radius). So I wrote a (BIG) sub that chops a distance into manageable pieces and pathfinds each individual segment.

What you can do is use the ScaledLine sub to calculate a point X tiles away from your target, along a life from your current position to the target. Then pathfind to that new point. It'll use the UO event pathfind function, and stop X tiles from the target. I've used exactly this in the past for disco training at the oriental dragon spawn in ilsh, to disco and follow it around at a fixed distance. Don't expect EXACT precision at all times tho, UO's pathfind function has a bit of a personality ;)

I'll share the full source later when I get home.

51
New member introductions / BadManiac Introduction
« on: March 10, 2010, 04:19:36 PM »
Hi, I'm Bad Maniac. The creator of BadManiac's automagic looter, item evaluator, and other automagic things.
Thought it was about time I finally joined the last free bastion of UO scripters.

What actually prompted me to join was a post by Cerveza that I'm going to contribute to, not just some puny suggestions either, the entire solution all wrapped up into the most beautiful sub(s) I've ever written, at least in my humble opinion. I'm actually surprised it doesn't get used more often by elite scripters. I'm talking about my Automagic Pathfinder script. It can do exactly what Cerveza wanted, namely follow something at a fixed distance, among many other things. I will be posting that shortly. With a full example on how to use it for Cerveza purpose.
As usual with all my scripts and subs (of which there are a large amount that just never got posted because of EasUO rules) all it takes to use them in a public script is a please, thank you, and a brief mention in the script description. Credit where credit's due and all that.

There's also a new version of my (in?)famous looter in the works with full SA support. And unlike the claw you don't need a masters degree in IQ to use it ;) That will also be posted here (and of course on EUO.com, the original home. But SUO'ers might get it early just to show my goodwill to this, for me, new community.

I'm hoping I can contribute to the community with subs, and share my many year scripting experience. See you all out there.

Is that karma enough for ya? :P

Pages: 1 2 3 [4]