const logindb = { loginplayer:[{username:'testuser',password:'testpwd'}] } var loginusername='' var loginpassword='' function addItemToMarketTable(item,price){ let table = document.getElementById('balanceitems') let tr=document.createElement('tr') let tditem=document.createElement('td') tditem.innerHTML=item let tdprice=document.createElement('td') tdprice.innerHTML=price tr.appendChild(tditem) tr.appendChild(tdprice) table.appendChild(tr) } function addPlayerToLBTable(player,index){ let table = document.getElementById('playerlb') let tr=document.createElement('tr') let tditem=document.createElement('td') tditem.innerHTML=player let tdindex=document.createElement('td') tdindex.innerHTML=index tr.appendChild(tditem) tr.appendChild(tdindex) table.appendChild(tr) } function addGuildToLBTable(guild,index){ let table = document.getElementById('guildlb') let tr=document.createElement('tr') let tditem=document.createElement('td') tditem.innerHTML=guild let tdindex=document.createElement('td') tdindex.innerHTML=index tr.appendChild(tditem) tr.appendChild(tdindex) table.appendChild(tr) } function createDashBox(color,title=null){ let dashBox = document.createElement('div') dashBox.className='dash-full-box' dashBox.id=color if(title!=null){ let dashtitle = document.createElement('p') dashtitle.className='dash-title' dashtitle.innerText=title dashBox.appendChild(dashtitle) } document.getElementById('dashboardcontent').appendChild(dashBox) let br= document.createElement('br') document.getElementById('dashboardcontent').appendChild(br) return dashBox } function spawnBaseDashBox(){ let wdmbox = createDashBox('red') wdmbox.innerHTML=`
Your Current balance: NODATA$
Current balance of your Guild: NODATA$
` let markbox = createDashBox('yellow','TRADE INFOS:') markbox.innerHTML=`Market price of items:Items: | Price: |
---|
Player: | Place: |
---|
Guild: | Place: |
---|