Advertisement
Maespark

OpenEasyUO - Event House Master Script

Jun 13th, 2019
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.82 KB | None | 0 0
  1. dofile(getinstalldir().."Scripts/Kal In Ex/KalLib.lua")
  2. dofile(getinstalldir().."Scripts/STUBY085/JournalToLower.txt")
  3.  
  4. --[[
  5. Title: Trivia Event Macro
  6. Author: Maelune
  7.  
  8.  
  9. <<Trivia>>
  10. Requirements: Must be located on the 3rd floor of the Event House in the room with the Green and Red squares
  11. (North side)
  12.  
  13. Instructions: Start the script. Once all players have arrived and are on screen, click the "Populate" button.
  14. Once the game has begun, do not click the Populate button again - it will cause scores to be wiped.
  15. Clicking Red or Green will give points to the square of the same color within the Event House.
  16.  
  17. Notes: This script will not pick up individuals wearing disguises/forms, or those who are hidden.
  18. Make sure that it is clear when you begin that all players must remain visible and unmorphed!
  19.  
  20.  
  21. <<Sorry!>>
  22. Requirements: Must have a Sorry! board and some friends to play with!
  23.  
  24. Instructions: > below the instructions block, locate "proctor =" and replace the name with that of your character.
  25. > start the script. Once all players have arrived, click the "Populate" button.
  26. > click the "Shuffle Cards" button
  27. > explain to players how to "draw a card"
  28. > click the "Deal Cards" button
  29. > now if any player besides yourself says, "draw a card", "Draw a card", or "DRAW A CARD"
  30. you will respond in the form of an emote with the card they have chosen.
  31. > once the Sorry! game has finished, you must emote "Puts cards away" to end the game.
  32.  
  33. Notes: If the proctor says, "Draw a card" the card drawn will simply be deleted from this deck and will re-appear
  34. in the deck once shuffled. You should explain how to "Draw a card" to the players before you start the macro.
  35.  
  36. Saying something at the exact moment when a player says "Draw a card" can potentially cause their card
  37. to be ignored. The window where this is possible is incredibly small (microseconds). Just be aware of it.
  38. ]]--
  39. --[[
  40. <<UO Life!>>
  41. Requirements: Be at the Life Board on the Event House roof, have some friends!
  42.  
  43. Instructions: > below the instructions block, locate "proctor =" and replace the name with that of your character.
  44. > start the script. Once all players have arrived, click the "Populate" button.
  45. > Explain the 3 commands for Life, "Spin the wheel", "Draw a trade", and "Draw an action"
  46. > click the "Start Life!" button
  47. > Emote, "Puts cards away" to end the game - this must be done by the proctor
  48.  
  49. Notes: If the proctor says, "Draw a card" the card drawn will simply be deleted from this deck and will re-appear
  50. in the deck once shuffled.
  51.  
  52. Saying something at the exact moment when a player says a command phrase can potentially cause their card
  53. to be ignored. The window where this is possible is incredibly small (microseconds). Just be aware of it.
  54. ]]--
  55. proctor = "Maelune"
  56. --Party Maker
  57. function ClientMenu()
  58. if UO.CliCnt > 1 then
  59. local timer = 0
  60.  
  61. local sForm = Obj.Create("TForm")
  62. sForm.Caption = "Kali's Party Builder"
  63. sForm.Font.Color = 255
  64. sForm._ = {Height = 100+30*UO.CliCnt, Width = 160, Color = 0, FormStyle = 3}
  65. sForm.OnClose = function() Obj.Exit() return end
  66.  
  67. local sLabel = Obj.Create("TLabel")
  68. sLabel.Caption = "Choose Master Client"
  69. sLabel._ = {Height = 25, Width = 100, Top = 20, Left = 23, Parent = sForm}
  70.  
  71. local sButton = {}
  72. for i = 1, UO.CliCnt do
  73. UO.CliNr = i
  74. wait(100)
  75. UO.Macro(8,2)
  76. timer = getticks()
  77. while UO.ContName ~= "status gump" and UO.ContName ~= "MainMenu gump" do
  78. wait(100)
  79. if (getticks() - timer) > 1000 then
  80. UO.Macro(8,2)
  81. end
  82. end
  83. sButton[i] = Obj.Create("TButton")
  84. sButton[i].Caption = tostring(UO.CliNr.." - "..UO.CharName)
  85. sButton[i].Top = 30 + 30*i
  86. sButton[i]._ = {Height = 25, Width = 100, Left = 25, Parent = sForm}
  87. sButton[i].OnClick = function()
  88. UO.CliNr = i
  89. Obj.Exit()
  90. end
  91. end
  92. sForm.Show()
  93. Obj.Loop()
  94. sForm.Hide()
  95.  
  96. for k,v in pairs(sButton) do
  97. Obj.Free(v)
  98. end
  99. Obj.Free(sLabel)
  100. Obj.Free(sForm)
  101. end
  102. return
  103. end
  104.  
  105. ClientMenu()
  106. -- //PartyMaker
  107.  
  108.  
  109. -- Defines public variables
  110. names = {}
  111. players = {}
  112. nscores = {}
  113. scores = {}
  114. myjournal = 0
  115. i = 1
  116. types = {605,606,607,608,400,401,402,403,666,667,694,695}
  117. round = 0
  118. deck = {}
  119. lifeDeck = {}
  120. JRsearch = nil
  121.  
  122. --Populate
  123. function Populate()
  124. t = ScanItems(true,{Type = types}) --Scans for all player types
  125.  
  126. --Populates players table with found players on the screen, sets all player scores to 0
  127. for i=1,#t do
  128. players[i] = t[i]
  129. scores[i] = 0
  130. wait(100)
  131. end
  132. for i=1,45 do
  133. deck[i] = i
  134. end
  135. for i=1,59 do
  136. lifeDeck[i] = i
  137. end
  138. DeckShuffle(lifeDeck)
  139. end
  140. --/Populate
  141.  
  142. --Sorry!
  143. function DeckShuffle(hand)
  144. size = #hand
  145. for i = size, 1, -1 do
  146. local rand = math.random(size)
  147. hand[i], hand[rand] = hand[rand], hand[i]
  148. end
  149. return hand
  150. end
  151.  
  152. function Deck()
  153. DeckShuffle(deck)
  154. end
  155.  
  156. function FindJournal()
  157. local i = 1
  158.  
  159. while true do
  160. newJournal = journal:new()
  161. wait(150)
  162. local findJournal = newJournal:find("draw a card","Draw a card","DRAW A CARD",proctor..": *Puts cards away*")
  163. if findJournal == 1 or findJournal == 2 or findJournal == 3 then
  164. print(findJournal)
  165. if deck[i] == 1 then UO.Macro(2,0,"Move Forward One, or Move a Pawn From Start")
  166. elseif deck[i] == 2 then UO.Macro(2,0,"Move Forward One, or Move a Pawn From Start")
  167. elseif deck[i] == 3 then UO.Macro(2,0,"Move Forward One, or Move a Pawn From Start")
  168. elseif deck[i] == 4 then UO.Macro(2,0,"Move Forward One, or Move a Pawn From Start")
  169. elseif deck[i] == 5 then UO.Macro(2,0,"Move Forward One, or Move a Pawn From Start")
  170. elseif deck[i] == 6 then UO.Macro(2,0,"Move Forward Two, or Move a Pawn From Start")
  171. elseif deck[i] == 7 then UO.Macro(2,0,"Move Forward Two, or Move a Pawn From Start")
  172. elseif deck[i] == 8 then UO.Macro(2,0,"Move Forward Two, or Move a Pawn From Start")
  173. elseif deck[i] == 9 then UO.Macro(2,0,"Move Forward Two, or Move a Pawn From Start")
  174. elseif deck[i] == 10 then UO.Macro(2,0,"Move Forward Three")
  175. elseif deck[i] == 11 then UO.Macro(2,0,"Move Forward Three")
  176. elseif deck[i] == 12 then UO.Macro(2,0,"Move Forward Three")
  177. elseif deck[i] == 13 then UO.Macro(2,0,"Move Forward Three")
  178. elseif deck[i] == 14 then UO.Macro(2,0,"Move Backward Four")
  179. elseif deck[i] == 15 then UO.Macro(2,0,"Move Backward Four")
  180. elseif deck[i] == 16 then UO.Macro(2,0,"Move Backward Four")
  181. elseif deck[i] == 17 then UO.Macro(2,0,"Move Backward Four")
  182. elseif deck[i] == 18 then UO.Macro(2,0,"Move Forward Five")
  183. elseif deck[i] == 19 then UO.Macro(2,0,"Move Forward Five")
  184. elseif deck[i] == 20 then UO.Macro(2,0,"Move Forward Five")
  185. elseif deck[i] == 21 then UO.Macro(2,0,"Move Forward Five")
  186. elseif deck[i] == 22 then UO.Macro(2,0,"Move Forward Seven, or Split Between Two Pawns")
  187. elseif deck[i] == 23 then UO.Macro(2,0,"Move Forward Seven, or Split Between Two Pawns")
  188. elseif deck[i] == 24 then UO.Macro(2,0,"Move Forward Seven, or Split Between Two Pawns")
  189. elseif deck[i] == 25 then UO.Macro(2,0,"Move Forward Seven, or Split Between Two Pawns")
  190. elseif deck[i] == 26 then UO.Macro(2,0,"Move Forward Eight")
  191. elseif deck[i] == 27 then UO.Macro(2,0,"Move Forward Eight")
  192. elseif deck[i] == 28 then UO.Macro(2,0,"Move Forward Eight")
  193. elseif deck[i] == 29 then UO.Macro(2,0,"Move Forward Eight")
  194. elseif deck[i] == 30 then UO.Macro(2,0,"Move Forward Ten, or Move Backward One")
  195. elseif deck[i] == 31 then UO.Macro(2,0,"Move Forward Ten, or Move Backward One")
  196. elseif deck[i] == 32 then UO.Macro(2,0,"Move Forward Ten, or Move Backward One")
  197. elseif deck[i] == 33 then UO.Macro(2,0,"Move Forward Ten, or Move Backward One")
  198. elseif deck[i] == 34 then UO.Macro(2,0,"Move Forward Eleven, or Switch Places With An Opponent")
  199. elseif deck[i] == 35 then UO.Macro(2,0,"Move Forward Eleven, or Switch Places With An Opponent")
  200. elseif deck[i] == 36 then UO.Macro(2,0,"Move Forward Eleven, or Switch Places With An Opponent")
  201. elseif deck[i] == 37 then UO.Macro(2,0,"Move Forward Eleven, or Switch Places With An Opponent")
  202. elseif deck[i] == 38 then UO.Macro(2,0,"Move Forward Twelve")
  203. elseif deck[i] == 39 then UO.Macro(2,0,"Move Forward Twelve")
  204. elseif deck[i] == 40 then UO.Macro(2,0,"Move Forward Twelve")
  205. elseif deck[i] == 41 then UO.Macro(2,0,"Move Forward Twelve")
  206. elseif deck[i] == 42 then UO.Macro(2,0,"Sorry!")
  207. elseif deck[i] == 43 then UO.Macro(2,0,"Sorry!")
  208. elseif deck[i] == 44 then UO.Macro(2,0,"Sorry!")
  209. elseif deck[i] == 45 then UO.Macro(2,0,"Sorry!")
  210. end
  211. --findJournal = findJournal:clear()
  212. wait(500)
  213. i = i + 1
  214. --print(i)
  215. wait(100)
  216. if i == 46 then
  217. UO.Macro(2,0,"Shuffles the deck...")
  218. i = 1
  219. DeckShuffle(deck)
  220. end
  221. --wait(150)
  222. --findJournal:clear()
  223.  
  224. elseif findJournal == 4 then
  225. print("Escape!")
  226. wait(150)
  227. do return end
  228. end
  229. end
  230. --wait(50)
  231. --FindJournal()
  232. end
  233.  
  234. --/Sorry!
  235.  
  236.  
  237.  
  238. --RedScores
  239. function RedScores()
  240. t = ScanItems(true,{Type = types})--Rescans nearby players
  241. round = round + 1
  242.  
  243. --Populates players table with updated location data
  244. for b=1,#players do
  245. for c=1,#players do
  246. if players[c].Name == t[c].Name then
  247. players[c] = t[c]
  248. end
  249. end
  250. end
  251.  
  252. --Determines if players get points based on X location
  253. for b=1,#players do
  254. if players[b].X > 3053 and players[b].X < 3058 then
  255. --print(players[b].Name)
  256. scores[b] = scores[b] + 1
  257. end
  258. print(players[b].Name.."'s score is now: "..scores[b])
  259. end
  260. print("-------------------------Round:"..round.."-------------------------")
  261. end
  262. --/RedScores
  263.  
  264. --GreenScores
  265. function GreenScores()
  266. t = ScanItems(true,{Type = types})--Rescans nearby players
  267. round = round + 1
  268.  
  269. --Populates players table with updated location data
  270. for b=1,#players do
  271. for c=1,#players do
  272. if players[c].Name == t[c].Name then
  273. players[c] = t[c]
  274. end
  275. end
  276. end
  277.  
  278. --Determines if players get points based on X location
  279. for b=1,#players do
  280. if players[b].X > 3045 and players[b].X < 3051 then
  281. --print(players[b].Name)
  282. scores[b] = scores[b] + 1
  283. end
  284. print(players[b].Name.."'s score is now: "..scores[b])
  285. end
  286. print("-------------------------Round:"..round.."-------------------------")
  287. end
  288. --/GreenScores
  289.  
  290. function StartLife()
  291. for i=1,#players do
  292. if not string.find(players[i].Name,proctor) then
  293. local prof = nil
  294. local k = math.random(1,6)
  295. if k == 1 then
  296. prof = "Blacksmith"
  297. elseif k == 2 then
  298. prof = "Carpenter"
  299. elseif k == 3 then
  300. prof = "Miner"
  301. elseif k == 4 then
  302. prof = "Tailor"
  303. elseif k == 5 then
  304. prof = "Tinker"
  305. elseif k == 6 then
  306. prof = "Lumberjack"
  307. end
  308. UO.Macro(2,0,players[i].Name.." is a "..prof.."!")
  309. wait(500)
  310. end
  311. end
  312. Life()
  313. end
  314.  
  315. function Life()
  316. local i = 1
  317. --print(string.lower(proctor..": *puts cards away*"))
  318. while true do
  319. Journal.Mark()
  320. wait(500)
  321. spinTheWheel = nil
  322. drawAction = nil
  323. drawTrade = nil
  324. local k = nil
  325. repeat
  326. spinTheWheel = journalsearch("spin the wheel","draw an action","draw a trade",(string.lower(proctor)..": "..".*puts cards away.*"))
  327. until spinTheWheel ~= nil
  328. print(spinTheWheel)
  329. if spinTheWheel == "spin the wheel" then
  330. k = math.random(1,15)
  331. if k == 1 then
  332. UO.Macro(2,0,"Move forward one!")
  333. elseif k == 2 then
  334. UO.Macro(2,0,"Move forward two!")
  335. elseif k == 3 then
  336. UO.Macro(2,0,"Move forward three!")
  337. elseif k == 4 then
  338. UO.Macro(2,0,"Move forward four!")
  339. elseif k == 5 then
  340. UO.Macro(2,0,"Move forward five!")
  341. elseif k == 6 then
  342. UO.Macro(2,0,"Move forward six!")
  343. elseif k == 7 then
  344. UO.Macro(2,0,"You've been skipped!")
  345. elseif k == 8 then
  346. UO.Macro(2,0,"Move backward one!")
  347. elseif k == 9 then
  348. UO.Macro(2,0,"Move backward two!")
  349. elseif k == 10 then
  350. UO.Macro(2,0,"Move backward three!")
  351. elseif k == 11 then
  352. UO.Macro(2,0,"Move backward four!")
  353. elseif k == 12 then
  354. UO.Macro(2,0,"Move backward five!")
  355. elseif k == 13 then
  356. UO.Macro(2,0,"Move backward six!")
  357. elseif k == 14 then
  358. UO.Macro(2,0,"WILD! Move 1 to 6 spaces!")
  359. elseif k == 15 then
  360. UO.Macro(2,0,"Skip a player card!")
  361. end
  362. elseif spinTheWheel == "draw an action" then
  363. if lifeDeck[i] == 1 then
  364. UO.Macro(2,0,"Win a “beautiful Big Head” Contest! Tell everyone why you should win this award.")
  365. wait(500)
  366. UO.Macro(2,0,"Collect 40k from the bank.")
  367. elseif lifeDeck[i] == 2 then
  368. UO.Macro(2,0,"Win a “Good Samaritan of The Year” Award! Tell Everyone Thank You.")
  369. wait(500)
  370. UO.Macro(2,0,"Collect 40k from the bank.")
  371. elseif lifeDeck[i] == 3 then
  372. UO.Macro(2,0,"Win a “LAWSUIT! Sue another player for steeling your pickaxe! Choose a player to sue")
  373. wait(500)
  374. UO.Macro(2,0,"Collect 20k from that player.")
  375. elseif lifeDeck[i] == 4 then
  376. UO.Macro(2,0,"Write a Book of Poems! Tell everyone what it’s about.")
  377. wait(500)
  378. UO.Macro(2,0,"Collect 40k from the bank.")
  379. elseif lifeDeck[i] == 5 then
  380. UO.Macro(2,0,"Set up a school of your choice! (related UOEvo). Everyone wants to go there!")
  381. wait(500)
  382. UO.Macro(2,0,"Collect 40k from the bank.")
  383. elseif lifeDeck[i] == 6 then
  384. UO.Macro(2,0,"Make your yard a maze.")
  385. wait(500)
  386. UO.Macro(2,0," Pay the bank 30k.")
  387. elseif lifeDeck[i] == 7 then
  388. UO.Macro(2,0,"Buy an Armor Set! Looking Good!")
  389. wait(500)
  390. UO.Macro(2,0,"Pay the bank 30k.")
  391. elseif lifeDeck[i] == 8 then
  392. UO.Macro(2,0,"LAWSUIT! Sue another player for squashing your prized Tomatoes! Choose a player to sue.")
  393. wait(500)
  394. UO.Macro(2,0,"Collect 50k from that player")
  395. elseif lifeDeck[i] == 9 then
  396. UO.Macro(2,0,"Get a Vendor!")
  397. wait(500)
  398. UO.Macro(2,0,"Pay the bank 50k")
  399. elseif lifeDeck[i] == 10 then
  400. UO.Macro(2,0,"Buy a tropical aquarium! Name your Fish.")
  401. wait(500)
  402. UO.Macro(2,0,"Pay the bank 20k.")
  403. elseif lifeDeck[i] == 11 then
  404. UO.Macro(2,0,"Run a marathon! Pick an opponent. Both show off your warm-up moves, and draw.")
  405. wait(500)
  406. UO.Macro(2,0,"The bank pays the player with the highest card 100k for their natural athleticism.")
  407. elseif lifeDeck[i] == 12 then
  408. UO.Macro(2,0,"IT’s a dance competition! Pick an opponent. Both show your dance moves and spin.")
  409. wait(500)
  410. UO.Macro(2,0,"The bank pays the player with the highest card 50k for their smooth moves.")
  411. elseif lifeDeck[i] == 13 then
  412. UO.Macro(2,0,"Sell flowers from your garden! Name your favorite flower.")
  413. wait(500)
  414. UO.Macro(2,0,"Collect 70k from the bank")
  415. elseif lifeDeck[i] == 14 then
  416. UO.Macro(2,0,"Sell ingots from your vendor! Name the type of metal you are selling.")
  417. wait(500)
  418. UO.Macro(2,0,"Collect 100k from the bank.")
  419. elseif lifeDeck[i] == 15 then
  420. UO.Macro(2,0,"Sell potions from your Vendor! Name what potion you are selling.")
  421. wait(500)
  422. UO.Macro(2,0,"Draw from the deck, collect 10k multiplied by the number you drew.")
  423. elseif lifeDeck[i] == 16 then
  424. UO.Macro(2,0,"Win a “Sell Tools from your vendor! Name the tool and whoever has that trade...")
  425. wait(500)
  426. UO.Macro(2,0,"Draw from the deck, collect 10k multiplied by the number you drew.")
  427. elseif lifeDeck[i] == 17 then
  428. UO.Macro(2,0,"Sell a full set of Clothing to a player of your choice!")
  429. wait(500)
  430. UO.Macro(2,0,"Collect 5k from that player.")
  431. elseif lifeDeck[i] == 18 then
  432. UO.Macro(2,0,"Business has been booming! You sell 20 Swords of exceptional quality.")
  433. wait(500)
  434. UO.Macro(2,0,"Pick a player and collect 100k.")
  435. elseif lifeDeck[i] == 19 then
  436. UO.Macro(2,0,"You trace your family tree... You are a descendent of royalty!")
  437. wait(500)
  438. UO.Macro(2,0,"Collect 70k from the bank.")
  439. elseif lifeDeck[i] == 20 then
  440. UO.Macro(2,0,"Time for the pet show! Your pet goat gets first place ribbon. Tell everyone its name.")
  441. wait(500)
  442. UO.Macro(2,0,"Collect 120k from the bank.")
  443. elseif lifeDeck[i] == 21 then
  444. UO.Macro(2,0,"Bake a cake for a big event! Pick a player and both describe your dream cake.")
  445. wait(500)
  446. UO.Macro(2,0,"Draw a card and whoever has the highest card collects 70k from bank.")
  447. elseif lifeDeck[i] == 22 then
  448. UO.Macro(2,0,"Give Gold to an animal rescue! Name your favorite animal")
  449. wait(500)
  450. UO.Macro(2,0,"Pay the bank 20k.")
  451. elseif lifeDeck[i] == 23 then
  452. UO.Macro(2,0,"Buy a Portrait? Tell everyone what it looks like.")
  453. wait(500)
  454. UO.Macro(2,0,"Pay the bank 50k.")
  455. elseif lifeDeck[i] == 24 then
  456. UO.Macro(2,0,"Start a worm farm! Worms are our future.")
  457. wait(500)
  458. UO.Macro(2,0,"Pay the bank 50k.")
  459. elseif lifeDeck[i] == 25 then
  460. UO.Macro(2,0,"Payday!!!")
  461. wait(500)
  462. UO.Macro(2,0,"Collect your paycheck from the bank.")
  463. elseif lifeDeck[i] == 26 then
  464. UO.Macro(2,0,"It’s Great Uncle Mealune’s 100th birthday! Tell us something funny about him.")
  465. wait(500)
  466. UO.Macro(2,0,"Buy him a present - pay the bank 30k.")
  467. elseif lifeDeck[i] == 27 then
  468. UO.Macro(2,0,"Invent a dance move! Pick a player and both draw a card.")
  469. wait(500)
  470. UO.Macro(2,0,"The bank pays the highest card winner 100k.")
  471. elseif lifeDeck[i] == 28 then
  472. UO.Macro(2,0,"Fired for sneaking your Dragon into work! Go to your trade tile and skip your turn.")
  473. wait(500)
  474. UO.Macro(2,0,"Next turn, draw a new trade card.")
  475. elseif lifeDeck[i] == 29 then
  476. UO.Macro(2,0,"Go fishing! Pick a player and both draw a card.")
  477. wait(500)
  478. UO.Macro(2,0," Whoever has the biggest number the bank pays their card x 10k")
  479. elseif lifeDeck[i] == 30 then
  480. UO.Macro(2,0,"Fired for sleeping on the job! Go to your trade tile and skip your turn.")
  481. wait(500)
  482. UO.Macro(2,0,"Next turn, draw a new trade card.")
  483. elseif lifeDeck[i] == 31 then
  484. UO.Macro(2,0,"Cook the perfect Pig! All players name their favorite part of the pig.")
  485. wait(500)
  486. UO.Macro(2,0,"Each player draws. 4 and up earns 30k. 3 and under loses 30k.")
  487. elseif lifeDeck[i] == 32 then
  488. UO.Macro(2,0,"Happy New Year! Everyone make a Evo resolution and draw a card.")
  489. wait(500)
  490. UO.Macro(2,0,"1-2 get 50k, 3-4 get 80k, and 5-6 get 100k from the bank.")
  491. elseif lifeDeck[i] == 33 then
  492. UO.Macro(2,0,"The dizzy spinners Event! Draw a card and see how dizzy you can get.")
  493. wait(500)
  494. UO.Macro(2,0,"1-3 gets 50k and 4-6 get 100k from the bank.")
  495. elseif lifeDeck[i] == 34 then
  496. UO.Macro(2,0,"Go Dolphin-Watching for a day! Describe your perfect Dolphin experience. ")
  497. wait(500)
  498. UO.Macro(2,0,"Draw a card 1-3 gets 40k and 4-6 get 50k from the bank.")
  499. elseif lifeDeck[i] == 35 then
  500. UO.Macro(2,0,"Shipwrecked on a desert island! Everyone draws a card to see how long they were stranded.")
  501. wait(500)
  502. UO.Macro(2,0,"Sue the cruise company. 1-3 gets 20k and 4-6 gets 50k from the bank.")
  503. elseif lifeDeck[i] == 36 then
  504. UO.Macro(2,0,"LAWSUIT! Sue another player for damaging your house! Pick a player to sue.")
  505. wait(500)
  506. UO.Macro(2,0,"Collect 80k from that player.")
  507. elseif lifeDeck[i] == 37 then
  508. UO.Macro(2,0,"Bonus payday! Choose another player to be your boss and tell them a joke.")
  509. wait(500)
  510. UO.Macro(2,0,"Collect a bonus payday from the bank.")
  511. elseif lifeDeck[i] == 38 then
  512. UO.Macro(2,0,"You're voted “The Nicest Person Ever” award! Give everyone a compliment and draw a card.")
  513. wait(500)
  514. UO.Macro(2,0,"1-3 gets 50k and 4-6 get 100k from the bank.")
  515. elseif lifeDeck[i] == 39 then
  516. UO.Macro(2,0,"The Haunted Maze! Describe your favorite maze and draw a card for a prize!")
  517. wait(500)
  518. UO.Macro(2,0,"1-3 gets 30k and 4-6 get 50k from the bank.")
  519. elseif lifeDeck[i] == 40 then
  520. UO.Macro(2,0,"Rescue a stray! Tell everyone what pet you rescued.")
  521. wait(500)
  522. UO.Macro(2,0,"Collect 10k from each player for your good deed.")
  523. elseif lifeDeck[i] == 41 then
  524. UO.Macro(2,0,"Surprise! An animal showed up on your door step. Tell everyone what animal it is.")
  525. wait(500)
  526. UO.Macro(2,0,"Capture it and sell it for 20k from the bank.")
  527. elseif lifeDeck[i] == 42 then
  528. UO.Macro(2,0,"Pet talent show! Pick a player. Both say what pet and what talent the pet has.")
  529. wait(500)
  530. UO.Macro(2,0,"Each draws a card. The bank pays the highest card 50k for winning the show.")
  531. elseif lifeDeck[i] == 43 then
  532. UO.Macro(2,0,"Visit the healer!")
  533. wait(500)
  534. UO.Macro(2,0,"Draw a card and pay the bank 10k x the card.")
  535. elseif lifeDeck[i] == 44 then
  536. UO.Macro(2,0,"Find buried treasure! Tell everyone what’s inside.")
  537. wait(500)
  538. UO.Macro(2,0,"Collect 30k from the bank.")
  539. elseif lifeDeck[i] == 45 then
  540. UO.Macro(2,0,"Buy a house on the shore!")
  541. wait(500)
  542. UO.Macro(2,0,"Pay bank 100k for the house if you want it.")
  543. elseif lifeDeck[i] == 46 then
  544. UO.Macro(2,0,"House on the shore for sale!")
  545. wait(500)
  546. UO.Macro(2,0,"Draw a card 1-3 collect 80k and 4-6 collect 150k from bank.")
  547. elseif lifeDeck[i] == 47 then
  548. UO.Macro(2,0,"Buy a Mountain Cottage!")
  549. wait(500)
  550. UO.Macro(2,0,"Pay bank 150k for the cottage if you want it.")
  551. elseif lifeDeck[i] == 48 then
  552. UO.Macro(2,0,"Mountain Cottage for sale!")
  553. wait(500)
  554. UO.Macro(2,0,"Draw a card 1-3 Collect 120k and 4-6 collect 200k from bank.")
  555. elseif lifeDeck[i] == 49 then
  556. UO.Macro(2,0,"Buy a tent!")
  557. wait(500)
  558. UO.Macro(2,0,"Pay bank 100k for the tent if you want it.")
  559. elseif lifeDeck[i] == 50 then
  560. UO.Macro(2,0,"Tent for sale!")
  561. wait(500)
  562. UO.Macro(2,0,"Draw a card 1-3 collect 80k and 4-6 collect 150k from the bank.")
  563. elseif lifeDeck[i] == 51 then
  564. UO.Macro(2,0,"Buy a houseboat!")
  565. wait(500)
  566. UO.Macro(2,0,"Pay bank 200k if you want it.")
  567. elseif lifeDeck[i] == 52 then
  568. UO.Macro(2,0,"Houseboat for sale!")
  569. wait(500)
  570. UO.Macro(2,0,"Draw a card 1-3 collect 180k and 4-6 collect 300k from the bank.")
  571. elseif lifeDeck[i] == 53 then
  572. UO.Macro(2,0,"Buy a small hut!")
  573. wait(500)
  574. UO.Macro(2,0,"Pay the bank 100k if you want it.")
  575. elseif lifeDeck[i] == 54 then
  576. UO.Macro(2,0,"Small hut for sale!")
  577. wait(500)
  578. UO.Macro(2,0,"Draw a card 1-3 collect 80k and 4-6 collect 150k from the bank.")
  579. elseif lifeDeck[i] == 55 then
  580. UO.Macro(2,0,"Buy a Farm house!")
  581. wait(500)
  582. UO.Macro(2,0,"Pay bank 200k if you want it.")
  583. elseif lifeDeck[i] == 56 then
  584. UO.Macro(2,0,"Farm house for sale!")
  585. wait(500)
  586. UO.Macro(2,0,"Draw a card 1-3 collect 180k and 4-6 collect 300k from the bank.")
  587. elseif lifeDeck[i] == 57 then
  588. UO.Macro(2,0,"Buy a large House!")
  589. wait(500)
  590. UO.Macro(2,0,"Pay the bank 250k if you want it.")
  591. elseif lifeDeck[i] == 58 then
  592. UO.Macro(2,0,"Large house for sale!")
  593. wait(500)
  594. UO.Macro(2,0,"Draw a card 1-3 collect 200k and 4-6 collect 300k.")
  595. elseif lifeDeck[i] == 59 then
  596. UO.Macro(2,0,"Stone Table for sale!")
  597. wait(500)
  598. UO.Macro(2,0,"Pick a player and collect 90k")
  599. end
  600. i = i + 1
  601. if i == 60 then
  602. i = 1
  603. wait(500)
  604. UO.Macro(2,0,"Shuffling...")
  605. DeckShuffle(lifeDeck)
  606. end
  607. elseif spinTheWheel == "draw a trade" then
  608. k = math.random(1,6)
  609. if k == 1 then
  610. UO.Macro(2,0,"1.Blacksmith: Get Paid by the bank 90k each payday.")
  611. elseif k == 2 then
  612. UO.Macro(2,0,"2.Carpenter: Get Paid by the bank 60k each Payday.")
  613. elseif k == 3 then
  614. UO.Macro(2,0,"3.Miner: Get Paid by the bank 80k each Payday")
  615. elseif k == 4 then
  616. UO.Macro(2,0,"4.Tailor: Get Paid by the bank 50k each Payday.")
  617. elseif k == 5 then
  618. UO.Macro(2,0,"5.Tinker: Get Paid by the bank 70k each Payday.")
  619. elseif k == 6 then
  620. UO.Macro(2,0,"6.Lumberjack: Get Paid by the bank 80k each Payday.")
  621. end
  622. elseif spinTheWheel == nil then
  623. print('Something went wrong!')
  624. elseif spinTheWheel == (string.lower(proctor)..": "..".*puts cards away.*") then
  625. print("Putting cards away!")
  626. return
  627. end
  628. end
  629. end
  630.  
  631. function journalsearch(...)
  632. local timeoutOccurred = true
  633. -- Journal.Mark()
  634. local successCheckTimeout = 1000 + getticks()
  635. repeat
  636. for i=1,#Journal do
  637. Journal[i]=string.lower(Journal[i])
  638. end
  639. local journalResult = Journal.Search({...}, 1000)
  640. if journalResult ~= "ERR_Timeout" then
  641. --print("Found journal message: " .. journalResult)
  642. timeoutOccurred = false
  643. return journalResult
  644. end
  645. until timeoutOccurred == false or getticks() > successCheckTimeout
  646. if timeoutOccurred == true then
  647. -- print("Journal search timeout occurred. "..{...})
  648. return nil
  649. end
  650. end
  651.  
  652.  
  653.  
  654.  
  655.  
  656. --MainMenu
  657. function MyCloseHandler()
  658. print("Finished!")
  659. Obj.Exit() --exit Loop command
  660. end
  661.  
  662. form = Obj.Create("TForm")
  663. form.Caption = "Test Window"
  664. form.OnClose = MyCloseHandler --Exits the script when the menu is closed
  665.  
  666. button = Obj.Create("TButton")
  667. button.Caption = "Populate"
  668. button.OnClick = Populate
  669. button.Parent = form
  670.  
  671. button = Obj.Create("TButton")
  672. button.Caption = "Red"
  673. button.OnClick = RedScores
  674. button.Parent = form
  675. button.Top = 30 + 30*1
  676.  
  677. button = Obj.Create("TButton")
  678. button.Caption = "Green"
  679. button.OnClick = GreenScores
  680. button.Parent = form
  681. button.Top = 30 + 30*2
  682.  
  683. button = Obj.Create("TButton")
  684. button.Caption = "Shuffle Deck"
  685. button.OnClick = Deck
  686. button.Parent = form
  687. button.Top = 30 + 30*1
  688. button.Left = 90
  689.  
  690. button = Obj.Create("TButton")
  691. button.Caption = "Deal Cards"
  692. button.OnClick = FindJournal
  693. button.Parent = form
  694. button.Top = 30 + 30*2
  695. button.Left = 90
  696.  
  697. button = Obj.Create("TButton")
  698. button.Caption = "Start Life!"
  699. button.OnClick = StartLife
  700. button.Parent = form
  701. button.Top = 30 + 30*1
  702. button.Left = 90*2
  703. --[[
  704. button = Obj.Create("TButton")
  705. button.Caption = ""
  706. button.OnClick = Deck
  707. button.Parent = form
  708. button.Top = 30 + 30*2
  709. button.Left = 90*2
  710. ]]--
  711.  
  712. form.Show() --call Show method
  713. Obj.Loop() --swallows execution, never returns
  714. Obj.Free(button) --release button from memory
  715. Obj.Free(form) --release form from memory
  716. --/MainMenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement