Jump to content

New Evento CHAOS


WallisTeer

Recommended Posts

Fala galera , estou desenvolvendo outro evento CHAOS

Com Mas opção de configurações.

Quando eu finalmente tiver arrumado os erros que dao no evento

Eu postarei aqui na L2JBrasil.

 

• Ao atacar o player na ciade ( Vou arrumar )

• e ao morrer nao perder o Super Hastle.

• Vai ter opção de Color name , Color Title , NAME TITLE

• Config de item

• Announce em 8D ( Em português )

 


# Evento Chaos
# Chaos Evento Name's Color.
ChaosEventoNickColor = FF0000
# Chaos Evento Title's Colon.
ChaosEventoTitleColor = FF0000
# Chaos Evento Title Player.
ChaosTitle = EVENTO CHAOS

 

CODIGO CHAOSEVENT.JAVA


/* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package com.l2jfrozen.gameserver.model.entity;

import java.util.Vector;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.model.actor.appearance.PcAppearance;
import com.l2jfrozen.gameserver.model.entity.Announcements;
import com.l2jfrozen.gameserver.datatables.SkillTable;
import com.l2jfrozen.gameserver.model.L2Effect;
import com.l2jfrozen.gameserver.model.L2Skill;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;

/**
*
* @author  Anarchy
*/
public class ChaosEvent
{
public static Vector<L2PcInstance> _players = new Vector<L2PcInstance>();
public static L2PcInstance _topplayer, _topplayer2, _topplayer3, _topplayer4, _topplayer5;
public static int _topkills = 0, _topkills2 = 0, _topkills3 = 0, _topkills4 = 0, _topkills5 = 0;
public static boolean _isChaosActive;

public void startChaos()
{
_isChaosActive = true;
_players.clear();
Announcements.getInstance().gameAnnounceToAll("Chaos Evento Iniciou");
Announcements.getInstance().gameAnnounceToAll("Pariticipar .joinchaos , Sair .leavechaos!");
}

public void stopChaos()
{
_isChaosActive = false;
Announcements.getInstance().gameAnnounceToAll("Chaos Evento acabou");
getTopKiller();
calculateRewards();
for (L2PcInstance player : _players)
    {
_players.remove(player);
player.getAppearance().setNameColor(0xFFFFFF);
player.getAppearance().setTitleColor(0xFFFFFF);
player.setTitle("");
    removeSuperHaste(player);
    }
cleanColors();
cleanPlayers();
_players.clear();
}

public void cleanColors()
{
for (L2PcInstance player : _players)
{
player.getAppearance().setNameColor(Config.CHAOS_NAME_COLOR);
player.getAppearance().setTitleColor(Config.CHAOS_TITLE_COLOR);
player.setTitle(Config.CHAOS_TITLE);
player.broadcastUserInfo();
}
}

public void cleanPlayers()
{
for (L2PcInstance player : _players)
{
player._inChaosEvent = false;
player._chaosKills = 0;
_topkills = 0;
_topplayer = null;
}
}

public void registerToChaos(L2PcInstance player)
{
if (!registerToChaosOk(player))
{
return;
}
_players.add(player);
player._inChaosEvent = true;
player._chaosKills = 0;
player.getAppearance().setNameColor(Config.CHAOS_NAME_COLOR);
player.getAppearance().setTitleColor(Config.CHAOS_TITLE_COLOR);
player.setTitle(Config.CHAOS_TITLE);
player.broadcastUserInfo();
player.sendMessage("Voce esta participando do Evento Chaos");
addSuperHaste(player);
}

public void addSuperHaste(L2PcInstance player)
{
L2Skill skill = SkillTable.getInstance().getInfo(7029,4);
if (skill != null)
{
skill.getEffects(player, player);
}
}

public boolean registerToChaosOk(L2PcInstance chaosplayer)
{
if (chaosplayer._inChaosEvent)
{
chaosplayer.sendMessage("Voce ja esta participando do Evento");
return false;
}
return true;
}
public void removeFromChaos(L2PcInstance player)
{
if (!removeFromChaosOk(player))
{
return;
}
_players.remove(player);
player._chaosKills = 0;
player._inChaosEvent = false;
player.sendMessage("Voce deixou Evento Chaos.");
player.getAppearance().setNameColor(0xFFFFFF);
player.getAppearance().setTitleColor(0xFFFFFF);
player.setTitle("");
player.broadcastUserInfo();
removeSuperHaste(player);
}
public boolean removeFromChaosOk(L2PcInstance chaosplayer)
{
if (!chaosplayer._inChaosEvent)
{
chaosplayer.sendMessage("Voce nao esta no Evento Chaos");
return false;
}
return true;
}
public static void getTopKiller()
{
for (L2PcInstance player : _players)
{
if (player._chaosKills > _topkills)
{
_topplayer = player;
_topkills = player._chaosKills;
}
if ((player._chaosKills > _topkills2) && (player._chaosKills < _topkills))
{
_topplayer2 = player;
_topkills2 = player._chaosKills;
}
if ((player._chaosKills > _topkills3) && (player._chaosKills < _topkills2))
{
_topplayer3 = player;
_topkills3 = player._chaosKills;
}
if ((player._chaosKills > _topkills4) && (player._chaosKills < _topkills3))
{
_topplayer4 = player;
_topkills4 = player._chaosKills;
}
if ((player._chaosKills > _topkills5) && (player._chaosKills < _topkills4))
{
_topplayer5 = player;
_topkills5 = player._chaosKills;
}
}
}
public void calculateRewards()
{
if (_topplayer != null)
{
_topplayer.addItem("Chaos Event Reward", 57, 5000, _topplayer, true);
}
if (_topplayer2 != null)
{
_topplayer2.addItem("Chaos Event Reward 2", 57, 4000, _topplayer2, true);
}
if (_topplayer3 != null)
{
_topplayer3.addItem("Chaos Event Reward 3", 57, 3000, _topplayer3, true);
}
if (_topplayer4 != null)
{
_topplayer4.addItem("Chaos Event Reward 4", 57, 2000, _topplayer4, true);
}
if (_topplayer5 != null)
{
_topplayer5.addItem("Chaos Event Reward 5", 57, 1000, _topplayer5, true);
}

Announcements.getInstance().gameAnnounceToAll("Vencedores Evento Chaos");
if (_topplayer != null)
{
Announcements.getInstance().gameAnnounceToAll("1) "+_topplayer.getName());
}
if (_topplayer2 != null)
{
Announcements.getInstance().gameAnnounceToAll("2) "+_topplayer2.getName());
}
if (_topplayer3 != null)
{
Announcements.getInstance().gameAnnounceToAll("3) "+_topplayer3.getName());
}
if (_topplayer4 != null)
{
Announcements.getInstance().gameAnnounceToAll("4) "+_topplayer4.getName());
}
if (_topplayer5 != null)
{
Announcements.getInstance().gameAnnounceToAll("5) "+_topplayer5.getName());
}
}

public void removeSuperHaste(L2PcInstance activeChar)
{
if (activeChar != null)
{
L2Effect[] effects = activeChar.getAllEffects();

for (L2Effect e : effects)
{
if ((e != null) && (e.getSkill().getId() == 7029))
{
e.exit();
}
}
}
}
}

 

Prints.

shot00007b.png

shot00008fg.png

 

Conto com a ajuda de voces. Sugestões são bem vindas.

Edited by wallister
  • Like 4

Vem ai um novo conceito em Lineage II

 

L2J-Fanatic

 

 

https://www.youtube.com/watch?v=1T5WFWQibhc&feature=youtu.beL2_JFanatic.png

 

 

 

 

 

 

 

Link to comment
Share on other sites


ChaosStartBuff.Mage= ?

ChaosStartBuff.fight= ?

Tem como por isso sim, só que vai ter que por uma restrição para usar o npc buffer quando estiver cadastrado no evento aí, quando registra no evento ele da "stopAllEffects();" que cancela os buffs, e rebuffa com os buffs de config.

 

@Wallister conte comigo para te ajudar as edições aí qualquer coisa é só dar um toque lá.

O que a mente do homem pode conceber e acreditar, pode ser alcançada.

 

 

Link to comment
Share on other sites

Tem como por isso sim, só que vai ter que por uma restrição para usar o npc buffer quando estiver cadastrado no evento aí, quando registra no evento ele da "stopAllEffects();" que cancela os buffs, e rebuffa com os buffs de config.

 

Sim vai ficar como as olympiadas depende da contagem quando chega lá remove e quando falta 10 segundos

para iniciar ele da os buffs seria uma boa.

 

isso meda uma grande ideia :wink:

 

 

Edited by lMinato
Link to comment
Share on other sites

vlw galera , vo desenvolve um negocio simples mas bom.

  • Like 1

Vem ai um novo conceito em Lineage II

 

L2J-Fanatic

 

 

https://www.youtube.com/watch?v=1T5WFWQibhc&feature=youtu.beL2_JFanatic.png

 

 

 

 

 

 

 

Link to comment
Share on other sites

Me manda a CODE por PM que vou ver o que da pra fazer

 

postei no topico acho que so o necessario para ideias...

Vem ai um novo conceito em Lineage II

 

L2J-Fanatic

 

 

https://www.youtube.com/watch?v=1T5WFWQibhc&feature=youtu.beL2_JFanatic.png

 

 

 

 

 

 

 

Link to comment
Share on other sites

Sim vai ficar como as olympiadas depende da contagem quando chega lá remove e quando falta 10 segundos

para iniciar ele da os buffs seria uma boa.

 

isso meda uma grande ideia :wink:

 

 

Consegui o chaos com os buffs configuráveis só falta as restrição e mais algumas edição que vou fazer, rsrs foi fácil até de mais tudo o que precisa é usar um pouco a cabeça e ver lá na área java mods tem todas as bases fica assim:

 

 

 

# Chaos Player Name Color

ChaosNameCollor = fff9

 

# Chaos Player Title Color

ChaosTitleCollor = b5b5b5

 

# Chaos Buffs Players

OnChaosBuffs = True

 

# The List of Fighter Buffs

# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln

FighterBuffList = 1204,2;1068,3;1040,3;1035,4;1036,2;1045,6;1086,2;1077,3;1240,3;1242,3;\

264,1;267,1;268,1

 

# The List of Mage Buffs

# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln

MageBuffList = 1204,2;1040,3;1035,4;1045,6;1048,6;1036,2;1303,2;1085,3;1059,3;1078,6;\

1062,2;1397,3;264,1

 

Screenshot: http://imgur.com/jXDNXlr,iYNBDdU,oU5Ccuu,vCY46KR#0

 

Créditos Criação : Leonardo Alves (EU)

Créditos Bases: An4rchy "Chaos Evento" , RedHot " Start Buffs ".

Edited by sapoo
  • Like 1

O que a mente do homem pode conceber e acreditar, pode ser alcançada.

 

 

Link to comment
Share on other sites

Consegui o chaos com os buffs configuráveis só falta as restrição e mais algumas edição que vou fazer, rsrs foi fácil até de mais tudo o que precisa é usar um pouco a cabeça e ver lá na área java mods tem todas as bases fica assim:

Screenshot: http://imgur.com/jXD...5Ccuu,vCY46KR#0

Créditos Criação : Leonardo Alves (EU)

Créditos Bases: An4rchy "Chaos Evento" , RedHot " Start Buffs ".

rsrsrs fico bom Leonardo..

se precisarem de ajuda ou ideias eu estou sem fazer nada :)

Edited by lMinato
Link to comment
Share on other sites

  • 4 weeks later...
Guest
This topic is now closed to further replies.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.