Meka][Meka Unstopable Posts: 700
| just a quick script to get u started with lua + hexhub
Code: | --// Random In/Out Ro 0.01 --// Meka][Meka --// HexHub Lua Plugin Script --// Just a quick sample of using lua scripting with hexhub. Intros = { '[USERNAME] has arrived to terrorize you all!', '[USERNAME] has appeared out of the darkness', 'Oh my god, you killed....uhh wait, [USERNAME] entered the hub.', } Outros = { '[USERNAME] Has Left The Hub', 'Aliens Rocks Abduct [USERNAME], And They Are Gone.', '[USERNAME] Begins Shrinking, And Eventually Disappears From The Hub.', 'Three Giant Men In White Coats March In And Haul Away [USERNAME] Kicking and Screaming.', } function UserConnected(user) LevelBot = GetProfileName(user.iProfile); local RandMsg = string.gsub(Intros[math.random(1,table.getn(Intros))], "%[USERNAME%]", user.sName); SendToAll(LevelBot, RandMsg); end function UserDisconneted(user) LevelBot = GetProfileName(user.iProfile); local RandMsg = string.gsub(Outros[math.random(1,table.getn(Outros))], "%[USERNAME%]", user.sName); SendToAll(LevelBot, RandMsg); end | -/Meka][Meka
|