Maybe its possible to bring QT socket functions into mudlet API. I'm sure a better coder than I could automate this even further by using GMCP to detect crystal corpses in your inventory and polyhedra in the room on Continuum, but this is functional enough for my purposes even if it's not the most efficient code. I can open second world and use events between worlds communicate, but thats not very handy. This just counts your crystals back down to zero so you know when you've fed all the polyhedra. Trigger pattern: ^(. ) begins to glow as the corpse of a glistening crystal sinks into itĬecho("\nYou have ". Polyhedra will spit back anything other than crystal corpses, and if they're already charged, they won't accept further corpses. It will attempt to give each one a crystal (even wonder crystals). This fires when you do IH in a room with any Continuum polyhedron. This simply counts your crystal corpses collected from the air above the Transphenortex Grid and shows you how many you have. matches)Ĭvform, cvcircle, cvappoint, cvleave, etc.Ĭvadd is the same as cvjoin, because I kept forgetting the syntax and that seems more intuitive.Ĭecho("\nYou have ". It could pretty easily be repurposed for you southern folk -peer. Use: #40 thing will send "thing" 40 times.Īnd finally, here is a tiny alias that I made to make my life easier with having to quickly make and populate covens for resurgems and such. An instance of the Socket class is retrieved by calling core.tcp(). When you want to use socket functions in your actions, you must use this class. Here is an old gem for which I take no credit, I forget where this thing came from. The Socket class is a replacement for the standard Lua Socket class and is compatible with HAProxy’s non-blocking nature. ])ĮDIT: I.I don't understand this spoiler tag. ![]() Target_title = tempTrigger(target:title(), ]. If target_title then killTrigger(target_title) end If target_lower then killTrigger(target_lower) end GustRecharge = tempTrigger(], ])Įdit: Holy mangled code. The use case for this library is: you are developing a lua-resty module relying on cosockets, but you want it to also be usable in OpenResty's init context or even in plain Lua. If gustRecharge then killtrigger(gustRecharge) end cosocket/LuaSocket automatic compatibility module for lua-resty modules wanting to be compatible with plain Lua or OpenResty's init context. If ndb.isperson(string.title(matches)) then Local currentRoomExits = getRoomExits(mmp.currentroom)Įlseif matches and not matches then Gust - gusts whoever, direction is decided as aboveĪlias: ^gust$|^gust (\w )$|^gust (\w ) (\w )$ Gust - gusts whoever is set as 'target', checks roomexits and picks the 2nd one So, I made this handy dandy alias for gusting people last night. Local pwp = math.floor((tonumber()/tonumber())*100) Local pep = math.floor((tonumber()/tonumber())*100) Local pegp = math.floor(tonumber()/tonumber())*100) Local php = math.floor((tonumber()/tonumber())*100) local pmp = math.floor((tonumber()/tonumber())*100) ![]() Solid border-radius: 7 padding: 3px ]])Įnd_gauge.back:setStyleSheet(]) ![]() Health_gauge = Geyser.Gauge:new()Įnd_ont:setStyleSheet([[background-color: yellow border-top:ġpx black solid border-left: 1px black solid border-bottom: 1px black And without needing the user to do any extra work.Basic gauges for vitals: (should be 2 separate scripts) It's dirty, but it gets the job done, I guess. The server could optionally reply with a meaningful file constructed of this information, an empty file, or something else equally meaningless and subsequently overwritten the next time a post is made. The downloaded "file" doesn't actually exist, but the URL would provide the server with the info that it needs to construct the database entry. the server is sending the information to the client-side. the server is creating the object and used to encapsulate the server socket. headers' Example: local luaheaders require http.headers The http. Example:Įdit for clarity: makepost.html?denizenName=someName,denizenLavel=someLevel,area=someAreaĮt cetera. Example: local luaserver require rver require 'http. If I'm understanding you correctly, the URL of the item that they are "GETting" would be all of the code that I need. It's not exactly behaving by the right rules to be a REST interface, but it's kind of the same idea.ĮTA: JSON would be extremely well suited to this, as we include YAJL bindings with yajl.to_string and yajl.to_value to shift from lua table to a string of JSON and vice versa. The file downloaded would be the payload back from the server, which you could then parse using file io. Demonnic wrote:As a sort of hacky hack hack way of doing it, you could code the server to parse http GET requests, and then use downloadFile() to communicate with the server.
0 Comments
Leave a Reply. |