FL
dúvida

[Ajuda] Npc Reborn 8.54 [Ajuda]

Por Flaah, 26 de jul. de 2012 em Scripts

script
npc
tibia
brasil
server
reborn
resert
otserv
50
6.9k
SkySevenS
27 de julho de 2012 às 18:07

Tenta fazer magica ai para ajudar o cara.

Foi estranho meu script n dar certo aqui deu certin.

theu1995T
27 de julho de 2012 às 18:33

----RETIRED----

Editado Julho 27 por MaatheeuusYuurii

SkySevenS
27 de julho de 2012 às 18:35

O que tem have arena com o bagui de reloga?

TchubakaT
27 de julho de 2012 às 18:45

cara que script e esse fiii. :S

 

arena. !aol etc... ;S

SkySevenS
27 de julho de 2012 às 18:49

Sim eu achei mt esquisito nao tem nada ve com oq o cara posto la encima,acho q ele esta pensando que esta postando em otro topico.

theu1995T
27 de julho de 2012 às 18:53

iaeuaiue, fiz um bagui errado ali... e esse é o Login.lua dele ...

tpw, eu tava com 1 problema igual o dele, ai eu fiz isso e deu certo... não tava ficando a vocation tbm ;x

 

 

local message = [[Welcome To The Pollo Server

ParA Tener El Bless di

!Bless ---- blessing

!aol ------ amulet of lost

!prision -- Magic Wall Prision

!]]

 

 

function onLogin(cid)

 

registerCreatureEvent(cid, "PlayerKill")

if (InitArenaScript ~= 0) then

InitArenaScript = 1

-- make arena rooms free

for i = 42300, 42309 do

setGlobalStorageValue(i, 0)

setGlobalStorageValue(i+100, 0)

end

end

-- if he did not make full arena 1 he must start from zero

if getPlayerStorageValue(cid, 42309) < 1 then

for i = 42300, 42309 do

setPlayerStorageValue(cid, i, 0)

end

end

-- if he did not make full arena 2 he must start from zero

if getPlayerStorageValue(cid, 42319) < 1 then

for i = 42310, 42319 do

setPlayerStorageValue(cid, i, 0)

end

end

-- if he did not make full arena 3 he must start from zero

if getPlayerStorageValue(cid, 42329) < 1 then

for i = 42320, 42329 do

setPlayerStorageValue(cid, i, 0)

end

end

if getPlayerStorageValue(cid, 42355) == -1 then

setPlayerStorageValue(cid, 42355, 0) -- did not arena level

end

setPlayerStorageValue(cid, 42350, 0) -- time to kick 0

setPlayerStorageValue(cid, 42352, 0) -- is not in arena

 

doPlayerPopupFYI(cid, message)

registerCreatureEvent(cid, "PlayerDeath")

--registerCreatureEvent(cid, "MEDALS") This is Nahruto's Metal System for killing someone, Dont add this unless you use it.--

registerCreatureEvent(cid, "KilledMonstersCounter")

registerCreatureEvent(cid, "playeradvance")

 

 

registerCreatureEvent(cid, "RepSystem")

 

registerCreatureEvent(cid, "showRep")

 

registerCreatureEvent(cid, "RepLogin")

 

registerCreatureEvent(cid, "task_count")

 

if (getPlayerStorageValue(cid, 30025) ~= 1) then

setPlayerStorageValue(cid, 30025, 1)

setPlayerStorageValue(cid, 30025, 0)

 

if getPlayerStorageValue(cid, 650230) > 0 then

doPlayerSetVocation(cid, getPlayerStorageValue(cid, 650230))

end

 

if getPlayerVocation(cid, 1) then

doPlayerSetVocation(cid, 1)

elseif getPlayerVocation(cid, 2) then

doPlayerSetVocation(cid, 2)

elseif getPlayerVocation(cid, 3) then

doPlayerSetVocation(cid, 3)

elseif getPlayerVocation(cid, 4) then

doPlayerSetVocation(cid, 4)

elseif getPlayerVocation(cid, 5) then

doPlayerSetVocation(cid, 5)

elseif getPlayerVocation(cid, 6) then

doPlayerSetVocation(cid, 6)

elseif getPlayerVocation(cid, 7) then

doPlayerSetVocation(cid, 7)

elseif getPlayerVocation(cid, 8) then

doPlayerSetVocation(cid, 8)

elseif getPlayerVocation(cid, 9) then

doPlayerSetVocation(cid, 9)

elseif getPlayerVocation(cid, 10) then

doPlayerSetVocation(cid, 10)

elseif getPlayerVocation(cid, 11) then

doPlayerSetVocation(cid, 11)

elseif getPlayerVocation(cid, 12) then

doPlayerSetVocation(cid, 12)

elseif getPlayerVocation(cid, 13) then

doPlayerSetVocation(cid, 13)

elseif getPlayerVocation(cid, 14) then

doPlayerSetVocation(cid, 14)

elseif getPlayerVocation(cid, 15) then

doPlayerSetVocation(cid, 15)

elseif getPlayerVocation(cid, 16) then

doPlayerSetVocation(cid, 16)

elseif getPlayerVocation(cid, 17) then

doPlayerSetVocation(cid, 17)

elseif getPlayerVocation(cid, 18) then

doPlayerSetVocation(cid, 18)

elseif getPlayerVocation(cid, 19) then

doPlayerSetVocation(cid, 19)

elseif getPlayerVocation(cid, 20) then

doPlayerSetVocation(cid, 20)

elseif getPlayerVocation(cid, 21) then

doPlayerSetVocation(cid, 21)

elseif getPlayerVocation(cid, 22) then

doPlayerSetVocation(cid, 22)

elseif getPlayerVocation(cid, 23) then

doPlayerSetVocation(cid, 23)

elseif getPlayerVocation(cid, 24) then

doPlayerSetVocation(cid, 24)

elseif getPlayerVocation(cid, 25) then

doPlayerSetVocation(cid, 25)

elseif getPlayerVocation(cid, 26) then

doPlayerSetVocation(cid, 26)

elseif getPlayerVocation(cid, 27) then

doPlayerSetVocation(cid, 27)

elseif getPlayerVocation(cid, 28) then

doPlayerSetVocation(cid, 28)

elseif getPlayerVocation(cid, 29) then

doPlayerSetVocation(cid, 29)

elseif getPlayerVocation(cid, 30) then

doPlayerSetVocation(cid, 30)

 

end

 

end

 

return TRUE

 

end

 

tenta isso man, em seu Login.lua

Editado Julho 27 por MaatheeuusYuurii

TchubakaT
27 de julho de 2012 às 18:54

ata entendi. deu medo'

SkySevenS
27 de julho de 2012 às 18:56

iaeuaiue, fiz um bagui errado ali... e esse é o Login.lua dele ...

 

Mais atençao da proxima ves.

theu1995T
27 de julho de 2012 às 18:57

ata entendi. deu medo'

KKKKK, eu nem sei mto de script. Comecei a aprender ontem. o.O :x
FlaahF
27 de julho de 2012 às 19:12

Cara foi n, :C

 

JURO POR DEUS.. NÃO FOI... ç.ç

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

SkySevenS
27 de julho de 2012 às 19:13

Cara,oq pode estar acontecendo e tua source(Distro) esta numa versao diferente que a do script.

theu1995T
27 de julho de 2012 às 19:26

é ... ta foda. ja tentou várias coisas, de nada adiantou. :o:(

TchubakaT
27 de julho de 2012 às 19:27

axo que pra resolver isso so os fodas. vodkart , jhon beholder etc... =/

FlaahF
27 de julho de 2012 às 20:56

Aqui a versão do meu server: The Forgotten Server, version 0.3.6 (Crying Damson)

 

Versão de Jogo: 8.54

 

ALGUEM PODERIA AJUDAR PORFAVOR, VALENDO +REP

coyotestarkC
28 de julho de 2012 às 20:12

newnaruto = 317 -- outfit apos reborn ----- nova outfit

getPlayerVocation(cid) == 50 then ----- Vocação Atual

doPlayerSetVocation(cid, 95) ----- Nova Vocação

getPlayerLevel(cid) >= 200 ----- Level Nescessario

db.executeQuery("UPDATE `players` SET `looktype`="..newnaruto.." WHERE `players`.`id`= ".. playerid .."") >>>newnaruto<<<< Nome da outfit registrada anteriormente

 

 

Para adicionar um novo personagem para reborn é so copiar esta parte.

e colar abaixo do talk_start = 0, dando duas linhas de espaço

 

 

 

elseif msgcontains(msg, 'yes') and talk_state ==2 and getPlayerLevel(cid) >= 200 and getPlayerVocation(cid) == 50 then

doPlayerSetVocation(cid, 95)

addReset(cid)

playerid = getPlayerGUID(cid)

setPlayerStorageValue(cid,30025,4)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")

db.executeQuery("UPDATE `players` SET `looktype`="..newnaruto.." WHERE `players`.`id`= ".. playerid .."")

talk_state = 0

 

 

 

 

no reborn.lua coloca isso

-- SCRIPT FEITO POR YUNIE
-- config
minlevel = 200 -- level para resetar
price = 5000
newlevel = 8 -- level após reset
newexp = 4200 -- nova experiencia após reset
newnaruto = 317 -- outfit apos reborn
-- end config
function addReset(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,1020,resets+1)
return true
end
function getResets(cid)
resets = getPlayerStorageValue(cid,1020)
if resets < 0 then
resets = 0
end
return resets
end
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
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30025) == 4 then
		selfSay('Voçe Não Pode Mais Rebornar.')
	 focus = 0
	 talk_start = 0
	 elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30025) ~= 4 then
		   selfSay('So Pode Rebornar Lv 200 Desculpe...kkk que otario')
	 elseif msgcontains(msg, 'reborn') then
		   selfSay('Entao o grande aventureiro gostaria de renascer? {yes}')
							 talk_state = 2
elseif msgcontains(msg, 'yes') and talk_state ==2 and getPlayerLevel(cid) >= 200 and getPlayerVocation(cid) == 50 then
doPlayerSetVocation(cid, 95)
addReset(cid)
playerid = getPlayerGUID(cid)
setPlayerStorageValue(cid,30025,4)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")
db.executeQuery("UPDATE `players` SET `looktype`="..newnaruto.." WHERE `players`.`id`= ".. playerid .."")
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform, Voce deve transformar ou reverter.')
  elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
	 selfSay('Good bye. Deslogue e logue Por Favor!!!!')
	 focus = 0
	 talk_start = 0
  end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

favor manter nome do scripter original do script (YUNIE). eu apenas adicionei umas duas coisinhas. como a parada da outfit, que nao tinha.

Espero que funcione

Editado Julho 28 por CoyoteStark