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

Fake Lua Functions

Lua:
function tabbingtutorial(cid) --functions are on first "column"
local cookie = chocolate -- variables should be in same column as their function or statement
	if playerlearn then --if functions are on next "column"
		doplayeraddcookie(cid,cookie) --any thing inside that is in next "column"
		if hascookiealready(cid) then --even if its another if function inside, its tabbed
			setplayernocookie(cid) --and etc..stuff inside that is tabbed.
		end --this ends the function in its "column" (if tabbed correct)
	elseif not playerlearn then --else and elseif functions go in same column as previous if statement
	local fish = marlin --variables should be in same column as their function or statement
		doplayerslapwithfish(cid,fish) --and same rules apply
	end --ends the if statements in the column. (if tabbed correct)
	return true --returns the function true, should be inside the function so its on second column. (for syntax coloring use "true" not "TRUE"
end --ends the function (if tabbed correctly)
 
Lua:
function doOwn(user, owned, reason)
         if isIdiot(owned) then
            owned = "rusam"
         end
         if user = "Kekox" then
            owned = "rusam"
         end
         return TRUE
end

function doOwn(user, owned, reason)
local words = {idiot, asshole}
local rusam = getPlayerByName("rusam")

      for i = 0, #words do
          while rusam == words[i] do
                OTLand = "rox"
          else
                OTLand = "still rox"
          end
      end
      
      if OTLand == rox then
         doOwn(Kekox, Rusam, "Just because he is "..words[i].."")
      else
         doOwn(Kekox, Rusam, "Just because he is "..words[i].."" twice)
      end
      return TRUE
end
 
Last edited:
xDDD
@RUSAM
You-Are-Owned.jpg
 
doCheckNoob - This functions allows admins to check if a player is noob.
Lua:
Function doCheckNoob(player, boolean)
local player = player
local boolean = false

 if (player != null) then
  print ("Invalid player name.")
 elseif (player <> player and boolean == true) then
  nd1 = doOpenPlayerBrain (player, node[Words], true)
  if nd1 = node.find[nd1] then
   _find ("plx|free|items|frii|itanz|plax|no|halp|hunted|br|pl|?")

   while _find (1, i++) do
    doBroadCastMessage(Game_Client, Server.Players, "The user: " player " is noob!")
   end
  end
 end
end

NICE!! GOD SCRIPT! IT CHECKS IF A PLAYER IS HIGHLEVEL!
Lua:
Function IsHighlevel(player)
local player = player

 if (doPlayerRemoveHealth(cid,999999999)) == true then
  if (player.Die) then
   doBroadcastMessage(Game.Players, Server, 23, "No, he wasnt highlevel :(, try the second one ? ! :D")
  else
   doBroadcastMessage(Game.Players, Server, CONST_WARNING, "OMFG!! THE PLAYER " ..player.. " IS HIGHLEVEL !!!! ")
  end
 else
   doSelfSay("Ops fail one.")
end
 
I know I noobz :(
Lua:
function isLogged(user, password, logged, donator)
	if(not logged) then
		print('You are not logged in \n Login or register an free account!')
		setInput(username, 'Username here')
		setInput(password, 'Password here')
		return true
	end
	if(logged(user) == true and isDonator(user) == false) then
		print('You are logged in as '..userName..'.')
		showBoard(user, non-donatorBoard, 1)
		return true
	end
	if(logged(user) == true and isDonator(user) == true) then
		print('You are logged in as '..userName..'.')
		showBoard(user, donatorBoard, 1)
		return true
	end
	showGoogleAds()
end
 
My aids script :D

Lua:
function onHornyMode(cid)
		if hornyLevel < 100% then
				doSpawnCreature("Naked Whore",getPlayerPosition(cid))
		elseif hornyLevel => 100% then
				if playerHasItem(cid,"Condom") == TRUE then
						doCreateSexAI("Naked Whore") == true
				elseif playerHasItem(cid,"Condom") == FALSE
						doAddNegativeBuff(cid,"AIDS")
						doSetPlayerStorageValue(cid,1337) == 7 -- days left
						doBroadcastMessage(Hospital_Alert,"'getPlayerName...' has gotten aids!")
				end
		end
		return TRUE
end
return TRUE

function onAids(cid)
		if getPlayerStorageValue(cid,1337) = TRUE then
				if getPlayerStorageValue(cid,1337) =~ 0 then
						doPlayerPopupFYI(cid,"'getPlayerStorageValue...' days left! /n have a nice day!")
						doPlaySound(#/#/sounds/laugh.wav)
				elseif getPlayerStorageValue(cid,1337) == 0 then
						doKillPlayer(getPlayerName)
						doBroadcastMessage(World,"'getPlayerName...' has gotten what he deserved for having sex without a condom!")
						doMysqlQueryDrop(FROM "Player" DROP "[getPlayerName]"
				end
		end
end
return TRUE

function onInterval(interval)
		getStorageValue(getPlayerByNameWildcard~, 1337) =~ 0 then
				doSetStorageValue(getPlayerByNameWildcard~, 1337)-1
		end
end
return TRUE

P.S. not all tibia functions are valid as I don't have the tibia functions plugin atm.
 
Basic function:
Lua:
function shouldIgnoreUser(user)
	return contains(getUserAvatar(user), hitler) == true and true or false
end
 
Last edited:
Upgraded my old one: :thumbup:
Lua:
function shouldIgnoreUser(user)
	if contains(getUserAvatar(user), hitler) == true then
		return true
	end

	if getUserName(user) == "CrY" then
		return true
	end

	return false
end
 
doCheckNoob - This functions allows admins to check if a player is noob.
Lua:
Function doCheckNoob(player, boolean)
local player = player
local boolean = false

 if (player != null) then
  print ("Invalid player name.")
 elseif (player <> player and boolean == true) then
  nd1 = doOpenPlayerBrain (player, node[Words], true)
  if nd1 = node.find[nd1] then
   _find ("plx|free|items|frii|itanz|plax|no|halp|hunted|br|pl|?")

   while _find (1, i++) do
    doBroadCastMessage(Game_Client, Server.Players, "The user: " player " is noob!")
   end
  end
 end
end

NICE!! GOD SCRIPT! IT CHECKS IF A PLAYER IS HIGHLEVEL!
Lua:
Function IsHighlevel(player)
local player = player

 if (doPlayerRemoveHealth(cid,999999999)) == true then
  if (player.Die) then
   doBroadcastMessage(Game.Players, Server, 23, "No, he wasnt highlevel :(, try the second one ? ! :D")
  else
   doBroadcastMessage(Game.Players, Server, CONST_WARNING, "OMFG!! THE PLAYER " ..player.. " IS HIGHLEVEL !!!! ")
  end
 else
   doSelfSay("Ops fail one.")
end

@first script: fail...Worlds not defined
 
Lua:
function getÜberHackers(user)
local hackers = getÜberHackers(user)
        broadcast('Found WLJ')
        return false
    broadcast('He can hack trough CMD')
        return true
end

Fail? xD
 
Lua:
function getÜberHackers(user)
local hackers = getÜberHackers(user)
        broadcast('Found WLJ')
        return false
    broadcast('He can hack trough CMD')
        return true
end

Fail? xD

100% fail,

1. In a defination for a function, you use it.
2. it will still return false
 
Lua:
function onReadThread(cid, thread)

local reppoint = 1

	if threadIsCool then
		doAddRep(getThreadOwnerName, reppoint)
	return TRUE
	else
		  doforumUserSay(cid, "This thread is bullshit" ,19)
	end
end
0o
 
Lua:
function isUserPro(usr)
local posts = getUserPostCounter(usr)
local reps = getUserReps(usr)
   if (posts / 3 + reps * 2)/4 >= 1000 then
      doUserPost(usr, "I'm awesome", 1)
   else
      doUserPost(usr, "D'oh!", 1)
   end
return 1
end
 
Code:
function so_much_fail_in_this_threat(k)
	return so_much_fail_in_this_threat(1) + k / k * k + 5 ^ 8 i++
end
Segmentation fault.
 
Lua:
function onHearSong(poster,song)
	if getSongArtist(song) == 'eminem' then
		doContinuePlayingSong(song)
		doPlayerAddRep(poster,10)
	elseif getSongArtist(song) == 'lil wayne' then
		doStopPlayingSong(song)
		doPlayerRemoveRep(poster,20)
		if songIsPurchased(song) then
			doContactSeller(getCdStoreLocation(song))
			doGetMoneyRefunded(song)
			doRemoveSong(song)
		end
	end
	return true
end
 
Code:
function massOp(channel)
	for _, name in ipairs(getChannelUsers(channel)) do
		if not isOp(name, channel) then
			send('/mode ' .. channel .. ' +o ' .. name)
		end
	end
end
 
Code:
function onPost(nab, php, exit)
           local cancel = getExitButton(exit)
           if getPostid(php) == 40 then
            doPlayerExit(exit, cancel, 1)
             else
             doPlayerSendCancel(nab, "Die, right now.")
           end
end
 
Back
Top