Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
Better explanation of what is possible with Lua specifically.
It's just a function called within a function, however given the power of this + closures, there are a lot of capabilities and uses for callbacks in our code. callbacks can be predefined or anonymous functions, which is possible because of the lambda calculus property.
A common example is in NPC scripts:
Code:
keywordHandler:addGreetKeyword({'hi'}, StdModule.say, {npcHandler = npcHandler, text = 'Hello, |PLAYERNAME|! I have already heard about you...
Better explanation of what is possible with Lua specifically.
It's just a function called within a function, however given the power of this + closures, there are a lot of capabilities and uses for callbacks in our code. callbacks can be predefined or anonymous functions, which is possible because of the lambda calculus property.
A common example is in NPC scripts:
Code:
keywordHandler:addGreetKeyword({'hi'}, StdModule.say, {npcHandler = npcHandler, text = 'Hello, |PLAYERNAME|! I have already heard about you! As our newest member you are eligible to be granted a weapon of your {choice}?'}, checkStorageNotSet )
In this case, checkStorageNotSet is a locally defined function that returns if the desired storage location has a value other than -1, and if it doesn't, output this line.
Basically the result of checkStorageNotSet determines if I output the NPC text.