Can SomeOne can give me some commands for add in my server
Like !rs command for resetscore
and !b command for !broadcast say every 1 sec
etc...
Thanks. Admin/mod comment
"Can SomeOne give me ..." give what? Leaving the most important part of the title away? Seriously? Did a random fucking zombie eat your stupid brain or what? Fixed! /DC KidJony has written
Can SomeOne can give me some commands for add in my server
Like !rs command for resetscore
and !b command for !broadcast say every 1 sec
etc...
Thanks.
Use admin script.... Im too lazy to write how bad you are because asking of things already scripted and uploaded millions times ago. Admin/mod comment
@ KidJony: you can do it. use your luaskills o,o
or your scripts not write by you?? 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
commands = {
	{
		cmd = "say",
		script = function(id,...)
			local args = {...}
			msg(id,string.char(169).."255255255"..os.date("%H:%M:%S").." "..player(id,"name")..": "..table.concat(args))
		end,
	},
}
addhook("say","yellcmd")
function yellcmd(id,txt)
	if txt:sub(1,1)=="!" then
		cmdd = false
		argument = {}
		for word in string.gmatch(txt,"[^%s]+") do
			table.insert(argument,word)
		end
		for n,v in pairs(commands) do
			if txt:sub(2,#v.cmd)==v.cmd then
				cmdd=true
				v.script(id,unpack(argument))
			end
		end
		if cmdd==false then msg2(id,string.char(169).."255000000Unknown Command!")
		end
		return 1
	end
end
the code above is used by RL Roleplay Citylife. it's easy to add command just add
1
2
3
4
{
	cmd = "<cmdname>",
	script = function(id,<another argument>) end,
},
before the end of table
EDIT: Forgot something on code, thanks to Infinite Rain's code because it remind me edited 1×, last 07.09.12 12:31:29 pm
KidJony has written
Can SomeOne can give me some commands for add in my server
Like !rs command for resetscore
and !b command for !broadcast say every 1 sec
etc...
Thanks.
u want to get ideas for commands or u want the lua ready ? Blunt has written
@
KidJony: you can do it. use your luaskills o,o
or your scripts not write by you??
Editing the tibia script is not skills. ExecL has written
Blunt has written
@
KidJony: you can do it. use your luaskills o,o
or your scripts not write by you??
Editing the tibia script is not skills.
It's far far away from it. First of all you need special string function:
1
2
3
4
5
6
7
function StrToTable(str)
	local tbl = {}
	for word in string.gmatch("[%S]+") do
		table.insert(tbl, word)
	end
	return tbl
end
After that you must program the commands
1
2
3
4
5
6
7
addhook('say', 's')
function s(id, text)
	local tbl = StrToTable(text)
	if tbl[1] == "!die" then
		parse('killplayer '.. id)
	end
end
easy Thanks For Users Replyed With a Code
I don't want Lua Script Already Ready i Just want Codes
For New Lua Script