Tópico Movido
Este tópico foi movido de "OTServ → Scripting → OTServ Scripts → NPCs, monsters e raids"
para "OTServ → Suporte OTServ → Suporte Derivados".
info
Grupo: Marquês
Registrado: 25/09/10
Posts: 1.3k
Reputação: +446
Gênero: Masculino

Tópico Movido
Este tópico foi movido de "OTServ → Scripting → OTServ Scripts → NPCs, monsters e raids"
para "OTServ → Suporte OTServ → Suporte Derivados".
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Campones
Registrado: 29/07/15
Posts: 42
Reputação: 0
Galera Eu To Com Um Sistema Akatsuki Q Peguei Em Um Forum So Q Quando Coloco Ele No Meu Server Algums Player Q Ja Tinha Conta Antes Deu Colocar O Sistema Nao Consegue Fazer A Quest Poq Fala Q O Player Ja Fez Sendo Q O Player Nao Fez ... Os Q Criaram Char Dps Do Sistema Consegue De Boa Alguem Pode AJudar Vou Postar O Script Abaixo EH Por Npc !
Script :
-- Script Akatsuki System Advance 1.0 --
-- By RigBy --
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 level = 600 -- Level preciso pra entra para akatsuki
local itemid = 5943 -- id do coração
local quantidade =1 -- quantos hearts e preciso
local bonushp = 300000 -- quanto de bonus de life vai ganha
local bonusmp = 30000 -- quanto de bonus de mana vai ganha
local experience = 20 -- Experience rates no caso 2x a experiencia do seu servidor.
local config = {
--[Vocation] = ( Nova Vocation, New Outfit )
[230] = { 500, 704}, -- Naruto
[24] = { 502, 700}, -- Sasuke
[328] = { 506, 736}, -- Lee
[42] = { 504, 170}, -- Sakura
[61] = { 508, 719}, -- Gaara
[78] = { 514, 754}, -- Neji
[98] = { 510, 710}, -- Kiba
[116] = { 512, 729}, -- Shikamaru
[135] = { 516, 717}, -- Hinata
[158] = { 544, 725}, -- Tenten
[177] = { 518, 589}, -- Itachi
[196] = { 520, 722}, -- Killer Bee
[231] = { 522, 744}, -- Kakashi
[246] = { 538, 705}, -- Minato
[260] = { 546, 709}, -- Kisame
[275] = { 548, 629}, -- Raikage
[287] = { 526, 891}, -- Yahiko
[297] = { 530, 713}, -- Kankuro
[314] = { 528, 396}, -- Kakuzo
[325] = { 532, 726}, -- Temari
[229] = { 524, 481}, -- Obito
[372] = { 550, 520}, -- Jiraya
[348] = { 542, 876}, -- Shisui
[404] = { 540, 630}, -- Tobirama
[427] = { 534, 718}, -- Kabuto
[391] = { 536, 721}, -- Chouji
[382] = { 552, 650}, -- Deidara
[414] = { 555, 892}, -- Hashirama
}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 1 or cid
if msgcontains(msg, 'akatsuki') then
if getPlayerVocation(cid) ~= config then
if getPlayerStorageValue(cid, 89745) == -1 then
if getPlayerLevel(cid) >= level then
selfSay('Tem certeza de que quer se juntar a Akatsuki?.', cid)
talkState[talkUser] = 1
else
selfSay('Você nem sabe o nível que é pra entrar na akatsuki, suma da minha frente seu idiota.', cid)
end
else
selfSay('Você já faz parte da Akatsuki!', cid)
end
else
selfSay('Não preciso de você agora!', cid)
end
end
if talkState[talkUser] == 1 and msgcontains(msg, 'yes') then
selfSay('Para provar a sua lealdade, você tem que trazer '..quantidade..' {coraçao}.', cid)
talkState[talkUser] = 2
end
if talkState[talkUser] == 2 and msgcontains(msg, 'coraçao') then
if getPlayerItemCount(cid, 5943) >= 1 then
local voc = config[getPlayerVocation(cid)]
doPlayerSetVocation(cid, voc[1])
local outfit = {lookType = voc[2]}
doCreatureChangeOutfit(cid, outfit)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonushp)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonusmp)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doPlayerRemoveItem(cid, 5943, 1)
doCreatureAddMana(cid, getCreatureMaxMana(cid))
setPlayerStorageValue(cid,89745,6)
doPlayerSetExperienceRate(cid, experience)
selfSay('Parabéns agora você faz parte da Akatsuki.', cid)
talkState[talkUser] = 0
else
selfSay('Não adianta me enganar, você não tem '..quantidade..' corações, vai atrás, e só volte com eles.', cid)
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())