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

Action Ban Hammer

Wavoz

Oldschooler
Joined
Jul 10, 2011
Messages
1,009
Reaction score
81
What is ban hammer? Ban Hammer is something i used to love in my server. Ban Hammer does not "ban" players, it punishes them with something worse than ban - they will be unable to move or logout, also they will get black skull.

Ban Hammer works by using it on people:
1.png

Ban Hammer can be used only by Gods (can be set for your own needs)
2.png

Ban hamme can be used only on players:
3.png

Ban hammer effects will lose after player has relogged or died. (after using ban hammer on player, he/she will be unable to log out for 1 minute)

Add this to actions.xml
Code:
 <action itemid="2557" event="script" value="tools/banhammer.lua" />

And make new file named banhammer.lua in actions/scripts/tools
Code:
local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 60000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerAccess(cid) < 5 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have no access to use this hammer!")
return false
end

if not isPlayer(itemEx.uid) or cid == itemEx.uid then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You can only use this hammer on players!")
return false
else
doAddCondition(itemEx.uid, condition)
doCreatureSetSkullType(itemEx.uid, 5)
doCreatureSetNoMove(itemEx.uid, 1)
doSendMagicEffect(getPlayerPosition(itemEx.uid), CONST_ME_MAGIC_RED)
end
return true
end

You can configure it to your own needs:
setConditionParam(condition, CONDITION_PARAM_TICKS, 60000) -- time in MS how long player will be unable to log out (60000 = 1 min)
getPlayerAccess(cid) < 5 --People who are able to use this hammer (1=player, 2=tutor etc... You can check data/XML/groups for your server)
doCreatureSetSkullType(itemEx.uid, 5) -- Skull type (SKULL_RED = 4, SKULL_BLACK = 5) You can check skull types in data/lib/constant.lua for your server.

Have any questions regarding the script? Post here or leave me a PM.
I know this is a simple script but i felt like contributing to Otland :)
 
Last edited:
I got a lil warning for real map OTs :)
Venore shipyard
1.png

The Throne of Damnation (Tafariel) in Pits of Inferno Quest
2.png


In order to prevent hammer getting into wrong hands i recommend removing those hammers.
 
I got a lil warning for real map OTs :)
Venore shipyard
1.png

The Throne of Damnation (Tafariel) in Pits of Inferno Quest
2.png


In order to prevent hammer getting into wrong hands i recommend removing those hammers.

why players cant use them right? so who bothers :p
 
Back
Top