-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 588 visualizações
-
- 0 respostas
- 1767 visualizações
-
- 0 respostas
- 1324 visualizações
-
- 2 respostas
- 2173 visualizações
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 1105 visualizações
-

Pergunta
NewAge 0
quando falo com o npc e digo ajudar, ele não responde, mas abre o shop
to fazendo um npc que vende itens e que da quest, alguém pode ajudar?
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler)[/size][/font][/color] [color=#5A5A5A][font=tahoma, helvetica, arial, sans-serif][size=3]-- OTServ event handling functions start 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 -- OTServ event handling functions end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'lemonade', 'lemondrink', 'limonada'}, 2006, 2, 5, 'lemonade') shopModule:addBuyableItem({'beer', 'cerveja'}, 2006, 3, 3, 'beer') shopModule:addBuyableItem({'milk', 'leite'}, 2006, 2, 6, 'milk') shopModule:addBuyableItem({'rum'}, 2006, 3, 27, 'rum') shopModule:addBuyableItem({'bread'}, 2689, 3) shopModule:addBuyableItem({'ham'}, 2671, 5) shopModule:addBuyableItem({'meat'}, 2666, 5) shopModule:addBuyableItem({'grapes'}, 2681, 3) shopModule:addBuyableItem({'red apple'}, 2674, 3) npcHandler:addModule(FocusModule:new()) [/size][/font][/color] [color=#5A5A5A][font=tahoma, helvetica, arial, sans-serif][size=3]local boromir = 6000 local boromir2 = 6001 local boromir3 = 61254 text = "5 Meat 5 Bread 10 Blueberries" -- Texto do papel lid = 1954 -- ID do Papel function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end[/size][/font][/color] [color=#5A5A5A][font=tahoma, helvetica, arial, sans-serif][size=3]local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'ajudar') and (getPlayerStorageValue(cid, 61254) == 1) then selfSay('Você pode conseguir um pouco de comida para mim? Estou muito ocupado e não tenho tempo para ir procurar.',cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then setPlayerStorageValue(cid, boromir, 1) setPlayerStorageValue(cid, boromir3, 2) setPlayerStorageValue(cid, boromir2, 1) letter = doPlayerAddItem(cid, lid) doSetItemText(letter, text) doPlayerPopupFYI(cid, "Nova quest iniciada! Quest Log atualizado: Ajudando Zio") selfSay('Tudo que preciso está escrito neste papel.', cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'ajudar') and (getPlayerStorageValue(cid, 61254) == 2) then selfSay('Você conseguiu todos os itens da lista?', cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'yes') or msgcontains(msg, 'sim') and (getPlayerStorageValue(cid, 61254) == 2) and getPlayerItemCount(cid,2666)>=5 and getPlayerItemCount(cid,2689)>=5 and getPlayerItemCount(cid,2677)>=10 then npcHandler:say("Muito obrigado, aqui está sua recompensa.", cid) doPlayerRemoveItem(cid,2666,5) doPlayerRemoveItem(cid,2689,5) doPlayerRemoveItem(cid,2677,10) doPlayerAddItem(cid,2148,10) setPlayerStorageValue(cid, boromir2, 2) setPlayerStorageValue(cid, boromir3, -1) talkState[talkUser] = 0 end return TRUE endLink para o comentário
https://xtibia.com/forum/topic/202545-script-n%C3%A3o-funciona/Compartilhar em outros sites
2 respostass a esta questão
Posts Recomendados