Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Rogue Epic 1.5 Pre-Quest, Task 1, Step 2, High Keep
- function event_say(e)
- -- Variable Declaration
- local winnings = 1500;
- local deal = nil;
- if(e.message:findi("hail")) then
- e.self:Say("Greetings, " .. e.other:GetName() .. ".");
- elseif(e.message:findi("deal")) then
- local deal = true;
- e.self:Emote("deftly shuffles the cards together. 'Just a moment, hon, I'm still shuffling.");
- -- need to pause here to wait for a 2nd "deal" to come from quester
- while deal do
- e.self:Emote("sweeps the cards from the table. 'Great! You won several hands that round!");
- winnings = winnings + 100;
- 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].");
- e.other:Message(3,"Guard Kovan glares at you with distrust")
- if (e.message.findi("cash out")
- deal = false;
- end
- e.self:Say("Thanks for playing, " .. e.other:GetName() .. ". Here are your winnings. Come back to our establishment again anytime.")
- elseif(e.message:findi("cash")) then
- e.other:GiveCash(winnings,0,0,0);
- end
- end
- -- Trade Gold-Leafed Urn for credits
- function event_trade(e)
- local item_lib = require("items");
- if(item_lib.check_turn_in(e.trade, {item1 = 9446})) then
- 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].");
- e.other:Ding();
- end
- item_lib.return_items(e.self, e.other, e.trade);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement