Ir para conteúdo

AJUDA A ENTENDER SCRIPT


Leofeli

Posts Recomendados

Galera estou com o projeto do meu dbo e estou reformulando ele inteiro e cheguei na parte de mexer com as transformações e reborn

bom estou meio confuso com o script do reborn não sei onde e oque alterar vou deixar a do Goku como exemplo eu deixei assim

Spoiler

--[vocation id] = { level, nova voc, looktype, efeito}
-- Goku
[1] = { 30, 2, 3, 118},
[2] = { 50, 3, 4, 114},
[3] = { 75, 4, 5, 114},
[4] = { 100, 5, 6, 121},
[5] = { 150, 6, 7, 114},
[6] = { 180, 7, 8, 116},

 

SENDO ESSE ESPAÇO ONDE SEPARA AS TRANSFORMAÇÕES NORMAIS /\ DAS REBORNADAS \/ 


[7] = { 200, 8, 9, 114},

[9] = { 50, 10, 11, 114},
[10] = { 100, 11, 12, 114},
[11] = { 150, 12, 13, 114},
[12] = { 200, 13, 14, 125},
[13] = { 250, 14, 15, 121},
[14] = { 400, 15, 16, 34},
[15] = { 600, 16, 18, 32},
[16] = { 600, 473, 17, 41},

 

Esse é o script que não entendo se puderem me dizer aonde mudar eu agradeço

 

Spoiler

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end

function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('???')
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) < 4 then
selfSay('Olá! Se voce está pronto, diga "reborn".')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Hey!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30023) ~= 4) or (getPlayerLevel(cid) > 600 and getPlayerStorageValue(cid,30023) ~= 4) then
selfSay('Apenas level 200 até 600 podem rebornar.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') then
selfSay('Realmente quer isto?')
talk_state = 2
--_GOKU_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 8 then
doReborn(cid,1,10,9)
talk_state = 0

--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 23 then
doReborn(cid,1,25,24)
talk_state = 0


elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce deve estar na ultima transformação.')


elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Adeus!')
focus = 0
talk_start = 0
end
end
end

function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Próximo por favor...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Adeus!')
focus = 0
end
end
end

 

Link para o comentário
Compartilhar em outros sites

Resumindo, o npc "reborna" o personagem se ele for entre o level 200 e 600, só isso, o resto são só checagens se ele está dentro desse level, e pra ver qual a vocation dele, de acordo com a vocation os parâmetros da function doReborn mudam. Pra saber como funciona o reborn não é nesse script, procura na pasta lib por "function doReborn"

Link para o comentário
Compartilhar em outros sites

4 horas atrás, samlecter disse:

Resumindo, o npc "reborna" o personagem se ele for entre o level 200 e 600, só isso, o resto são só checagens se ele está dentro desse level, e pra ver qual a vocation dele, de acordo com a vocation os parâmetros da function doReborn mudam. Pra saber como funciona o reborn não é nesse script, procura na pasta lib por "function doReborn"

No caso eu n entendi a parte de troca a vocação tipo a ultima transform sem reborn do goku é a Newtype 7 e a primeira depois do reborn 8 isso que queria saber pois eu vou mudar totalmente as transforms dos personagens e empaquei nessa parte

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...