Ir para conteúdo

Posts Recomendados

Estou com uma duvida relacionado ao kit inicial !!

 

Eu queria sabe onde em que script edito onde o player pega o kit inial e e teleportado na x area ??

 

Obs: o kit inicial ja ta com o npc Prof.Robert so que na hora de pega o bau do kit ele e teleportado pro local errado e queria saber onde mexo pra arrumar o tp das citys caso tenha mudado de mapa que foi oque fiz +- ^^

 

 

Rep++

Link para o comentário
https://xtibia.com/forum/topic/204690-encerrado-duvida-kit-inicial/
Compartilhar em outros sites

maaan :) ta ligado essa parte ?? no script??

 

 

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 creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

local places = {

["cerulean"] = 1,

["saffron"] = 2,

["lavender"] = 3,

["celadon"] = 4,

["pewter"] = 5, --Alterado por min, stylo para meu MAPA'

["viridian"] = 6,

["vermilion"] = 7,

["fuchsia"] = 8,

["cinnabar"] = 9,

["snow"] = 10,

}

 

if msgcontains(string.lower(msg), 'city') or msgcontains(string.lower(msg), 'citys') then

if getPlayerStorageValue(cid, 9658754) == 1 then

selfSay("You already choose your beginner town!", cid)

return true

else

selfSay("You can choose your beginner town between: {{saffron}, {cerulean}, {lavender}, {fuchsia}, {celadon}, {viridian}, {vermilion}, {pewter}, {cinnabar} or {snow}}.", cid)

return true

end

elseif places[string.lower(msg)] then

city = string.lower(msg)

selfSay("Are you sure which you want to begin in {".. doCorrectString(msg) .."}?", cid)

talkState[talkUser] = 2

return true

elseif msgcontains(msg, "yes") or msgcontains(msg, "Yes") and talkState[talkUser] == 2 then

if getPlayerStorageValue(cid, 9658754) == 1 then

selfSay("You already choose your beginner town!", cid)

return true

else

selfSay("OK then... Now your beginner town is ".. doCorrectString(city)..". Good luck in your jorney!", cid)

doPlayerSetTown(cid, places[city])

setPlayerStorageValue(cid, 9658754, 1)

return true

end

elseif msgcontains(msg, "no") or msgcontains(msg, "No") and talkState[talkUser] == 2 then

selfSay("Ok then... say again what city you want to begin!", cid)

talkState[talkUser] = 0

return true

end

 

return true

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

 

local places = {

["cerulean"] = 1,

["saffron"] = 2,

["lavender"] = 3,

["celadon"] = 4,

["pewter"] = 5,

["viridian"] = 6,

["vermilion"] = 7,

["fuchsia"] = 8,

["cinnabar"] = 9,

["snow"] = 10,

}

 

 

Dps vai em talkantions/tele.lua

 

e vai tar na 1 parte

 

local places = {

[1] = {name = "Cerulean", id = 1, sto = 897530},

[2] = {name = "Saffron", id = 2, sto = 897531},

[3] = {name = "Lavender", id = 3, sto = 897532},

[4] = {name = "Celadon", id = 4, sto = 897533},

[5] = {name = "Pewter", id = 5, sto = 897534},

[6] = {name = "Viridian", id = 6, sto = 897535}, --alterado v1.7

[7] = {name = "Vermilion", id = 7, sto = 897536},

[8] = {name = "Fuchsia", id = 8, sto = 897537},

[9] = {name = "Cinnabar", id = 9},

[10] = {name = "Snow", id = 10, sto = 897538},

[11] = {name = "Golden", id = 11, sto = 897539},

[12] = {name = "Hamilin", id = 14, sto = 897540},

}

 

 

ou assim veio vai no seu mapa da ctrl+t e cfg as porsição de cada city e dai axo q funfa \õ

 

maaan :) ta ligado essa parte ?? no script??

 

 

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 creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

local places = {

["cerulean"] = 1,

["saffron"] = 2,

["lavender"] = 3,

["celadon"] = 4,

["pewter"] = 5, --Alterado por min, stylo para meu MAPA'

["viridian"] = 6,

["vermilion"] = 7,

["fuchsia"] = 8,

["cinnabar"] = 9,

["snow"] = 10,

}

 

if msgcontains(string.lower(msg), 'city') or msgcontains(string.lower(msg), 'citys') then

if getPlayerStorageValue(cid, 9658754) == 1 then

selfSay("You already choose your beginner town!", cid)

return true

else

selfSay("You can choose your beginner town between: {{saffron}, {cerulean}, {lavender}, {fuchsia}, {celadon}, {viridian}, {vermilion}, {pewter}, {cinnabar} or {snow}}.", cid)

return true

end

elseif places[string.lower(msg)] then

city = string.lower(msg)

selfSay("Are you sure which you want to begin in {".. doCorrectString(msg) .."}?", cid)

talkState[talkUser] = 2

return true

elseif msgcontains(msg, "yes") or msgcontains(msg, "Yes") and talkState[talkUser] == 2 then

if getPlayerStorageValue(cid, 9658754) == 1 then

selfSay("You already choose your beginner town!", cid)

return true

else

selfSay("OK then... Now your beginner town is ".. doCorrectString(city)..". Good luck in your jorney!", cid)

doPlayerSetTown(cid, places[city])

setPlayerStorageValue(cid, 9658754, 1)

return true

end

elseif msgcontains(msg, "no") or msgcontains(msg, "No") and talkState[talkUser] == 2 then

selfSay("Ok then... say again what city you want to begin!", cid)

talkState[talkUser] = 0

return true

end

 

return true

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

 

local places = {

["cerulean"] = 1,

["saffron"] = 2,

["lavender"] = 3,

["celadon"] = 4,

["pewter"] = 5,

["viridian"] = 6,

["vermilion"] = 7,

["fuchsia"] = 8,

["cinnabar"] = 9,

["snow"] = 10,

}

 

 

Dps vai em talkantions/tele.lua

 

e vai tar na 1 parte

 

local places = {

[1] = {name = "Cerulean", id = 1, sto = 897530},

[2] = {name = "Saffron", id = 2, sto = 897531},

[3] = {name = "Lavender", id = 3, sto = 897532},

[4] = {name = "Celadon", id = 4, sto = 897533},

[5] = {name = "Pewter", id = 5, sto = 897534},

[6] = {name = "Viridian", id = 6, sto = 897535}, --alterado v1.7

[7] = {name = "Vermilion", id = 7, sto = 897536},

[8] = {name = "Fuchsia", id = 8, sto = 897537},

[9] = {name = "Cinnabar", id = 9},

[10] = {name = "Snow", id = 10, sto = 897538},

[11] = {name = "Golden", id = 11, sto = 897539},

[12] = {name = "Hamilin", id = 14, sto = 897540},

}

 

 

ou assim veio vai no seu mapa da ctrl+t e cfg as porsição de cada city e dai axo q funfa \õ

maaan :) ta ligado essa parte ?? no script??

 

 

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 creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

local places = {

["cerulean"] = 1,

["saffron"] = 2,

["lavender"] = 3,

["celadon"] = 4,

["pewter"] = 5, --Alterado por min, stylo para meu MAPA'

["viridian"] = 6,

["vermilion"] = 7,

["fuchsia"] = 8,

["cinnabar"] = 9,

["snow"] = 10,

}

 

if msgcontains(string.lower(msg), 'city') or msgcontains(string.lower(msg), 'citys') then

if getPlayerStorageValue(cid, 9658754) == 1 then

selfSay("You already choose your beginner town!", cid)

return true

else

selfSay("You can choose your beginner town between: {{saffron}, {cerulean}, {lavender}, {fuchsia}, {celadon}, {viridian}, {vermilion}, {pewter}, {cinnabar} or {snow}}.", cid)

return true

end

elseif places[string.lower(msg)] then

city = string.lower(msg)

selfSay("Are you sure which you want to begin in {".. doCorrectString(msg) .."}?", cid)

talkState[talkUser] = 2

return true

elseif msgcontains(msg, "yes") or msgcontains(msg, "Yes") and talkState[talkUser] == 2 then

if getPlayerStorageValue(cid, 9658754) == 1 then

selfSay("You already choose your beginner town!", cid)

return true

else

selfSay("OK then... Now your beginner town is ".. doCorrectString(city)..". Good luck in your jorney!", cid)

doPlayerSetTown(cid, places[city])

setPlayerStorageValue(cid, 9658754, 1)

return true

end

elseif msgcontains(msg, "no") or msgcontains(msg, "No") and talkState[talkUser] == 2 then

selfSay("Ok then... say again what city you want to begin!", cid)

talkState[talkUser] = 0

return true

end

 

return true

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

 

local places = {

["cerulean"] = 1,

["saffron"] = 2,

["lavender"] = 3,

["celadon"] = 4,

["pewter"] = 5,

["viridian"] = 6,

["vermilion"] = 7,

["fuchsia"] = 8,

["cinnabar"] = 9,

["snow"] = 10,

}

 

 

Dps vai em talkantions/tele.lua

 

e vai tar na 1 parte

 

local places = {

[1] = {name = "Cerulean", id = 1, sto = 897530},

[2] = {name = "Saffron", id = 2, sto = 897531},

[3] = {name = "Lavender", id = 3, sto = 897532},

[4] = {name = "Celadon", id = 4, sto = 897533},

[5] = {name = "Pewter", id = 5, sto = 897534},

[6] = {name = "Viridian", id = 6, sto = 897535}, --alterado v1.7

[7] = {name = "Vermilion", id = 7, sto = 897536},

[8] = {name = "Fuchsia", id = 8, sto = 897537},

[9] = {name = "Cinnabar", id = 9},

[10] = {name = "Snow", id = 10, sto = 897538},

[11] = {name = "Golden", id = 11, sto = 897539},

[12] = {name = "Hamilin", id = 14, sto = 897540},

}

 

dai vc cfg no seu mapa e.e!

 

 

ou assim veio vai no seu mapa da ctrl+t e cfg as porsição de cada city e dai axo q funfa \õ

Link para o comentário
https://xtibia.com/forum/topic/204690-encerrado-duvida-kit-inicial/#findComment-1442162
Compartilhar em outros sites

Haa acho que entendi vou testa aqui caso entendi vou tida rep+ ^^

 

Edited: cara eu ja arruemi o id das citys so que issu nao resolveu na gora de pega o kit inicial ele nao vai pre nenhum city e saffron ele vai pra celedon =/

Editado por Brunnoo
Link para o comentário
https://xtibia.com/forum/topic/204690-encerrado-duvida-kit-inicial/#findComment-1442177
Compartilhar em outros sites

sim eu sei mais eu queria saber em que script eu add ou arrumo as possiçao das cps do map pq no npc robert so tem o id das citys e issu ja arrumei !!

Link para o comentário
https://xtibia.com/forum/topic/204690-encerrado-duvida-kit-inicial/#findComment-1442226
Compartilhar em outros sites

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

mano o starter.lua te teleporta pra temple position ali q tu coloco no mapa editor.. tu q ta fazendo algu errado com as posiçoes ou com a configuraçao dos ids das town

Link para o comentário
https://xtibia.com/forum/topic/204690-encerrado-duvida-kit-inicial/#findComment-1442228
Compartilhar em outros sites

  • 5 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
https://xtibia.com/forum/topic/204690-encerrado-duvida-kit-inicial/#findComment-1733444
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...