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

TalkAction Terror command for GM's :)

Colandus

Advanced OT User
Senator
Joined
Jun 6, 2007
Messages
2,434
Solutions
19
Reaction score
218
Location
Sweden
This is funny command I made to terror my players hueahuea :D

First you need these functions: Sleep function, Position function
Then go to data/talkactions/talkactions.xml and write:
Code:
<talkaction words="/terror" access="4" script="terror.lua"/>

And in data/talkactions/scripts make file called "terror.lua" and in it paste this code:
Code:
-- /terror text
local messageAmount = 40

function onSay(cid, words, param)
	if isPlayerGhost(cid) == TRUE then
		enableSleep(function()
			local tmpPos = {}
			local i = 0
			for j = 1, messageAmount * 5 do -- instead of while (for safety)
				local center = getCreaturePosition(cid)
				local pos = Position(math.random(center.x - 7, center.x + 7), math.random(center.y - 5, center.y + 5), center.z, 1)
				local thing = getTileThingByPos(pos)
				if thing.uid > 0 then
					if isCreature(thing.uid) == TRUE or hasProperty(thing.uid, CONST_PROP_BLOCKINGANDNOTMOVEABLE) == FALSE and not comparePos(tmpPos, pos) then
						i = i + 1
						tmpPos = pos
						sleep(math.random(300, 700))
						doCreatureSay(cid, param, TALKTYPE_SAY, pos)
					end
				end
				
				if i == messageAmount then
					break
				end
			end
		end)
	else
		doPlayerSendCancel(cid, "This command is only available while in ghost mode.")
	end
	return TRUE
end


Have fun terrorizing your players,
Colandus
 
Last edited:
nice cola... coca cola ;D

you will be responsible for heart attacks by the tibia!
 
dont work for me i use 0.2 and add slep funtion and position, in console dont see any error but dont work.
 
Your GM need to be invisible when you execute the command.
 
[26/02/2009 02:59:05] data/talkactions/scripts/terror.lua:6: attempt to call global 'enableSleep' (a nil value)
[26/02/2009 02:59:05] stack traceback:
[26/02/2009 02:59:05] data/talkactions/scripts/terror.lua:6: in function <data/talkactions/scripts/terror.lua:4>
 
strange its not working at 0.3.1pl2 logs dont give any errors i added functions
my command is
PHP:
/terror MUHAHAHA
 
Back
Top