————————————————-
– Put your Lua functions here. –
– –
– Note that you can also use external Scripts –
————————————————-
function HEALTH(event, args)
current = 0
max = 295
if atcp.MSDPHEALTH ~= nil and atcp.MSDPHEALTH_MAX ~= nil then
– create the text to display on the gauge
text = "Health: "..atcp.MSDPHEALTH.."/"..atcp.MSDPHEALTH_MAX
outline_text ("healthLabel", text, "yellow", 3, false, 92, 632-bottom_offset, 250, 11)
– make sure the gauge doesn't go off either end
current = tonumber(atcp.MSDPHEALTH) * max / tonumber(atcp.MSDPHEALTH_MAX)
if current < 0 then
current = 0
elseif current > max then
current = max
end – if
end – if
setGauge("healthBar", current, max)
setGaugeStyleSheet("healthBar", [[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #220202, stop: 0.1 #440505, stop: 0.2 #660808, stop: 0.3 #880b0b, stop: 0.4 #aa0e0e, stop: 0.5 #cc1111, stop: 0.6 #aa0e0e, stop: 0.7 #880b0b, stop: 0.8 #660808, stop: 0.9 #440505, stop: 1 #220202);
border-top: 0px black solid;
border-left: 1px black solid;
border-bottom: 0px black solid;
border-radius: 7;
padding: 3px;]],
[[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #080000, stop: 0.1 #110000, stop: 0.2 #190000, stop: 0.3 #220000, stop: 0.4 #2a0000, stop: 0.5 #330000, stop: 0.6 #2a0000, stop: 0.7 #220000, stop: 0.8 #190000, stop: 0.9 #110000, stop: 1 #080000);
border-width: 0px;
border-color: black;
border-style: solid;
border-radius: 7;
padding: 3px;]])
end – HEALTH
function SERVER_ID(event, args)added handler for MSDPSERVER_ID
initialise_msdp()
end – SERVER_ID
function initialise_msdp()No handler
– Set the PLUGIN_ID so the mud knows which version you're using.
sendATCP("@PLUGIN_ID", "GW2_Mudlet_Plugin_(version_1.0)")
– Tell the mud which MSDP variables to report.
sendATCP("@REPORT", "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 AFFECTS ROOM_EXITS")
end – initialise_msdp
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
<ScriptPackage>
<ScriptGroup isActive="yes" isFolder="yes">
<name>testing</name>
<packageName>testing</packageName>
<script></script>
<eventHandlerList/>
<Script isActive="yes" isFolder="no">
<name>SERVER_ID</name>
<packageName></packageName>
<script>function SERVER_ID(event, args)
initialise_msdp()
end – SERVER_ID
</script>
<eventHandlerList>
<string>MSDPSERVER_ID</string>
</eventHandlerList>
</Script>
<Script isActive="yes" isFolder="no">
<name>initialise_msdp</name>
<packageName></packageName>
<script> function initialise_msdp()
– Set the PLUGIN_ID so the mud knows which version you're using.
sendATCP("@PLUGIN_ID", "GW2_Mudlet_Plugin_(version_1.0)")
– Tell the mud which MSDP variables to report.
sendATCP("@REPORT", "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 AFFECTS ROOM_EXITS")
end – initialise_msdp
</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>layout</name>
<packageName></packageName>
<script>function layout()
setBorderTop(100)
top_container = Geyser.Container:new({
name = "top_container", – give it a unique name here
x=0, y=0, – have it start at the top-left corner of mudlet
width ="100%", height= 100, – with a width of 200, and a height of the full screen, hence 100%
})
setBorderBottom(100)
bottom_container = Geyser.Container:new({
name = "bottom_container", – give it a unique name here
x=0, y=0, – have it start at the top-left corner of mudlet
width = "100%", height= 100, – with a width of 200, and a height of the full screen, hence 100%
})
setBorderLeft(300)
left_container = Geyser.Container:new({
name = "left_container", – give it a unique name here
x=0, y=0, – have it start at the top-left corner of mudlet
width = 200, height="100%", – with a width of 200, and a height of the full screen, hence 100%
})
setBorderRight(300)
right_container = Geyser.Container:new({
name = "right_container", – give it a unique name here
x=0, y=0, – have it start at the top-left corner of mudlet
width = 200, height="100%", – with a width of 200, and a height of the full screen, hence 100%
})
Top_Border = Geyser.Label:new({
name = "Top_Border",
x = "20%", y = "0%",
width = "60%", height = "15%",
message = [[<center><font size=40>SLOTHMUD - A RETURN TO ITS ORIGINS</font></center>]]
})
Top_Border:setStyleSheet([[
background-color: black;
border-width: 2px;
border-style: solid;
border-color: grey;
border-radius: 10px;
font: bold large "Monospace";
]])
Locations = Geyser.Label:new({
name = "Locations",
x = "0%", y = "0%",
width = "20%", height = "25%"
})
Locations:setStyleSheet([[
background-color: black;
border-width: 2px;
border-style: solid;
border-color: grey;
border-radius: 10px;
font: bold large "Monospace";
]])
Locations:echo("LOCATION INFORMATION:<br><hr><br>Continent: "..atcp.MSDPCONTINENT.."<br>Area: "..atcp.MSDPAREA_NAME.."<br>Room: "..atcp.MSDPROOM_NAME.."<br>Exits: "..atcp.MSDPROOM_EXITS.."<br>Terraion: "..atcp.MSDPTERRAIN.."<br>Room ID: "..atcp.MSDPROOM_VNUM)
Grouping = Geyser.Label:new({
name = "Grouping",
x = "0%", y = "25%",
width = "135%", height = "35%"
}, left_container)
Grouping:setStyleSheet([[
background-color: black;
border-width: 2px;
border-style: solid;
border-color: grey;
border-radius: 10px;
font: bold large "Monospace";
]])
Grouping:echo("GROUP FIGHTING:<br><hr><br>Group Leader: "..atcp.MSDPGROUP_LEADER.."<br>Tank Name: "..atcp.MSDPTANK_NAME.."<br>Tank Health: "..atcp.MSDPTANK_HEALTH.."/"..atcp.MSDPTANK_HEALTH_MAX.."<br>Tank Level: "..atcp.MSDPTANK_LEVEL.."<br><br>Enemy: "..atcp.MSDPOPPONENT_NAME.."<br>Level: "..atcp.MSDPOPPONENT_LEVEL.."<br>Health: "..atcp.MSDPOPPONENT_HEALTH.."/"..atcp.MSDPOPPONENT_HEALTH_MAX)
–echo("Grouping", "[[<p style="font-family: monospace; font-size:small;">]][[GROUP FIGHTING: <br>==============<br>Group Leader: ]]..atcp.MSDPGROUP_LEADER..[[<br>Tank Name: ]]..atcp.MSDPTANK_NAME..[[<br>Tank Health: ]]..atcp.MSDPTANK_HEALTH..[[/]]..atcp.MSDPTANK_HEALTH_MAX..[[<br>Tank Level: ]]..atcp.MSDPTANK_LEVEL..[[<br><br>Enemy: ]]..atcp.MSDPOPPONENT_NAME..[[<br>Level: ]]..atcp.MSDPOPPONENT_LEVEL..[[<br>Health: ]]..atcp.MSDPOPPONENT_HEALTH..[[/]]..atcp.MSDPOPPONENT_HEALTH_MAX[[</p>]])
Statistics = Geyser.Label:new({
name = "Statistics",
x = "550%", y = "0%",
width = "130%", height = "100%"
}, right_container)
Statistics:setStyleSheet([[
background-color: black;
border-width: 2px;
border-style: solid;
border-color: grey;
border-radius: 10px;
font: bold large "Monospace";
]])
Statistics:echo("STATS INFORMATION:<hr>Name: "..atcp.MSDPCHARACTER_NAME.."<br>Citizen of "..atcp.MSDPCITIZEN.."<br> Your alignment is: "..atcp.MSDPALIGNMENT.."<br>Sex: "..atcp.MSDPSEX.."<hr>Money: "..atcp.MSDPMONEY.."<br>Drachma: "..atcp.MSDPDRACHMA.."<hr>Levels:<br>"..atcp.MSDPCLASS.." "..atcp.MSDPLEVEL.." "..atcp.MSDPCLASS_SEC.." "..atcp.MSDPLEVEL_SEC.." "..atcp.MSDPCLASS_TER.." "..atcp.MSDPLEVEL_TER.." "..atcp.MSDPCLASS_QUA.." "..atcp.MSDPLEVEL_QUA.."<br>"..atcp.MSDPCLASS_QUI.." "..atcp.MSDPLEVEL_QUI.." "..atcp.MSDPCLASS_HEX.." "..atcp.MSDPLEVEL_HEX.." "..atcp.MSDPCLASS_SEP.." "..atcp.MSDPLEVEL_SEP.." "..atcp.MSDPCLASS_OCT.." "..atcp.MSDPLEVEL_OCT.."<br>Avatar: "..atcp.MSDPCLASS_AVA.." "..atcp.MSDPLEVEL_AVA.."<hr> Experience: "..atcp.MSDPEXPERIENCE.."<hr>Health: "..atcp.MSDPHEALTH.." / "..atcp.MSDPHEALTH_MAX.."<hr> Mana: "..atcp.MSDPMANA.." / "..atcp.MSDPMANA_MAX.."<hr> Moves: "..atcp.MSDPMOVEMENT.." / "..atcp.MSDPMOVEMENT_MAX.."<hr> AC: "..atcp.MSDPAC.."<hr> HONOR: "..atcp.MSDPHONOR.."<hr> STR:"..atcp.MSDPSTR.."/"..atcp.MSDPSTR_PERM.." CON:"..atcp.MSDPCON.."/"..atcp.MSDPCON_PERM.."<br> DEX:"..atcp.MSDPDEX.."/"..atcp.MSDPDEX_PERM.." WIS:"..atcp.MSDPWIS.."/"..atcp.MSDPWIS_PERM.."<br>INT:"..atcp.MSDPINT.."/"..atcp.MSDPINT_PERM.." CHAR:"..atcp.MSDPCHARISMA.."/"..atcp.MSDPCHARISMA_CAP.."<hr>Spells and Damage:<br>Weapon Damage: "..atcp.MSDPWEAPON_DAM.."<br>Stab Damage: "..atcp.MSDPSTAB_DAM.."/"..atcp.MSDPSTAB_DAM_CAP.."<br>Hand Damage: "..atcp.MSDPHAND_DAM.."/"..atcp.MSDPHAND_DAM_CAP.."<br> Undead Cont: "..atcp.MSDPUNDEAD_CONT.."/"..atcp.MSDPUNDEAD_CONT_CAP.."<br>Spell Bonus: "..atcp.MSDPSPELL_BONUS.."/"..atcp.MSDPSPELL_BONUS_CAP.."<br>Heal Bonus: "..atcp.MSDPHEAL_BONUS.."/"..atcp.MSDPHEAL_BONUS_CAP.."<hr>Hitroll: "..atcp.MSDPHITROLL.."<hr>Damroll: "..atcp.MSDPDAMROLL.."<hr>Damage Red: "..atcp.MSDPDAM_RED.."/"..atcp.MSDPDAM_RED_CAP)
end
</script>
<eventHandlerList>
<string>MSDPROOM_NAME</string>
<string>MSDPROOM_EXITS</string>
<string>MSDPROOM_VNUM</string>
<string>MSDPAREA_NAME</string>
<string>MSDPCHARACTER_NAME</string>
<string>MADPHEALTH</string>
<string>MSDPHEALTH_MAX</string>
<string>MSDPMANA</string>
<string>MSDPMANA_MAX</string>
<string>MSDPMOVEMENT</string>
<string>MSDPMOVEMENT_MAX</string>
<string>MSDPAC</string>
<string>MSDPHONOR</string>
<string>MSDPCONTINENT</string>
<string>MSDPLEVEL</string>
<string>MSDPCLASS</string>
<string>MSDPDRACHMA</string>
<string>MSDPALIGNMENT</string>
<string>MSDPEXPERIENCE</string>
<string>MSDPMONEY</string>
<string>MSDPSTR</string>
<string>MSDPCON</string>
<string>MSDPDEX</string>
<string>MSDPWIS</string>
<string>MSDPINT</string>
<string>MSDPSTR_PERM</string>
<string>MSDPCON_PERM</string>
<string>MSDPDEX_PERM</string>
<string>MSDPWIS_PERM</string>
<string>MSDPWEAPON_DAM</string>
<string>MSDPSPELL_BONUS_CAP</string>
<string>MSDPHEAL_BONUS_CAP</string>
<string>MSDPHEAL_BONUS</string>
<string>MSDPCHARISMA</string>
<string>MSDPCHARISMA_CAP</string>
<string>MSDPFLAIL_DAM</string>
<string>MSDPKICK_DAM</string>
<string>MSDPHAND_DAM</string>
<string>MSDPHAND_DAM_CAP</string>
<string>MSDPDAM_RED</string>
<string>MSDPDAM_RED_CAP</string>
<string>MSDPSEX</string>
<string>MSDPGROUP_LEADER</string>
<string>MSDPTANK_HEALTH</string>
<string>MSDPTANK_HEALTH_MAX</string>
<string>MSDPTANK_LEVEL</string>
<string>MSDPTANK_NAME</string>
<string>MSDPLEVEL_SEC</string>
<string>MSDPLEVEL_TER</string>
<string>MSDPLEVEL_QUA</string>
<string>MSDPLEVEL_QUI</string>
<string>MSDPLEVEL_HEX</string>
<string>MSDPLEVEL_SEP</string>
<string>MSDPLEVEL_OCT</string>
<string>MSDPLEVEL_AVA</string>
<string>MSDPCITIZEN</string>
<string>MSDPCLASS_SEC</string>
<string>MSDPCLASS_TER</string>
<string>MSDPCLASS_QUA</string>
<string>MSDPCLASS_QUI</string>
<string>MSDPCLASS_HEX</string>
<string>MSDPCLASS_SEP</string>
<string>MSDPCLASS_OCT</string>
<string>MSDPCLASS_AVA</string>
<string>MSDPSTAB_DAM</string>
<string>MSDPSTAB_DAM_CAP</string>
<string>MSDPUNDEAD_CONT</string>
<string>MSDPUNDEAD_CONT_CAP</string>
<string>MSDPSPELL_BONUS</string>
<string>MSDPINT_PERM</string>
<string>MSDPHITROLL</string>
<string>MSDPDAMROLL</string>
<string>MSDPOPPONENT_HEALTH</string>
<string>MSDPOPPONENT_HEALTH_MAX</string>
<string>MSDPOPPONENT_LEVEL</string>
<string>MSDPOPPONENT_NAME</string>
<string>MSDPTERRAIN</string>
<string>MSDPAFFECTS</string>
</eventHandlerList>
</Script>
</ScriptGroup>
</ScriptPackage>
</MudletPackage>
Could someone wade through my plugin and tell me how to fix it? With the way it is im
always lagging a prompt behind, so if im steadily moving in directions in mud the rooms im
seeing is for the previous room I just left and not the one Im in now.