Want to kick a player but his name is too long or has spaces at the end and you keep writing it wrong?
Use this rune on him!
I thought using doRemoveCreature on a player would crash the server, but it just kicks the player.
You can also remove npcs and monsters with this rune.
kickrune.lua
actions.xml
Only tested on TFS 0.2.8.
You can also make this into a talkaction, so you can have less commands in sources and more in talkactions
Rep if you like it :thumbup:
Use this rune on him!
I thought using doRemoveCreature on a player would crash the server, but it just kicks the player.
You can also remove npcs and monsters with this rune.
kickrune.lua
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerGroupId(cid) >= 5 then
if isPlayer(item2.uid) == 1 or isCreature(item2.uid) == 1 then
doRemoveCreature(item2.uid)
doSendMagicEffect(topos,12)
end
else
doPlayerSendCancel(cid,'Sorry, not possible.')
end
end
Code:
<action itemid="2315" script="kickrune.lua" allowfaruse="1" blockwalls="0"/>
Only tested on TFS 0.2.8.
You can also make this into a talkaction, so you can have less commands in sources and more in talkactions
Rep if you like it :thumbup:
Last edited: