Akayan Scripts

Akayan Scripts

Postby Akaya » Thu Jan 10, 2013 5:04 am

I'm very new to SlothMUD but not Mudlet. I'll do my best to post some useful scripts here. If you have any suggestions, or things you'd like to have, feel free to speak your voice.

The majority of scripts that create a user interface (UI) utilize the Vyzor Framework ( a mudlet script that makes creating a UI much easier ) so you'll want to grab a copy and install it which you can find here. Download vyzor.mpackage from that link and install it using the Package Manager located on the Mudlet toolbar. Once you install, restart Mudlet for everything to take effect.

I'm happy to answer any questions you have and/or walk you through the installation process. Enjoy!
Last edited by Akaya on Fri Jan 11, 2013 12:16 pm, edited 2 times in total.
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 10, 2013 5:13 am

This first script will activate the MSDP information exchange. This will give you loads of information sent by the game server for you to utilize in your scripts.

1) Create a new script

2) Copy and paste the following to the big white scripting box:
Code: Select all
function getmsdpvars(event, args)
   for i = 1, 2 do tempTimer(i, [[send "\n"]]) end
   tempTimer(1, function () sendATCP("@REPORT", "SERVER_ID WORLD_TIME CHARACTER_NAME HEALTH HEALTH_MAX MANA MANA_MAX MOVEMENT MOVEMENT_MAX AREA_NAME ROOM_NAME ROOM_VNUM AC HONOR CONTINENT LEVEL CLASS DRACHMA ALIGNMENT EXPERIENCE MONEY STR CON DEX WIS INT STR_PERM CON_PERM DEX_PERM WIS_PERM WEAPON_DAM SPELL_BONUS_CAP HEAL_BONUS HEAL_BONUS_CAP CHARISMA CHARISMA_CAP FLAIL_DAM KICK_DAM HAND_DAM HAND_DAM_CAP DAM_RED DAM_RED_CAP SEX GROUP_LEADER TANK_HEALTH TANK_HEALTH_MAX TANK_LEVEL TANK_NAME LEVEL_SEC LEVEL_TER LEVEL_QUA LEVEL_QUI LEVEL_HEX LEVEL_SEP LEVEL_OCT LEVEL_AVA CITIZEN CLASS_SEC CLASS_TER CLASS_QUA CLASS_QUI CLASS_HEX CLASS_SEP CLASS_OCT CLASS_AVA STAB_DAM STAB_DAM_CAP UNDEAD_CONT UNDEAD_CONT_CAP SPELL_BONUS INT_PERM HITROLL DAMROLL OPPONENT_HEALTH OPPONENT_HEALTH_MAX OPPONENT_LEVEL OPPONENT_NAME TERRAIN") end)
--   tempTimer(2, function () cecho("<green><MSDP ACTIVATED><reset>") end)
end


3) Click Save and be sure the script is enabled

You will now be able to request data from the server via the getmsdpvars() function!

Enjoy!
Last edited by Akaya on Thu Jan 10, 2013 6:13 am, edited 1 time in total.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Fancy Gauges

Postby Akaya » Thu Jan 10, 2013 6:11 am

Need some fancy gauges for your UI?

Image

Download Gauges.zip from here:
https://sourceforge.net/projects/akayanui/files
And install to your Mudlet profile using the Package Manager.
Then enter cg on your prompt line.

This script utilizes MSDP data and the Vyzor Framework.

Follow the instructions in the first two posts to get this working properly for you.

Keeps track of your health, mana, move, and mob health via colorful gauges. Also has a numerical display as the 'center piece'.

Enjoy!
Last edited by Akaya on Fri Jan 11, 2013 12:41 pm, edited 2 times in total.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Tabbed Chat Window

Postby Akaya » Thu Jan 10, 2013 7:45 pm

This nifty script will redirect all your channels to a single window for you to sort through at your leisure.
Image

Download ChatWindow.zip from here:
http://sourceforge.net/projects/akayanui/files/
And install it on your Mudlet profile using the Package Manager

This script utilizes the Vyzor Framework so you'll want to follow the instructions on the very first post.

If you want to add/remove tabs, alter this line in the 'Create the UI' script included with the .xml file
Image

Enjoy!
Last edited by Akaya on Fri Jan 11, 2013 12:18 pm, edited 3 times in total.
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 11, 2013 6:49 am

Here's a screencast of a UI in action.

Includes a chat window, gauges, a few clickable buttons, and the mudlet mapper widget (which I'm doing my best to set up for SlothMUD )

http://youtu.be/t2DjeKRhN74
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby *Breeze* » Sat Jan 12, 2013 10:51 am

neat scripts :)

thanks!
User avatar
*Breeze*
Avatar Poster
 
Posts: 520
Joined: Mon Nov 05, 2007 9:24 am
Status: Offline

Re: Akayan Scripts

Postby Constin » Sat Jan 12, 2013 11:29 am

Does MSDP vars TANK_HEALTH TANK_HEALTH_MAX TANK_LEVEL TANK_NAME exist? And how they used in game if yes?
Constin
 
Posts: 16
Joined: Fri Jan 11, 2013 3:37 pm
Status: Offline

Re: Akayan Scripts

Postby *Breeze* » Sat Jan 12, 2013 4:55 pm

those are set if you are in a group and the tank uses the 'point' command.
User avatar
*Breeze*
Avatar Poster
 
Posts: 520
Joined: Mon Nov 05, 2007 9:24 am
Status: Offline

Re: Akayan Scripts

Postby Akaya » Sun Jan 13, 2013 12:15 am

Constin wrote:Does MSDP vars TANK_HEALTH TANK_HEALTH_MAX TANK_LEVEL TANK_NAME exist?

YES!

Constin wrote: And how they used in game if yes?


After following the instructions on post #2 of this topic, you'll have access to all MSDP information, including tank info.

MSDP is live. Meaning it updates automatically whenever the variables change.

To utilize this awesome feature, you'll want to create an event handler.

When the MSDP information is sent to you, an event is raised that has the same name as the variable (In this case, MSDPTANK_HEALTH, MSDPTANK_HEALTH_MAX, etc )

So you'll want to make a script that fires off of these variables. Here's an example:
Image

When the MSDP variable, MSDPTANK_HEALTH is updated, the function updateTank() is ran.
:!: Notice how the script name and function name match? This is very important!

The above script will display the following every time your tank's health changes:
TANK 75/100

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

Re: Akayan Scripts

Postby Akaya » Sun Jan 13, 2013 4:22 am

Someone requested the following script, so here you are Someone.

This will remove all your EQ, place it in a defined container, pull another set of EQ from a defined container and wield/hold/wear the items.
The example contains two sets of default equipment which you can alter/add to. I included two example sets: AC and Stabbing

When you login, you'll want to let the system know which set you're currently wearing. Simply type: set eq <set name>

You'll then want to set which container each EQ set belongs to. So type: set bag <EQ set> <container>

To switch between equipment sets simply type: ex <set name>

Due note that you'll need to set which EQ set your wearing and which containers they'll go into each time you re-open that profile in Mudlet.

:!: To add/alter equipment sets, create a new if statement, function and table in the format provided.
Attachments
EQ Exchange.zip
Install using the Package Manager
Updated 1/13/13
(1.65 KiB) Downloaded 1072 times
Last edited by Akaya on Mon Jan 14, 2013 1:24 am, edited 1 time in total.
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: Akayan Scripts

Postby *Breeze* » Sun Jan 13, 2013 6:05 am

tyvm. will try it
User avatar
*Breeze*
Avatar Poster
 
Posts: 520
Joined: Mon Nov 05, 2007 9:24 am
Status: Offline

Re: Akayan Scripts

Postby Constin » Sun Jan 13, 2013 1:01 pm

Akaya wrote:
To switch between equipment sets simply type: ex <set name>

So to switch to the AC set you'd type: ex ac

To add/alter equipment sets, create a new if statement, function and table in the format provided. (If you need help in this area just ask. Should people like this script, I'll update it to have aliases for this)



You use bad algorithm. Ppl storing their eq in bags , or robes and using more then 2 mods. So u need:
1. rem all eq.
2. Then get EQ u need from container.
3. Wear Items u need.
4. put items from previos mode to containner. U cant put all items from inventory to container couse inventory may content some junk.


So. first of all u need to know previos mode , to know which items u need to put to container after exchange. Also u cant wear weapons and holding items. "wield dagger" "hold light" i mean u better test scripts before public it)

reliable way is to put all items from all modes exept mode u using to container in point 4. in this case u dont need to know previos mode.

-------
Some good words about MSDP exchange script:
Thank you u all very match for this ability. Thank Splork and other coders for MSDP. Thank you Akaya for this script. Its greate abulity.
I can use this window and scripts w/o visior, am i right? Whoohoo!
Constin
 
Posts: 16
Joined: Fri Jan 11, 2013 3:37 pm
Status: Offline

Re: Akayan Scripts

Postby Akaya » Mon Jan 14, 2013 1:31 am

Updated the EQ Exchange script.

- Fixed the problem with only being able to wear items and not wield or hold.

- You can now set which containers you'd like to place your EQ in.

Remember that it still only includes two sets. If you want to have more, you'll need to wait for me to have the time or do it yourself. The script contains everything you need to add another set.

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 17, 2013 7:44 am

If you are using the latest version of Mudlet (2.1 is currently the latest) you will be able to run lua from the command prompt.

Simply type:
lua <whatever>

Whatever being the script you wish to run.

Enter this on the command prompt to display your profile's path on your computer:
lua cecho("<yellow>\nProfile location: <cyan>"..getMudletHomeDir() )

If you receive msdp information (instructions on how to do this in post #2), you can enter this right from your prompt to display the msdp variable which holds your character's name (You can use this in an alias if you'd prefer to view it that way):
lua display( atcp.MSDPCHARACTER_NAME )

It's a very useful script that will save you hours of time in the long run.

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

Re: Akayan Scripts

Postby Constin » Fri Jan 18, 2013 3:29 am

function getmsdpvars(event, args)
for i = 1, 2 do tempTimer(i, [[send "\n"]]) end
tempTimer(1, function () sendATCP("@REPORT", "SERVER_ID WORLD_TIME CHARACTER_NAME HEALTH HEALTH_MAX MANA MANA_MAX MOVEMENT MOVEMENT_MAX AREA_NAME ROOM_NAME ROOM_VNUM AC HONOR CONTINENT LEVEL CLASS DRACHMA ALIGNMENT EXPERIENCE MONEY STR CON DEX WIS INT STR_PERM CON_PERM DEX_PERM WIS_PERM WEAPON_DAM SPELL_BONUS_CAP HEAL_BONUS HEAL_BONUS_CAP CHARISMA CHARISMA_CAP FLAIL_DAM KICK_DAM HAND_DAM HAND_DAM_CAP DAM_RED DAM_RED_CAP SEX GROUP_LEADER TANK_HEALTH TANK_HEALTH_MAX TANK_LEVEL TANK_NAME LEVEL_SEC LEVEL_TER LEVEL_QUA LEVEL_QUI LEVEL_HEX LEVEL_SEP LEVEL_OCT LEVEL_AVA CITIZEN CLASS_SEC CLASS_TER CLASS_QUA CLASS_QUI CLASS_HEX CLASS_SEP CLASS_OCT CLASS_AVA STAB_DAM STAB_DAM_CAP UNDEAD_CONT UNDEAD_CONT_CAP SPELL_BONUS INT_PERM HITROLL DAMROLL OPPONENT_HEALTH OPPONENT_HEALTH_MAX OPPONENT_LEVEL OPPONENT_NAME TERRAIN") end)
-- tempTimer(2, function () cecho("<green><MSDP ACTIVATED><reset>") end)
end



how to run this script at start? i need to start it manualy by using command getmsdpvars() every time im loging in
Constin
 
Posts: 16
Joined: Fri Jan 11, 2013 3:37 pm
Status: Offline

Next

Return to Mudlet - unlimited possibilities

Who is online

Users browsing this forum: No registered users and 1 guest