<-->

 

The Otter Scrolls

 

module solve::solve {

    // [*] Import dependencies
    use challenge::theotterscrolls;

    public fun solve(
        spellbook: &mut theotterscrolls::Spellbook,
        _ctx: &mut TxContext
    ) {
        let v: vector<u64> = vector[1, 0, 3, 3, 3];
        theotterscrolls::cast_spell(v, spellbook);
    }

}

 

 

 

Dark BrOTTERhood

 

module solve::solve {

    // [*] Import dependencies
    use challenge::Otter::{Self, OTTER};
    use sui::random::Random;

    #[allow(lint(public_random))]
    public fun solve(
        vault: &mut Otter::Vault<OTTER>,
        questboard: &mut Otter::QuestBoard,
        player: &mut Otter::Player,
        r: &Random,
        ctx: &mut TxContext,
    ) {
        Otter::buy_sword(vault, player, ctx);
        Otter::find_a_monster(questboard, r, ctx);
        Otter::fight_monster(questboard, player, 0);
        Otter::return_home(questboard, 0);


        let mut i = 0;

        while (i <= 100) {
            Otter::find_a_monster(questboard, r, ctx);
            Otter::get_the_reward(vault, questboard, player, 0, ctx);
            i = i + 1;
        };




        let flag = Otter::buy_flag(vault, player, ctx);
        Otter::prove(questboard, flag);

    }

}

 

 

 

World of Ottercraft

 

module solve::solve {

    // [*] Import dependencies
    use challenge::Otter::{Self, OTTER};

    public fun solve(
        board: &mut Otter::QuestBoard,
        vault: &mut Otter::Vault<OTTER>,
        player: &mut Otter::Player,
        ctx: &mut TxContext
    ) {
        let quest_id = 0;


        let mut ticket = Otter::enter_tavern(player);
        Otter::buy_sword(player, &mut ticket);
        Otter::checkout(ticket, player, ctx, vault, board);
        
        let mut i = 0 ;

        while(i < 25) {
            Otter::find_a_monster(board, player);
            i = i + 1;
        };
        
        Otter::bring_it_on(board, player, quest_id);
        Otter::return_home(board, player);
        Otter::get_the_reward(vault, board, player, ctx);

        i = 0;
        while (i < 24) {
            let mut ticket = Otter::enter_tavern(player);
            Otter::buy_shield(player, &mut ticket);
            Otter::get_the_reward(vault, board, player, ctx);
            Otter::checkout(ticket, player, ctx, vault, board);
            i = i + 1;
        };
        let mut ticket = Otter::enter_tavern(player);
        Otter::buy_flag(&mut ticket, player);
        Otter::checkout(ticket, player, ctx, vault, board);


    }

}

'writeups' 카테고리의 다른 글

CrewCTF 2024 - blockchain(lightbook)  (0) 2024.08.05
HITCON CTF 2024 Quals(Lustrous, No-Exit Room, Flag Reader)  (0) 2024.07.15
codegate 2024 quals  (0) 2024.06.03
Dreamhack Invitational Quals  (0) 2024.05.03
osu!gaming 2024 - blockchain  (0) 2024.03.04

+ Recent posts