Ir para conteúdo
  • Cadastre-se
  • 0

ajudar com itens


death15

Pergunta

14 respostass a esta questão

Posts recomendados


acho que ele quer um scroll que quando clicado duas vezes da rep***cao pro clan e isso ? '-'

Aqui, no entanto, nós não olhamos para trás por muito tempo. Nós continuamos seguindo em frente, abrindo novas portas e fazendo coisas novas. E sabe por quê? Porque somos curiosos… e a curiosidade continua nos conduzindo por novos caminhos. Siga em frente…

Walt Disney

Link para o comentário
Compartilhar em outros sites

Scroll ou amigo está dando itens de Rep***ção Clan e eu preciso disso.

 

Seja mais claro amigo, formule melhor sua duvida antes de postar!

hYLPO.gif

kBmUrWZ.gif

SkyNeTl500x/500sp/1000adlTvT, Ctf, DMlSafe+10, max+20Armas, +20 Set'slArmor TT,DK, Weapon IC 200+ ON

Facebook I l Facebook II

Perfil

Link para o comentário
Compartilhar em outros sites

I'm looking for an item that a double click of clan rep***tion.

 

Bone to kill the boss and players not think much about char to gain rep***tion and only buy the items. so I'm looking for a clan that Rep***tion items.

Editado por death15
Link para o comentário
Compartilhar em outros sites

Preste mais atenção nas regras:

 

Não crie tópico com o prefixo [DÚVIDA] não tem lógica você usar aqui.

Exemplo: "[DÚVIDA] MANA POTION" | Escreva somente: "MANA POTION"

 

Evite tópicos repetitivos, use a Busca, e se não encontrar o que deseja aí sim crie um tópico.

 

Evite "pegar carona" em tópicos de outros (A não ser que seja o mesmo assunto).

 

Não crie tópicos com títulos como, "Ajuda", "Ajuda aqui peloamor de Deus" E variáveis. Insira no título do tópico uma breve palavra que descreverá o mesmo.

 

Ao criar o seu tópico não esqueça de informar o nome da revisão(projeto/rev) e o cliente usado, Através do mod revision!

Isso facilitará que a dúvida seja solucionada com mais rapidez e eficácia. Clique aqui para maiores informações.

Link para o comentário
Compartilhar em outros sites

ok. my question if I want to attach something to a java like this

 

Index: C:/workspace/L2_GameServer/java/config/General.properties

===================================================================

--- C:/workspace/L2_GameServer/java/config/General.properties (revision 3148)

+++ C:/workspace/L2_GameServer/java/config/General.properties (working copy)

@@ -714,7 +714,35 @@

# Default: False

CustomMerchantTables = False

 

+# Enables the custom title for new characters

+# Default : False

+EnableCustomStartTitle = true

+CharacterSpawnTitle = Newbie

 

+# Custom spawn for all characters

+# Default for the event : True

+EnableCustomSpawn = true

+CustomSpawnX = -81879

+CustomSpawnY = -49608

+CustomSpawnZ = -10355

+

+#1.Allow to get adena from pvp

+#2.How many adena per pvp?

+EnableToGetAdenaFromPvP = true

+AdenaPerPvP = 1

+

+#Custom starting levels for new chars

+CustomStartingLevel75 = true

+CustomStartingLevel80 = false

+CustomStartingLevel85 = false

+

+#This will allow to turn peace zone towns to pvp

+AllowTurnPeaceZoneToPvP = true

+

+#Noobs and Cools ColorName

+NoobsColorName = 00FFFF

+CoolsColorName = 0011FF

+

# ---------------------------------------------------------------------------

# Developer Settings

# ---------------------------------------------------------------------------

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/Config.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/Config.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/Config.java (working copy)

@@ -507,8 +507,21 @@

public static boolean CUSTOM_TELEPORT_TABLE;

public static boolean CUSTOM_DROPLIST_TABLE;

public static boolean CUSTOM_MERCHANT_TABLES;

-

-

+ public static boolean CHARTITLESTART;

+ public static String CHARTITLE;

+ public static boolean ALLOWCUSTOMXYZ;

+ public static int SPAWNX;

+ public static int SPAWNY;

+ public static int SPAWNZ;

+ public static boolean ENABLE_ADENA_GET_BYPVP;

+ public static int NVC_ADENA;

+ public static boolean NEW_CHAR_LEVEL75;

+ public static boolean NEW_CHAR_LEVEL80;

+ public static boolean NEW_CHAR_LEVEL85;

+ public static boolean NVC_PVP;

+ public static int NOOBS_NAMECOLOR;

+ public static int COOLS_NAMECOLOR;

+

//--------------------------------------------------

// L2JMods Settings

//--------------------------------------------------

@@ -1510,6 +1523,20 @@

CUSTOM_TELEPORT_TABLE = Boolean.valueOf(General.getProperty("CustomTeleportTable", "false"));

CUSTOM_DROPLIST_TABLE = Boolean.valueOf(General.getProperty("CustomDroplistTable", "false"));

CUSTOM_MERCHANT_TABLES = Boolean.valueOf(General.getProperty("CustomMerchantTables", "false"));

+ CHARTITLESTART = Boolean.valueOf(General.getProperty("EnableCustomStartTitle", "false"));

+ CHARTITLE = General.getProperty("CharacterSpawnTitle", "Newbie");

+ ALLOWCUSTOMXYZ = Boolean.valueOf(General.getProperty("EnableCustomSpawn", "false"));

+ SPAWNX = Integer.parseInt(General.getProperty("CustomSpawnX", "0"));

+ SPAWNY = Integer.parseInt(General.getProperty("CustomSpawnY", "0"));

+ SPAWNZ = Integer.parseInt(General.getProperty("CustomSpawnZ", "0"));

+ ENABLE_ADENA_GET_BYPVP = Boolean.valueOf(General.getProperty("EnableToGetAdenaFromPvP", "false"));

+ NVC_ADENA = Integer.parseInt(General.getProperty("AdenaPerPvP", "1"));

+ NEW_CHAR_LEVEL75 = Boolean.valueOf(General.getProperty("CustomStartingLevel75", "false"));

+ NEW_CHAR_LEVEL80 = Boolean.valueOf(General.getProperty("CustomStartingLevel80", "false"));

+ NEW_CHAR_LEVEL85 = Boolean.valueOf(General.getProperty("CustomStartingLevel85", "false"));

+ NVC_PVP = Boolean.valueOf(General.getProperty("AllowTurnPeaceZoneToPvP", "false"));

+ NOOBS_NAMECOLOR = Integer.decode("0x" + General.getProperty("NoobsColorName", "00FFFF"));

+ COOLS_NAMECOLOR = Integer.decode("0x" + General.getProperty("CoolsColorName", "0011FF"));

}

catch (Exception e)

{

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)

@@ -146,7 +146,7 @@

newChar.setCurrentCp(template.baseCpMax);

newChar.setCurrentMp(template.baseMpMax);

//newChar.setMaxLoad(template.baseLoad);

-

+

// send acknowledgement

CharCreateOk cco = new CharCreateOk();

sendPacket(cco);

@@ -184,10 +184,38 @@

L2PcTemplate template = newChar.getTemplate();

 

newChar.addAdena("Init", Config.STARTING_ADENA, null, false);

-

- newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);

- newChar.setTitle("");

-

+

+ if (Config.NEW_CHAR_LEVEL75 && (newChar.getLevel() >= 1) && (newChar.getLevel() < 85))

+ {

+ newChar.getStat().addExp(804219972);

+ newChar.getStat().addSp(99999999);

+ newChar.getStat().addSp(99999999);

+ }

+ if (Config.NEW_CHAR_LEVEL80 && (newChar.getLevel() >= 1) && (newChar.getLevel() < 85))

+ {

+ newChar.getStat().addExp(4200000000L);

+ newChar.getStat().addSp(99999999);

+ newChar.getStat().addSp(99999999);

+ }

+ if (Config.NEW_CHAR_LEVEL85 && (newChar.getLevel() >= 1) && (newChar.getLevel() < 85))

+ {

+ newChar.getStat().addExp(19827360000L);

+ newChar.getStat().addSp(99999999);

+ newChar.getStat().addSp(99999999);

+ }

+

+ if (Config.ALLOWCUSTOMXYZ)

+ {

+ newChar.setXYZInvisible(Config.SPAWNX, Config.SPAWNY, Config.SPAWNZ);

+ }

+ else newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);

+

+ if (Config.CHARTITLESTART)

+ {

+ newChar.setTitle(Config.CHARTITLE);

+ }

+ else newChar.setTitle("");

+

L2ShortCut shortcut;

//add attack shortcut

shortcut = new L2ShortCut(0,0,3,2,0,1);

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy)

@@ @@ -353,6 +353,15 @@

SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);

Announcements.getInstance().showAnnouncements(activeChar);

 

+ if (activeChar.iscool())

+ {

+ activeChar.sendMessage("Welcome " + activeChar.getName() + " you are fighting for Cool Faction.");

+ }

+ if (activeChar.isnoob())

+ {

+ activeChar.sendMessage("Welcome " + activeChar.getName() + " you are fighting for Noob Faction.");

+ }

+

if (showClanNotice)

{

final StringBuilder html = StringUtil.startAppend(2000,

@@ -399,7 +408,7 @@

 

if (DimensionalRiftManager.getInstance().checkIfInRiftZone(activeChar.getX(), activeChar.getY(), activeChar.getZ(), false))

DimensionalRiftManager.getInstance().teleportToWaitingRoom(activeChar);

-

+

if (activeChar.getClanJoinExpiryTime() > System.currentTimeMillis())

activeChar.sendPacket(new SystemMessage(SystemMessageId.CLAN_MEMBERSHIP_TERMINATED));

 

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/appearance/PcAppearance.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/appearance/PcAppearance.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/appearance/PcAppearance.java (working copy)

@@ -44,7 +44,7 @@

private int _nameColor = 0xFFFFFF;

 

/** The hexadecimal Color of players name (white is 0xFFFFFF) */

- private int _titleColor = 0xFFFF77;

+ private int _titleColor = 0xFFFFFF;

 

// =========================================================

// Constructor

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)

@@ -239,8 +239,8 @@

 

// Character Character SQL String Definitions:

private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,last_recom_date) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

- private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=? WHERE charId=?";

- private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot FROM characters WHERE charId=?";

+ private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,cool=?,noob=? WHERE charId=?";

+ private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,cool,noob FROM characters WHERE charId=?";

 

// Character Teleport Bookmark:

private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)";

@@ -513,6 +513,10 @@

private boolean _noble = false;

private boolean _hero = false;

 

+ /** Faction Mode */

+ private boolean _iscool = false;

+ private boolean _isnoob = false;

+

/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */

private L2NpcInstance _lastFolkNpc = null;

 

@@ -5324,13 +5328,33 @@

return;

}

 

+ if(checkIfPvP(target) || iscool() && targetPlayer.isnoob() || isnoob() && targetPlayer.iscool())

+ {

+ if (Config.ENABLE_ADENA_GET_BYPVP)

+ {

+ if ((iscool() && targetPlayer.iscool()) || (isnoob() && targetPlayer.isnoob()))

+ {

+ sendMessage("You cannot attack a character which is in same faction.");

+ return;

+ }

+ else

+ {

+ increasePvpKills();

+ int nvcAdenaReward = Config.NVC_ADENA;

+ addItem("Loot", 57, nvcAdenaReward, this, true);

+ sendMessage("Rewarded with " + nvcAdenaReward + " adena for your kill.");

+ return;

+ }

+ }

+ }

+

// If in duel and you kill (only can kill l2summon), do nothing

if (isInDuel() && targetPlayer.isInDuel()) return;

 

// If in Arena, do nothing

if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))

return;

-

+

// Check if it's pvp

if (

(

@@ -5412,6 +5436,10 @@

*/

public void increasePkKillsAndKarma(int targLVL)

{

+

+ if (Config.ENABLE_ADENA_GET_BYPVP)

+ return;

+

int baseKarma = Config.KARMA_MIN_KARMA;

int newKarma = baseKarma;

int karmaLimit = Config.KARMA_MAX_KARMA;

@@ -5483,6 +5511,9 @@

 

public void updatePvPStatus()

{

+ if(!iscool() || !isnoob())

+ return;

+

if (isInsideZone(ZONE_PVP)) return;

setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

 

@@ -5497,6 +5528,8 @@

if (player_target == null)

return;

 

+ if(player_target.iscool() || player_target.isnoob())

+ return;

if ((isInDuel() && player_target.getDuelId() == getDuelId())) return;

if ((!isInsideZone(ZONE_PVP) || !player_target.isInsideZone(ZONE_PVP)) && player_target.getKarma() == 0)

{

@@ -6872,7 +6905,8 @@

player.setOnlineTime(rset.getLong("onlinetime"));

player.setNewbie(rset.getInt("newbie"));

player.setNoble(rset.getInt("nobless")==1);

-

+ player.setcool((rset.getInt("cool")==1)? true : false);

+ player.setnoob((rset.getInt("noob")==1)? true : false);

player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time"));

if (player.getClanJoinExpiryTime() < System.currentTimeMillis())

{

@@ -7304,7 +7338,9 @@

statement.setString(50, getName());

statement.setLong(51, getDeathPenaltyBuffLevel());

statement.setInt(52, getBookMarkSlot());

- statement.setInt(53, getObjectId());

+ statement.setInt(53, iscool() ? 1 : 0);

+ statement.setInt(54, isnoob() ? 1 : 0);

+ statement.setInt(55, getObjectId());

 

statement.execute();

statement.close();

@@ -8116,6 +8152,12 @@

@Override

public boolean isAutoAttackable(L2Character attacker)

{

+

+ if((attacker instanceof L2PcInstance) && ((L2PcInstance)attacker).iscool())

+ return true;

+ if((attacker instanceof L2PcInstance) && ((L2PcInstance)attacker).isnoob())

+ return true;

+

// Check if the attacker isn't the L2PcInstance Pet

if (attacker == this || attacker == getPet())

return false;

@@ -8916,6 +8958,10 @@

*/

public boolean checkPvpSkill(L2Object target, L2Skill skill, boolean srcIsSummon)

{

+

+ if(iscool() || isnoob())

+ return true;

+

// check for PC->PC Pvp status

if (

target != null && // target not null and

@@ -9870,6 +9916,28 @@

sendPacket(sl);

}

 

+ // Faction Mode

+ public boolean iscool()

+ {

+ return _iscool;

+ }

+

+ public boolean isnoob()

+ {

+ return _isnoob;

+ }

+

+ // Faction Mode

+ public void setcool(boolean value)

+ {

+ _iscool = value;

+ }

+

+ public void setnoob(boolean value)

+ {

+ _isnoob = value;

+ }

+

/**

* 1. Add the specified class ID as a subclass (up to the maximum number of <b>three</b>)

* for this character.<BR>

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Character.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)

@@ -731,6 +731,19 @@

sendPacket(ActionFailed.STATIC_PACKET);

return;

}

+

+ if (((L2PcInstance) this).iscool() && ((L2PcInstance) target).iscool())

+ {

+ ((L2PcInstance) this).sendMessage("You cant attack a player which is in the same faction as you.");

+ sendPacket(ActionFailed.STATIC_PACKET);

+ return;

+ }

+ if (((L2PcInstance) this).isnoob() && ((L2PcInstance) target).isnoob())

+ {

+ ((L2PcInstance) this).sendMessage("You cant attack a player which is in the same faction as you.");

+ sendPacket(ActionFailed.STATIC_PACKET);

+ return;

+ }

}

// Checking if target has moved to peace zone

if (target.isInsidePeaceZone((L2PcInstance)this))

@@ -2148,6 +2161,11 @@

setIsDead(false);

boolean restorefull = false;

 

+ if ((this instanceof L2PcInstance) && (((L2PcInstance) this).iscool()))

+ teleToLocation(-22509, 277935, -9927);

+ if ((this instanceof L2PcInstance) && (((L2PcInstance) this).isnoob()))

+ teleToLocation(-22546, 278100, -8263);

+

if (this instanceof L2Playable && ((L2Playable)this).isPhoenixBlessed())

{

restorefull = true;

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/L2World.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/L2World.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/L2World.java (working copy)

@@ -228,7 +228,7 @@

{

return _allPlayers;

}

-

+

/**

* Return how many players are online.<BR><BR>

*

@@ -238,7 +238,7 @@

{

return _allPlayers.size();

}

-

+

/**

* Return the player instance corresponding to the given name.<BR><BR>

*

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java (working copy)

@@ -101,6 +101,9 @@

 

if (_isPeaceZone && Config.ZONE_TOWN != 2)

character.setInsideZone(L2Character.ZONE_PEACE, true);

+

+ if (_isPeaceZone && Config.NVC_PVP)

+ character.setInsideZone(L2Character.ZONE_PEACE, false);

 

character.setInsideZone(L2Character.ZONE_TOWN, true);

 

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java

===================================================================

--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instanc/L2nvcInstance.java (revision 3148)

+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2nvcInstance.java (working copy)

/*

* 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 3 of the License, 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, see <

O conteúdo está oculto, favor efetuar login ou se cadastrar!

*/

package net.sf.l2j.gameserver.model.actor.instance;

/**

* @author fdLP

*

*/

import java.util.Collection;

import java.sql.Connection;

import java.sql.PreparedStatement;

import java.sql.ResultSet;

import java.util.StringTokenizer;

import java.util.logging.Logger;

import net.sf.l2j.Config;

import net.sf.l2j.L2DatabaseFactory;

import net.sf.l2j.gameserver.ThreadPoolManager;

import net.sf.l2j.gameserver.ai.CtrlIntention;

import net.sf.l2j.gameserver.datatables.MapRegionTable;

import net.sf.l2j.gameserver.datatables.SkillTable;

import net.sf.l2j.gameserver.model.L2World;

import net.sf.l2j.gameserver.model.L2Skill;

import net.sf.l2j.gameserver.network.clientpackets.Say2;

import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.gameserver.network.serverpackets.MyTargetSelected;

import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

import net.sf.l2j.gameserver.network.serverpackets.NpcSay;

import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation;

import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

import net.sf.l2j.gameserver.network.serverpackets.SocialAction;

import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;

import net.sf.l2j.util.Rnd;

public final class L2nvcInstance extends L2NpcInstance

{

private boolean _currentTask = false;

/**

* @param template

*/

public L2nvcInstance(int objectId, L2NpcTemplate template)

{

super(objectId, template);

}

@Override

public void onBypassFeedback(L2PcInstance player, String command)

{

StringTokenizer st = new StringTokenizer(command, " ");

String actualCommand = st.nextToken(); // Get actual command

if (actualCommand.equalsIgnoreCase("noob")) // Start of noob command

{

setTarget(player);

if (player.isnoob())

{

CreatureSay npctalk1 = new CreatureSay(player.getObjectId(), Say2.TELL, "NvC", "Don't try to cheat me Noob!");

this.broadcastPacket(npctalk1);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

else if (player.iscool())

{

CreatureSay npctalk2 = new CreatureSay(player.getObjectId(), Say2.TELL, "NvC", "What is going on noob?Want to go at Cool's faction?Hell no ...");

this.broadcastPacket(npctalk2);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

else

{

player.setnoob(true);

Connection connection = null;

try

{

connection = L2DatabaseFactory.getInstance().getConnection();

PreparedStatement statement = connection.prepareStatement("SELECT charId FROM characters where char_name=?");

statement.setString(1, player.getName());

ResultSet rset = statement.executeQuery();

int charId = 0;

if (rset.next())

{

charId = rset.getInt(1);

}

rset.close();

statement.close();

if (charId == 0)

{

connection.close();

return;

}

statement = connection.prepareStatement("UPDATE characters SET noob=1 WHERE charId=?");

statement.setInt(1, charId);

statement.execute();

statement.close();

connection.close();

}

catch (Exception e)

{

_log.info("Could not set good status of char: " + player.getName() + " ");

}

finally

{

try

{

connection.close();

}

catch (Exception e)

{

}

}

_log.info("NvC System : Player " + player.getName() + " has chosen the noob faction.");

if (player.isnoob() == true)

{

player.broadcastUserInfo();

CreatureSay tptalk1 = new CreatureSay(player.getObjectId(), Say2.TELL, "NvC", "Welcome at Noob's faction base.");

this.broadcastPacket(tptalk1);

player.getAppearance().setNameColor(Config.NOOBS_NAMECOLOR);

player.setTitle("Noob");

player.teleToLocation(-22546, 278100, -8263); //Tully's Workshop 10

}

}

}

else if (actualCommand.equalsIgnoreCase("cool")) // Start of Cool command

{

setTarget(player);

if (player.iscool())

{

CreatureSay npctalk3 = new CreatureSay(player.getObjectId(), Say2.TELL, "NvC", "This is not right ... dont try it again.");

this.broadcastPacket(npctalk3);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

else if (player.isnoob())

{

CreatureSay npctalk4 = new CreatureSay(player.getObjectId(), Say2.TELL, "NvC", "You are cool and want to go at Noob's faction?You have to be kidding me ...");

this.broadcastPacket(npctalk4);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

else

{

player.setcool(true);

Connection connection = null;

try

{

connection = L2DatabaseFactory.getInstance().getConnection();

PreparedStatement statement = connection.prepareStatement("SELECT charId FROM characters where char_name=?");

statement.setString(1, player.getName());

ResultSet rset = statement.executeQuery();

int charId = 0;

if (rset.next())

{

charId = rset.getInt(1);

}

rset.close();

statement.close();

if (charId == 0)

{

connection.close();

return;

}

statement = connection.prepareStatement("UPDATE characters SET cool=1 WHERE charId=?");

statement.setInt(1, charId);

statement.execute();

statement.close();

connection.close();

}

catch (Exception e)

{

_log.info("Could not set cool status of char: " + player.getName() + " ");

}

finally

{

try

{

connection.close();

}

catch (Exception e)

{

}

}

_log.info("NvC System : Player " + player.getName() + " has chosen the cool faction.");

if (player.iscool() == true)

{

player.broadcastUserInfo();

CreatureSay tptalk2 = new CreatureSay(player.getObjectId(), Say2.TELL, "NvC", "Welcome at Cool's faction base.");

this.broadcastPacket(tptalk2);

player.setTitle("Cool");

player.teleToLocation(-22509, 277935, -9927); //Tully's Workshop 9

}

}

}

else if (actualCommand.equalsIgnoreCase("noble")) // Start of noble command

{

if (player.getPvpKills() == 50)

{

player.setPvpKills(player.getPvpKills() - 50);

player.setNoble(true);

NpcSay cs2 = new NpcSay(getObjectId(), Say2.TELL, getNpcId(), "Happy dude became noblesse!");

player.sendPacket(cs2);

}

else if (player.isNoble())

{

NpcSay cs1 = new NpcSay(getObjectId(), Say2.TELL, getNpcId(), "You are already noblesse.");

player.sendPacket(cs1);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

else

{

NpcSay cs = new NpcSay(getObjectId(), Say2.TELL, getNpcId(), "I see a wannabe noble here , you need 50 pvps in order to become noblesse!");

player.sendPacket(cs);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

}

else

super.onBypassFeedback(player, command);

}

@Override

public void showChatWindow(L2PcInstance player)

{

if (player.iscool() == true)

{

String filename1;

 

filename1 = "data/html/nvc/nvcc.htm";

 

NpcHtmlMessage html1 = new NpcHtmlMessage(getObjectId());

html1.setFile(filename1);

html1.replace("%objectId%", String.valueOf(getObjectId()));

player.sendPacket(html1);

}

else if (player.isnoob() == true)

{

String filename2;

 

filename2 = "data/html/nvc/nvcn.htm";

 

NpcHtmlMessage html2 = new NpcHtmlMessage(getObjectId());

html2.setFile(filename2);

html2.replace("%objectId%", String.valueOf(getObjectId()));

player.sendPacket(html2);

}

else

{

String filename;

 

filename = "data/html/nvc/nvc.htm";

 

NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());

html.setFile(filename);

html.replace("%objectId%", String.valueOf(getObjectId()));

player.sendPacket(html);

}

}

/**

* this is called when a player interacts with this NPC

* @param player

*/

@Override

public void onAction(L2PcInstance player)

{

if (this != player.getTarget())

{

player.setTarget(this);

player.sendPacket(new MyTargetSelected(getObjectId(), player

.getLevel()

- getLevel()));

player.sendPacket(ActionFailed.STATIC_PACKET);

}

else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false))

{

SocialAction sa = new SocialAction(getObjectId(), Rnd.get(8));

broadcastPacket(sa);

player.setLastFolkNPC(this);

showChatWindow(player);

player.sendPacket(ActionFailed.STATIC_PACKET);

} else

{

player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT,

this);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

}

}

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.




×
×
  • Criar Novo...

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.