Debug Log
// --- NPC Interaction Window Logic --- function showNpcInteraction(name, text) { document.getElementById('npc-interaction-title').textContent = name || ''; document.getElementById('npc-interaction-text').textContent = text || ''; } function hideNpcInteraction() { document.getElementById('npc-interaction-title').textContent = ''; document.getElementById('npc-interaction-text').textContent = ''; } document.getElementById('npc-interaction-close').onclick = hideNpcInteraction; // Optionally, expose to game.js or other scripts: window.showNpcInteraction = showNpcInteraction; window.hideNpcInteraction = hideNpcInteraction; document.getElementById('completeRegisterBtn').onclick = async function() { const username = document.getElementById('loginUsername').value.trim(); const password = document.getElementById('loginPassword').value; const race = document.getElementById('regRace').value; const charClass = document.getElementById('regClass').value; const guild = document.getElementById('regGuild').value; try { await window.registerCloudAccount(username, password, { race, class: charClass, guild }); localStorage.setItem('peakeCloudUsername', username); if (modal) modal.style.display = 'none'; if (currentUserSpan) currentUserSpan.textContent = username; } catch (err) { document.getElementById('loginError').textContent = err.message || 'Registration failed.'; } }; // Console and live chat input handlers var input = document.getElementById('consoleInput'); var btn = document.getElementById('consoleInputBtn'); input.addEventListener('keydown', function(e) { if (e.key === 'Enter') handleConsoleInput(); }); btn.addEventListener('click', handleConsoleInput); var liveChatInput = document.getElementById('liveChatInput'); if (liveChatInput) { liveChatInput.addEventListener('keydown', function(e) { if (e.key === 'Enter' && typeof sendLiveChat === 'function') sendLiveChat(); }); } // Focus input on load input.focus(); });
Peake RPG V000.0009 User: (not signed in)
Character
Inventory
    Cloud Save
    Game Console
    Conversation
    NPC portrait

    Narrator

    Walk up to someone and type: talk [name]
    Live World
    Offline
    No players online.
    World chat is empty.
    Debug Terminal
    Checking backend...
    Inventory
    Cloud Save
    Game Console
    Conversation
    NPC portrait

    Narrator

    Walk up to someone and type: talk [name]
    Live World
    Offline
    No players online.
    World chat is empty.
    // ...existing code... input.addEventListener('keydown', function(e) { if (e.key === 'Enter') handleConsoleInput(); }); btn.addEventListener('click', handleConsoleInput); var liveChatInput = document.getElementById('liveChatInput'); if (liveChatInput) { liveChatInput.addEventListener('keydown', function(e) { if (e.key === 'Enter' && typeof sendLiveChat === 'function') sendLiveChat(); }); } // Focus input on load input.focus(); });