• 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] How npc can execute "commands"?

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,966
Solutions
99
Reaction score
3,383
Location
Poland
GitHub
gesior
Is it possible to make NPC who will 'kick' (/kick "name") players?
Code:
	if msgcontains(msg, 'kickme') then
	selfSay('/kick ' .. getPlayerName(cid) .. '')
	end
doesn't work :(
NPC only say "/kick Sorcer" :/
 
Last edited:
<npc name="Jeremiasz" script="data/npc/scripts/jeremiasz.lua" autowalk="1" floorchange="0" access="5">
Good? It doesn't work. Still say "/kick Sorcer"
EDIT:
If someone have same problem use:
if msgcontains(msg, 'kickme') then
doRemoveCreature(cid)
end
It's code from my NPC.
 
Last edited:
Back
Top