Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------
- ----------------------------
- ----------------------------
- ADMINS = {} -- Add names with quotes separated with commas, example: ADMINS = {'Firestonnne', 'Firestone'} -- If admin list is blank, all users have privileges
- MAP_CODE = '@5313698'
- SPAWN_LOCATION = {x=425, y=325}
- BUTTON_LOCATIONS = {
- [tfm.enum.shamanObject.anvil] = {x1=300, y1=075, x2=350, y2=125},
- [tfm.enum.shamanObject.ball] = {x1=375, y1=075, x2=425, y2=125},
- [tfm.enum.shamanObject.balloon] = {x1=450, y1=075, x2=500, y2=125},
- [tfm.enum.shamanObject.littleBox] = {x1=300, y1=150, x2=350, y2=200},
- [tfm.enum.shamanObject.box] = {x1=000, y1=000, x2=000, y2=000},
- [tfm.enum.shamanObject.littleBoard] = {x1=375, y1=150, x2=500, y2=200},
- [tfm.enum.shamanObject.board] = {x1=300, y1=225, x2=500, y2=275}
- }
- ----------------------------
- ----------------------------
- ----------------------------
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- system.disableChatCommandDisplay('reset', true)
- function reset()
- tfm.exec.newGame(MAP_CODE)
- for name,player in pairs(tfm.get.room.playerList) do
- system.bindMouse(name, true)
- end
- end
- function eventMouse(name, x, y)
- if table.getn(ADMINS) ~= 0 then
- if not is_admin(name) then
- return
- end
- end
- for id_type, loc in pairs (BUTTON_LOCATIONS) do
- if (x > loc.x1 and x < loc.x2) and (y > loc.y1 and y < loc.y2) then
- tfm.exec.addShamanObject(id_type, SPAWN_LOCATION.x, SPAWN_LOCATION.y, 0, 0, 0, false)
- return
- end
- end
- end
- function is_admin(name)
- for num,admin_name in pairs(ADMINS) do
- if name == admin_name then
- return true
- end
- end
- return false
- end
- function eventChatCommand(name, cmd)
- if table.getn(ADMINS) ~= 0 then
- if not is_admin(name) then
- return
- end
- end
- if cmd == 'reset' then
- reset()
- end
- end
- reset()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement