Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --objMolTable{"Phosphate_ion","Ammonium_ion"}
- --objElTable{"Hydrogen","Helium","Lithium"}
- pim = peripheral.wrap("left")
- mon = peripheral.wrap("top")
- Player = ""
- function setupScoreboard()
- commands.exec("scoreboard objectives add testname dummy testname")
- commands.exec("scoreboard players add @a")
- commands.exec("scoreboard objectives setdisplay sidbar testname")
- end
- function addAllUsers()
- --add @a to scoreboard
- end
- function addScore(item)
- --Sets the objective to 1
- commands.exec("scoreboard players set "..player.." "..item.." 1")
- end
- function checkInv()
- data = {}
- local slot
- local name
- local slots = pim.getAllStacks()
- for i,j in pairs(slots) do
- slot = i
- name = j["display_name"]
- addScore(name)
- data[slot]=name
- end
- --commands.exec("testfor @a[name="..Player..",score_"..item.."=1,score_"..item.."_min=1]")
- --based on game mode check for object_name, formula, molarmass,boilingpt meltingpt molarmas,shortname,neutrons,form
- end
- function checkUser()
- local user = pim.getInventoryName()
- if user =='pim' then
- Player = ""
- else
- Player = user
- end
- return Player
- end
- function getWin()
- --get where all = 1 or get a new objective for total
- --commands.exec(
- --save to file
- end
- function printTop()
- --pull from file to print to screen
- end
- function init()
- --which game to play
- --1 element
- --2 molecures
- --if 1 then
- --which game to play
- --other nonmetals
- --alkali metals
- --alkaline earth metals
- --noble gasses
- --metalloids
- --halogends
- --transition metals
- --post-transition metals
- --lanthanoids
- --actinoids
- --chose level
- --begginer(element Names/symboles)
- --intermediate(atomic Numbers/state)
- --advanced(neutrons)
- -- end
- --if 2 then
- --chose level
- --beginner(name)
- --intermediate(formula)
- --advanced(molarmass/boilingpt/meltingpt)
- --call setupScoreboard()
- --end
- end
- elements
- {
- ["Hydrogen"]={
- ["shortName"]= "H",
- ["form"]= "gas",
- ["type"]= "nonMetal",
- ["neutrons"]= "0"
- },
- ["Helium"]={
- ["shortName"]= "He",
- ["form"]= "gas",
- ["type"]= "nobleGas",
- ["neutrons"]= "2"
- },
- ["Lithium"]={
- ["shortName"]= "Li",
- ["form"]= "solid",
- ["type"]= "alkaliMetal",
- ["neutrons"]= "4"
- },
- ["Beryllium"]={
- ["shortName"]= "Be",
- ["form"]= "solid",
- ["type"]= "alkalineEarth",
- ["neutrons"]= "5"
- },
- }
- setupScoreboard()
- while true do
- event = os.pullEvent()
- if event =="player_on" then
- Player = checkUser()
- if Player == "" then
- else
- print(Player)
- checkInv()
- end
- end
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement