Ir para conteúdo

Featured Replies

Postado
11 minutos atrás, xWhiteWolf disse:

@Jobs perhaps, try it and tell if there're any warnings on console

 

hã? o cara perguntou se funciona em tfs 1.2, dai eu acabei de testar no meu ot, e tive que mudar umas coisas só tipo 'getItemNameById', 'doPlayerSetStorageValue' agora ta funcionando rs

  • Respostas 122
  • Visualizações 20.7k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • tem sim, eu só não coloquei porque o próprio tibia ja tem um sistema de exhausted padrão de 1 segundo entre ações contendo itemEx (que é configurável pelo config.lua)

  • dá ué..  terra = {65783} . . . isInArray(terra, itemEx.uid) agora só vai dar pra minerar nos pisos que tiverem unique id 65783. A constante de level é o seguinte.. a fórmula da experiência necessá

  • sim ué.. pra upar do 50 pro 51 a conta é a seguinte: (51*51/k) - (50*50/k) que é igual a 1300 - 1250 = 50 picaretadas.

Postado
  • Autor
11 horas atrás, Jobs disse:

 

hã? o cara perguntou se funciona em tfs 1.2, dai eu acabei de testar no meu ot, e tive que mudar umas coisas só tipo 'getItemNameById', 'doPlayerSetStorageValue' agora ta funcionando rs

nao havia entendido, achei que era vc perguntando se funcionava no tfs 1.2, e respondi que talvez funcionasse, porém se desse algum warning no console era pra ele mandar ql era que eu corrigia

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Postado
Em 01/08/2016 ás 11:00, xWhiteWolf disse:

nao havia entendido, achei que era vc perguntando se funcionava no tfs 1.2, e respondi que talvez funcionasse, porém se desse algum warning no console era pra ele mandar ql era que eu corrigia

 

Eita, dando suporte até agora mano :gasp:  Parabéns! :grin:

 

Postado
On 7/31/2016 at 9:52 PM, Jobs said:

 


terra = {351,352,353,354,355}
 levels = {
[-1] = 2229, ---- skull
[0] = 1294, --- small stone
[1] = 3976, --- worm
[10] = 2149, -- Small Emerald
[12] = 2146, -- Small Sapphire
[15] = 2145, -- Small Diamond 
[17] = 2150, -- Small Amethyst
[20] = 2147, -- Small Ruby
[25] = 2144, -- Black Pearls 
[27] = 2143, -- White Pearls
[30] = 2157, -- Gold Nuggets
[35] = 2156, --- red gem
[36] = 2158, -- blue gem 
[37] = 2155, -- green gem 
[38] = 2153, -- violet gem
[39] = 2154, -- yellow gem
[40] = 7761, -- small enchanted emerald 
[42] = 7759, -- Small Enchanted Sapphiire
[45] = 7762, -- Small Enchanted Amethyst
[50] = 7760, -- Small Enchanted Ruby
[70] = 2177  -- Life Crystal
} 


local config = {
storage = 19333,
chance = 40, --- chance de achar um item ou não
k = 2, --- constante de level.. quanto maior, mais fácil é upar. (a fórmula é level ao quadrado dividido pela constante)
experience = 19334
}


function onUse(cid, item, fromPosition, itemEx, toPosition)


local drops = {}


function getDrops(cid)
for i= -1,getPlayerStorageValue(cid, config.storage) do
if levels[i] then
table.insert(drops, levels[i])
end
end
return true
end


if isInArray(terra, itemEx.itemid) then
getDrops(cid)
setPlayerStorageValue(cid, config.experience, getPlayerStorageValue(cid, config.experience)+1)
local experience = getPlayerStorageValue(cid, config.experience)
if experience >= (8+(getPlayerStorageValue(cid, config.storage)^2))/config.k then
setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage)+1)
doPlayerSendTextMessage(cid, 27, "Congratulations, you have leveled! Your currect level is "..getPlayerStorageValue(cid, config.storage) ..".")
if getPlayerStorageValue(cid, config.storage) == 50 then
doPlayerSendTextMessage(cid, 20, "For reaching level "..getPlayerStorageValue(cid, config.storage) .." you have been awarded with Mining Helmet.")
doPlayerAddItem(cid, 7497, 1, true)
end
end
if config.chance >= math.random(1,100) then
if #drops >= 1 then
local item = drops[math.random(1,#drops)]
doPlayerSendTextMessage(cid, 27, "You have found a "..getItemName(item)..".")
doPlayerAddItem(cid, item, 1, true)
end
doSendMagicEffect(toPosition, 3)
else
doSendMagicEffect(toPosition, 2)
return true
end
elseif itemEx.itemid == item.itemid then
doPlayerSendTextMessage(cid, 27, "You're currenctly level "..getPlayerStorageValue(cid, config.storage)..".")
else
return false
end
return true
end

 

Ok now i have challenge for you ;) possible command to check your mining level? for example '!mininglevel' and it will say for example 'Your mining level is 7.' :O

Postado
  • Autor
9 minutos atrás, Zalton Returns disse:

Ok now i have challenge for you ;) possible command to check your mining level? for example '!mininglevel' and it will say for example 'Your mining level is 7.' :O

Spoiler

local config = {
	storage = 19333
	}

function onSay(cid, words, param, channel) 
	local lv = getPlayerStorageValue(cid, config.storage)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your mining level is ".. lv > 0 and lv or 0 ..".")
return true
end

 

and in talkactions.xml you must copy on the lines and change the file name and the words to !mininglevel.

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

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.7k

Informação Importante

Confirmação de Termo