Ir para conteúdo

Featured Replies

Postado

Talkaction:

local cities = {
    --["city"] = town_id,
    ["enigma"] = 1,            --Exemplo.
}
function onSay(cid, words, param)
    if not param or param == "" then
        return doPlayerSendCancel(cid, 'Command: command "city')
    elseif getPlayerStorageValue(cid, 60191) < 1 then
        return doPlayerSendCancel(cid, "You can only teleport on the special floors.")
    elseif not cities[param:lower():sub(2)] then
        return doPlayerSendCancel(cid, "This city doesn't exist or you can't teleport there.")
    end
    local city = param:lower():sub(2)
    local toPos = getTownTemplePosition(cities[city])
    doPlayerSendTextMessage(cid, 27, "You teleported to "..city..".")
    doTeleportThing(cid, toPos)
    doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
    return true
end
Movement:
function onStepIn(cid, item, position, fromPosition)
    setPlayerStorageValue(cid, 60191, 1)
    return true
end
function onStepOut(cid, item, position, fromPosition)
    setPlayerStorageValue(cid, 60191, -1)
    return true
end
Serão 2 tags: uma para StepIn e outra para StepOut. Em ambas você configura o mesmo actionid.

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

não respondo pms solicitando suporte em programação/scripting

  • Respostas 17
  • Visualizações 655
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Estou ensinando ele no skype, ele ta aprendendo bem, bom, eu falei pra ele fazer isto, ele está tentando, não vou dar a resposta, vou deixar para ele 

  • <movevent type="StepIn" actionid="Numero" event="script" value="Arquivo.lua"/>  <movevent type="StepOut" actionid="Numero" event="script" value="Arquivo.lua"/>   <talkaction words="!p

Posted Images

Postado
  • Autor

 

Talkaction:

local cities = {
    --["city"] = town_id,
    ["enigma"] = 1,            --Exemplo.
}
function onSay(cid, words, param)
    if not param or param == "" then
        return doPlayerSendCancel(cid, 'Command: command "city')
    elseif getPlayerStorageValue(cid, 60191) < 1 then
        return doPlayerSendCancel(cid, "You can only teleport on the special floors.")
    elseif not cities[param:lower():sub(2)] then
        return doPlayerSendCancel(cid, "This city doesn't exist or you can't teleport there.")
    end
    local city = param:lower():sub(2)
    local toPos = getTownTemplePosition(cities[city])
    doPlayerSendTextMessage(cid, 27, "You teleported to "..city..".")
    doTeleportThing(cid, toPos)
    doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
    return true
end
Movement:
function onStepIn(cid, item, position, fromPosition)
    setPlayerStorageValue(cid, 60191, 1)
    return true
end
function onStepOut(cid, item, position, fromPosition)
    setPlayerStorageValue(cid, 60191, -1)
    return true
end
Serão 2 tags: uma para StepIn e outra para StepOut. Em ambas você configura o mesmo actionid.

 

poderia colocar as tags prontas ? sem a ID do actionID ?

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

Postado
<movevent type="StepIn" actionid="Numero" event="script" value="Arquivo.lua"/>
 <movevent type="StepOut" actionid="Numero" event="script" value="Arquivo.lua"/>
 
<talkaction words="!palavra;/palavra" event="script" value="arquivo.lua"/>

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

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.7k

Informação Importante

Confirmação de Termo