• 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!

Solved Ban not working 0.3.7 SVN Crying Damson 8.6

Freezer

New Member
Joined
Mar 14, 2013
Messages
54
Reaction score
0
Location
Germany
Hiho,
i searched the whole forum for about 2h >.<... I can't figure out how the ban command should work in the 0.3.7 SVN Crying Damson... When I say /ban there opens a "Chat window" but no matter what I type in there, it does not work... says also "invalid action" sometimes while typing sth in...
I hope someone can help me to solve this issue :)



EDIT:

This fancy /ban script does NOT work for Gods! You have to be A GM,CM or whatever...


This is just how I fixed it on my server... Maybe it helps someone.

:)
 
Last edited:
lol, bans doesn't work for me either after testing

Found one script, not sure who is real author, removed reason and action which didn't worked, here's edited code, tested on 0.3.7:
Lua:
-- /ban PLAYERNAME, NUMBERDAYS(?), COMMENT
function onSay(cid, words, param)
	local parametres = string.explode(param, ",")
	if(parametres[1] ~= nil) then
		local accId = getAccountIdByName(parametres[1])
		if(accId > 0) then
			local comment = "No comment made"

			if(parametres[2] == nil) then
				doPlayerSendCancel(cid, "You must enter ban days.")
				return true
			elseif(isNumber(parametres[2]) == false) then
				doPlayerSendCancel(cid, "Ban days use only numbers.")
				return true
			end

			if(parametres[3] ~= nil) then
				comment = parametres[3]
			end

			doAddAccountBanishment(accId, getPlayerGUIDByName(parametres[1]), os.time() + (86400 * parametres[2]), comment, getPlayerGUID(cid))
			local player = getPlayerByNameWildcard(parametres[1])
			if(isPlayer(player) == true) then
				doRemoveCreature(player)
			end
		else
			doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")
		end
	else
		doPlayerSendCancel(cid, "Player name required. Command usage: /ban name, days, comment")
	end

	return true
end

Edit:
Lol, playerban doesn't work on basic 0.3.7 code, while inserting playername, days, comment to accban works

Haha, I've IP-banned localhost. Ima fucking genius
 
Last edited:
Haha, I've IP-banned localhost. Ima fucking genius

Trololololo :D

Well, I don't even know why your posted script is not working... "As GOD"
Maybe this is a reason:
GOD has group_id=6 the script is also checking it with:
Lua:
		local accId = getAccountIdByName(parametres[1])
		if(accId > 0)
Is that really necessary?
You defining the rights also in the talkactions.xml with:
XML:
	<talkaction log="yes" words="/ban" access="3" event="script" value="ban.lua"/>

So only everyone who group_id >= 3 should be able to cast it. Or am I wrong? :blink:


But I really don't care anymore. I use this time better in scripting some nice quests. I set my account to a lower group_id and all is fine :).
 
Last edited:
I got an idea now.
Just remove from creaturescripts\scripts\ban\type.lua and actions.lua this:
Lua:
	if(not isInArray(ACCESS[getPlayerAccess(cid)], channel)) then
		doPlayerSendCancel(cid, "You cannot do this action.")
		return false
	end
everything is defined in tables anyway so it should work without it, just disable !report for players if it uses ban.lua just in case of cheat engine
 
Back
Top