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 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
And make new file named banhammer.lua in actions/scripts/tools
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
Ban Hammer works by using it on people:
Ban Hammer can be used only by Gods (can be set for your own needs)
Ban hamme can be used only on players:
Ban Hammer can be used only by Gods (can be set for your own needs)
Ban hamme can be used only on players:
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: