Ir para conteúdo

Featured Replies

Postado
  • Autor

Irei testar, jaja edito

 

Ediit: ele ainda continua levando players free pras cidades vips ;x

 

Ediit2: eu falo com o npc, hi, yalahar, yes, (yalahar eh free), eele vai pra yalahar normal,

ai eu falo hi, alfon, yes (alfon eh vip), ai ele vai pra yalahar :S

trokei certinho as posx yalahar eh a 1 e alfon eh a 8

 

  Citar

 

   local position = {

    pos1 = {x=1555, y=2576, z=6},  -- posição da 1° cidade e assim sucessivamente....
    pos2 = {x = 160, y = 54, z = 7},
    pos3 = {x = 160, y = 54, z = 7},
    pos4 = {x = 160, y = 54, z = 7},
    pos5 = {x = 160, y = 54, z = 7},
    pos6 = {x = 160, y = 54, z = 7},
    pos7 = {x = 160, y = 54, z = 7},
    pos8 = {x=114, y=282, z=6},
    pos9 = {x = 160, y = 54, z = 7},
    pos10 = {x = 160, y = 54, z = 7},

Editado por subhe (veja o histórico de edições)

n35408.gif

  • Respostas 34
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • No caso do NPC Chat, o probema é simples: Pegue por exemplo essa fala de seu NPC: selfSay("Sorry, you don\'t have enough money.") Agora pegue como exemplo essa outra mensagem: selfSay('Sorry, you

  • O primeiro erro eu arrumei... já o segundo, não tenho idéia, porque no meu ot 10.35 funciona normal e é script de 8.60... tenta agora e ve se da erro.  

  • Flavio S. Cabral
    Flavio S. Cabral

    isso é minha assinatura se não percebeu rsrsrs

Postado

Vou reler tudo aqui, devo ter me passado em algo...
Vou instalar o sistema de VIP assim, posso usar em futuros scripts também.

Breve edito aqui com o resultado.

Te ajudei?
Se você achar que eu mereço, me dê uma "rep+" e selecione meu post como "melhor resposta"

 

Skype: JoadsonAion

Postado
  • Autor

Arrumeei o script do Fywell, está funcionando perfeitamente :D

 

@Fywell Reputado  :accept:

 

@Joadson obrigado por tentar ajudar  Reputado  :accept:

 

 

segue o script arrumado

  Citar

 

local free = {

 
        ["yalahar"] = {x=1555, y=2576, z=6},
["edron"] = {x=1555, y=2576, z=6},
["goroma"] = {x=0, y=0, z=0},
["smallville"] = {x=0, y=0, z=0},
["top"] = {x=0, y=0, z=0},
["lv"] = {x=0, y=0, z=0},
["go"] = {x=0, y=0, z=0}
}
local vip = {
     
        ["alfon"] = {x=114 ,y=282 ,z=6},
      ["everwood"] = {x=0 ,y=0 ,z=0},
      ["nunca"] = {x=0 ,y=0 ,z=0}
}
local cost = 100
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
npcHandler.topic = {}
 
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
 
       for city, tp in pairs(free) do
           if msgcontains(msg, city) then
              npcHandler:say('you are sure?', cid)
              npcHandler.topic[cid] = 1
           elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 1 then
              if doPlayerRemoveMoney(cid, cost) then
                 doTeleportThing(cid, tp)
                 npcHandler:say('Let\'s GO', cid)
                 npcHandler.topic[cid] = 0
              else
                  npcHandler:say('Sorry, you don\'t have enough money', cid)
                  npcHandler.topic[cid] = 0
              end
           end
       end
       
       
       for citys, tps in pairs(vip) do
           if msgcontains(msg, citys) then
              npcHandler:say('you are sure?', cid)
              npcHandler.topic[cid] = 2
           elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 2 then
              if(getPlayerVipDays(cid) > 0) then
                 if doPlayerRemoveMoney(cid, cost) then
                    doTeleportThing(cid, tps)
                    npcHandler:say('Let\'s GO', cid)
                    npcHandler.topic[cid] = 0 
                 else
                    npcHandler:say('Sorry, you don\'t have enough money', cid)
                    npcHandler.topic[cid] = 0   
                 end
              else
                  npcHandler:say('Você não tem VIP!', cid)
                  npcHandler.topic[cid] = 0
              end
           end
       end
       
       if msgcontains(msg, 'no') then
          npcHandler:say('Bye!', cid)
          npcHandler.topic[cid] = 0
       end
                       
return true
end
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

Só fiz mudar isso

  Citar

 

 

["town1"] = {x= ,y= ,z= },

 

por isso

  Citar

 

 

["town1"] = {x=y=z= },

 

e isso

  Citar

 

 

if getPlayerPremiumDays(cid) > 0 then

 

por isso

  Citar

 

 

if(getPlayerVipDays(cid) > 0) then

Editado por subhe (veja o histórico de edições)

n35408.gif

Postado

No script dele é só trocar isso if getPlayerPremiumDays(cid) > 0 then por isso if getPlayerVipDays(cid) > 0 then

Te ajudei?
Se você achar que eu mereço, me dê uma "rep+" e selecione meu post como "melhor resposta"

 

Skype: JoadsonAion

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo