Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. -- Rogue Epic 1.5 Pre-Quest, Task 1, Step 2, High Keep
  2.  
  3. function event_say(e)
  4.  
  5. -- Variable Declaration
  6. local winnings = 1500;
  7. local deal = nil;
  8.  
  9. if(e.message:findi("hail")) then
  10. e.self:Say("Greetings, " .. e.other:GetName() .. ".");
  11. elseif(e.message:findi("deal")) then
  12. local deal = true;
  13. e.self:Emote("deftly shuffles the cards together. 'Just a moment, hon, I'm still shuffling.");
  14. -- need to pause here to wait for a 2nd "deal" to come from quester
  15. while deal do
  16. e.self:Emote("sweeps the cards from the table. 'Great! You won several hands that round!");
  17. winnings = winnings + 100;
  18. e.self:Say("You now have " .. winnings .. " chips to gamble with. Let me know at any time if you want me to [deal you a hand], or if you'd rather [cash out].");
  19. e.other:Message(3,"Guard Kovan glares at you with distrust")
  20. if (e.message.findi("cash out")
  21. deal = false;
  22. end
  23. e.self:Say("Thanks for playing, " .. e.other:GetName() .. ". Here are your winnings. Come back to our establishment again anytime.")
  24. elseif(e.message:findi("cash")) then
  25. e.other:GiveCash(winnings,0,0,0);
  26. end
  27.  
  28. end
  29.  
  30. -- Trade Gold-Leafed Urn for credits
  31. function event_trade(e)
  32. local item_lib = require("items");
  33.  
  34. if(item_lib.check_turn_in(e.trade, {item1 = 9446})) then
  35. e.self:Emote("passes the urn to Guard Kovan for safekeeping. She slides her left hand down her right sleeve and vice versa. 'Welcome to the Highkeep Casino, " .. e.other:GetName() .. ". The urn you brought is worth 1500 credits. Let me know at any time if you want me to [deal you a hand], or if you'd rather [cash out].");
  36. e.other:Ding();
  37. end
  38. item_lib.return_items(e.self, e.other, e.trade);
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement