Legal o npc. Eu criei a função doReborn, igual do wodbo no meu ot 8.54.
- Fórum
- OTServ
- Recursos
- Scripting
- NPCs, monsters e raids
- [Npc] Rebornfor Wodbo 8.54
[Npc] Rebornfor Wodbo 8.54
Por Beeki, 10 de mar. de 2012 em NPCs, monsters e raids
info
Grupo: Barão
Registrado: 12/09/10
Posts: 249
Reputação: +53

info
Grupo: Herói
Registrado: 12/03/11
Posts: 1.9k
Reputação: +284
Gênero: Masculino
Char no Tibia: Nokte

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

Perdi tempo nada, eu gosto de mecher nas sources. Meu script de transform é compilado igual do wodbo também.
info
Grupo: Herói
Registrado: 12/03/11
Posts: 1.9k
Reputação: +284
Gênero: Masculino
Char no Tibia: 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
Grupo: Artesão
Registrado: 24/10/11
Posts: 133
Reputação: +55
Char no Tibia: ...

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
Grupo: Herói
Registrado: 12/03/11
Posts: 1.9k
Reputação: +284
Gênero: Masculino
Char no Tibia: Nokte

Olha bem o script e perceba que ele esta configurado para level 250 menos.
info
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: Masculino

funciona na versão 8.6 ?????
info
Grupo: Marquês
Registrado: 29/10/11
Posts: 1.2k
Reputação: +134
Gênero: Masculino

Beeki tem como fazer,pra ele reborna 250+?estou empacado nisso preciso d+,rep+ se ajudar,Obrigado.
info
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: 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
Editado Julho 20 por PostadorHunter
info
Grupo: Marquês
Registrado: 29/10/11
Posts: 1.2k
Reputação: +134
Gênero: 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())
Editado Julho 20 por Mozark001
info
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: Masculino

e oq q deu errado ??
info
Grupo: Marquês
Registrado: 29/10/11
Posts: 1.2k
Reputação: +134
Gênero: 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
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: 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
Editado Julho 20 por PostadorHunter






info
Grupo: Herói
Registrado: 12/03/11
Posts: 1.9k
Reputação: +284
Gênero: Masculino
Char no Tibia: 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 )