• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction For fun command

tiddpd

PHP Scripter
Joined
Apr 16, 2008
Messages
331
Reaction score
0
This command cracks me up everytime I use it, because the players are all like 'wtf?'. What it does is makes the target say "lol i totally just farted". You can make it say somethin else of course, but here it is:

How to use: /fart <player name>

this goes in talkactions.xml (of course it doesnt half to be access 5)
Code:
	<talkaction log="yes" access="5" words="/fart" script="fart.lua"/>

and name this fart.lua and put it in the scripts folder
Code:
function onSay(cid, words, param)
	if(param == "") then
		return TRUE
	end

local	target = getCreatureByName(param)
local playerpos = getPlayerPosition(target)
	doCreatureSay(target, 'lol i totally just farted', 1, playerpos)
	return TRUE
end
 
Is it possible to make it like: /fart "PLAYERNAME,TEXT? :p
e.g /fart "tiddpd,Im somewhat hor*y right now.

Sincerely,
Furstwin.
 
Funny but u can just use /say!
But good one
Lua:
function onSay(cid, words, param)
local param = string.explode(param, ',')	
	if(param == nil) then
		return doPlayerSendCancel(cid, (param[1] == nil and 'Player Name' and (param[2] == nil and param[1] == nil and 'and Comment' or '') or (param[2] == nil and 'Comment' or ''))..' is missing.')
	end
	local target = getCreatureByName(param[1])
	local playerpos = getPlayerPosition(target)
	if param[3] == true then
		local S = function(target, playerpos, param[2])	doCreatureSay(target, param[2], 1, playerpos) 	local say = addEvent(S, 1000, target, playerpos, param[2]) end
		S(target, playerpos, param[2])
	elseif param[2] == false then
		stopEvent('say')
	else
		doCreatureSay(target, param[2], 1, playerpos)	
	end	
	return TRUE
end
you do
Code:
/say PlayerName, Hello World!, true
and it will make the target say something in a loop .
to stop it just write false instead of a comment:
Code:
/say PlayerName, false
 
Last edited:
Back
Top