• 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 If someone say "fuck" he is getting exhausted

poliwag

New Member
Joined
Dec 10, 2011
Messages
40
Reaction score
1
can anyone make me that script????
if someone say "fuck" he cant say "ass" in 2 seconds
i need it to talkactions

please thanks.
 
in data/talkactions/talkactions.xml insert
XML:
	<talkaction log="no" words="fuck, ass" separator="," case-sensitive="no" event="script" value="curse.lua"/>
create file /data/talkactions/scripts/curse.lua and paste
Lua:
local c = {
	exhaustion = 2, -- in seconds
	storage = 30102, -- storage value used to save exhaustion
	onlyDefaultChannel = false
}

function onSay(cid, words, param, channel)
	if c.onlyDefaultChannel then
		if (channel ~= CHANNEL_DEFAULT) then return true end
	end

	if(exhaustion.check(cid, c.storage)) then return true end
	exhaustion.set(cid, c.storage, c.exhaustion)

	return false
end
 
Last edited:
[Error - LuaScriptInterface::loadFile] data/talkactions/scripts/curse.lua:4: '}' expected (to close '{' at line 1) near 'onlyDefaultChannel'
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/curse.lua)
data/talkactions/scripts/curse.lua:4: '}' expected (to close '{' at line 1) near 'onlyDefaultChannel'
error console
 
Try this:
Lua:
local c = {
	exhaustion = 2, -- in seconds
	storage = 30102, -- storage value used to save exhaustion
	onlyDefaultChannel = false
}
 
function onSay(cid, words, param, channel)
 	if c.onlyDefaultChannel then
		if (channel ~= CHANNEL_DEFAULT) then return false end
	end
 
	if(exhaustion.check(cid, c.storage)) then return true end
	exhaustion.set(cid, c.storage, c.exhaustion)
 
	return true
end
 
same ;/
[Error - LuaScriptInterface::loadFile] data/talkactions/scripts/curse.lua:4: '}' expected (to close '{' at line 1) near 'onlyDefaultChannel'
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/curse.lua)
data/talkactions/scripts/curse.lua:4: '}' expected (to close '{' at line 1) near 'onlyDefaultChannel'
:

edit:

copied
local c = {
exhaustion = 2, -- in seconds
storage = 30102 -- storage value used to save exhaustion
onlyDefaultChannel = false
}

function onSay(cid, words, param, channel)
if c.onlyDefaultChannel then
if (channel ~= CHANNEL_DEFAULT) then return false end
end

if(exhaustion.check(cid, c.storage)) then return true end
exhaustion.set(cid, c.storage, c.exhaustion)

return false
end

and nothing;/
 
Lua:
local c = {
	exhaustion = 2, -- in seconds
	storage = 30102, -- storage value used to save exhaustion
	onlyDefaultChannel = false
}

function onSay(cid, words, param, channel)
	if c.onlyDefaultChannel then
		if (channel ~= CHANNEL_DEFAULT) then return true end
	end

	if(exhaustion.check(cid, c.storage)) then return true end
	exhaustion.set(cid, c.storage, c.exhaustion)

	return false
end

missed a comma

-- edit :D
javol working!, sorry I had to eat something :D

if work than klick here :p
 
Back
Top