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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Jah
Wanderer


Joined: 11 Oct 2000
Posts: 52
Location: Sweden

PostPosted: Fri Aug 04, 2006 10:08 am   

Need help converting a script...
 
Code:
#CLASS {Healthchecker}
#TRIGGER {%s(%d)/(%d)%shit,%s(%d)/(%d)*move (%*)} {#gag;#var move %3;#var movemax %4;#math moveminus (@movemax - @move);#if (@moveminus < 50) {#var moveminus ""};#var name "%5";#if (@name == "the lich of a cadaver") {#var name lich};#if (@name == "the wraith of a giant centipede") {#var name wraith};#if %ismember( @name, @Group) {#noop} {#var Group %additem( @name, @Group)};;Begin bar calculation;#var bars "";#var bar =;#var numbars 50;#math bars {%1 * 50 / %2};#var vamped "";#if (@bars >= 51) {#var bars 50;#var vamped 1};#math spacenum {50 - @bars};#var barspace {%repeat( ".", @spacenum)};#if (@bars < 10) {#var bar %ansi( blink, high, red)%repeat( @bar, @bars)} {#if (@bars < 16) {#var bar %ansi( high, red)%repeat( @bar, @bars)} {#if (@bars < 26) {#var bar %ansi( high, yellow)%repeat( @bar, @bars)} {#if (@bars < 38) {#var bar %ansi( high, green)%repeat( @bar, @bars)} {#if (@bars < 48) {#var bar %ansi( high, green)%repeat( @bar, @bars)} {#if (@bars <= 50) {#if (@vamped==1) {#var bar %ansi( grey)%repeat( @bar, 44)VAMPED} {#var bar %ansi( grey)%repeat( @bar, @bars)}}}}}}};;End bar calculation;#var hp %1;#var maxhp %2;#Var sub %line;#math minus (@hp - @maxhp);#math minusplus (@maxhp - @hp);#if (@minusplus<=0) {#var minusplus 0};#math status (@hp*100/@maxhp);#if (@status<0) {#VAR sub2 @status} {#if (@status<20) {#var sub2 {%ansi( blink, high, red) @status~% @minus}} {#if (@status<31) {#VAR sub2 {%ansi( high, red) @status~% @minus}} {#if (@status<51) {#VAR sub2 {%ansi( high, yellow) @status~% @minus}} {#if (@status<76) {#VAR sub2 {%ansi( high, green) @status~% @minus}} {#if (@status<97) {#VAR sub2 {%ansi( high, green) @status~% @minus}} {#if (@status<1000) {#VAR sub2 ""}}}}}}};#if (@status<599) {#sub {@bar@barspace @name @sub2 %ansi(green)@moveminus}};#if (@status<97) {#addkey healthchecker {@name=@minusplus}};#VAR sub "";#cap group1}
#TRIGGER {$} {#var templist "";#var templist2 "";#var gnum "";#T- Healthchecker;:group: #CLR;#LOOPDB @healthchecker {#VARIABLE templist %concat( @templist, "|", %repeat( "0", 4 - %len( %val)), %val, "=", %key)};#VARIABLE templist %delete( @templist, 1, 1);#VARIABLE templist %sort( @templist, 1);#VARIABLE templist2 %sort( @templist, 1);#FORALL @templist {#add gnum 1;:group: #SHOW F@gnum : %concat( %copy( %i, %pos( "=", %i) + 1, %len( %i) - %pos( "=", %i) + 1), ": -", %number( %copy( %i, 1, %pos( "=", %i) - 1)));#key F@gnum {h %copy( %i, %pos( "=", %i) + 1, %len( %i) - %pos( "=", %i) + 1)}};#Var healthchecker ""}
#TRIGGER {hit, *} {#cap group1;#gag}
#CLASS 0
#CLASS {Healtchecker always on}
#TRIGGER {^Your group consists of:} {#gag;#say --- Sent group output to group1 window. ---;#var group "";#var Gnum 0;#T+ Healthchecker;:group: #clr;:group1: #clr}
#TRIGGER {{{@attack}} {{@} {}
#CLASS 0


Does cmud want trigger like this
Code:
$rank($hp)/($maxhp)%shit,%s($move)/($movemax)*move ($name)


and then using like $hp instead of @hp in script?
I read the post on coverting but it's somewhat unclear to me that doesn't know any programming language, only zscript :P
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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