summaryrefslogtreecommitdiff
path: root/plugins/shop.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shop.py')
-rwxr-xr-x[-rw-r--r--]plugins/shop.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/plugins/shop.py b/plugins/shop.py
index 44c5db8..be66cea 100644..100755
--- a/plugins/shop.py
+++ b/plugins/shop.py
@@ -7,6 +7,7 @@ import chatbot
import logicmanager
import status
import badge
+import random
from net.inventory import get_item_index
from net.trade import reset_trade_state
from utils import encode_str, extends
@@ -67,6 +68,20 @@ def cleanup():
s.index = 0
s.start_time = 0
+sell_greetings = [
+ "Hi {0}! Welcome to my shop!",
+ "Hey {0}, wanna something?",
+ "Let\'s do business!",
+ "Yeah! Spend your money here!",
+ "Shop here {0}, yes!",
+]
+
+buy_greetings = [
+ "Okay! Let's see what you've got to sell!",
+ "Hmm? Something interesting to trade?",
+ "Hey {0}, I'm not going to buy garbage!",
+ "Uh? Sorry I was\'t listening.",
+]
# =========================================================================
def selllist(nick, message, is_whisper, match):
@@ -75,10 +90,14 @@ def selllist(nick, message, is_whisper, match):
if nick in nobuy:
mapserv.cmsg_chat_message("Special prize for you, " + nick + "!")
time.sleep(5)
+ else:
+ answer = random.choice(sell_greetings)
+ mapserv.cmsg_chat_message(answer.format(nick))
+
+ time.sleep(5)
# ~ return
# Support for 4144's shop (Sell list)
data = '\302\202B1'
-
for id_, (price, amount) in selling.iteritems():
index = get_item_index(id_)
if index < 0:
@@ -99,7 +118,9 @@ def selllist(nick, message, is_whisper, match):
def buylist(nick, message, is_whisper, match):
if not is_whisper:
return
-
+ answer = random.choice(buy_greetings)
+ mapserv.cmsg_chat_message(answer.format(nick))
+ time.sleep(5)
# Support for 4144's shop (Sell list)
data = '\302\202S1'