CargoFind Plugin

page: 1 | 2 | next
back to index | forum index | search
 Sat, Sep 22, 2007  smittens
Version 1.0 - Download here. Thanks to Shape for the idea.

I made a plugin called CargoFind. What does it do, you ask? Well to see, let's look at my convenient (and oft-occurring) example:

You are in a sector. There is a giant ball of cargo, most of which you don't care about. But maybe there's an Axia Accelerated Positron in its midst? Well normally you would have to search through every bit of cargo. But no longer!

/cargofind "Axia Accelerated Positron"
or
/cargofind "Axia"
or
/Cargofind "Posi"
or
/Cargofind "Ax"

Basically, whatever you put in quotes, it'll find you the first widget (or stacked widget) with that in its name. This can be useful if you don't know how to spell the whole name, or in another example...

You jump into a sector with Oruns and Denteks, and a lot of cargo. Rather than shoot them, you want to collect processor cores. Rather than search for Orun Cores AND dentek cores, you can just type

/cargofind "Processor"

And it'll get you the first of either. Pick it up, rinse repeat repeat.

NOTE: This only works with cargo in your radar range.
link
 Sat, Sep 22, 2007  raybondo
I deleted the other duplicated thread.
link
 Sat, Sep 22, 2007  smittens
Oops, sorry. Thanks ray.
link
 Sun, Sep 23, 2007  Lord~spidey
great plug very useful when law harvesting or looking for something in a sea of cargo

thanks smittens awesome plug
link
 Sun, Sep 23, 2007  ThinkHen
Very creative use of RadarNext and RadarPrev. I wouldn't have thought of that.

-Nautargos
link
 Mon, Sep 24, 2007  look... no hands
cool now all i have to do is setup a bind that brings up a chat box with the command already typed in so all i have to do is enter the search terms, should be simple enough.
link
 Tue, Oct 23, 2007  blacknet
try this

/alias CARGOFIND 'prompt cargofind'
/bind 'key' CARGOFIND

Ed
link
 Sat, Oct 27, 2007  AJRimmer
this is a god send..thanx
link
 Sun, Nov 18, 2007  Killdog Deathwad
This is a great plugin (kudos to Smittens) but there are times when I don't have time to type "/cargofind xyz" and so I'd really like to be able to setup a few commonly used search terms to keys so that all I have to do is hit a single key to find whatever it is I want.

For example, say you often want to find scrap metal, I'd like to have "/cargofind scrap" bound to a key. According to the posts below, I thought that i'd be able to do that by putting the following in my wgaf.cfg file:

alias CFscrap "prompt /cargofind scrap"

...and in my config.ini file:

JOYBUTTON11=CFscrap

but this doesn't seem to work. The button bind works fine but the alias doesn't work as expected with the plugin.

Using the prompt command did bring up a prompt containing the text stated but I still had to manually hit enter (which, ideally, I'd like to avoid) and, in any case, it didn't do anything, it didn't appear to be talking to the cargofind script at all.

I came to this conclusion because, looking at the code for the cargofind script, it seems that there are 3 possible "outcomes" (for want of a better word). These are:

1) It finds an item according to the string entered
2) It returns a message stating that there is no item matching that string
3) it returns a messages informing the user of the syntax required to use cargofind.

Using "prompt" in the alias above resulted in none of these so I can only assume that the prompt command is not talking to the cargofind script at all.

Another thing I tried was using the say_channel command. I tried this because, according to my, admittedly poor, understanding, if you can type "/cargofind xyz" into chat and have it work then, logically, you should be able make an alias that says:

alias CFxyz "say_channel /cargofind xyz"

and have it also work successfully.

Of course, I've tried this and it doesn't work. This seems strange to me but, as I said, I have a very poor grasp of how this all works.

On the advice of a fellow guild member, I also tried:

alias CFxyz "/cargofind xyz"

but I had no luck there either.

So, I'm a bit stuck. I'm not sure where to go from here. I've searched the forums (fora?) to no avail and the wiki doesn't cover specifics like this so I'm hoping that one of you bind gurus will impart some of your wisdom.

Can this be done? Is it possible without resorting to lua? It seems like it should be quite simple.

Anyway, if anyone can help, I'd appreciate it.

Cheers,
KD

PS: here a list of the things I tried but that did not work...

alias "/cargofind xyz"
alias "prompt /cargofind xyz"
alias "echo /cargofind xyz"
alias "say /cargofind xyz"
alias "say_channel /cargofind xyz"
link
 Mon, Nov 19, 2007  smittens
You do:

/alias FindWhatever "cargofind 'Item Name'"
/bind YourKey FindWhatever

Make sure to put single quotes around Item Name.

This was useful in the nation war when I had to find Tumble (to follow his lead). My FindTumble alias was a smashing success!
link
 Mon, Nov 19, 2007  Killdog Deathwad
Ahhh, of course. Once again, I am thwarted by the smallest of details. I should know better by now.

Thanks Smit, it works like a charm now.

Cheers,
KD
link
 Tue, Jan 27, 2009  Daare
Link is dead. Any chance this plugin can be hosted elsewhere? I miss my /cargofind.
link
 Wed, Jan 28, 2009  maq
CargoFind.zip
link
 Wed, Jan 28, 2009  Daare
Many thanks!
link
 Fri, May 29, 2009  DarBar
How 'bout a function in /cargofind like ls

so..
/cargofind ls
would list all cargoes within radar range, so you can see what is there before you ask where a specific item is...
So when i pop a trader and have vprs chasing me, i can infiniturbo around and decide what i'm going to pick up

XD

TBF
link
 Fri, May 29, 2009  maq
cargolist does exactly that.
link
 Sat, May 30, 2009  DarBar
/me has just figured that out. thx. :P
link
 Sun, May 31, 2009  smittens
Hey Mick, I hope it's alright (just let me know if not and I'll take it down), but I changed the link in my original post to the link you gave where it is still hosted. Thanks :)
link
 Mon, Jun 01, 2009  maq
Sure, it should stay there for a while tho if something happens to it i'll likely not notice.
link
 Wed, Jul 22, 2009  Shapenaji
How about regular expressions? suppose I want all "*blaster*" on the field?
link
back to index | forum index | search
page: 1 | 2 | next