Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Bartender

Solution ON ENTER { { GLOBAL }[ range menu msgpos lmsg1 lmsg2 lmsg3 lmsg4 barname ]FOREACH
;Storm Palace Hosting Customizable Bar Script
;Made By: 'Star' 'zina' and 'Spyder'
;*******************Customize Below This Line*******************

97 range =
;sets the distance which ordered item lands from you and that you clear when placing order

"@512,243 " msgpos =
;sets the position of the bartenders speech bubbles

"Storm Hosting's Tiki Bar" barname =
"Danny" bartender =
;set the name of the bar and bartender

"For instructions on how to order say 'HELPME'. The instructions will appear in your log!" msg1 =
"Type 'MENU' for a list of things to order." msg2 =
"I hope You enjoy yourself and come back often." msg3 =
;sets the 3 messages which the bartender speaks upon room loading

[
;***Define menu in form: [ "name" propid "$price" "delivery message" ]***
[ "bucket corona" 92279101 "4.99" ]
[ "bud light" 219564532 "2" ]
[ "coors light" 923852290 "2" ]
[ "pepsi" 1312847937 "1.50" ]
[ "coke" -1334594843 "1.50" ]
[ "diet coke" 162907254 "1.50" ]
[ "sprite" 164266576 "1.50" ]
[ "margarita" -1465527479 "2.50" ]
[ "strawberry rita" -1679124801 "2.50" ]
[ "martini" -60769996 "3" ]
[ "sex on the beach" -339691738 "3" ]
[ "shirley temple" -80851035 "3" ]
[ "red wine" 869824728 "4" ]
[ "white wine" -1546664220 "5" ]
[ "jack daniels" 1252658040 "6" ]
[ "whiskey" -1832121346 "4" ]
[ "tiquila" Tequila "4" ]
[ "jello shots" -1233651429 "3.50" ]
[ "fish & chips" -1982652552 "6" ]
[ "nachos" 2023742060 "4.25" ]
[ "bar nuts" 1896716922 "1" ]
[ "pizza" -1496177140 "8" ]
[ "hamburger" -1591295600 "4.75" ]
] menu =
;end of menu
;******************Customize Above This Line******************
"Welcome to " barname & ". I'm " & bartender & ", your bartender. " & msg4 =
msgpos msg1 & lmsg1= msgpos msg2 & lmsg2= msgpos msg3 & lmsg3= msgpos msg4 & lmsg4=
}

ON OUTCHAT
{ { GLOBAL }[ menu range ]FOREACH
{ "Instructions are in your log." LOCALMSG
{ LOGMSG }[
"*******************************************************"
"To see a list of what is available to order say 'menu'."
"To order an item from the list say 'order <item>'."
"To order an item for someone else whisper 'order <item>' to them."
"*******************************************************"
]FOREACH
"" CHATSTR =
} CHATSTR "helpme" == IF
{ "The items you can order are in your log." LOCALMSG
barname GLOBAL
"**********" barname & " Menu**********" & LOGMSG
{ item =
item 0 GET " - $" & item 2 GET & LOGMSG
} menu FOREACH
"**********" barname & " Menu**********" & LOGMSG
"" CHATSTR =
} CHATSTR "menu" == IF
{ 1 ME SETSPOTSTATE
60 DELAY
0 validorder =
{ WHOTARGET } { WHOME } WHOTARGET IFELSE WHOPOS y = x =
{ range x += } { range x -= } x ROOMWIDTH < IFELSE
{ temparray =
{ 1 validorder =
{ range 110 + crange =
WHOME WHOPOS my = mx =
my crange - ymin = my crange + ymax =
mx crange - xmin = mx crange + xmax =
i LOOSEPROPPOS py = px =
{i REMOVELOOSEPROP} py ymin >= py ymax <= AND
px xmin >= px xmax <= AND AND IF
i++}{ i NBRLOOSEPROPS <} WHILE
temparray 1 GET x y ADDLOOSEPROP
{ msgpos DUP GLOBAL WHOTARGET WHONAME & ", " & USERNAME & " bought you a $1!" GREPSUB & ROOMMSG }
{ msgpos DUP GLOBAL USERNAME & ", here's your $1." GREPSUB & ROOMMSG } WHOTARGET IFELSE
} "$1" GREPSUB temparray 0 GET == IF
} menu FOREACH
{ msgpos DUP GLOBAL USERNAME & ", we don't have any $1 here. Say 'menu' to get a list of items you can order." GREPSUB & LOCALMSG
} 0 validorder == IF
"" CHATSTR =
} CHATSTR "^order (.*)$" GREPSTR IF
}
ON ROOMLOAD {
{ lmsg4 DUP GLOBAL LOCALMSG }150 ALARMEXEC
{ lmsg1 DUP GLOBAL LOCALMSG }600 ALARMEXEC
{ lmsg2 DUP GLOBAL LOCALMSG }1300 ALARMEXEC
{ lmsg3 DUP GLOBAL LOCALMSG }1700 ALARMEXEC
}
 
Was this article helpful? yes / no
Article details
Article ID: 367
Category: Room Scripts
Date added: 01-30-2015 04:53:44
Views: 1192
Rating (Votes): Article rated 5.0/5.0 (1)

 
<< Go back

Powered by Help Desk Software HESK™