<commit_before>require("handler.sendmessage")
require("base.common")
require("item.gems")

-- UPDATE common SET com_script = 'test.vilarion' WHERE com_itemid = 9;

module("test.vilarion", package.seeall)

function QuestTitle(user)
    return "Test Quest"
end

function QuestDescription(user, status)
    return "Status " .. status
end

function QuestTargets(user, status)
    if status == 1 then
        return position(5, 5, 0)
    elseif status == 2 then
        return {position(5, 10, 0), position(3, 10, 0), {3, 1, 3}}
    elseif status == 3 then
        return {}
    elseif status == 4 then
        return nil
    elseif status == 5 then
        return {1, 2, 3}
    elseif status == 6 then
        return "bla"
    elseif status == 7 then
        return {"bla"}
    elseif status == 8 then
        return {{3, 1, 3}, "bla", position(3, 10, 0)}
    elseif status == 9 then
        -- ILLEGAL, do NOT set quest progress in quest entrypoints
        user:setQuestProgress(12344, 1);
    end
end

function QuestFinalStatus()
    return 42
end

function getTestLookAt()
    local lookAt = ItemLookAt()

    lookAt.name = "Vilarion's Test Item of pwnage with a microwave"
    lookAt.rareness = ItemLookAt.epicItem;
    lookAt.description = "This item has an evil presence. Also it creates cookies. But they all look like Vilarion."
    lookAt.craftedBy = "Vilarion"
    lookAt.weight = 1
    lookAt.worth = 13333320
    lookAt.qualityText = "supercharged"
    lookAt.durabilityText = "eternal"
    lookAt.durabilityValue = 100
    lookAt.diamondLevel = 1
    lookAt.emeraldLevel = 1
    lookAt.rubyLevel =1
    lookAt.sapphireLevel = 1
    lookAt.amethystLevel = 1
    lookAt.obsidianLevel = 1
    lookAt.topazLevel = 1
    lookAt.bonus = 255

    return lookAt
end

function LookAtItem(player, item)
    world:itemInform(player, item, getTestLookAt())
    return true    
end

function UseItem(User, SourceItem, ltstate)
    if User.lastSpokenText == "inform" then
        local myItem = world:getItemOnField(position(957,95,0))
        local lookAt = ItemLookAt()
        lookAt.name = "Was ist das?"
            lookAt.description = "Du bemerkst ein seltsames Glitzern im Gras vor der Eiche."
        world:itemInform(User,myItem,lookAt)<commit_msg>test logging<commit_after>require("handler.sendmessage")
require("base.common")
require("item.gems")

-- UPDATE common SET com_script = 'test.vilarion' WHERE com_itemid = 9;

module("test.vilarion", package.seeall)

function QuestTitle(user)
    return "Test Quest"
end

function QuestDescription(user, status)
    return "Status " .. status
end

function QuestTargets(user, status)
    if status == 1 then
        return position(5, 5, 0)
    elseif status == 2 then
        return {position(5, 10, 0), position(3, 10, 0), {3, 1, 3}}
    elseif status == 3 then
        return {}
    elseif status == 4 then
        return nil
    elseif status == 5 then
        return {1, 2, 3}
    elseif status == 6 then
        return "bla"
    elseif status == 7 then
        return {"bla"}
    elseif status == 8 then
        return {{3, 1, 3}, "bla", position(3, 10, 0)}
    elseif status == 9 then
        -- ILLEGAL, do NOT set quest progress in quest entrypoints
        user:setQuestProgress(12344, 1);
    end
end

function QuestFinalStatus()
    return 42
end

function getTestLookAt()
    local lookAt = ItemLookAt()

    lookAt.name = "Vilarion's Test Item of pwnage with a microwave"
    lookAt.rareness = ItemLookAt.epicItem;
    lookAt.description = "This item has an evil presence. Also it creates cookies. But they all look like Vilarion."
    lookAt.craftedBy = "Vilarion"
    lookAt.weight = 1
    lookAt.worth = 13333320
    lookAt.qualityText = "supercharged"
    lookAt.durabilityText = "eternal"
    lookAt.durabilityValue = 100
    lookAt.diamondLevel = 1
    lookAt.emeraldLevel = 1
    lookAt.rubyLevel =1
    lookAt.sapphireLevel = 1
    lookAt.amethystLevel = 1
    lookAt.obsidianLevel = 1
    lookAt.topazLevel = 1
    lookAt.bonus = 255

    return lookAt
end

function LookAtItem(player, item)
    world:itemInform(player, item, getTestLookAt())
    return true    
end

function UseItem(User, SourceItem, ltstate)
    if User.lastSpokenText == "log" then
        log("Test")
    end

    if User.lastSpokenText == "inform" then
        local myItem = world:getItemOnField(position(957,95,0))
        local lookAt = ItemLookAt()
        lookAt.name = "Was ist das?"
            lookAt.description = "Du bemerkst ein seltsames Glitzern im Gras vor der Eiche."
        world:itemInform(User,myItem,lookAt)
{'fraction_non_alphanumeric': 0.09853615905615032, 'fraction_numerical': 0.0305877212147695, 'mean_word_length': 2.909479077711358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3194381', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1451, 'n_words': 444}