lbs to kg script

... A place to ask for help on any topic whether it be starting out to player killing to IT issues.
Naerin
Posts: 313
Joined: Sat May 23, 2015 12:29 pm

Re: lbs to kg script

Post by Naerin » Wed Jul 26, 2017 6:20 pm

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.

Naerin
Posts: 313
Joined: Sat May 23, 2015 12:29 pm

Re: lbs to kg script

Post by Naerin » Wed Jul 26, 2017 6:25 pm

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

Firimei Lang
Posts: 1268
Joined: Fri Feb 05, 2016 6:09 pm
Location: UK

Re: lbs to kg script

Post by Firimei Lang » Thu Jul 27, 2017 10:26 am

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?

Brocas
Posts: 419
Joined: Fri Jul 01, 2016 10:08 am
Location: North Carolina

Re: lbs to kg script

Post by Brocas » Thu Jul 27, 2017 10:40 am

No changes like this have any affect on the mud. It's purely for the person reading the text.

Alison
Posts: 821
Joined: Mon Mar 30, 2015 3:09 am
Location: South Africa
Contact:

Re: lbs to kg script

Post by Alison » Thu Jul 27, 2017 2:53 pm

Thanks everyone. Greatly appreciate it.

Alison
Posts: 821
Joined: Mon Mar 30, 2015 3:09 am
Location: South Africa
Contact:

Re: lbs to kg script

Post by Alison » Sun Jul 30, 2017 9:16 am

im getting "fired but did not compile message""

Maeglin
Posts: 76
Joined: Wed Apr 15, 2015 9:47 pm

Re: lbs to kg script

Post by Maeglin » Sun Jul 30, 2017 9:50 am

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.

Post Reply