Postado Julho 26, 2014 10 anos Nenhum... "Lendas jamais voltam pois são apenas lendas. eu, eu sou real." Attr:// [GM] Eddy. 2013 ~ 2014 R.I.P O retorno da lenda....
Postado Julho 26, 2014 10 anos Sim estou "Lendas jamais voltam pois são apenas lendas. eu, eu sou real." Attr:// [GM] Eddy. 2013 ~ 2014 R.I.P O retorno da lenda....
Postado Julho 26, 2014 10 anos se esse não der eu n posso ajuda mais . local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function playerHaveItems(cid, itemid) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do if getPlayerItemCount(cid, items) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do doPlayerRemoveItem(cid, items, count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "trocar") then if playerHaveItems(cid, {5896, 6569, 2674, 5894, 5888, 5881, 5901}) then doPlayerRemoveItems(cid, {5896, 6569, 2674, 5894, 5888, 5881, 5901}, 700) doPlayerAddItem(cid, 2521, 1) else selfSay("Voce precisa de 700 Future orb, 700 water pendant, 700 Stone orb, 700 Essenses of fire, 700 Feathers, 700 bottles of poison e 700 Ice Orb, Para Conseguir Uma Master Ball.") end end return true endnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Azul: ID dos itens Vermelho: quantidade Verde: ID que o Npc irá te dar Amarelo: Mensagem se não tiver os itens Preto: Nome do Npc Rosa: Mensagem para trocar os iten
Postado Julho 26, 2014 10 anos Olha cara, esse script não vai adiantar mas agradeço a sua ajuda pelo menos você tentou (pelo menos você ainda tem interesse), eu preciso que a moeda de troca do npc não seja gold e sim a minha escolha basicamente é isso, esse ultimo script troca um monte de item por 1 item, precisa ter vários itens disponíveis para troca.... é algo como... ItempriceID = [18423 ,1] Itens ID = [12360 ,1] [12360 ,1] [12360 ,1] [12360 ,1] [12360 ,1] [12360 ,1] [12360 ,1] function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end selfSay("Eu posso te vender {prismatic armor}, {prismatic helmet}, {prismatic legs} e {prismatic boots} mas irá te custar alguns tokens, deseja algo?.", cid) talkState[cid] = 0 if doPlayerRemoveItem(cid, itemid, 1) then selfSay("Obrigado..", cid) doTeleportThing(cid, pos) else selfSay("Voce não tem os tokens necessarios....", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Isso ai encima não funciona só fiz como exemplo.. Editado Julho 26, 2014 10 anos por Vills (veja o histórico de edições) "Lendas jamais voltam pois são apenas lendas. eu, eu sou real." Attr:// [GM] Eddy. 2013 ~ 2014 R.I.P O retorno da lenda....
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.