Need edit this script to use in TFS 1.2... Pls help =)
Creaturescripts/scripts/vocouts.lua
creaturescripts.xlm
Have this error. Plx help =)
Creaturescripts/scripts/vocouts.lua
function onLogin(cid)
registerCreatureEvent(cid, "OutfitClass")
return true
end
function onOutfit(cid, old, current)
local class = {
[1] = {[0] = {136, 140}, [1] = {128, 132}}, -- citizen, nobleman
[2] = {[0] = {136, 138}, [1] = {128, 130}}, -- citizen, mage
[3] = {[0] = {136, 137}, [1] = {128, 129}}, -- citizen, hunter
[4] = {[0] = {136, 139}, [1] = {128, 131}}, -- citizen, knight
[5] = {[0] = {136, 140, 141, 158}, [1] = {128, 132, 133, 154}}, -- citizen, nobleman, summoner e shaman
[6] = {[0] = {136, 138, 148, 149}, [1] = {128, 130, 144, 145}}, -- citizen, mage, druid e wizard
[7] = {[0] = {136, 137, 156, 155}, [1] = {128, 129, 152, 151}}, -- citizen, hunter, assassin e pirate
[8] = {[0] = {136, 139, 142, 147}, [1] = {128, 131, 134, 143}} -- citizen, knight, warrior e barbarian
}
if getPlayerAccess(cid) > 2 then return true end
local outfits = class[getPlayerVocation(cid)][getPlayerSex(cid)]
return isInArray(outfits, current.lookType) and true or doPlayerSendCancel(cid, "você não tem vocação para usar essa outfit.") and false
end
registerCreatureEvent(cid, "OutfitClass")
return true
end
function onOutfit(cid, old, current)
local class = {
[1] = {[0] = {136, 140}, [1] = {128, 132}}, -- citizen, nobleman
[2] = {[0] = {136, 138}, [1] = {128, 130}}, -- citizen, mage
[3] = {[0] = {136, 137}, [1] = {128, 129}}, -- citizen, hunter
[4] = {[0] = {136, 139}, [1] = {128, 131}}, -- citizen, knight
[5] = {[0] = {136, 140, 141, 158}, [1] = {128, 132, 133, 154}}, -- citizen, nobleman, summoner e shaman
[6] = {[0] = {136, 138, 148, 149}, [1] = {128, 130, 144, 145}}, -- citizen, mage, druid e wizard
[7] = {[0] = {136, 137, 156, 155}, [1] = {128, 129, 152, 151}}, -- citizen, hunter, assassin e pirate
[8] = {[0] = {136, 139, 142, 147}, [1] = {128, 131, 134, 143}} -- citizen, knight, warrior e barbarian
}
if getPlayerAccess(cid) > 2 then return true end
local outfits = class[getPlayerVocation(cid)][getPlayerSex(cid)]
return isInArray(outfits, current.lookType) and true or doPlayerSendCancel(cid, "você não tem vocação para usar essa outfit.") and false
end
creaturescripts.xlm
<event type="login" name="LoginClass" event="script" value="vocouts.lua"/>
<event type="outfit" name="OutfitClass" event="script" value="vocouts.lua"/>
<event type="outfit" name="OutfitClass" event="script" value="vocouts.lua"/>
Have this error. Plx help =)