First commit
This commit is contained in:
25
app/SabrehavenServer/data/talkactions/scripts/chameleon.lua
Normal file
25
app/SabrehavenServer/data/talkactions/scripts/chameleon.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
local condition = Condition(CONDITION_OUTFIT, CONDITIONID_COMBAT)
|
||||
condition:setTicks(-1)
|
||||
|
||||
function onSay(player, words, param)
|
||||
if not player:getGroup():getAccess() then
|
||||
return true
|
||||
end
|
||||
|
||||
if player:getAccountType() < ACCOUNT_TYPE_GOD then
|
||||
return false
|
||||
end
|
||||
|
||||
local itemType = ItemType(param)
|
||||
if itemType:getId() == 0 then
|
||||
itemType = ItemType(tonumber(param))
|
||||
if itemType:getId() == 0 then
|
||||
player:sendCancelMessage("There is no item with that id or name.")
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
condition:setOutfit(itemType:getId())
|
||||
player:addCondition(condition)
|
||||
return false
|
||||
end
|
||||
Reference in New Issue
Block a user