Quantas vocations vc quer que possa se transformar
info
Grupo: Visconde
Registrado: 05/02/14
Posts: 411
Reputação: +285
Gênero: Masculino
Char no Tibia: Zeh Sergipano

Essa script e minha hehehehe.
eu tenho essa que foi um colega que passo pra min pra eu da uma editada.pode usar.
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 )
[1] = { 800, 453},
[2] = { 800, 453},
[3] = { 800, 453},
[4] = { 800, 453},
[5] = { 800, 453},
[6] = { 800, 453},
[7] = { 800, 453},
[8] = { 800, 453},
[9] = { 800, 453},
[10] = { 800, 453},
[11] = { 800, 453},
[12] = { 800, 453},
[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 getPlayerItemCount(cid, 5943, 6) then
if msgcontains(msg, 'yes') and getPlayerStorageValue(cid,30026) == 4 then
selfSay('You are reborn.', cid)
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 350 and getPlayerStorageValue(cid,30025) ~= 4 then
selfSay('Hehe, I say If you READY. You do not have 350 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) >= 350 then
local voc = config[getPlayerVocation(cid)]
doPlayerSetVocation(cid, voc[1])
local outfit = {lookType = voc[2]}
doCreatureChangeOutfit(cid, outfit)
doPlayerRemoveItem(cid, 5943, 6)
setPlayerStorageValue(cid,30026,4)
talkState[talkUser] = 0
elseif msgcontains(msg, '') and getPlayerLevel(cid) ~= 350 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce precisa ter level 350+ para se tornar membro da akatsuki.', cid)
talkState[talkUser] = 0
elseif msgcontains(msg, '') and talkState[talkUser] == 2 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce precisa reverter ou transformar para se tornar membro da akatsuki.', cid)
talkState[talkUser] = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Ate mais.', cid)
focus = 0
talk_start = 0
end
else
selfSay('Hehe, Voce não tem os corações.', cid)
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Desculpa a falta de dentificação e pq eu uso tab pra da espaço e do com preguiça de da espaço agora bye
Editado Março 5 por RigBy
info
Grupo: Artesão
Registrado: 13/04/13
Posts: 148
Reputação: +14
Gênero: Masculino
Char no Tibia: tempest flower
Essa script e minha hehehehe.
eu tenho essa que foi um colega que passo pra min pra eu da uma editada.pode usar.
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 ) [1] = { 800, 453}, [2] = { 800, 453}, [3] = { 800, 453}, [4] = { 800, 453}, [5] = { 800, 453}, [6] = { 800, 453}, [7] = { 800, 453}, [8] = { 800, 453}, [9] = { 800, 453}, [10] = { 800, 453}, [11] = { 800, 453}, [12] = { 800, 453}, [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 getPlayerItemCount(cid, 5943, 6) then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid,30026) == 4 then selfSay('You are reborn.', cid) focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 350 and getPlayerStorageValue(cid,30025) ~= 4 then selfSay('Hehe, I say If you READY. You do not have 350 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) >= 350 then local voc = config[getPlayerVocation(cid)] doPlayerSetVocation(cid, voc[1]) local outfit = {lookType = voc[2]} doCreatureChangeOutfit(cid, outfit) doPlayerRemoveItem(cid, 5943, 6) setPlayerStorageValue(cid,30026,4) talkState[talkUser] = 0 elseif msgcontains(msg, '') and getPlayerLevel(cid) ~= 350 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce precisa ter level 350+ para se tornar membro da akatsuki.', cid) talkState[talkUser] = 0 elseif msgcontains(msg, '') and talkState[talkUser] == 2 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce precisa reverter ou transformar para se tornar membro da akatsuki.', cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Ate mais.', cid) focus = 0 talk_start = 0 end else selfSay('Hehe, Voce não tem os corações.', cid) return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())Desculpa a falta de dentificação e pq eu uso tab pra da espaço e do com preguiça de da espaço agora bye
VLW AMIGO REP+
Tópico movido para a seção de dúvidas e pedidos resolvidos.
Alguem tem mais outra dúvida.
info
Grupo: Campones
Registrado: 02/03/14
Posts: 59
Reputação: +10

Alguem tem mais outra dúvida.
Gostaria de saber porque reviveu este tópico se já foi resolvido.







info
Grupo: Artesão
Registrado: 13/04/13
Posts: 148
Reputação: +14
Gênero: Masculino
Char no Tibia: tempest flower
Eae amigos
Ja vou logo no ponto
QUERO QUE MUDEM SO UMA PARTE DESSE SCRIPT PRA MIM PFF:
QUote:
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 vocation = 120 -- vocation que precisa ter
local vocatiion = 900 -- vocation que vai se transforma
local item = 5943 -- ID do Item que necessita para trocar
local quantidade = 10 -- quantidade de corações
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'sim')) then
if getPlayerStorageValue(cid, 8219382) == -1 then
if getPlayerVocation(cid) == vocation then
if getPlayerItemCount(cid, item) < quantidade then
selfSay('Não tente me enganar, voce não tem os '..quantidade..' corações !', cid)
else
doPlayerRemoveItem(cid, item, quantidade)
doPlayerSetVocation(cid, vocatiion)
setPlayerStorageValue(cid,8219382,1)
selfSay('Voce agora faz parte da akatsuki.', cid)
end
else
selfSay('Voce nao tem a vocacao nessessaria.', cid)
end
else
selfSay('Voce ja faz parte da akatsuki.', cid)
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Obs: Na parte
local vocation = 120 -- vocation que precisa ter
local vocatiion = 900 -- vocation que vai se transforma
Eu quero assim vocation x transforma na vocation x / vocation xx transforma na vocation xx entenderam?
Não quero que so possa ter 1 vocation para transformar
Outro exemplo:
local vocation = 1,2,3,4,5,6,7,8 / local vocatiion = 18 -- vocation que vai se transforma
local vocation = 690,691,692 / local vocatiion = 696 -- vocation que vai se transforma
Essa parte eu que vo editar.
PFF ajuda ai!
So falta isso pra meu system dar certo
)
Ty rep++++++!
Editado Março 5 por alanmtd1