AFFECTS

Re: AFFECTS

Postby Madigan » Thu Mar 03, 2016 8:21 am

Here is my completed script as an update to both Linx's and Breeze's work. Please feel free to use freely.

Code: Select all
function UpdateSStats()
   clearWindow("AffectsWindow")
     cecho("AffectsWindow","\n<yellow>Status\n<green>--------\n");
     cecho("AffectsWindow","<green>\nTarget\:<white> "..target.."<green>  HP:<white> "..msdp["OPPONENT_HEALTH"].."\n");
     cecho("AffectsWindow","<green>--------------------------------------------\n");
     cecho("AffectsWindow","<green>Continent:<white> "..msdp["CONTINENT"].."<green>  Area:<white> "..msdp["AREA_NAME"].."\n");
     cecho("AffectsWindow","<green>--------------------------------------------\n");
     cecho("AffectsWindow","<green>Group Leader:<white> "..msdp["GROUP_LEADER"].."<green>  Tank:<white> "..msdp["TANK_NAME"].."\n");
     cecho("AffectsWindow","<green>Align:<white> "..msdp["ALIGNMENT"].."\n");
     cecho("AffectsWindow","<green>XP:<white> "..msdp["EXPERIENCE"].."<green>   $$:<white> "..msdp["MONEY"].."\n");
     cecho("AffectsWindow","<green>HIT/DAM:<white> +"..msdp["HITROLL"].."/+"..msdp["DAMROLL"].."<green>   AC:<white> "..msdp["AC"].."\n");
     cecho("AffectsWindow","<green>[Weap Dam]:<white> "..msdp["WEAPON_DAM"].."<green> [Stab Dam]:<white> "..msdp["STAB_DAM"].."<green> [Spell Bonus]:<white> "..msdp["SPELL_BONUS"].."\n");
     cecho("AffectsWindow","\n<yellow>Affects\n<green>--------\n")
    for k,v in pairs(msdp.AFFECTS) do
       if (k ~= "item-generated") then
          if k ~= "class" then
      
echo("AffectsWindow",string.format("%-20s",string.upper(k))..string.format("%5s",os.date("*t",v).min..":"..os.date("%S",v)).."\n")
         end
        end
   end
end



If you already had Linx's affects script :
1) just paste the above code over his scripts/slothMUD/utility/UpsateSStats script.
2) add the following changes to the [onConnect] initAffectsWindow trigger also:

Code: Select all
createMiniConsole("AffectsWindow",900,0,600,510)
setMiniConsoleFontSize("AffectsWindow", 10)
setBackgroundColor("AffectsWindow",0,0,0,255)


right click the image link below and choose to open in a new window.
Image
https://www.dropbox.com/s/2r7u0y2to45c9w0/Updated-Affects-Status-WIndow.jpg?dl=0
Madigan
 
Posts: 30
Joined: Fri Sep 17, 2010 1:22 am
Status: Offline

Previous

Return to Mudlet - unlimited possibilities

Who is online

Users browsing this forum: No registered users and 3 guests