Ir para conteúdo

Featured Replies

Postado
Em 23/01/2018 em 19:02, Mormai disse:

Não funcionou, ta dando erro no tibia debug9 quando uso o item

 

 

Tente Esse:

doCreatureSay(cid, "ML +".. ml, TEXTCOLOR_YELLOW)

 

Caso não funcione basta você mudar os números até achar a cor desejada.

  • Respostas 6
  • Visualizações 443
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Bruno Carvalho
    Bruno Carvalho

    Se você quer ML por experience ele fica assim:   Se você quer adicionar um tanto de leveis na ml:  

Postado
  • Autor

@Bruno Carvalho O script funcionou perfeiramente.. agora estou com outro problema espero que voce possa me ajudar

Meu Server nao esta reconhecendo o firstitems.

e ta dando o erro 47 e 45

 

Data/creaturesscript/script/firstitems.lua:onlogin

[C}: im function 'maxn'

Data/creaturesscript/script/firstitems.lua:47

Data/creaturesscript/script/firstitems.lua:45

 

local firstItems = {}
firstItems[0] =
{
2120,
5710,
2789,
2305,
2261,
2274,
2273
}
firstItems[1] =
{
2323,
8871,
7730,
2643,
2525
}
firstItems[2] =
{
2323,
8871,
7730,
2643,
2525
}
firstItems[3] =
{
2457,
8872,
2647,
2643,
2525
}
firstItems[4] =
{
2457,
2463,
2647,
2643,
2525
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2789, 1)
else
doPlayerAddItem(cid, 2789, 1)
end
local bag = doPlayerAddItem(cid, 11235, 1)
doAddContainerItem(bag, 2268, 1)
doAddContainerItem(bag, 2269, 1)
doAddContainerItem(bag, 2304, 1)
doAddContainerItem(bag, 2274, 1)

doAddContainerItem(bag, 2191, 1)
doAddContainerItem(bag, 2186, 1)
doAddContainerItem(bag, 2400, 1)
doAddContainerItem(bag, 7368, 1)

doAddContainerItem(bag, 7620, 1)
doAddContainerItem(bag, 7618, 1)

doAddContainerItem(bag, 2278, 1)
doAddContainerItem(bag, 2261, 1)
doAddContainerItem(bag, 2789, 100)
doAddContainerItem(bag, 2293, 1)
doAddContainerItem(bag, 2305, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Em 15/01/2018 em 19:28, Bruno Carvalho disse:

Se você quer ML por experience ele fica assim:

  Mostrar conteúdo oculto


local ml = 450 -- Quanto de experience o player irá ganhar?!
local exhaust = 0 -- Tempo para o player poder usar o item novamente! (tempo em segundos)
local storage = 87544 -- Não mexa aqui.
local level = 1 -- Level que podera usar o exp scroll.

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) >= level then
		if (getPlayerStorageValue(cid, storage) <= os.time()) then
			doPlayerAddSpentMana(cid, ml)
			doCreatureSay(cid, "ML ".. ml ..".", 19)
			doSendMagicEffect(getCreaturePosition(cid), 14)
			doRemoveItem(cid, item.uid, 1)
			setPlayerStorageValue(cid, storage, os.time() + exhaust)
		else
			doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry,You need to be level "..level.." or more for use this item.")
	end
	return true
end

 

 

Se você quer adicionar um tanto de leveis na ml:

  Mostrar conteúdo oculto


local ml = 4 -- Quanto de magic level o player irá ganhar?!
local exhaust = 0 -- Tempo para o player poder usar o item novamente! (tempo em segundos)
local storage = 87544 -- Não mexa aqui.
local level = 1 -- Level que podera usar o exp scroll.

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) >= level then
		if (getPlayerStorageValue(cid, storage) <= os.time()) then
			doPlayerAddMagLevel(cid, ml)
			doCreatureSay(cid, "ML +".. ml, 19)
			doSendMagicEffect(getCreaturePosition(cid), 14)
			doRemoveItem(cid, item.uid, 1)
			setPlayerStorageValue(cid, storage, os.time() + exhaust)
		else
			doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry,You need to be level "..level.." or more for use this item.")
	end
	return true
end

 

 

 

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

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