Legal o npc. Eu criei a função doReborn, igual do wodbo no meu ot 8.54.
- Forums
- OTServ
- Recursos
- Scripting
- NPCs, monsters e raids
- [Npc] Rebornfor Wodbo 8.54
[Npc] Rebornfor Wodbo 8.54
By Beeki, 10 de mar. de 2012 in NPCs, monsters e raids
info
Group: Barão
Joined: 12/09/10
Posts: 249
Reputation: +53

info
Group: Herói
Joined: 12/03/11
Posts: 1.9k
Reputation: +284
Gender: Masculino
Tibia Character: Nokte

kkk, Perdeu tempo criando essa função, como você viu no Script usei funções que já tem no distro!
info
Group: Barão
Joined: 12/09/10
Posts: 249
Reputation: +53

Perdi tempo nada, eu gosto de mecher nas sources. Meu script de transform é compilado igual do wodbo também.
info
Group: Herói
Joined: 12/03/11
Posts: 1.9k
Reputation: +284
Gender: Masculino
Tibia Character: Nokte

Hm... é achei um pouco perda de tempo... o script de transform da para fazer em lua também, bem mais Fácil, para fazer seu wodbo 8.54 unica coisa que você teria que mecher nas source era pra adicionar os novos efeitos e + alguns customs e só!
muito bom esse npc Estarei dando umas modificaçoes é utilizando no meu servidor ![]()
info
Group: Artesão
Joined: 24/10/11
Posts: 133
Reputation: +55
Tibia Character: ...

cara, esse script n ta funfando eu falo 'hi' - 'reborn' e fala 'yes' ai ele fala que não tenho level 250.. mais to 2000 ![]()
info
Group: Herói
Joined: 12/03/11
Posts: 1.9k
Reputation: +284
Gender: Masculino
Tibia Character: Nokte

Olha bem o script e perceba que ele esta configurado para level 250 menos.
info
Group: Conde
Joined: 10/12/11
Posts: 962
Reputation: +99
Gender: Masculino

funciona na versão 8.6 ?????
info
Group: Marquês
Joined: 29/10/11
Posts: 1.2k
Reputation: +134
Gender: Masculino

Beeki tem como fazer,pra ele reborna 250+?estou empacado nisso preciso d+,rep+ se ajudar,Obrigado.
info
Group: Conde
Joined: 10/12/11
Posts: 962
Reputation: +99
Gender: Masculino

ei mozark tenta assim
aonde ta
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30025) ~= 4 then
selfSay('Hehe, I say If you READY. You do not have 250 level.', cid)
tenta troca o < 250 por > 250
n sei se vai funcionar
e axo q vai ser so para maiores de 250 n tenho certeza pq < é menor e > e maior
Edited Julho 20 by PostadorHunter
info
Group: Marquês
Joined: 29/10/11
Posts: 1.2k
Reputation: +134
Gender: Masculino

Vo tenta ja edito ake,Obrigado.
@Edit:Puts nao funfo mano,Se puder ajudar ainda eu agradeço.
Parei meu wodbo 8.54 por causa desse npc.
Meu npc esta assim:
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
local config = {
--[Vocation] = ( Nova Vocation, New Outfit )
[6] = { 7, 137},
}
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('You are reborn.', cid)
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) > 250 and getPlayerStorageValue(cid,30025) ~= 4 then
selfSay('Hehe, I say If you READY. You do not have 250 level.', cid)
elseif msgcontains(msg, 'reborn') then
selfSay('Are you sure? {yes}', cid)
talkState[talkUser] = 2
elseif msgcontains(msg, 'yes') and talkState[talkUser] ==2 and getPlayerLevel(cid) == 250 then
local voc = config[getPlayerVocation(cid)]
doPlayerSetVocation(cid, voc[1])
local outfit = {lookType = voc[2]}
doCreatureChangeOutfit(cid, outfit)
doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(1)))
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+20000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+30000)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
setPlayerStorageValue(cid,30025,4)
talkState[talkUser] = 0
elseif msgcontains(msg, 'yes') and getPlayerLevel(cid) == 250 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! You need level 250 to reborn.', cid)
talkState[talkUser] = 0
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform to reborn.', cid)
talkState[talkUser] = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) > 4 then
selfSay('Good bye.', cid)
focus = 0
talk_start = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Edited Julho 20 by Mozark001
info
Group: Conde
Joined: 10/12/11
Posts: 962
Reputation: +99
Gender: Masculino

e oq q deu errado ??
info
Group: Marquês
Joined: 29/10/11
Posts: 1.2k
Reputation: +134
Gender: Masculino

Por exemplo, eu to level 240,ele dis q precisa de level 250 pra reborna,e kuadn oeu to 251+ ele dis que n tenho 250 tbm ...
Queria por pra no minimo 250 reborna.
info
Group: Conde
Joined: 10/12/11
Posts: 962
Reputation: +99
Gender: Masculino

vo ver aqui ja edito
edit
ahh
meu erro aki desculpe eu n tinha lido tudo
aki e o lvl q e quando n pode rebornar
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) > 250 and getPlayerStorageValue(cid,30025) ~= 4 then
selfSay('Hehe, I say If you READY. You do not have 250 level.', cid)
i botei > era < mesmo
o lvl de q pode rebornar axo q e aki
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30025) == 4 then
selfSay('You are reborn.', cid)
dps vejo tenhoq sai
Edited Julho 20 by PostadorHunter






info
Group: Herói
Joined: 12/03/11
Posts: 1.9k
Reputation: +284
Gender: Masculino
Tibia Character: Nokte
Bem venho aqui trazer para vocês um NPC de Reborn para quem está criando um servidor de WoDBO na versão 8.54, pode ser usado em qualquer OTserver também, bem aqui vai...
Reborn.xml
Reborn.lua, muito facil configurar, já tem uma tabelinha ai encinando como, até
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 local config = { --[Vocation] = ( Nova Vocation, New Outfit ) [21] = { 22, 137}, [254] = { 255, 351}, [36] = { 37, 148}, [51] = { 52, 144}, [65] = { 66, 152}, [378] = { 379, 451}, [80] = { 81, 150}, [93] = { 94, 150}, [107] = { 108, 509}, [118] = { 119, 118}, [131] = { 132, 34}, [144] = { 145, 15}, [155] = { 156, 15}, [167] = { 168, 173}, [179] = { 180, 178}, [191] = { 192, 184}, [205] = { 206, 190}, [217] = { 218, 221}, [229] = { 230, 281}, [242] = { 243, 60}, [254] = { 255, 351}, [265] = { 266, 334}, [275] = { 276, 80}, [286] = { 287, 338}, [296] = { 297, 198}, } 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('You are reborn.', cid) focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30025) ~= 4 then selfSay('Hehe, I say If you READY. You do not have 250 level.', cid) elseif msgcontains(msg, 'reborn') then selfSay('Are you sure? {yes}', cid) talkState[talkUser] = 2 elseif msgcontains(msg, 'yes') and talkState[talkUser] ==2 and getPlayerLevel(cid) == 250 then local voc = config[getPlayerVocation(cid)] doPlayerSetVocation(cid, voc[1]) local outfit = {lookType = voc[2]} doCreatureChangeOutfit(cid, outfit) doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(1))) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+20000) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+30000) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) setPlayerStorageValue(cid,30025,4) talkState[talkUser] = 0 elseif msgcontains(msg, 'yes') and getPlayerLevel(cid) ~= 250 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! You need level 250 to reborn.', cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform to reborn.', cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye.', cid) focus = 0 talk_start = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())Créditos:
Rodrigo Ritter ( Criador )
Beeki ( Trazer ao XTibia )