Ir para conteúdo

Erro com reborn


yagoshira004

Posts Recomendados

Eai galera, tou com um erro aqui no reborn no meu server de DBO

Esta rebornando tudo normal porem quando eu deslogo ele volta na vocacao anterior..

 

Exemplo: Eu reborno o brolly lvl 300 > ele volta lvl 1 com o brolly reborn

porem se eu deslogar ele volta sendo o brolly normal

 

Alguem sabe o que aconteceu?

O erro só ocorre com a vocação brolly que no caso é 306 para 307

 

 

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 306 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 307)

 

Script reborn;

 

 

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('Hello. If you ready I can "Reborn" you.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 1 then
selfSay('Sorry, but you are after reborn.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 300 and getPlayerStorageValue(cid,30023) ~= -1 then
selfSay('Hehe, I say If you READY. You do not have 300 lvl.')
elseif msgcontains(msg, 'reborn') then
selfSay('Are you sure?')
talk_state = 2
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 49 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 82)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 50 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 87)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 51 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 92)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 52 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 97)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 53 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 112)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 54 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 102)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 55 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 107)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 56 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 117)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 63 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 122)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 74 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 127)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 81 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 132)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 143 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 144)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 155 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 156)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 171 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 172)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 306 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 307)
elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must have got last transform.')
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye.')
focus = 0
talk_start = 0
end
end
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
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('Hello. If you ready I can "Reborn" you.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 1 then
selfSay('Sorry, but you are after reborn.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 300 and getPlayerStorageValue(cid,30023) ~= -1 then
selfSay('Hehe, I say If you READY. You do not have 300 lvl.')
elseif msgcontains(msg, 'reborn') then
selfSay('Are you sure?')
talk_state = 2
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 49 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 82)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 50 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 87)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 51 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 92)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 52 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 97)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 53 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 112)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 54 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 102)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 55 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 107)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 56 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 117)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 63 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 122)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 74 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 127)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 81 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 132)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 143 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 144)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 155 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 156)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 171 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 172)
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 300 and getPlayerVocation(cid) == 306 then
setPlayerStorageValue(cid,30023,1)
doReborn(cid, 1, 42, 307)
elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must have got last transform.')
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye.')
focus = 0
talk_start = 0
end
end
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...