Go Back   The Palace Avatar Chat Community Forums. > Palace Builders Palace Users > Borg scripts

Borg scripts Use this forum to find or post your cyborg scripts.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-01-2007, 03:55 AM
LJ©'s Avatar
Palace User
 
Join Date: Mar 2007
Location: Brisbane, Australia
Posts: 12
Rep Power: 0
LJ© is on a distinguished road
Icon10 Imperial - Metric Convertor

This script can help clear confusion when chatting with someone on the other side of the world about the weather, etc. e.g When they say its 30*C, do you know what is that in F? or what's 50*F is in C?

Converts from/to Celcius<>Farenheit, Miles/Hr<>Kilometres/Hr, pounds<>kilograms, and miles<>kilometres.

Typing "calc" will send instructions to your message log.

Imperial - Metric Calculator Instructions__________
Simply type in this format...
<number><unit>
e.g. 20*MPH (20 = number, *MPH = unit)
The units are... *C *F *MPH *KPH (*KMH) *lb *kg *mile(s) *km

So when you type "60*MPH" it appears that you said "60 MPH = 96.0 KPH."

*N.B. I take no responsibility for the accuracy of the conversions.
I got a B in maths!
__________________________________________________ _____

;LJ©'s Metric/Imperial Conversion Ver6.99B

; Place this in the OUTCHAT section of your cyborg.ipt
{
"Imperial - Metric Calculator Instructions__________" LOGMSG
"Simply type in this format..." LOGMSG
"<number><unit>" LOGMSG
"e.g. 20*MPH (20 = number, *MPH = unit)" LOGMSG
"The units are... *C *F *MPH *KPH (*KMH) *lb *kg *mile(s) *km" LOGMSG
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^calc$" GREPSTR IF

;Celcius to Farenheit
{
"$1" GREPSUB tempvarc =
tempvarc ATOI 9 * tempcel =
tempcel 5 / cel1 =
tempcel 5 % celdec1 =
cel1 32 + tempfar =
"$1 *C = " GREPSUB tempfar ITOA & "." & celdec1 ITOA & " *F" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]c$" GREPSTR IF
;Farenheit to Celcius
{
"$1" GREPSUB tempvarf =
tempvarf ATOI 32 - tempfar =
tempfar 5 * far1 =
far1 9 / tempcel =
far1 9 % tmpxcel =
"$1 *F = " GREPSUB tempcel ITOA & "." & tmpxcel ITOA & " *C" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]f$" GREPSTR IF
;Kilometres to Miles
{
"$1" GREPSUB tempkm1 =
tempkm1 ATOI 1000 * tempkm2 =
tempkm2 1609 / tempmile =
tempkm2 1609 % tmpmile2 =
"$1 Kilometres = " GREPSUB tempmile ITOA & "." & tmpmile2 ITOA & " Miles" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]km$" GREPSTR IF
;Miles to Kilometres
{
"$1" GREPSUB tempmil1 =
tempmil1 ATOI 1609 * tempmil2 =
tempmil2 1000 / tempkm3 =
tempmil2 1000 % tmpkm3 =
"$1 Miles = " GREPSUB tempkm3 ITOA & "." & tmpkm3 ITOA & " Kilometres" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]mile" GREPSTR IF
;Kilograms to Pounds
{
"$1" GREPSUB tempkg1 =
tempkg1 ATOI 10000 * tempkg2 =
tempkg2 4536 / templb =
tempkg2 4536 % tmplb2 =
"$1 Kilograms = " GREPSUB templb ITOA & "." & tmplb2 ITOA & " Pounds" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]kg$" GREPSTR IF
;Pounds to Kilograms
{
"$1" GREPSUB templb1 =
templb1 ATOI 4536 * templb2 =
templb2 10000 / tempkg3 =
templb2 10000 % tmpkg3 =
"$1 Pounds = " GREPSUB tempkg3 ITOA & "." & tmpkg3 ITOA & " Kilograms" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]lb$" GREPSTR IF

;MPH to KPH
{
"$1" GREPSUB tempmph =
tempmph ATOI 8 * mph1 =
mph1 5 / kph =
mph1 5 % kphdec =
"$1 MPH = " GREPSUB kph ITOA & "." & kphdec ITOA & " KPH" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]mph$" GREPSTR IF

;KPH to MPH
{
"$1" GREPSUB tempkph =
tempkph ATOI 5 * kph1 =
kph1 8 / mph =
kph1 8 % mphdec =
"$1 KPH = " GREPSUB mph ITOA & "." & mphdec ITOA & " MPH" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]kph$" GREPSTR IF
;KPH to MPH
{
"$1" GREPSUB tempkph =
tempkph ATOI 5 * kph1 =
kph1 8 / mph =
kph1 8 % mphdec =
"$1 KPH = " GREPSUB mph ITOA & "." & mphdec ITOA & " MPH" & SAY
"" GREPSUB CHATSTR =
}
CHATSTR LOWERCASE "^(.*)[*]kmh$" GREPSTR IF

;end LJ©'s Metric/Imperial Conversion
Reply With Quote
  #2 (permalink)  
Old 04-02-2007, 12:44 AM
Finna's Avatar
Super Moderator
 
Join Date: Mar 2006
Location: MO, USA
Posts: 55
Rep Power: 6
Finna is on a distinguished road
thank you for both this and the brb script, I have added both of them to my borg and love them
__________________
If all the worlds a stage, who handles the rewrites?
Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


The Latest Posts
Title, Username, & Date Last Post Forum
download
03-21-2011 11:20 AM
by maarten
User Questions
Palace for Mac OS 10.6?
03-13-2011 09:39 AM
by pawnipt
User Questions
Server
03-07-2011 04:52 PM
by satinrose
User Questions
Return room Script
02-24-2011 12:07 AM
by jaela
Room Scripts
Releasing source code
02-17-2011 09:19 AM
by Sman�
Developers Forum
Website spammers
01-26-2011 08:48 PM
by maarten
The Planet: Palace News
Online Users: 58
1 members and 57 guests
VeraFlorsewal
Most users ever online was 1,010, 06-27-2007 at 11:45 PM.
Stats
Members: 5,112
Threads: 1,141
Posts: 4,004
Top Poster: maarten (1,169)
Welcome to our newest member, cliffymayers


All times are GMT +2. The time now is 04:26 PM.


Powered by vBulletin
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0