Change directory structure
This commit is contained in:
44
luprex/lua/login.lua
Normal file
44
luprex/lua/login.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
makeclass('login')
|
||||
|
||||
function login.interface(actor, place)
|
||||
gui.menu_item("cb_becomeplayer", "Become a Player")
|
||||
gui.menu_item("cb_p123", "Print 1, 2, 3")
|
||||
gui.menu_item("cb_p123_nopredict", "Print 1, 2, 3 nopredict")
|
||||
gui.menu_item("cb_uglytimedaemon","Start the Time Daemon")
|
||||
gui.menu_item("cb_seedprng","Seed the PRNG")
|
||||
end
|
||||
|
||||
function login.cb_seedprng(actor,place,dialog)
|
||||
local result=http.get{method='GET',host='www.random.org',path='/cgi-bin/randbyte',params={nbytes='32',format='f'},verifycertificate=false}
|
||||
pprint(result)
|
||||
end -- "GET /cgi-bin/randbyte?nbytes=16384&format=f HTTP/1.0\nHost: www.random.org\n\n"
|
||||
|
||||
|
||||
function login.cb_becomeplayer(actor, place, dialog)
|
||||
actor.kind='P'
|
||||
actor.Count={} setmetatable(actor.Count,NilIsZero)
|
||||
actor.food={} setmetatable(actor.food,NilIsZero)
|
||||
actor.spectra={} setmetatable(actor.spectra,NilIsZero)
|
||||
actor.stack={}
|
||||
actor.team='red'
|
||||
tangible.setclass(actor, player)
|
||||
tangible.animate(actor,{action="warp",plane="main",x=0,y=0,z=0})
|
||||
end
|
||||
|
||||
function login.cb_p123(actor, place, dialog)
|
||||
print(1)
|
||||
wait(1)
|
||||
print(2)
|
||||
wait(1)
|
||||
print(3)
|
||||
end
|
||||
|
||||
function login.cb_p123_nopredict(actor, place, dialog)
|
||||
nopredict()
|
||||
print(1)
|
||||
wait(1)
|
||||
print(2)
|
||||
wait(1)
|
||||
print(3)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user