Ir para conteúdo

Featured Replies

Postado

desculpe pela impressão causada, apenas quis deixar em destaque não que esteja falado com ignorância. rsrs'

 

Reborn.xml

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) > 300 and getPlayerStorageValue(cid,30023) ~= 4 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
--_Goku_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 300 and getPlayerVocation(cid) == 45 then
doReborn(cid,1,304,50)
talk_state = 0
--_Vegeta_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 300 and getPlayerVocation(cid) == 56 then
doReborn(cid,1,311,61)
talk_state = 0
--_Brolly_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 300 and getPlayerVocation(cid) == 67 then
doReborn(cid,1,390,72)
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

 

que nada. ;D

Poste a função doReborn.

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

  • Respostas 21
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor

editei o post com os scripts  :D

 

 

desculpe pela impressão causada, apenas quis deixar em destaque não que esteja falado com ignorância. rsrs'

 

 

npc/reborn.xml

 

'-' REMOVIDO.

 

npc/scripts/ Reborn.lua

'-' REMOVIDO.

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

Postado

Sim mas eu quero:

function doReborn(cid, outfit, algumacoisa)

pois não está nesse script.

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

Postado

lib/050-function

 

 

-> parte do reborn

function doReborn(cid, level, looktype, vocation)
setGlobalStorageValue(1000,getPlayerGUID(cid))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
return TRUE
end

 

Atah, poste então o vocations.xml, pra ver...

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