Postado Maio 11, 2017 8 anos Estranho você dizer que o Script está funcionando perfeitamente, pois instalei ele aqui sem alteração e ele não funciona. Enfim... Vou editar sem testar. Testa você aí em seu servidor e veja se funciona. SUGESTÃO #01 function onUse(cid, item, frompos, itemEx, topos) if getTopCorpse(topos) == null or itemEx.actionid ~= 2497 then return true end if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue (cid, 17001) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 or getPlayerStorageValue (cid, 98752) >= 1 then --alterado v1.9 return doPlayerSendCancel(cid, "impossivel fazer isso agora.") end if not isCreature(itemEx.uid) then doCreatureSetNoMove(cid, true) local tmp = getCreatureOutfit(cid) if getPlayerSex(cid) == 1 then tmp.lookType = 2501 else tmp.lookType = 2500 end doSetCreatureOutfit(cid, tmp, -1) setPlayerStorageValue(cid, 98752, 1) -------------------------------------------------- function finalizar(cid,toPos) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureSetNoMove(cid, false) local itemEx = getTopCorpse(topos) local rand = math.random(1, 5) if itemEx then doPlayerAddItem(cid, 15500, rand) doItemSetAttribute(itemEx.uid,'aid', 2497) end setPlayerStorageValue(cid, 98752, -1) end addEvent(finalizar, 8*1000,cid,toPos) --------------------------------------------- end return true end SUGESTÃO #02 function onUse(cid, item, frompos, itemEx, topos) if getTopCorpse(topos) == null then return true end if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue (cid, 17001) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 or getPlayerStorageValue (cid, 98752) >= 1 then --alterado v1.9 return doPlayerSendCancel(cid, "impossivel fazer isso agora.") end if not isCreature(itemEx.uid) then doCreatureSetNoMove(cid, true) local tmp = getCreatureOutfit(cid) if getPlayerSex(cid) == 1 then tmp.lookType = 2501 else tmp.lookType = 2500 end doSetCreatureOutfit(cid, tmp, -1) setPlayerStorageValue(cid, 98752, 1) -------------------------------------------------- function finalizar(cid,toPos) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureSetNoMove(cid, false) local itemEx = getTopCorpse(topos) local rand = math.random(1, 5) if itemEx and itemEx.actionid ~= 2497 then doPlayerAddItem(cid, 15500, rand) doItemSetAttribute(itemEx.uid,'aid', 2497) end setPlayerStorageValue(cid, 98752, -1) end addEvent(finalizar, 8*1000,cid,toPos) --------------------------------------------- end return true end
Postado Maio 12, 2017 8 anos Autor 13 horas atrás, Frenesy disse: Estranho você dizer que o Script está funcionando perfeitamente, pois instalei ele aqui sem alteração e ele não funciona. Enfim... Vou editar sem testar. Testa você aí em seu servidor e veja se funciona. SUGESTÃO #01 function onUse(cid, item, frompos, itemEx, topos) if getTopCorpse(topos) == null or itemEx.actionid ~= 2497 then return true end if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue (cid, 17001) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 or getPlayerStorageValue (cid, 98752) >= 1 then --alterado v1.9 return doPlayerSendCancel(cid, "impossivel fazer isso agora.") end if not isCreature(itemEx.uid) then doCreatureSetNoMove(cid, true) local tmp = getCreatureOutfit(cid) if getPlayerSex(cid) == 1 then tmp.lookType = 2501 else tmp.lookType = 2500 end doSetCreatureOutfit(cid, tmp, -1) setPlayerStorageValue(cid, 98752, 1) -------------------------------------------------- function finalizar(cid,toPos) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureSetNoMove(cid, false) local itemEx = getTopCorpse(topos) local rand = math.random(1, 5) if itemEx then doPlayerAddItem(cid, 15500, rand) doItemSetAttribute(itemEx.uid,'aid', 2497) end setPlayerStorageValue(cid, 98752, -1) end addEvent(finalizar, 8*1000,cid,toPos) --------------------------------------------- end return true end SUGESTÃO #02 function onUse(cid, item, frompos, itemEx, topos) if getTopCorpse(topos) == null then return true end if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue (cid, 17001) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 or getPlayerStorageValue (cid, 98752) >= 1 then --alterado v1.9 return doPlayerSendCancel(cid, "impossivel fazer isso agora.") end if not isCreature(itemEx.uid) then doCreatureSetNoMove(cid, true) local tmp = getCreatureOutfit(cid) if getPlayerSex(cid) == 1 then tmp.lookType = 2501 else tmp.lookType = 2500 end doSetCreatureOutfit(cid, tmp, -1) setPlayerStorageValue(cid, 98752, 1) -------------------------------------------------- function finalizar(cid,toPos) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureSetNoMove(cid, false) local itemEx = getTopCorpse(topos) local rand = math.random(1, 5) if itemEx and itemEx.actionid ~= 2497 then doPlayerAddItem(cid, 15500, rand) doItemSetAttribute(itemEx.uid,'aid', 2497) end setPlayerStorageValue(cid, 98752, -1) end addEvent(finalizar, 8*1000,cid,toPos) --------------------------------------------- end return true end obrigado foi resolvido man n sei porque eu tinha feito assim e n deu certoitemEx.aid ~= 2497 then -- isso deu errado eu pensei q era a mesma coisa uma ultima duvida*** é possivel dar valor a uma actionid igual se faz com storage? Editado Maio 12, 2017 8 anos por wevertonvrb (veja o histórico de edições)
Postado Maio 12, 2017 8 anos 11 horas atrás, wevertonvrb disse: obrigado foi resolvido man n sei porque eu tinha feito assim e n deu certoitemEx.aid ~= 2497 then -- isso deu errado eu pensei q era a mesma coisa Que bom que deu certo. Se eu ajudei em algo, já sabe né? REP+ 11 horas atrás, wevertonvrb disse: uma ultima duvida*** é possivel dar valor a uma actionid igual se faz com storage? ActionID não possuem value.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.