Postado Setembro 29, 2014 10 anos Estou a um tempinho pra terminar essa quest , pq eu sempre acabo errando em alguma coisa no script , eu quero que na quest tenha lá 5 baus e o player só possa escolher 1 , é meio que simples , só q eu sou bem leigo em scripts ai n to conseguindo fazer essa quest funcionar , já tentei alguns outros scripts , o ultimo que testei foi esse aqui : Citar u = 59555 id = 8856 id2 = 7958 id3 = 8929 id5 = 8293 id5 = 8932 level = 1 if getPlayerLevel(cid) < level then doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doPlayerSendCancel(cid,"Somente level " .. level .. " pode fazer a quest.") end if getPlayerStorageValue(cid, a) < 1 then doPlayerAddItem(cid, id, 1) doPlayerAddItem(cid, id2, 1) doPlayerAddItem(cid, id3, 1) doPlayerAddItem(cid, id4, 1) doPlayerAddItem(cid, id5, 1) doPlayerSetStorageValue(cid, a, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Esta vazio.") end if getPlayerLevel(cid) < level then doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doPlayerSendCancel(cid,"Somente level " .. level .. "+ pode fazer a quest.") end return TRUE end Se alguém , conseguir ou arrumar esse script , ou me passar um que funcione , seria possível , colocar 1 bau pra dar 2 itens ? pq o item 8856 é um Bow e eu queria que a Arrow (id 2547) viesse junto. Agradeço desde já .
Postado Setembro 29, 2014 10 anos Testa. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { [ActionID1] = {8856, 2547}, [ActionID2] = 7958, [ActionID3] = 8929, [ActionID4] = 8293, [ActionID5] = 8932, level = 30, storage = 0000 } if getPlayerLevel(cid) < config.level then doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doPlayerSendCancel(cid,'Necessário level ['.. config.level ..'] para fazer essa quest.') return true end if getPlayerStorageValue(cid, config.storage) < 1 then for a, c in pairs(config) do doPlayerAddItem(cid, c[item.actionid], 1) setPlayerStorageValue(cid, config.storage, 1) end else doPlayerSendCancel(cid, 'Está vazio') end return true end Adicione os Actions ID's, a storage, e testa.
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.