Ir para conteúdo

Featured Replies

Postado

ESSE ERRO

http://prntscr.com/b8yirb

Script

function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
local type = getPlayerStorageValue(thing.uid, 89745)
doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(cid) == 0 and "She" or "He").." are "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 2 and "Jounin" or type == 3 and "Anbu" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Akatsuki Member"))
end
return true
end

 

script sennin

Spoiler

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, "yes")) then
npcHandler:say("Entao voce tem os {pergaminhos} katon, suiton e raiton?", cid)
talkState[talkUser] = 1

elseif(msgcontains(msg, "pergaminhos") and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,89745) >= 7) then
npcHandler:say("Voce ja é sennin.", cid)

elseif doPlayerRemoveItem(cid, 7400, 1) and doPlayerRemoveItem(cid, 7401, 1) and doPlayerRemoveItem(cid, 7398, 1) then
setPlayerStorageValue(cid,89745,7)
doPlayerAddItem(cid,823,1)
npcHandler:say("Agora voce é um Sennin!", cid)
else
npcHandler:say("Voce nao tem os pergaminhos.", cid)
end
end
return true
end

npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

Script jounin

 

Spoiler

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, 'shinobi')) then
selfSay('Ohh sim...verdade, de agora em diante seras chamado de {jounin}, gosto muito desse espirito jovem, lembro de minha juventude.', cid)
end
---------------------------------------------------------
if(msgcontains(msg, 'jounin')) then
selfSay('Tudo bem então, sem mais delongas me de o {certificado} da conclusao do exame, pois ficara no seus arquivos ninja que voce concluiu o exame jounin!', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'certificado') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,89745) > 2) then
selfSay('Voce ja fes o exame jounin.', cid)
else
if(doPlayerRemoveItem(cid, 6088, 1) == TRUE) then
setPlayerStorageValue(cid,89745,3)
doPlayerAddExperience(cid,25000)
doPlayerAddItem(cid,8851,1)
selfSay('Umm, isso me da mais alegria e animo para viver, vendo essa juventude tao determinada, podes se considerar um chunin de agora em diante!', cid)
else
selfSay('Cade o certificado Shinobi, sem ele não podes ganhar o Titulo de Jounin, me traga o CERTIFICADO!', cid)
end
end
return true
end
 
 
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

 

script anbus

 

Spoiler

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, 'shinobi')) then
selfSay('Ohh sim...verdade, de agora em diante seras chamado de {anbu}, foi muito valente por ter feito o exame.', cid)
end
---------------------------------------------------------
if(msgcontains(msg, 'anbu')) then
selfSay('Hahaha, axa mesmo que terminou? So estara terminado quando matar a PRISIONEIRA e me der o {cerebro} dela!', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'cerebro') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,89745) > 3) then
selfSay('Voce ja me deu o cerebro da prisioneira e ja se tornou um anbu.', cid)
else
if(doPlayerRemoveItem(cid, 5808, 1) == TRUE) then
setPlayerStorageValue(cid,89745,4)
doPlayerAddExperience(cid,25000)
selfSay('Hahaha, vejo que nao sera dificil de tomar decisoes no futuro, tem potencial pra se tornar um captao anbu algum dia!', cid)
else
selfSay('Ande LOGO, mate a PRISIONEIRA e me de o CEREBRO dela!', cid)
end
end
return true
end
 
 
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Postado
function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) then
		local var = {[0] = "Shinobi", [1] = "Genin", [2] = "Chunin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin", [6] = "Akatsuki Member"} 
		local ret = getPlayerStorageValue(thing.uid, 89745) <= 0 and 0 or getPlayerStorageValue(thing.uid, 89745)
		doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(thing.uid) == 0 and "She" or "He").." are "..var[ret])
	end
	return true
end

 

Postado
  • Autor
1 hora atrás, Vodkart disse:

function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) then
		local var = {[0] = "Shinobi", [1] = "Genin", [2] = "Chunin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin", [6] = "Akatsuki Member"} 
		local ret = getPlayerStorageValue(thing.uid, 89745) <= 0 and 0 or getPlayerStorageValue(thing.uid, 89745)
		doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(thing.uid) == 0 and "She" or "He").." are "..var[ret])
	end
	return true
end

 

http://prntscr.com/b92bky

Postado

só se vc tiver usando uma storage maior que 6... Usa assim pra ver

 

obs: é isso mesmo, vc ta dando storage 7 e não colocou nada para especificar o que é a 7!

porque acaba na 6 como "akatsuki member"

 

¬¬

 

 

function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) then
		local var = {[0] = "Shinobi", [1] = "Genin", [2] = "Chunin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin", [6] = "Akatsuki Member"} 
		local ret = getPlayerStorageValue(thing.uid, 89745) <= 0 and 0 or getPlayerStorageValue(thing.uid, 89745)
		doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(thing.uid) == 0 and "She" or "He").." are "..(not var[ret] and "None" or var[ret]))
	end
	return true
end

 

 

---------------------------------

 

olha aqui o script do sennin, vc botou valor 7

 

npcHandler:say("Voce ja é sennin.", cid)
setPlayerStorageValue(cid,89745,7)

Editado por Vodkart (veja o histórico de edições)

Postado
  • Autor
9 minutos atrás, Vodkart disse:

só se vc tiver usando uma storage maior que 6... Usa assim pra ver

 

 


function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) then
		local var = {[0] = "Shinobi", [1] = "Genin", [2] = "Chunin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin", [6] = "Akatsuki Member"} 
		local ret = getPlayerStorageValue(thing.uid, 89745) <= 0 and 0 or getPlayerStorageValue(thing.uid, 89745)
		doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(thing.uid) == 0 and "She" or "He").." are "..(not var[ret] and "None" or var[ret]))
	end
	return true
end

 

 

Vlw Ja rep dps rep +

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo