Example #1
0
def start():
    print"""To your north a door dominated by a giant
        number 1.
        
        What will you do?"""
    move = raw_input(">>")
    if move == "go north":
        room1.start()
    elif move == "look":
        look.look(2)
        start()
    else:
        print "I don't understand."
        start()
Example #2
0
def start():
    print"""To your south is a door dominated by a giant
        number 2.
        
        What will you do?"""
    move = raw_input(">>")
    if move == "go south":
        room2.start()
    elif move == "look":
        look.look(1)
        start()
    elif move == "teabag pony":
        print "You teabag the dead pony, giggling with glee."
        start()
    else:
        print "I don't understand."
        start()
Example #3
0
        #========= Go [direction] ==========#

        if command in ["go", "walk", "move", "jump", "hop", "teleport", "translate", "commute"]:
            go.go(command, splitIn, cRoom, roomL, cChar, cPlayer, npcL)
            cChar.save()
            npcL = npc.loadNpcs()
            for c in npcL:
                npc.loadNpc(c, "mob")
            roomL = room.loadRooms()
            cChar = character.loadCharacter(cChar.name,cPlayer.username)
            cRoom = loadCRoom()
        #========= Look [object] ==========#

        elif command in ["look", "watch", "observe", "see", "eye", "regard", "check"]:
            look.look(command,splitIn,npcL,cRoom,cChar,cPlayer)
        #========= take [object] ==========#

        elif command in ["take", "grab", "borrow"]:
            if len(splitIn) == 1:
                print("You grab in to the void.. You now own.. nothing.")
            else:
                if splitIn[1] in cRoom.inventory:
                    print(cRoom.inventory[splitIn[1]] + "\n You acquired " + splitIn[1])
                    cChar.inventory[splitIn[1]] = cRoom.inventory[splitIn[1]]
                else:
                    print("There is no such thing here, " + random.choice(["weirdo", "nutter", "whippersnapper", "beavus", "butthead", "you Thraal", "whacko"]) + ".")

        #========= wear ==========#

        elif command in ["wear", "don", "mount", 'equip']:
Example #4
0
		# Get Action id
		action = sql.query_single(query)
		
		# Do action, and spend action points
		if (action):
			super = int(action / 10)
			sub = action - super * 10
			
			# DEBUG("super: {0}, sub: {1}".format(super, sub))
			use_action_point = False
			if super == 1: # MOVE
				movement = move.move(target2)
				messages.append(movement[1])
				if movement [0]:
					messages.append(look.look(sql.room_name_from_id(player.location)))
					use_action_point = True
				
			elif super == 2: # LOOK
				if sub == 0:
					messages.append(look.look(target2))
				
				elif sub == 1:
					messages.append(look.look_around())
		
			elif super == 3: # ASK
				if sub == 0:
					asking = ask.ask(target1, target2)
					#messages.append(ask.ask(target1, target2))
					messages.append(asking[1])
					use_action_point = asking [0]
Example #5
0
#!/usr/bin/python3
import sys
sys.path.append('../')
import argparse
import common.xquant as xq
from common.instance import get_strategy_instance
from look import look


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description='backtest')
    parser.add_argument('-sii', help='strategy instance id')
    parser.add_argument('--cs', help='chart show', action="store_true")
    args = parser.parse_args()
    # print(args)
    if not (args.sii):
        parser.print_help()
        exit(1)

    instance = get_strategy_instance(args.sii)
    config = xq.get_strategy_config(instance['config_path'])

    look(args.sii, config, instance['value'])