Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- see = [[<b><VP><a href="event:pad1">Menu Pad!</a></b>]]
- Fly = {}
- Info = [[
- <V> Hello and welcome to <VP>MenuPad<V> ! Here, you can use communly known commands but it A <VP>Pad<V> :)
- You can access this help menu when ever you want by writing <BL>!help<V> and for the Pad use <BL><a href="event:pad1">!pad</a><V>.
- <p align="right"><a href="event:close"><R>Close</a></p>
- ]]
- pad1 = [[
- <BL><a href="event:sham">Set Shaman</a> :<V> sets the specific mouse as a shaman.
- <BL><a href="event:snow">Snow</a> :<V> sets snow to the map.
- <BL><a href="event:map">Map</a> :<V> plays youre map.
- <BL><a href="event:vamp">Vampire</a> :<V> sets the specific mouse as a vampire.
- <BL><a href="event:fly">Fly</a> :<V> Gives the ability to fly for the following mouse.
- <BL><a href="event:unfly">Unfly</a> :<V> Disable the ability to fly for the following mouse.
- <R><p align="center"><a href="event:close">Close</a></p>
- ]]
- function eventNewPlayer(name)
- tfm.exec.bindKeyboard(name, 32, true, true)
- ui.addTextArea(0 , see, name, nil, nil, nil, nil, nil, nil, 0.92, true)
- Fly[name]=false
- end
- for p, player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(p)
- end
- function eventTextAreaCallback(id, name, event)
- if event=="sham" then
- ui.addPopup(0, 2,[[<font size="16"><J><b>Player Name</b>:</font>]], name, nil, nil, nil, true)
- elseif event=="snow" then
- tfm.exec.snow()
- elseif event=="map" then
- ui.addPopup(1, 2, [[<font size="16"><J><b>Map code</b>:</font>]], name, nil, nil, nil, true)
- elseif event=="vamp" then
- ui.addPopup(2, 2, [[<font size="16"<J>><b>Player Name</b>:</font>]], name, nil, nil, nil, true)
- elseif event=="pad1" then
- ui.removeTextArea(see,name)
- ui.addTextArea(1001, pad1, name, nil, nil, nil, nil, nil, nil, 0.92, true)
- elseif event=="close" then
- ui.removeTextArea(id,name)
- ui.addTextArea(0,'<b><VP><a href="event:pad1">Menu Pad!</a></b>',name,nil,nil,nil,nil,nil, nil, 0.92, true)
- elseif event=="fly" then
- tfm.exec.bindKeyboard(name, 32, true, true)
- ui.addPopup(3, 2,[[<font size="16"><J><b>Player Name</b>:</font>]], name, nil, nil, nil, true)
- elseif event=="unfly" then
- ui.addPopup(4, 2,[[<font size="16"><J><b>Player Name</b>:</font>]], name, nil, nil, nil, true)
- end
- end
- function eventKeyboard(name,key,down,x,y)
- if Fly[name] then
- if key==32 then
- tfm.exec.movePlayer(name,0,0,true,0,-50,false)
- end
- end
- end
- function eventPopupAnswer(id,name,answer)
- if id==0 then
- if answer==nil then
- tfm.exec.setShaman(name)
- elseif answer=="all" then
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.setShaman(name)
- end
- else
- tfm.exec.setShaman(answer)
- end
- elseif id==1 then
- if answer~=nil then
- tfm.exec.newGame(answer)
- else
- tfm.exec.newGame(math.random(0,210))
- end
- elseif id==2 then
- if answer~=nil then
- tfm.exec.setVampirePlayer(answer)
- else
- tfm.exec.setVampirePlayer(name)
- end
- elseif id==3 then
- if answer~=nil then
- Fly[answer]=true
- else
- Fly[name]=true
- end
- elseif id==4 then
- if answer~=nil then
- Fly[answer]=false
- else
- Fly[name]=true
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement