Help with Zulah's Room Database

I absolutely love the database! I can search for things much deeper than just the map, but I want to add the room items or 'info here' information to the notes sections of the database. Can someone help me with that? I tried editing the script in the notes section, by adding the GMCP information in a similar fashion as the rest (where the "" are) but that bugged the whole thing out and I changed it back before I couldn't remember how lol

Comments

  • these are the 2 scripts

    ---------------------------------------------------------------------------

    function createRoom_DB()
    db:create("world", { 
    rooms = {
    roomName="",
    roomNumber=0,
    roomDescription="",
    roomEnvironment="",
    roomArea="",
    roomNotes="",
    _unique = { "roomNumber" },
        _violations = "REPLACE"
    }
    })
    rooms_db = db:get_database("world")
    db:fetch(rooms_db.rooms)
    end


    ---------------------------------------------------------------------------

    function addRoom_db()
    local r_Name = gmcp.Room.Info.name
    local r_Numb = gmcp.Room.Info.num
    local r_Desc = gmcp.Room.Info.desc
    local r_Envi = gmcp.Room.Info.environment
    local r_Area = gmcp.Room.Info.area
    local r_Note = ""
    rooms_db = db:get_database("world")
    local testTable = {}
    local testTable = db:fetch(rooms_db.rooms, db:eq(rooms_db.rooms.roomNumber, r_Numb))
    if not testTable[1] then
    cecho("<green> -- This is the first time this room was added to your database! --\n")
    db:add(rooms_db.rooms, {
    roomName=r_Name,
    roomNumber=r_Numb,
    roomDescription=r_Desc,
    roomEnvironment=r_Envi,
    roomArea=r_Area,
    roomNotes="",
    })
    elseif testTable[1].roomDescription ~= r_Desc and gmcp.Room.Info.environment ~= "Vessel" and gmcp.Room.Info.environment ~= "Deep Ocean Floor" then
    --cecho("\n<orange> -- You've been here before but the room has changed!")
    else
    end
    end
Sign In or Register to comment.