• 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!

Lua Where can I learn lua?

Status
Not open for further replies.
What do you think? This Script works?
I learned a little.


Code:
getPlayerGhostAccess(cid, item)
if item.itemid == 8983 then
		doPlayerSendTextMessage(cid,21,"You are a ghost now !")
            doPlayerGetGhostAcess(cid)
end
	return TRUE
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 8983 then
		doPlayerSendTextMessage(cid,21,"You pulled it!")
		doTransformItem(item.uid, item.itemid + 1)
	elseif item.itemid == 8984 then
		doPlayerSendTextMessage(cid,21,"You pulled it back!")
		doTransformItem(item.uid, item.itemid - 1)
	end
	return TRUE
end



THIS ONE?
 
Lua 5.1 Reference Manual - contents
and in your servers doc folder file LUA_FUNCTIONS (outdated).

If you want to learn lua, the easiest way will be to read basic lua tutorials then other peoples code and learn how it works.. then attempt to remake or modify it as long as its not a complex script. Then start on your own script when you have a idea of how different functions can be used togather to get the output you want.
 
Status
Not open for further replies.
Back
Top