Ir para conteúdo

Featured Replies

Postado

Alguém poderia me ajudar? Preciso de um sistema de Reborn do DBO por comando, exemplo o player diz !Reborn e volta level 8 (vida e mana resetam também), porém com a nova vocação.

Para facilitar, caso alguém se disponibilizar a fazer, aqui está o sistema por NPC.

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) == 4 then
selfSay('Sorry, but you are after reborn.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30023) ~= 4 then
selfSay('Hehe, I say If you READY. You do not have 250 lvl.')
elseif msgcontains(msg, 'reborn') then
selfSay('Are you sure?')
talk_state = 2
--Goku--
                       elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 1 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 10, 211)
talk_state = 0
--Vegeta--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 8 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 26, 221)	
talk_state = 0
--Piccolo--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 92 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 38, 231)	
talk_state = 0
--C17--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 20 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 46, 241)	
talk_state = 0
--Gohan--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 25 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 64, 251)	
talk_state = 0
--Mirai Trunks--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 32 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 74, 261)	
talk_state = 0
--Cell--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 38 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 81, 271)	
talk_state = 0
--Freeza--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 43 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 88, 281)	
talk_state = 0
--Buu--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 50 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 98, 291)	
talk_state = 0
--Broly--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 57 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 113, 301)	
talk_state = 0
--C18--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 62 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 46, 311)	
talk_state = 0
--Uub--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 67 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 128, 321)	
talk_state = 0
--Goten--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 72 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 142, 331)	
talk_state = 0
--Chibi Trunks--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 79 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 151, 597)	
talk_state = 0
--Cooler--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 86 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 153, 351)	
talk_state = 0
--Dende--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 92 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 169, 361)	
talk_state = 0
--Baby--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 97 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 580, 371)	
talk_state = 0
--Bardock--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 102 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 188, 381)	
talk_state = 0
--Kuririn--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 108 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 205, 391)	
talk_state = 0
--Pan--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 113 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 212, 401)	
talk_state = 0
--Videl--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 118 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 227, 411)	
talk_state = 0
--Janemba---
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 123 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 234, 421)	
talk_state = 0
--Tenshihan--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 128 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 246, 431)	
talk_state = 0
--Jenk--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 133 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 257, 441)	
talk_state = 0
--Raditz--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 138 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 267, 451)	
talk_state = 0
--C16--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 143 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 272, 461)	
talk_state = 0
--Turles--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 148 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 285, 471)	
talk_state = 0
--Bulma--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 153 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 296, 481)	
talk_state = 0
--Shenron--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 158 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 302, 491)	
talk_state = 0
--Vegetto--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 163 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 308, 501)	
talk_state = 0
--Tapion--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 168 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 321, 511)	
talk_state = 0
--Kame--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 173 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 331, 521)	
talk_state = 0
--Kagome--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 178 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 357, 531)	
talk_state = 0
--King Vegeta--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 183 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 347, 541)	
talk_state = 0
--Zaiko--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 188 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 368, 551)	
talk_state = 0
--Chilled---
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 193 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 375, 561)	
talk_state = 0
-C8--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 198 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 516, 571)	
talk_state = 0
--Bills--
	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 203 then
setPlayerStorageValue(cid,30023,1)
			doReborn(cid, 1, 586, 581)	
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert.')


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

 

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