Akayan Scripts

Re: Akayan Scripts

Postby Akaya » Wed Dec 18, 2013 4:12 am

The characters seem to vary depending on the OS. To use the characters in a script, you'll want to display MSDPROOM_EXITS via Mudlet and copy/paste them into your Mudlet script. They will come out as 'forgein letters' but at least Mudlet keeps them consistent within itself.

As for capturing exits via triggers: That's always a viable option and I'm sure this is how many Slothers have been capturing exits regardless of their client. MSDP still offers exits though, and having a reliable way to parse the information, if one should choose to use it, should be there.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby *Breeze* » Wed Dec 18, 2013 4:27 am

could also ask the benevolent Splork to change the output to something nicer?

also, can mudlet parse JSON and put into a database that it can look up stuff from?
User avatar
*Breeze*
Avatar Poster
 
Posts: 500
Joined: Mon Nov 05, 2007 9:24 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Wed Dec 18, 2013 2:00 pm

*Breeze* wrote:also, can mudlet parse JSON and put into a database that it can look up stuff from?


Yes! Just use yajl.to_string and yajl.to_value: http://wiki.mudlet.org/w/Manual:Miscell ... .to_string
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby *Breeze* » Wed Dec 18, 2013 2:35 pm

sweet. i let someone else who has time try to deal with it then, if they have the time/desire.

only thing i ask is if someone figures out how to use it with mudlet/wintin/whatever they share so others can use it.

this is not a permanent link. its only there for a few days. it has probably 99% of the eqlist, minus a few things like vault keys and anything with the keyword template in it, etc.
save as eqlist.json
User avatar
*Breeze*
Avatar Poster
 
Posts: 500
Joined: Mon Nov 05, 2007 9:24 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Wed Dec 18, 2013 3:44 pm

ooo. That's neat. It's a massive string though. I was able to take small sections of it and convert it to a lua table:
Code: Select all
myData = [[{"Generated":"Wed, 18 Dec 2013 10:29:19 -0700","4":{"OBJECT_VNUM":"4","OBJECT_NAME":"hexagonal hex token","OBJECT_SHORT_DESCRIPTION":"a hexagonal shaped token","OBJECT_TYPE":"LIGHT","VALUE_COLOUR":"0","VALUE_LIGHT_TYPE":"0","VALUE_HOURS":"-1","OBJECT_WEAR":"TAKE HOLD","OBJECT_EXTRA_FLAGS":"MAGIC","OBJECT_WEIGHT":"1","OBJECT_VALUE":"100000","OBJECT_RENT":"5500"}}]]
myTable = yajl.to_value(myData)
display(myTable)

But only as much as Mudlet could handle as I'm in the scripting window. Here's the result for the first few lines using the above snippet:
Code: Select all
{
  Generated = "Wed, 18 Dec 2013 10:29:19 -0700",
  ["4"] = {
    OBJECT_WEIGHT = "1",
    OBJECT_VNUM = "4",
    OBJECT_NAME = "hexagonal hex token",
    VALUE_LIGHT_TYPE = "0",
    OBJECT_VALUE = "100000",
    VALUE_HOURS = "-1",
    OBJECT_WEAR = "TAKE HOLD",
    OBJECT_EXTRA_FLAGS = "MAGIC",
    OBJECT_TYPE = "LIGHT",
    OBJECT_RENT = "5500",
    VALUE_COLOUR = "0",
    OBJECT_SHORT_DESCRIPTION = "a hexagonal shaped token"
  }
}


Meaning you can refer to this object's short description in a lua script with
Code: Select all
myTable["4"].OBJECT_SHORT_DESCRIPTION


If you manage to parse all that JSON data this would be a great scriptable database for eq!

This might be possible with Mudlet's Database Functions but last I heard it was unfinished/buggy.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby *Breeze* » Wed Dec 18, 2013 4:10 pm

yeah, it was meant to be used for that purpose exactly.

in php you can do

Code: Select all
<?php

$eqArray = json_decode(file_get_contents('eqlist.json'),true);

echo '<pre>';print_r($eqArray);die('</pre>');

?>


or even build your own raw interface/search.
everything is cross referenced so its just a matter of searching / displaying it.

splitting that file into other stuff would be trivial, but i decided to just output the information and let others deal with it, since there is no way i can make everyone happy. it easier to just make _me_ happy.

you can do something like this to separate each item into its own line separated by \n
Code: Select all
<?php

 $eqArray = json_decode(file_get_contents('eqlist.json'),true);

 $eqBuffer = '';
 foreach ($eqArray as $eqK=>$eqV)
 {
   $eqBuffer .= json_encode($eqV)."\n";
   unset($eqArray[$eqK]);
 }

 die($eqBuffer);

?>


or a few other simple variations thereof to sort by OBJECT_TYPE or anything else.
User avatar
*Breeze*
Avatar Poster
 
Posts: 500
Joined: Mon Nov 05, 2007 9:24 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Sat Dec 21, 2013 12:45 pm

Need to capture your group info to a miniConsole? Here's a nice start...
Group Capture.xml.xml
(1.15 KiB) Downloaded 130 times

Just change myConsole to the name of your miniConsole.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Sat Dec 28, 2013 5:50 pm

Here's a nice compass that will display not only room exits, but whether its an open/closed door or window:
http://youtu.be/zq9Outs5QL4
Image
SlothCompass.xml
Install using the Package Manager
(52.42 KiB) Downloaded 132 times

Enjoy!
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Thu Jan 02, 2014 3:59 am

Here's a script that will automatically set your target to whatever the group leader calls (and only what the group leader calls). You can also manually set the target by typing t <whatever>. If you want to use your target in a macro, you can do so:
Code: Select all
send("backstab "..target)

Group Target.xml.xml
Install using the Package Manager!
(1.78 KiB) Downloaded 152 times


Enjoy!
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Scan

Postby Akaya » Tue Jan 07, 2014 4:20 pm

This script captures all information via the SCAN command. It is placed in a lua table named Scan. The table is updated when you SCAN.

To attack your target if it is 'immediately to the north':
Code: Select all
if Scan[target]["immediately to the north"] then
  send("north")
  send("backstab "..target)
end

Akayan Scanner.xml
Install via the Package Manager!
(5.32 KiB) Downloaded 135 times


Enjoy!
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Tue Jan 14, 2014 7:26 pm

Toyed around with Mudlet's new database functions and was able to parse the eqlist json file to produce this nice UI that displays my current eq:
Image
I'm still messing around with the parsing function though so I don't have a usable script atm. Just a snapshot. :)
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby *Splork* » Tue Jan 14, 2014 7:45 pm

That is awesome!
User avatar
*Splork*
Site Admin
 
Posts: 1133
Joined: Tue Apr 29, 2003 8:50 pm
Status: Offline

Re: Akayan Scripts

Postby Akaya » Fri Jan 17, 2014 7:25 pm

I present to you the eqlist database for Mudlet users!
Image
Simply type lookup <item> and it will update itself with all the info you'll find on the eqlist website.
It includes an eqlist.lua file with all the info from the eqlist database along with all the functions you need to query. So if you're up for scripting, it has everything you need.
You can type the following on the command line to display every piece of armor in the database:
Code: Select all
getType("ARMOR")


This was a very daunting task to create. Lots of effort went into it. Thank you Splork and Breeze for all the help!

Enjoy!

The file is too big for this forum apparently so here's a direct download link via dropbox...
https://dl-web.dropbox.com/get/Public/E ... qeu4w&dl=1
Install Using the Package Manager!
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Fri Jan 17, 2014 9:34 pm

made a small update to how the database was queried. Wasn't capturing all the info. Is now. Link updated in previous post.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Simple Gauges

Postby Akaya » Fri Jan 24, 2014 3:25 pm

Here are some simple gauges to keep track of your health, mana, movement and mob health.

They sit at the bottom of your screen by default.

You can alter its size and position in Scripts>Create the monster on lines 5,6 and 7

They use the Geyser framework. So just install using the package manager and you're all set!

Don't forget to make sure you're utilizing msdp variables! You can find how to do so here: viewtopic.php?f=39&t=4002#p33909

Enjoy!
Attachments
SimpleGauges.zip
Install with Package Manager on Mudlet toolbar!
(1.33 KiB) Downloaded 107 times
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

PreviousNext

Return to Mudlet - unlimited possibilities

Who is online

Users browsing this forum: No registered users and 1 guest

cron