• 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] Param limit

wesoly136

Member
Joined
Jul 30, 2009
Messages
562
Reaction score
9
Hi!
I need a limit to talkaction param. That when you say '/otland lol' will work but '/otland wofifjreoifreiof' or '/otland this ot is very stupid and gm is a noob' won't work :D
Hope you understand :P
 
This would limit the returned values to 1:
LUA:
local t = string.explode(param, " ", 1)
? :p

I don't know actually what you wanted, this maybe:
LUA:
if #t > 1 then
return true
end
? :p

or you wanted to limit length of param?
 
One more thing
I have a talkaction that adds custom words to the name of the item. How to do that one item can be edited only one time? I'm trying with 'string.explode' to find '(' in the name of the item but doesnt work :/(the custom words are in the (barckets))
 
One more thing
I have a talkaction that adds custom words to the name of the item. How to do that one item can be edited only one time? I'm trying with 'string.explode' to find '(' in the name of the item but doesnt work :/(the custom words are in the (barckets))

Hmmm...
Code:
if(item.actionid ~= 1337) then
	doItemSetAttribute(item.uid, "name", "Modified ".. getItemNameById(item.itemid))
	doItemSetAttribute(item.uid, "actionid", 1337)
else
	doPlayerSendCancel(cid, "This item has been already edited.")
end
 
Back
Top