Exemplo n.º 1
0
    def perform_activation(self, sector):
        self.load_cookie()
        user_db = self.get_db()
        action.action_activate(self, self.server[0], user_db['activation_code'])

        self.login()
        self.save_cookie()

        action.action_select_spawn(self, self.nation, sector)
        
        self.loadup() # requests 1 village
        quest.skip_tutorial(self)
        action.action_quest(self, "next", "Tutorial_15a")
        
        user_db['activated'] = True
        db.users.save(user_db)
Exemplo n.º 2
0
def do_tutorial(travian):
    action.action_quest(travian, "next", "Tutorial_01")
    action.action_quest(travian, "questWindowClosed")
    action.action_quest(travian, "tipsOff")
    action.action_quest(travian, None, "Tutorial_02")
    action.action_quest(travian, "next", "Tutorial_02")
    action.action_quest(travian, None, "Tutorial_03")
    action.action_build_up(travian, 1)
    action.action_quest(travian, None, "Tutorial_03")
    action.action_quest(travian, "next", "Tutorial_03")
    action.action_quest(travian, None, "Tutorial_04")
    action.action_build_up(travian, 1)
    action.action_quest(travian, None, "Tutorial_04")
    action.action_quest(travian, "next", "Tutorial_04")
    action.action_quest(travian, None, "Tutorial_04")
    action.action_build_up(travian, 2)
    action.action_quest(travian, None, "Tutorial_04")
    action.action_quest(travian, "next", "Tutorial_05")
    action.action_quest(travian, None, "Tutorial_05")

    travian.ajax_cmd("heroSetAttributes", {"resource":2, "attackBehaviour":"hide"})
    action.action_quest(travian, "next", "Tutorial_06")
    
    action.action_quest(travian, None, "Tutorial_07")
    travian.request_GET("/dorf2.php")
    action.action_quest(travian, None, "Tutorial_07")
    action.action_quest(travian, "next", "Tutorial_07")
    action.action_quest(travian, None, "Tutorial_08")
    action.action_build_new(travian, 19, 10)
    action.action_quest(travian, "next", "Tutorial_08")
    action.action_quest(travian, None, "Tutorial_09")
    action.action_build_new(travian, 39, 16)
    action.action_quest(travian, None, "Tutorial_09")
    action.action_quest(travian, "next", "Tutorial_09")
    action.action_quest(travian, None, "Tutorial_10")
    travian.ajax_cmd("premiumFeature", {"featureKey":"finishNow", "context":""})
    action.action_quest(travian, "next", "Tutorial_10")
    action.action_quest(travian, None, "Tutorial_11")
    action.action_adventure(travian)
    action.action_quest(travian, "next", "Tutorial_11")
    action.action_quest(travian, None, "Tutorial_12")

    travian.request_GET("/berichte.php")
    first_report = reader.read_reports(travian.current_page)[0]
    travian.request_GET(first_report['link'])

    action.action_quest(travian, "next", "Tutorial_12")
    travian.request_hero()
    action.action_apply_item(travian, travian.hero.inventory[len(travian.hero.inventory)-1], 1)
    action.action_quest(travian, None, "Tutorial_13")
    action.action_quest(travian, "next", "Tutorial_13")
    travian.ajax_cmd("overlay", {})
    action.action_quest(travian, "next", "Tutorial_14")
    action.action_quest(travian, "next", "Tutorial_15")
Exemplo n.º 3
0
 def execute(self, village):
     action.action_quest(village.account, "next", self['name'])
     village.fire_event(Event(village, 'quest_reward', datetime.now()))
Exemplo n.º 4
0
def skip_tutorial(travian):
    action.action_quest(travian, "skip")