Postado Novembro 15, 2014 10 anos FALA pessoal esta com problema meu script e nao sei como arrumar :| tipo o npc ta bugando. é o seguinte quando falo hi ela pergunta se eu quero entrar no saffari e o custo eh 500dl ai eu falo sim ela vai checar se estou carregando alguma pokebola é ai que ta o bug. mesmo sem nenhuma pokeball ela fala que eu estou carregando pokebolas e nao me teleporta pro outro lado da porta. mesmo sem as pokebolas e com o dinheiro o script nao funciona. ai eu dei sorte meu gm bugo tive q fazer outro lvl 1 e tal ai ele sem pokebola e com dinheiro parra pela droga do portal ja qualquer char normal o npc fala que ele ta com pokebola.. alguem me ajuda ai vlw. focus = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('See ya.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 3 then selfSay('Oi, eu posso deixar voce entrar no saffari por 500 Dollars, voce aceita?')--alterado v1.9 focus = cid talk_start = os.clock() elseif (msgcontains(msg, 'yes') and focus == cid ) then --alterado v1.9 if getPlayerItemCount(cid,2391) >= 1 or getPlayerItemCount(cid,2394) >= 1 or getPlayerItemCount(cid,2392) >= 1 or getPlayerItemCount(cid,2393) >= 1 or getPlayerItemCount(cid, 12617) >= 1 then selfSay("Voce nao pode entrar no saffari com nenhumn tipo de pokeball vlw flw..") --alterado v1.9 /\ focus = 0 talk_start = 0 elseif getPlayerStorageValue(cid, 98796) >= 1 or getPlayerStorageValue(cid, 98797) >= 1 then selfSay("Voce esta no saffari.. cuidado aqui tem muito pokemon forte!!") focus = 0 talk_start = 0 elseif doPlayerRemoveMoney(cid, 50000) then --500dl --alterado v1.9 doPlayerAddItem(cid, 12617, 30) --alterado v1.9 doTeleportThing(cid, SafariEnter) doSendMagicEffect(getThingPos(cid), 21) talk_start = os.clock() else selfSay("voce precisa de 500 dollars para entrar aqui... flw..") --alterado v1.9 focus = 0 talk_start = 0 end elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3) then selfSay('To ocupada.. ta vendo nao ?.') elseif (msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3) then selfSay('Flw!...') focus = 0 talk_start = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('vlw flw...') end focus = 0 end end FALA pessoal esta com problema meu script e nao sei como arrumar :| tipo o npc ta bugando. é o seguinte quando falo hi ela pergunta se eu quero entrar no saffari e o custo eh 500dl ai eu falo sim ela vai checar se estou carregando alguma pokebola é ai que ta o bug. mesmo sem nenhuma pokeball ela fala que eu estou carregando pokebolas e nao me teleporta pro outro lado da porta. mesmo sem as pokebolas e com o dinheiro o script nao funciona. ai eu dei sorte meu gm bugo tive q fazer outro lvl 1 e tal ai ele sem pokebola e com dinheiro parra pela droga do portal ja qualquer char normal o npc fala que ele ta com pokebola.. alguem me ajuda ai vlw. focus = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('See ya.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 3 then selfSay('Oi, eu posso deixar voce entrar no saffari por 500 Dollars, voce aceita?')--alterado v1.9 focus = cid talk_start = os.clock() elseif (msgcontains(msg, 'yes') and focus == cid ) then --alterado v1.9 if getPlayerItemCount(cid,2391) >= 1 or getPlayerItemCount(cid,2394) >= 1 or getPlayerItemCount(cid,2392) >= 1 or getPlayerItemCount(cid,2393) >= 1 or getPlayerItemCount(cid, 12617) >= 1 then selfSay("Voce nao pode entrar no saffari com nenhumn tipo de pokeball vlw flw..") --alterado v1.9 /\ focus = 0 talk_start = 0 elseif getPlayerStorageValue(cid, 98796) >= 1 or getPlayerStorageValue(cid, 98797) >= 1 then selfSay("Voce esta no saffari.. cuidado aqui tem muito pokemon forte!!") focus = 0 talk_start = 0 elseif doPlayerRemoveMoney(cid, 50000) then --500dl --alterado v1.9 doPlayerAddItem(cid, 12617, 30) --alterado v1.9 doTeleportThing(cid, SafariEnter) doSendMagicEffect(getThingPos(cid), 21) talk_start = os.clock() else selfSay("voce precisa de 500 dollars para entrar aqui... flw..") --alterado v1.9 focus = 0 talk_start = 0 end elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3) then selfSay('To ocupada.. ta vendo nao ?.') elseif (msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3) then selfSay('Flw!...') focus = 0 talk_start = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('vlw flw...') end focus = 0 end end kra nao consigo entender isso :| bug maldito
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.