Ir para conteúdo
  • Cadastre-se

Derivado Sistema de kill mais extra exp em %


Posts Recomendados

entao o sistema funcionaria da seguinte forma qnt mais vc matar os bixos vc ia upando o teu extra bonus exp em x%.

como funciona: ao matar um x quantia de monstros vc ia almentando sua exp em x%. matei 1000 monstros vc estaria ganhando 10% a mais de exp. 

cd vez q vc matar um mosntro aparecer no servlog uma msg em laranja dizendo a quantia de monstros matados e a qnt de exp extra bonus X% q esta ganhando.

eu vi em um servidor e achei interessante e atrativo.

alguem pederia me ajudar?

babydoll2.gif

Link para o post
Compartilhar em outros sites

Esta é uma mensagem automática! Este tópico foi movido para a área correta.
Pedimos que você leia as regras do fórum.

Spoiler

This is an automated message! This topic has been moved to the correct area.
Please read the forum rules.

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites

sistema bem simples de ser feito, mas vai contar todos os monstros? ou existe uma tabela de mob dependendo do seu level? Se não só ficar caçando rat

a exp é permanente? ou qndo deslogar acaba?

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
21 horas atrás, chateadoagr disse:

é todos os monstros n existe tabela, a exp é pra sempre pode deslogar e logar q n vai resetar a exp bonus, vai sempre continuar a almentar ate cansar de caçar.

UP

babydoll2.gif

Link para o post
Compartilhar em outros sites

n testei

 

function getExpMonsterKills(cid)
	local me = {
		[{1000, 3000}] = 0.10, -- 10%
		[{3001, 6000}] = 0.20, -- 20%
		[{6001, 15000}] = 0.30, -- 30%
		[{15001, math.huge}] = 0.40 -- 40%
	}
	for v , r in pairs(me) do
		if getPlayerStorageValue(cid, 178902) >= v[1] and getPlayerStorageValue(cid, 178902) <= v[2] then
			return r
		end
	end
	return 0
end
function onKill(cid, target)
	if isPlayer(cid) and isMonster(target) == true then
		setPlayerStorageValue(cid, 178902, getPlayerStorageValue(cid, 178902) <= 0 and 1 or getPlayerStorageValue(cid, 178902)+1)
		local percent = getExpMonsterKills(cid)
		if percent == 0 then return true end
		local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
		local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent))
		doPlayerAddExperience(cid, count)
		addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60))
	end
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
16 minutos atrás, Vodkart disse:

n testei

 


function getExpMonsterKills(cid)
	local me = {
		[{1000, 3000}] = 0.10, -- 10%
		[{3001, 6000}] = 0.20, -- 20%
		[{6001, 15000}] = 0.30, -- 30%
		[{15001, math.huge}] = 0.40 -- 40%
	}
	for v , r in pairs(me) do
		if getPlayerStorageValue(cid, 178902) >= v[1] and getPlayerStorageValue(cid, 178902) <= v[2] then
			return r
		end
	end
	return 0
end
function onKill(cid, target)
	if isPlayer(cid) and isMonster(target) == true then
		setPlayerStorageValue(cid, 178902, getPlayerStorageValue(cid, 178902) <= 0 and 1 or getPlayerStorageValue(cid, 178902)+1)
		local percent = getExpMonsterKills(cid)
		if percent == 0 then return true end
		local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
		local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent))
		doPlayerAddExperience(cid, count)
		addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60))
	end
	return true
end

 

onde vai o script pode explicar pf?

babydoll2.gif

Link para o post
Compartilhar em outros sites

em creaturescript

ai adiciona essa parte o seu login.lua antes do último "return true"

 

registerCreatureEvent(cid, "exp_pmob")


e tag em creaturescript.xml

 

<event type="kill" name="exp_pmob" event="script" value="nome do seu script.lua"/> 

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
2 minutos atrás, Vodkart disse:

em creaturescript

ai adiciona essa parte o seu login.lua antes do último "return true"

 


registerCreatureEvent(cid, "exp_pmob")


e tag em creaturescript.xml

 


<event type="kill" name="exp_pmob" event="script" value="nome do seu script.lua"/> 

 

vlw vou testar aqui

 

esse erro apareceu :

Spoiler

[10:33:43.133] [Error - CreatureScript Interface]
[10:33:43.138] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.140] Description:
[10:33:43.146] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.148] stack traceback:
[10:33:43.150]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.154] [Error - CreatureScript Interface]
[10:33:43.160] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.163] Description:
[10:33:43.169] (luaGetMonsterInfo) Monster not found

[10:33:43.173] [Error - CreatureScript Interface]
[10:33:43.175] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.179] Description:
[10:33:43.182] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.184] stack traceback:
[10:33:43.186]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.194] [Error - CreatureScript Interface]
[10:33:43.196] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.199] Description:
[10:33:43.200] (luaGetMonsterInfo) Monster not found

[10:33:43.208] [Error - CreatureScript Interface]
[10:33:43.209] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.210] Description:
[10:33:43.212] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.222] stack traceback:
[10:33:43.224]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.228] [Error - CreatureScript Interface]
[10:33:43.233] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.235] Description:
[10:33:43.238] (luaGetMonsterInfo) Monster not found

[10:33:43.249] [Error - CreatureScript Interface]
[10:33:43.253] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.255] Description:
[10:33:43.256] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.261] stack traceback:
[10:33:43.264]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.420] [Error - CreatureScript Interface]
[10:33:43.426] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.428] Description:
[10:33:43.429] (luaGetMonsterInfo) Monster not found

[10:33:43.431] [Error - CreatureScript Interface]
[10:33:43.441] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.443] Description:
[10:33:43.445] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.446] stack traceback:
[10:33:43.447]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.457] [Error - CreatureScript Interface]
[10:33:43.461] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.468] Description:
[10:33:43.472] (luaGetMonsterInfo) Monster not found

[10:33:43.479] [Error - CreatureScript Interface]
[10:33:43.481] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.483] Description:
[10:33:43.487] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.495] stack traceback:
[10:33:43.497]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.502] [Error - CreatureScript Interface]
[10:33:43.509] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.510] Description:
[10:33:43.513] (luaGetMonsterInfo) Monster not found

[10:33:43.522] [Error - CreatureScript Interface]
[10:33:43.524] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.527] Description:
[10:33:43.533] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.536] stack traceback:
[10:33:43.540]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.750] [Error - CreatureScript Interface]
[10:33:43.754] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.756] Description:
[10:33:43.759] (luaGetMonsterInfo) Monster not found

[10:33:43.766] [Error - CreatureScript Interface]
[10:33:43.770] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.772] Description:
[10:33:43.776] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.778] stack traceback:
[10:33:43.783]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.789] [Error - CreatureScript Interface]
[10:33:43.792] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.794] Description:
[10:33:43.797] (luaGetMonsterInfo) Monster not found

[10:33:43.803] [Error - CreatureScript Interface]
[10:33:43.805] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.808] Description:
[10:33:43.813] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.814] stack traceback:
[10:33:43.816]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.826] [Error - CreatureScript Interface]
[10:33:43.828] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.830] Description:
[10:33:43.832] (luaGetMonsterInfo) Monster not found

[10:33:43.839] [Error - CreatureScript Interface]
[10:33:43.841] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.850] Description:
[10:33:43.853] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.858] stack traceback:
[10:33:43.864]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:43.870] [Error - CreatureScript Interface]
[10:33:43.872] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.877] Description:
[10:33:43.880] (luaGetMonsterInfo) Monster not found

[10:33:43.882] [Error - CreatureScript Interface]
[10:33:43.892] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:43.895] Description:
[10:33:43.897] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:43.898] stack traceback:
[10:33:43.905]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.060] [Error - CreatureScript Interface]
[10:33:44.066] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.069] Description:
[10:33:44.076] (luaGetMonsterInfo) Monster not found

[10:33:44.080] [Error - CreatureScript Interface]
[10:33:44.082] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.088] Description:
[10:33:44.090] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.093] stack traceback:
[10:33:44.095]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.103] [Error - CreatureScript Interface]
[10:33:44.105] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.106] Description:
[10:33:44.109] (luaGetMonsterInfo) Monster not found

[10:33:44.113] [Error - CreatureScript Interface]
[10:33:44.120] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.126] Description:
[10:33:44.128] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.129] stack traceback:
[10:33:44.130]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.139] [Error - CreatureScript Interface]
[10:33:44.141] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.143] Description:
[10:33:44.144] (luaGetMonsterInfo) Monster not found

[10:33:44.148] [Error - CreatureScript Interface]
[10:33:44.153] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.157] Description:
[10:33:44.163] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.164] stack traceback:
[10:33:44.166]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.372] [Error - CreatureScript Interface]
[10:33:44.377] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.378] Description:
[10:33:44.380] (luaGetMonsterInfo) Monster not found

[10:33:44.381] [Error - CreatureScript Interface]
[10:33:44.387] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.390] Description:
[10:33:44.391] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.394] stack traceback:
[10:33:44.399]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.402] [Error - CreatureScript Interface]
[10:33:44.405] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.413] Description:
[10:33:44.415] (luaGetMonsterInfo) Monster not found

[10:33:44.428] [Error - CreatureScript Interface]
[10:33:44.429] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.436] Description:
[10:33:44.441] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.443] stack traceback:
[10:33:44.446]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.454] [Error - CreatureScript Interface]
[10:33:44.457] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.459] Description:
[10:33:44.460] (luaGetMonsterInfo) Monster not found

[10:33:44.463] [Error - CreatureScript Interface]
[10:33:44.467] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.469] Description:
[10:33:44.470] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.472] stack traceback:
[10:33:44.474]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.484] [Error - CreatureScript Interface]
[10:33:44.487] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.490] Description:
[10:33:44.494] (luaGetMonsterInfo) Monster not found

[10:33:44.497] [Error - CreatureScript Interface]
[10:33:44.498] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.501] Description:
[10:33:44.504] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.508] stack traceback:
[10:33:44.513]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.670] [Error - CreatureScript Interface]
[10:33:44.675] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.677] Description:
[10:33:44.678] (luaGetMonsterInfo) Monster not found

[10:33:44.686] [Error - CreatureScript Interface]
[10:33:44.687] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.689] Description:
[10:33:44.697] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.698] stack traceback:
[10:33:44.701]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.708] [Error - CreatureScript Interface]
[10:33:44.710] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.712] Description:
[10:33:44.715] (luaGetMonsterInfo) Monster not found

[10:33:44.721] [Error - CreatureScript Interface]
[10:33:44.724] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.725] Description:
[10:33:44.727] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.728] stack traceback:
[10:33:44.737]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.740] [Error - CreatureScript Interface]
[10:33:44.741] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.747] Description:
[10:33:44.750] (luaGetMonsterInfo) Monster not found

[10:33:44.754] [Error - CreatureScript Interface]
[10:33:44.756] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.761] Description:
[10:33:44.763] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:44.764] stack traceback:
[10:33:44.767]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:44.978] [Error - CreatureScript Interface]
[10:33:44.983] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:44.991] Description:
[10:33:44.995] (luaGetMonsterInfo) Monster not found

[10:33:44.997] [Error - CreatureScript Interface]
[10:33:44.999] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.003] Description:
[10:33:45.007] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:45.009] stack traceback:
[10:33:45.010]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:45.015] [Error - CreatureScript Interface]
[10:33:45.020] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.027] Description:
[10:33:45.029] (luaGetMonsterInfo) Monster not found

[10:33:45.031] [Error - CreatureScript Interface]
[10:33:45.032] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.034] Description:
[10:33:45.038] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:45.042] stack traceback:
[10:33:45.044]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:45.055] [Error - CreatureScript Interface]
[10:33:45.057] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.058] Description:
[10:33:45.063] (luaGetMonsterInfo) Monster not found

[10:33:45.068] [Error - CreatureScript Interface]
[10:33:45.070] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.075] Description:
[10:33:45.079] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:45.081] stack traceback:
[10:33:45.086]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:45.090] [Error - CreatureScript Interface]
[10:33:45.092] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.093] Description:
[10:33:45.098] (luaGetMonsterInfo) Monster not found

[10:33:45.109] [Error - CreatureScript Interface]
[10:33:45.111] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.113] Description:
[10:33:45.115] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:45.117] stack traceback:
[10:33:45.122]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:45.279] [Error - CreatureScript Interface]
[10:33:45.282] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.284] Description:
[10:33:45.293] (luaGetMonsterInfo) Monster not found

[10:33:45.297] [Error - CreatureScript Interface]
[10:33:45.300] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.305] Description:
[10:33:45.307] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:45.310] stack traceback:
[10:33:45.313]  data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[10:33:45.322] [Error - CreatureScript Interface]
[10:33:45.324] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.330] Description:
[10:33:45.332] (luaGetMonsterInfo) Monster not found

[10:33:45.336] [Error - CreatureScript Interface]
[10:33:45.341] data/creaturescripts/scripts/upbonus.lua:onKill
[10:33:45.342] Description:
[10:33:45.349] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[10:33:45.355] stack traceback:
[

 

 

babydoll2.gif

Link para o post
Compartilhar em outros sites

tais testando com o god alguma coisa? tem que ser com player

 

testei com o rato que dá 250 de exp(em branco) e o azul é a exp que ganhei a mais, no caso está 10%

 

então 10% de 250 = 25

 

 

EopxRnI.jpg

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

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
36 minutos atrás, leozincorsair disse:

Aqui funcionou ! +Rep

passa seu face? pra vc me ajudar? quero mostra pra vc o bug...me ajuda ai

 

Link para o post
Compartilhar em outros sites
6 horas atrás, Vodkart disse:

n testei

 


function getExpMonsterKills(cid)
	local me = {
		[{1000, 3000}] = 0.10, -- 10%
		[{3001, 6000}] = 0.20, -- 20%
		[{6001, 15000}] = 0.30, -- 30%
		[{15001, math.huge}] = 0.40 -- 40%
	}
	for v , r in pairs(me) do
		if getPlayerStorageValue(cid, 178902) >= v[1] and getPlayerStorageValue(cid, 178902) <= v[2] then
			return r
		end
	end
	return 0
end
function onKill(cid, target)
	if isPlayer(cid) and isMonster(target) == true then
		setPlayerStorageValue(cid, 178902, getPlayerStorageValue(cid, 178902) <= 0 and 1 or getPlayerStorageValue(cid, 178902)+1)
		local percent = getExpMonsterKills(cid)
		if percent == 0 then return true end
		local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
		local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent))
		doPlayerAddExperience(cid, count)
		addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60))
	end
	return true
end

 

Envez de ser numero de monstros pode ser Storage??

Link para o post
Compartilhar em outros sites
5 horas atrás, Luzetti disse:

passa seu face? pra vc me ajudar? quero mostra pra vc o bug...me ajuda ai

 

eu so coloquei do jeito que ele postou , pegou sem nenhum problema , uso 0.3.6 !

Link para o post
Compartilhar em outros sites
3 horas atrás, Vodkart disse:

pode

Pode adptar pra min?? pra ser usada storage emvez de matar 1k de monstros? tipo storage x almenta xp em 10% e x em 20%

Link para o post
Compartilhar em outros sites
1 hora atrás, Gustavo Ntos disse:

Pode adptar pra min?? pra ser usada storage emvez de matar 1k de monstros? tipo storage x almenta xp em 10% e x em 20%

 

claro, você quer por storage assim:

 

storage 1001 = 10%

storage 1002 = 20%

storage 1003 = 30%

etc...

 

ou pode ser por valor da storage assim:

 

storage 1001(value 1) = 10%

storage 1001(value 2) = 20%

storage 1001(value 3) = 30%

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
[1:34:10.461] [Error - CreatureScript Interface]
[1:34:10.471] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:10.474] Description:
[1:34:10.478] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:10.486] stack traceback:
[1:34:10.489]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[1:34:10.853] [Error - CreatureScript Interface]
[1:34:10.861] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:10.864] Description:
[1:34:10.872] (luaGetMonsterInfo) Monster not found

[1:34:10.888] [Error - CreatureScript Interface]
[1:34:10.889] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:10.891] Description:
[1:34:10.893] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:10.904] stack traceback:
[1:34:10.908]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[1:34:10.962] [Error - CreatureScript Interface]
[1:34:10.969] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:10.971] Description:
[1:34:10.972] (luaGetMonsterInfo) Monster not found

[1:34:10.976] [Error - CreatureScript Interface]
[1:34:10.983] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:10.987] Description:
[1:34:10.990] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:10.997] stack traceback:
[1:34:11.000]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[1:34:11.364] [Error - CreatureScript Interface]
[1:34:11.371] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.376] Description:
[1:34:11.384] (luaGetMonsterInfo) Monster not found

[1:34:11.389] [Error - CreatureScript Interface]
[1:34:11.390] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.401] Description:
[1:34:11.403] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:11.405] stack traceback:
[1:34:11.407]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[1:34:11.466] [Error - CreatureScript Interface]
[1:34:11.474] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.477] Description:
[1:34:11.488] (luaGetMonsterInfo) Monster not found

[1:34:11.493] [Error - CreatureScript Interface]
[1:34:11.495] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.506] Description:
[1:34:11.508] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:11.511] stack traceback:
[1:34:11.513]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[1:34:11.876] [Error - CreatureScript Interface]
[1:34:11.884] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.889] Description:
[1:34:11.897] (luaGetMonsterInfo) Monster not found

[1:34:11.901] [Error - CreatureScript Interface]
[1:34:11.903] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.909] Description:
[1:34:11.913] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:11.915] stack traceback:
[1:34:11.917]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

[1:34:11.980] [Error - CreatureScript Interface]
[1:34:11.988] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:11.990] Description:
[1:34:11.994] (luaGetMonsterInfo) Monster not found

[1:34:12.004] [Error - CreatureScript Interface]
[1:34:12.009] data/creaturescripts/scripts/upbonus.lua:onKill
[1:34:12.020] Description:
[1:34:12.024] data/creaturescripts/scripts/upbonus.lua:21: attempt to index a boolean value
[1:34:12.025] stack traceback:
[1:34:12.028]   data/creaturescripts/scripts/upbonus.lua:21: in function <data/creaturescripts/scripts/upbonus.lua:15>

2016-12-25.png

e tmbm o monstro n morre ele fica vivo parado sem vida

testado com player vai mata o bixo da esse erro e o bixo n morre

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

babydoll2.gif

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por LeoTK
      Salve galera neste tópico irei postar algumas prints do mapa do servidor para quem queira acompanhar e quem sabe até utilizar de inspiração para mapear o seu NTO.
       
      #Att 11/08/2022

       
       
       
       
      Konoha (Em Desenvolvimento)
       
       
       
       
    • Por DiigooMix
      Como o título já diz, será que alguém possui sprite do hitto e se possível as transformações dele?
    • Por OmegaZero
      Olá gostaria que alguém me ajudasse com uma "scripting" não sei se é pela mesma, seria o seguinte uma determinada arma teria a chance de dar double hit e não sei oque fazer alguem poderia ajudar?

      OBS:não sei se é o local correto se não for mova, desculpe
    • Por Madarasenju
      Olá galera do Tibia King, queria por uns npc's no meu server que não tem função de trade nem nada do tipo, queria que eles só andassem como enfeite, Rep+ Pra quem me ajudar... grato desde já.
    • Por SilenceRoot
      A magia é assim o você usa a a magia e ela ficará ativado por 10 segundos, até que o inimigo lance a primeira magia ou todos de uma vez, quando ele lançar a primeira magia, ele não lhe acertará ou seja esquivando dela, e logo em seguida será teletransportado aleatoriamente ao redor do inimigo que usou.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo