lbs to kg script
Re: lbs to kg script
Ooh, thanks. Yeah, I should do that - my Zmud folder is a real mess since I haven't been doing that and have been changing and editing scripts on the side.
Re: lbs to kg script
Zmud/Cmud version, thanks to Maeglin for pointing out some issues:
#CLASS {LbstoKg}
#VAR weigh {0}
#VAR weighkg {0}
#VAR carry {0}
#VAR carrykg {0}
#VAR wear {0}
#VAR wearkg {0}
#TRIGGER {and you weigh (%d).(%d) lbs.$} {
#MATH weigh %eval( %float( %1) + %norm( %eval( %2/%float( 10))))
#VAR weighkg {%format( 1, %eval( @weigh*0.454))}
#SUB {and you weigh @weighkg kg.}
}
#TRIGGER {^You are carrying (%d).(%d) lbs} {
#MATH carry %eval( %float( %1) + %norm( %eval( %2/%float( 10))))
#VAR carrykg {%format( 1, %eval( @carry*0.454))}
#SUB {You are carrying @carrykg kg}
}
#TRIGGER {and wearing (%d).(%d) lbs} {
#MATH wear %eval( %float( %1) + %norm( %eval( %2/%float( 10))))
#VAR wearkg {%format( 1, %eval( @wear*0.454))}
#SUB {and wearing @wearkg kg}
}
#CLASS 0
#CLASS {LbstoKg}
#VAR weigh {0}
#VAR weighkg {0}
#VAR carry {0}
#VAR carrykg {0}
#VAR wear {0}
#VAR wearkg {0}
#TRIGGER {and you weigh (%d).(%d) lbs.$} {
#MATH weigh %eval( %float( %1) + %norm( %eval( %2/%float( 10))))
#VAR weighkg {%format( 1, %eval( @weigh*0.454))}
#SUB {and you weigh @weighkg kg.}
}
#TRIGGER {^You are carrying (%d).(%d) lbs} {
#MATH carry %eval( %float( %1) + %norm( %eval( %2/%float( 10))))
#VAR carrykg {%format( 1, %eval( @carry*0.454))}
#SUB {You are carrying @carrykg kg}
}
#TRIGGER {and wearing (%d).(%d) lbs} {
#MATH wear %eval( %float( %1) + %norm( %eval( %2/%float( 10))))
#VAR wearkg {%format( 1, %eval( @wear*0.454))}
#SUB {and wearing @wearkg kg}
}
#CLASS 0
-
- Posts: 1268
- Joined: Fri Feb 05, 2016 6:09 pm
- Location: UK
Re: lbs to kg script
Nice scripts, but what is the point of changing the system? Does it affect anything in the MUD? I have never really been into these aesthetic changes. Unless it does actually have a purpose?
Re: lbs to kg script
No changes like this have any affect on the mud. It's purely for the person reading the text.
Re: lbs to kg script
Thanks everyone. Greatly appreciate it.
Re: lbs to kg script
im getting "fired but did not compile message""
Re: lbs to kg script
That's happened to me with the port code script before, and I could never figure out why. Works just fine on my home computer but never on my laptop. I just tried Naerin's updated script with CMUD, and it seems to be working fine.