Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Adnil
Newbie


Joined: 21 Dec 2005
Posts: 4

PostPosted: Wed Dec 21, 2005 5:27 pm   

Medievia Mob Faction gold & points received tracker
 
A simple little script to keep track on a per session basis of gold , hero point and serpents points received on Medievia mud.
5 Aliases to use the script.

  • MFInfo - displays all info
  • MFG - displays gold received only
  • MFHP - display Hero points received only
  • MFSP - display Serpent points received only
  • MFReset - resets all variables to zero

Code:

#CLASS {MF}
#ALIAS MFReset {#var MFGold 0;#var MFGTemp 0;#var MFHEPS 0;#var MFSERP 0;#Var MFHEPSTEMP 0;#Var MFSERPTEMP 0}
#ALIAS MFG {#sh %ansi(yellow)Gold %ansi(green)Received from Mob Factions = %ansi(white)%trimleft(%format("&16.0n",@MFGold))}
#ALIAS MFHP {#sh @ansi(bcyan)Hero Points %ansi( green)Received from Mob Factions = @ansi(White)%trimleft( %format( "&16.0n", @MFHEPS))}
#ALIAS MFInfo {MFG;MFHP;MFSP}
#ALIAS MFSP {#sh @ansi(bGreen)Serpent Points %ansi( green)Received from Serpents = @ansi(White)%trimleft( %format( "&16.0n", @MFSERP))}
#VAR MFGold {0} {0}
#VAR MFGTemp {0} {0}
#VAR MFHEPS {0} {0}
#VAR MFHEPSTEMP {0}
#VAR MFSERP {0} {0}
#VAR MFSERPTEMP {}
#TRIGGER {An imp appears and hands you &MFGTemp gold coins for your heroic deeds vs %2!} {#MATH MFGold {%number(%replace(@MFGold,",")) + %number(%replace(@MFGTemp,","))}}
#TRIGGER {The DM bestowed upon you &MFHEPSTEMP hero points for your heroic deeds vs %2!} {#MATH MFHEPS {%number(%replace(@MFHEPS,",")) + %number(%replace(@MFGHEPSTEMP,","))}}
#TRIGGER {The DM bestowed upon you &MFHEPSTEMP hero points and &MFSERPTEMP serpent points for your heroic deeds vs the %3!} {#MATH MFHEPS {%number( %replace( @MFHEPS, ",")) + %number( %replace( @MFHEPSTEMP, ","))};#MATH MFSERP {%number( %replace( @MFSERP, ",")) + %number( %replace( @MFSERPTEMP, ","))}}
#CLASS 0
Reply with quote
Adnil
Newbie


Joined: 21 Dec 2005
Posts: 4

PostPosted: Sun Oct 15, 2006 4:12 am   Version 3 of gold/heropoint & serpent points tracker
 
Extension of first script posted with added functionality to display details of which mobfactions have been killed, what gold and heropoints were received for them. Also functionality to track heropoints and serpent points received while serpent hunting.
Apologies if posted code looks messy, it was just exported and pasted below
Commands are:
MFv3 - shows details on all mobfactions and serpents killed
MFDetails - only shows mobfaction details
SerpDetails - only shows serpent details
MFReset - clears mobfaction information
SerpReset - clears serpent information
MFv3Reset - clears all information


Code:

#CLASS {MFv3}
#CLASS 0
#CLASS {MFv3|Variables}
#VAR MFGTemp {0}
#VAR MFType {}
#VAR MFHEPSTemp {0}
#VAR SERPHEPSTemp {45}
#VAR SERPType {gold}
#VAR MFGold {0} {0}
#VAR MFGTotal {}
#VAR MFHEPSTotal {0}
#VAR SERPHEPSTotal {0}
#VAR SerpPtsTemp {202}
#VAR SerpPts {0}
#VAR SerpPtsTotal {0}
#VAR MFCount {0} {0}
#VAR SerpCount {0}
#VAR MFsGold {}
#VAR MFsCount {}
#VAR MFHEPS {0}
#VAR MFsHeps {}
#VAR MFName {Khrait Scoutships}
#VAR MFCountTotal {0}
#VAR SerpHeps {0}
#VAR SerpsHeps {}
#VAR SerpsPts {}
#VAR SerpName {}
#VAR SerpsCount {}
#VAR SerpCountTotal {0}
#CLASS 0
#CLASS {MFv3|Aliases}
#ALIAS MFDetails {#sh %ansi( White)Details on Mobfactions Killed and Gold/Heropoints received;#Show %ansi( bold, blue)%format( "&s", "Name")%repeat( ".", 21) %format( "&s", "Count")%repeat( ".", 15)%format( "&s", "Gold")%repeat( ".", 6) %format( "&s", "HeroPoints");#show --------------------------------------------------------------------;#class {MFV3|Variables};#loopdb @MFsGold {#Math MFGTotal {%number( @MFGTotal) + %val};@MFName = %key;@MFGold = %val;#loopdb @MFsCount {#if (@MFName==%key) {@MFCount = %val} {}};#loopdb @MFSHeps {#if (@MFName==%key) {@MFHeps = %val} {}};#sh {%ansi( yellow)@MFNAME%repeat( " ", %eval( 25 -%len( @MFName)))} %ansi( bold, green)%format( "&5.0n", @MFCount) %ansi( yellow)%format( "&18.0n", @MFGold) %ansi( bold, cyan)%format( "&16.0n", @MFHEPS)};#loopdb @MFsCount {#math MFCountTotal {%number( @MFCountTotal) + %val}};#loopdb @MFSHeps {#math MFHEPSTotal {%number( @MFHEPSTotal) + %val}};#show --------------------------------------------------------------------;#show Totals%repeat( " ", 20)%ansi( bold, green)%format( "&5.0n", @MFCountTotal) %ansi( yellow)%format( "&18.0n", @MFGTotal) %ansi( bold, cyan)%format( "&16.0n", @MFHEPSTotal);MFCount= 0;MFGTotal =0;MFHEPSTotal = 0;MFCountTotal = 0;#show "";#class 0}
#ALIAS SerpDetails {#sh %ansi( White)Details on Serpents Killed and Serpent Points/Heropoints received;#show --------------------------------------------------------------------;#Show %ansi( bold, blue)%format( "&s", "Name")%repeat( ".", 21) %format( "&s", "Count")%repeat( ".", 6)%format( "&s", "SerpentPoints")%repeat( ".", 6) %format( "&s", "HeroPoints");#class {MFv3|Variables};#loopdb @SerpsHeps {@SerpName = %key;@SerpHeps = %val;#loopdb @SerpsPts {#if (@SerpName==%key) {@SerpPts = %val} {}};#loopdb @SerpsCount {#if (@SerpName==%key) {@SerpCount = %val} {}};#sh {%ansi( yellow)@SerpName%repeat( " ", %eval( 25 -%len( @SerpName)))} %ansi( bold, green)%format( "&5.0n", @SerpCount) %ansi( yellow)%format( "&18.0n", @SerpPts) %ansi( bold, cyan)%format( "&16.0n", @SerpHeps)};#loopdb @SerpsCount {#math SerpCountTotal {%number( @SerpCountTotal) + %val}};#loopdb @SerpsHeps {#math SerpHepsTotal {%number( @SerpHEPSTotal) + %val}};#loopdb @SerpsPts {#math SerpPtsTotal {%number( @SerpPtsTotal) + %val}};#show --------------------------------------------------------------------;#show Totals%repeat( " ", 20)%ansi( bold, green)%format( "&5.0n", @SerpCountTotal) %ansi( yellow)%format( "&18.0n", @SerpPtsTotal) %ansi( bold, cyan)%format( "&16.0n", @SerpHEPSTotal);SerpCountTotal= 0;SerpHepsTotal=0;SerpPtsTotal=0;#class 0}
#ALIAS MFv3 {MFDetails;SerpDetails}
#ALIAS MFReset {#class {MFv3|Variables};#var MFType "";#var MFGold 0;#var MFGTemp 0;#var MFHEPS 0;#Var MFHEPSTEMP 0;#var MFsGold "";#var MFsHeps "";#var MFsCount "";#Var MFCount 0;#class 0}
#ALIAS SerpReset {#class {MFv3|Variables};#var SerpCount 0;#var SerpsCount "";#var SerpPts 0;#var SerpPtsTotal 0;#var SerpsPts "";#var SerpHeps 0;#var SerpsHeps "";#var SerpName "";#class 0}
#ALIAS MFv3Reset {MFReset;SerpReset}
#CLASS 0
#CLASS {MFv3|Triggers}
#TRIGGER {^An imp appears and hands you &MFGTemp gold coins for your heroic deeds vs the &MFType!$} {#var MFGold 0;#loopdb {@MFsGold} {#if (@MFType==%key) {MFGold = %val}};#MATH MFGold {%number( %replace( @MFGold, ",")) + %number( %replace( @MFGTemp, ","))};#addkey {MFsGold} {@MFType=@MFGold};#loopdb {@MFsCount} {#if (@MFType==%key) {MFCount = %val}};#MATH MFCount {%number( @MFCount) + 1};#addkey {MFsCount} {@MFType=@MFCount};#var MFGOLD 0;#variable MFCOUNT 0}
#TRIGGER {^The DM bestowed upon you &MFHEPSTEMP hero points for your heroic deeds vs the &MFType!$} {MFHeps=0;#loopdb {@MFsHEPs} {#if (@MFType==%key) {MFHEPS = %val}};#MATH MFHEPS {%number( %replace( @MFHEPS, ",")) + %number( %replace( @MFHEPSTEMP, ","))};#addkey {MFsHEPS} {@MFType=@MFHEPS};#var MFHEPS 0}
#TRIGGER {^The DM bestowed upon you &SERPHEPSTEMP hero points and &SERPPTSTEMP serpent points for your heroic deeds vs the &RoomNum room long &SERPTYPE serpent!$} {SerpHeps = 0;#loopdb {@SerpsHeps} {#if (@SerpType==%key) {SerpHeps = %val}};#MATH SerpHeps {%number( %replace( @SERPHeps, ",")) + %number( %replace( @SERPHEPSTEMP, ","))};#addkey {SerpsHeps} {@SerpType=@SerpHeps};SerpPts = 0;#loopdb {@SerpsPts} {#if (@SerpType==%key) {SerpPts = %val}};#MATH SerpPts {%number( %replace( @SerpPts, ",")) + %number( %replace( @SERPPTSTEMP, ","))};#addkey {SerpsPts} {@SerpType=@SerpPts};SerpCount = 0;#loopdb {@SerpsCount} {#if (@SerpType==%key) {SerpCount = %val}};#MATH SerpCount {%number(@SERPCount) + 1};#addkey {SerpsCount} {@SerpType=@SerpCount}}
#CLASS 0
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net