StatBars and Wounding

by Unknown

Back to Mechanic's Corner.

Unknown2005-09-19 01:50:55
Was looking at some code that Dagnev or whatever wrote in the the afflictions post in combat http://lusternia.ire-community.com/index.p...indpost&p=22838. I for one have a long history of graphical RPGs so I cannot continue playing for long without a map (thanks Thorgal!) and some fancy bars. So I changed the codes so most everyone can use it and made it so there is prompt tracking.

CODE
#CLASS {Status}
#VAR currentsize {15}
#VAR totalgold {38856}
#VAR currenthealth {768}
#VAR currentmana {524}
#VAR currentego {524}
#VAR currentpower {0}
#VAR maxmana {2335}
#VAR currentstr {21}
#VAR currentdex {8}
#VAR currentCon {16}
#VAR Currentcredits {122}
#VAR currentrank {173}
#VAR currentlevel {55}
#VAR currentTNL {17}
#VAR currentCha {16}
#VAR Currentlessons {47}
#VAR currentendurance {2740}
#VAR currentwillpower {1660}
#VAR maxhealth {3160}
#VAR currentint {11}
#TRIGGER {Health : (%d)/(%d) Endurance : (%d)/(%d)} {#VAR maxhealth %2;#var maxendurance %4}
#TRIGGER {Mana : (%d)/(%d) Willpower : (%d)/(%d)} {#VAR maxmana %2;#var maxwillpower %4}
#TRIGGER {  Strength     : (%d)   Dexterity : (%d)  Constitution : (%d)} {currentstr=%1;currentdex=%2;currentCon=%3}
#TRIGGER {  Intelligence :  (%d)   Size      : (%d)  Charisma     : (%d)} {currentint=%1;currentsize=%2;currentCha=%3}
#TRIGGER {You currently possess (%d) lessons, (%d) Credits.} {Currentlessons=%1;Currentcredits=%2}
#TRIGGER {You are ranked (%d){th|rd|st|nd} in Lusternia} {currentrank=%1}
#TRIGGER {Level : (%d) ~((%d)~%~)} {currentlevel=%1;currentTNL=%2}
#TRIGGER {(%d) gold sovereigns.} {totalgold=%1}
#TRIGGER {(*)h, (*)m, (*)e, (*)p, (*)en, (*)w (*)-} {currenthealth=%1;currentmana=%2;currentego=%3;currentpower=%4;currentendurance=%5;currentwillpower=%6} "" {nocr|prompt}
#BUTTON 39 {wounds} {} {} {} {} {} {Lusternia\\BodyScan.bmp} {Size} {146} {227} {Pos} {350} {0} {8} {} {} {} "" {Inset|Top} {} {} {2}
#BUTTON 41 {Kullian} {} {} {} {} {} {} {Size} {119} {21} {Pos} {0} {0} {12} {} {} {} "" {} {} {} {2}
#BUTTON 42 {Str: @currentStr} {} {} {} {} {} {} {Size} {35} {23} {Pos} {20} {0} {31} {} {} {} "" {} {} {} {2}
#BUTTON 43 {Int: @currentInt} {} {} {} {} {} {} {Size} {35} {23} {Pos} {42} {0} {31} {} {} {} "" {} {} {} {2}
#BUTTON 44 {Con: @currentCon} {} {} {} {} {} {} {Size} {42} {23} {Pos} {20} {77} {31} {} {} {} "" {} {} {} {2}
#BUTTON 45 {Cha: @currentCha} {} {} {} {} {} {} {Size} {42} {23} {Pos} {42} {77} {31} {} {} {} "" {} {} {} {2}
#BUTTON 46 {Size: @currentSize} {} {} {} {} {} {} {Size} {45} {23} {Pos} {42} {33} {31} {} {} {} "" {} {} {} {2}
#BUTTON 47 {Dex: @currentDex} {} {} {} {} {} {} {Size} {45} {23} {Pos} {20} {33} {31} {} {} {} "" {} {} {} {2}
#BUTTON 48 {@currentLessons lessons, @currentcredits credits} {} {} {} {} {} {} {Size} {120} {23} {Pos} {64} {0} {9} {} {} {} "" {} {} {} {2}
#BUTTON 49 {Level: @currentLevel} {} {} {} {} {} {} {Size} {64} {23} {Pos} {86} {0} {12} {} {} {} "" {} {} {} {2}
#BUTTON 50 {Rank: @currentRank} {} {} {} {} {} {} {Size} {57} {23} {Pos} {86} {63} {12} {} {} {} "" {} {} {} {2}
#BUTTON 53 {Gold: @totalGold} {} {} {} {} {} {} {Size} {120} {27} {Pos} {108} {0} {6} {} {} {} "" {} {} {} {2}
#BUTTON 54 {H : @currenthealth/@maxhealth} {} {} {} {@currenthealth} {} {} {} {} {} {} {} {} {32832} {} {Gauge||7|@maxhealth|@maxhealth-@currenthealth|7} {} "" {Explore|Inset} {} {}
#BUTTON 55 {M : @currentmana/@maxmana} {} {} {} {@currentmana} {} {} {} {} {} {} {} {} {32784} {} {Gauge||7|@maxmana|@maxmana-@currentmana|7} {} "" {Explore|Inset} {} {}
#BUTTON 56 {E : @currentendurance/@maxendurance} {} {} {} {@currentendurance} {} {} {} {} {} {} {} {} {32864} {} {Gauge||7|@maxendurance|@maxendurance-@currentendurance|7} {} "" {Explore|Inset} {} {}
#CLASS 0

#CLASS {Status|bodypart damage} {enable}
#ALIAS puer {chant puer @limbheal;#T+ limbhealing}
#VAR limbheal {none} {none}
#VAR headwounds {100}
#VAR chestwounds {100}
#VAR gutwounds {100}
#VAR rightlegwounds {100}
#VAR leftlegwounds {100}
#VAR leftarmwounds {100}
#VAR rightarmwounds {100}
#TRIGGER {Your wound status is:} {#T+ wounds}
#TRIGGER "limbhealing" {As you chant the ritual of Puer over your (*), you feel your skin} {#IF ("%1"="head") {#ADD headwounds 46};#IF ("%1"="chest") {#ADD chestwounds 46};#IF ("%1"="gut") {#ADD gutwounds 46};#IF ("%1"="left arm") {#ADD leftarmwounds 46};#IF ("%1"="right arm") {#ADD rightarmwounds 46};#IF ("%1"="left leg") {#ADD leftlegwounds 46};#IF ("%1"="right leg") {#ADD rightlegwounds 46};#IF @headwounds>100 {headwounds=100};#IF @chestwounds>100 {chestwounds=100};#IF @gutwounds>100 {gutwounds=100};#IF @leftarmwounds>100 {leftarmwounds=100};#IF @rightarmwounds>100 {rightarmwounds=100};#IF @leftlegwounds>100 {leftlegwounds=100};#IF @rightlegwounds>100 {rightlegwounds=100};limbheal=none;#T- limbhealing} "" {disable}
#TRIGGER {*|*|*~(%1~)*|*|*Gut*} {chestwounds=%1;#T- wounds}
#TRIGGER {*~(%1~)*~(%2~)*Larm} {rightarmwounds=%1;leftarmwounds=%2;#T- wounds}
#TRIGGER {*|*|*~(%1~)*|*|*Rarm} {gutwounds=%1;#T- wounds}
#BUTTON 4 {@headwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {355} {57} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#BUTTON 5 {@chestwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {400} {57} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#BUTTON 6 {@rightlegwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {504} {14} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#BUTTON 7 {@leftlegwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {504} {94} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#BUTTON 8 {@rightarmwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {422} {3} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#BUTTON 9 {@leftarmwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {422} {110} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#BUTTON 10 {@gutwounds} {} {} {} {} {} {} {Size} {35} {20} {Pos} {444} {57} {15} {} {} {} "" {Top} {} {bodypart damage} {2}
#CLASS 0


Just google for bodyscan and insert, and change the name button to your name (or make it update for your multi-chars). Fiddle with the spacing in the stats if it doesn't update after typing stat and score.