Ir para conteúdo

Featured Replies

  • Respostas 10
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Testado e funcionando ambos agora :   EffectPos.lua level = 300; -- LEVEL function effectPos(cid) local config = { effect = 2; -- EFFEITO } local tidpos = getCreaturePos(cid); local tableef

  • EffectPos.lua level = 300; -- LEVEL function effectPos(cid) local config = { tidpos = getCreaturePos(cid); effect = xxxx; -- EFFEITO } local tableeffect = { [1] = {x=tidpos.x-1, y=tidpos.y

  • Se sua dúvida/pedido foi sanada ou respondido, marque o post que te ajudou como melhor resposta pro tópico ficar como resolvido.     abrçs

Postado
  • Solução

Testado e funcionando ambos agora :

 

EffectPos.lua

level = 300; -- LEVEL

function effectPos(cid)

local config = {	
		effect = 2; -- EFFEITO
}

local tidpos = getCreaturePos(cid);

local tableeffect = {
		[1] = {x=tidpos.x-1, y=tidpos.y-1, z=tidpos.z};
		[2] = {x=tidpos.x, y=tidpos.y-1, z=tidpos.z};
		[3] = {x=tidpos.x+1, y=tidpos.y-1, z=tidpos.z};
		[4] = {x=tidpos.x+1, y=tidpos.y, z=tidpos.z};
		[5] = {x=tidpos.x+1, y=tidpos.y+1, z=tidpos.z};
		[6] = {x=tidpos.x, y=tidpos.y+1, z=tidpos.z};
		[7] = {x=tidpos.x-1, y=tidpos.y+1, z=tidpos.z};
		[8] = {x=tidpos.x-1, y=tidpos.y, z=tidpos.z};
  }
  	 	
		for x = 1, 8 do
			if not isPlayerPzLocked(cid) then	
				addEvent(doSendMagicEffect, x * 2000, tableeffect[x], config.effect);	
				addEvent(function ()
					if isPlayer(cid) then
						effectPos(cid);
					end
				end , 1000);
			end	
		end

	return 1;
end

function onAdvance(cid, skill, oldLevel, newLevel)	
	
	skill = SKILL_LEVEL;

	if skill == level then
		effectPos(cid);
		doPlayerSendTextMessage(cid, 19, "Congratulations !!");
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_YELLOW);
	end	

	return 1;
end

function onLogin(cid)

 	if getPlayerLevel(cid) >= level then	 	
		effectPos(cid);
	end

	return 1;
end

EffectText.lua

local config = {
	
	["1-5"] = 120; -- [VOCATION] = CORES;
	["2-6"] = 130; 
	["3-7"] = 140;
	["4-8"] = 150;

}

function effectText(cid)
    
    local texts = "´ .  ,";
   	
    for vocations, color in pairs(config) do
    	local v = vocations:explode("-");
    	if getPlayerVocation(cid) == (tonumber(v[1]) or tonumber(v[2])) then
    		eff = color
    		break
    	end
    end
    
    if eff then
    	doSendAnimatedText(getThingPos(cid), texts, eff); 
    	addEvent(function()
    		if isPlayer(cid) then
    			effectText(cid)
    		end
    	end, 800);		
    end
  
   	return 1;
end

function onLogin(cid)
    
    effectText(cid)
    
    return 1;
end

EQD4Qy4.gif

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