action.xml ( ESSES UNIQUE ID VOCE COLOCA NAS ALAVANCA...
<action uniqueid="17000" script="addons.lua"/>
<action uniqueid="18000" script="addons.lua"/>
<action uniqueid="19000" script="addons.lua"/>
<action uniqueid="20000" script="addons.lua"/>
<action uniqueid="21000" script="addons.lua"/>
ADDONS.LUA
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 21000 then
queststatus = getPlayerStorageValue(cid,19002)
if queststatus == -1 and doPlayerRemoveItem(cid, 2160, 50) then
doPlayerSendTextMessage(cid,22,"voce acabou de ganha assassin full")
doPlayerAddOutfit(cid, 156, 3) -- 156, 3 = outfit assassin e addon
doPlayerAddOutfit(cid, 152, 3)
setPlayerStorageValue(cid,19002,1)
else
doPlayerSendTextMessage(cid,22,"voce ja pegou esse addon ou nao tem o item.")
end
elseif item.uid == 20000 then
queststatus = getPlayerStorageValue(cid,21002)
if queststatus == -1 and doPlayerRemoveItem(cid, 2160, 50) then -- 2160 é o item e 50 é a quantidade
doPlayerSendTextMessage(cid,22,"voce acabou de ganha mage full")
doPlayerAddOutfit(cid, 130, 3) --mage
doPlayerAddOutfit(cid, 138, 3)
setPlayerStorageValue(cid,21002,1)
else
doPlayerSendTextMessage(cid,22,"voce ja pegou esse addon ou nao tem o item.")
end
elseif item.uid == 19000 then
queststatus = getPlayerStorageValue(cid,21003)
if queststatus == -1 and doPlayerRemoveItem(cid, 2160, 50) then -- 2160 é o item e 50 é a quantidade
doPlayerSendTextMessage(cid,22,"voce acabou de ganha druid full")
doPlayerAddOutfit(cid, 148, 3) --druid
doPlayerAddOutfit(cid, 144, 3)
setPlayerStorageValue(cid,21003,1)
else
doPlayerSendTextMessage(cid,22,"voce ja pegou esse addon ou nao tem o item.")
end
elseif item.uid == 18000 then
queststatus = getPlayerStorageValue(cid,21004)
if queststatus == -1 and doPlayerRemoveItem(cid, 2160, 50) then -- 2160 é o item e 50 é a quantidade
doPlayerSendTextMessage(cid,22,"voce acabou de ganha warrior full")
doPlayerAddOutfit(cid, 134, 3) --warrior
doPlayerAddOutfit(cid, 142, 3)
setPlayerStorageValue(cid,21004,1)
else
doPlayerSendTextMessage(cid,22,"voce ja pegou esse addon ou nao tem o item.")
end
elseif item.uid == 17000 then
queststatus = getPlayerStorageValue(cid,21005)
if queststatus == -1 and doPlayerRemoveItem(cid, 2160, 50) then -- 2160 é o item e 50 é a quantidade
doPlayerSendTextMessage(cid,22,"voce acabou de ganha knight full")
doPlayerAddOutfit(cid, 131, 3) --knight
doPlayerAddOutfit(cid, 139, 3)
setPlayerStorageValue(cid,21005,1)
else
doPlayerSendTextMessage(cid,22,"voce ja pegou esse addon ou nao tem o item.")
end
else
return 0
end
return 1
end