Lava Titan
Developer
Hey could someone convert this script from TFS 0.4 to TFS 1.2 please?
This is a basic newtype.lua script except that this one works like newtype and chameleon rune at same time, like:
/newtype 274 -> squirrel outfit
/newtype 2160 -> crystal coin outfit
Thanks in Advance
This is a basic newtype.lua script except that this one works like newtype and chameleon rune at same time, like:
/newtype 274 -> squirrel outfit
/newtype 2160 -> crystal coin outfit
Thanks in Advance

Code:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local t, pid = string.explode(param, ","), cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end
local period, tmp = -1, tonumber(t[3])
if(t[3] and tmp) then
period = tmp
end
if(not isNumeric(t[1])) then
if(getMonsterInfo(t[1])) then
doSetMonsterOutfit(pid, t[1], period)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")
end
return true
end
t[1] = tonumber(t[1])
local disabled = {507, 508, 510, 510}
if(isInArray(disabled, t[1])) then
return true
end
if(t[1] <= 1 or t[1] == 135 or t[1] == 453 or t[1] == 542 or (t[1] > 160 and t[1] < 192) or t[1] > 573) then
local item = getItemInfo(t[1])
if(item) then
doSetItemOutfit(pid, t[1], period)
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")
return true
end
local tmp = getCreatureOutfit(pid)
tmp.lookType = t[1]
doCreatureChangeOutfit(pid, tmp)
return true
end