Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Hass
- --Made in: 10/01/2020
- --Last update: 18/01/2020
- --[[How to use ?
- Replace your name with Hass in admin="Hass"
- Go to map editor and paste this code
- <C><P title="Title" /><Z><S /><D /><O /></Z></C>
- With changing the "Title" to the title you want
- "Don't use ' in the title for example don't make it title="Hass's World"
- Make the map and load it in your tribe house :)
- ]]
- admin="Hass"
- for _,v in pairs ({'disablePhysicalConsumables','disableAutoNewGame','disableAllShamanSkills','disableAfkDeath','disableAutoTimeLeft','disableAutoShaman'}) do
- tfm.exec[v](true)
- end
- function _find(table, find)
- found=false
- index=0
- for ind, obj in pairs(table) do
- if obj==find then
- found=true
- index=ind
- break
- end
- end
- return {found, index}
- end
- function eventNewGame()
- if tfm.get.room.currentMap ~= "@0" then
- xml = tfm.get.room.xmlMapInfo.xml
- creator = tfm.get.room.xmlMapInfo.author
- end
- local titles = {}
- local match_this={'title="(.-)"', 'title ="(.-)"', 'title= "(.-)"', 'title = "(.-)"'}
- for title in string.gmatch(xml, '<P .-/>') do
- for _,m in pairs(match_this) do
- if not _find(titles, title:match(m))[1] then
- table.insert(titles, title:match(m))
- end
- end
- end
- for i = 1, #titles do
- ui.setMapName("<J>"..creator.." <BL>- "..titles[i])
- end
- end
- eventPlayerDied=tfm.exec.respawnPlayer
- eventPlayerWon=tfm.exec.respawnPlayer
- local c={"map"}
- function eventChatCommand(n,cmd)
- local c={}
- for i in cmd:gmatch('[^%s]+') do
- table.insert(c,i)
- end
- c[1]=c[1]:lower()
- if c[1]=="map" and n==admin then
- tfm.exec.newGame(c[2])
- end
- end
- for i=1,#c do
- system.disableChatCommandDisplay(c[i],true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement