Ir para conteúdo

Featured Replies

Postado
Em 24/12/2016 ás 22:53, Vodkart disse:

 

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%

Não entendi tentei montar a script e nao deu certo...

Tipo eu quero por pra ganhar xp bonus ao fazer quest entendeu? tipo a quest da storage que da xp a+

  • Respostas 31
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 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%

  • 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 typ

  • mas cada quest é uma storage diferente?   ou vc vai subindo a quantidade de % de exp?   se eu faço a quest 1 ganho 10% se eu faço a quest 2 ganho 20%

Posted Images

Postado
18 horas atrás, Gustavo Ntos disse:

Não entendi tentei montar a script e nao deu certo...

Tipo eu quero por pra ganhar xp bonus ao fazer quest entendeu? tipo a quest da storage que da xp a+

mas cada quest é uma storage diferente?

 

ou vc vai subindo a quantidade de % de exp?

 

se eu faço a quest 1 ganho 10%

se eu faço a quest 2 ganho 20%

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Postado
6 horas atrás, Vodkart disse:

mas cada quest é uma storage diferente?

 

ou vc vai subindo a quantidade de % de exp?

 

se eu faço a quest 1 ganho 10%

se eu faço a quest 2 ganho 20%

Assim mesmo sem acumular....

Postado
function getExpMonsterKills(cid)
	local me = {
		[1] = 0.10, -- 10%
		[2] = 0.20, -- 20%
		[3] = 0.30, -- 30%
		[4] = 0.40 -- 40%
	}
     local x = me[getPlayerStorageValue(cid, 178902)]
	return (not x and 0 or x)
end
function onKill(cid, target)
	if isPlayer(cid) and isMonster(target) == true then
		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

 

ai só colocando assim no final da quest

 

quest 1:

 

setPlayerStorageValue(cid, 178902, 1) -- aqui vai dar os 0.10

 

quest 2:

 

setPlayerStorageValue(cid, 178902, 2) -- aqui vai dar os 0.20

 

e assim sucessivamente...

 

 

 

 

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Postado
15 horas atrás, Vodkart disse:

function getExpMonsterKills(cid)
	local me = {
		[1] = 0.10, -- 10%
		[2] = 0.20, -- 20%
		[3] = 0.30, -- 30%
		[4] = 0.40 -- 40%
	}
     local x = me[getPlayerStorageValue(cid, 178902)]
	return (not x and 0 or x)
end
function onKill(cid, target)
	if isPlayer(cid) and isMonster(target) == true then
		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

 

ai só colocando assim no final da quest

 

quest 1:

 

setPlayerStorageValue(cid, 178902, 1) -- aqui vai dar os 0.10

 

quest 2:

 

setPlayerStorageValue(cid, 178902, 2) -- aqui vai dar os 0.20

 

e assim sucessivamente...

 

 

 

 

Se fazer a Quest [1] e [2] vai somar 30% a + de xp ou so 20%?

15 horas atrás, Vodkart disse:

function getExpMonsterKills(cid)
	local me = {
		[1] = 0.10, -- 10%
		[2] = 0.20, -- 20%
		[3] = 0.30, -- 30%
		[4] = 0.40 -- 40%
	}
     local x = me[getPlayerStorageValue(cid, 178902)]
	return (not x and 0 or x)
end
function onKill(cid, target)
	if isPlayer(cid) and isMonster(target) == true then
		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

 

ai só colocando assim no final da quest

 

quest 1:

 

setPlayerStorageValue(cid, 178902, 1) -- aqui vai dar os 0.10

 

quest 2:

 

setPlayerStorageValue(cid, 178902, 2) -- aqui vai dar os 0.20

 

e assim sucessivamente...

 

 

 

 

Vai continuar como?

<event type="kill" name="exp_pmob" event="script" value=xp.lua"/> 

<event type="advance" name="exp_pmob" event="script" value=xp.lua"/> 

<event type="login" name="exp_pmob" event="script" value=xp.lua"/> 

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