-
Posts
507 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Rio
-
Hello guys i have this code: ### Eclipse Workspace Patch 1.0 #P L2jHellasC Index: java/com/l2jhellas/gameserver/model/zone/type/L2FlagZone.java =================================================================== --- java/com/l2jhellas/gameserver/model/zone/type/L2FlagZone.java (revision 0) +++ java/com/l2jhellas/gameserver/model/zone/type/L2FlagZone.java (working copy) @@ -0,0 +1,186 @@ +/* + * 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 <http://www.gnu.org/licenses/>. + */ +package com.l2jhellas.gameserver.model.zone.type; + +import java.util.concurrent.Future; + +import com.l2jhellas.gameserver.ThreadPoolManager; +import com.l2jhellas.gameserver.model.L2Character; +import com.l2jhellas.gameserver.model.L2Skill; +import com.l2jhellas.gameserver.model.actor.instance.L2MonsterInstance; +import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance; +import com.l2jhellas.gameserver.model.actor.instance.L2PlayableInstance; +import com.l2jhellas.gameserver.model.zone.L2ZoneType; +import com.l2jhellas.gameserver.skills.SkillTable; +import com.l2jhellas.util.Rnd; + +public class L2FlagZone extends L2ZoneType +{ + private int _skillId; + private int _chance; + private int _initialDelay; + private int _skillLvl; + private int _reuse; + private boolean _enabled; + private String _target; + private Future<?> _task; + + public L2FlagZone(int id) + { + super(id); + _skillId = 1323; + _skillLvl = 1; + _chance = 100; + _initialDelay = 0; + _reuse = 30000; + _enabled = true; + _target = "pc"; + } + + @Override + public void setParameter(String name, String value) + { + if (name.equals("skillId")) + { + _skillId = Integer.parseInt(value); + } + else if (name.equals("skillLvl")) + { + _skillLvl = Integer.parseInt(value); + } + else if (name.equals("chance")) + { + _chance = Integer.parseInt(value); + } + else if (name.equals("initialDelay")) + { + _initialDelay = Integer.parseInt(value); + } + else if (name.equals("default_enabled")) + { + _enabled = Boolean.parseBoolean(value); + } + else if (name.equals("target")) + { + _target = String.valueOf(value); + } + else if (name.equals("reuse")) + { + _reuse = Integer.parseInt(value); + } + else + { + super.setParameter(name, value); + } + } + + @Override + protected void onEnter(L2Character character) + { + if (character instanceof L2PcInstance) + { + L2PcInstance player = (L2PcInstance) character; + player.setPvpFlag(1); + player.sendMessage("You entered a Pvp Flag zone."); + player.broadcastUserInfo(); + if ((character instanceof L2PlayableInstance && _target.equalsIgnoreCase("pc") || character instanceof L2PcInstance && _target.equalsIgnoreCase("pc_only") || character instanceof L2MonsterInstance && _target.equalsIgnoreCase("npc")) && _task == null) + { + _task = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new ApplySkill(/* this */), _initialDelay, _reuse); + } + } + } + + @Override + protected void onExit(L2Character character) + { + if (character instanceof L2PcInstance) + { + L2PcInstance player = (L2PcInstance) character; + player.setPvpFlag(0); + player.sendMessage("You left the Pvp Flag zone."); + player.broadcastUserInfo(); + } + if (_characterList.isEmpty() && _task != null) + { + _task.cancel(true); + _task = null; + } + } + + public L2Skill getSkill() + { + return SkillTable.getInstance().getInfo(_skillId, _skillLvl); + } + + public String getTargetType() + { + return _target; + } + + public boolean isEnabled() + { + return _enabled; + } + + public int getChance() + { + return _chance; + } + + public void setZoneEnabled(boolean val) + { + _enabled = val; + } + + class ApplySkill implements Runnable + { + @Override + public void run() + { + if (isEnabled()) + { + for (L2Character temp : _characterList.values()) + { + if (temp != null && !temp.isDead()) + { + if ((temp instanceof L2PlayableInstance && getTargetType().equalsIgnoreCase("pc") || temp instanceof L2PcInstance && getTargetType().equalsIgnoreCase("pc_only") || temp instanceof L2MonsterInstance && getTargetType().equalsIgnoreCase("npc")) && Rnd.get(100) < getChance()) + { + L2Skill skill = null; + if ((skill = getSkill()) == null) + { + System.out.println("ATTENTION: error on zone with id " + getId()); + System.out.println("Skill " + _skillId + "," + _skillLvl + " not present between skills"); + } + else + skill.getEffects(temp, temp); + } + } + } + } + } + } + + @Override + public void onDieInside(L2Character character) + { + + } + + @Override + public void onReviveInside(L2Character character) + { + onEnter(character); + } +} \ No newline at end of file Index: java/com/l2jhellas/gameserver/datatables/xml/ZoneData.java =================================================================== --- java/com/l2jhellas/gameserver/datatables/xml/ZoneData.java (revision 200) +++ java/com/l2jhellas/gameserver/datatables/xml/ZoneData.java (working copy) @@ -49,6 +49,7 @@ import com.l2jhellas.gameserver.model.zone.type.L2DamageZone; import com.l2jhellas.gameserver.model.zone.type.L2DerbyTrackZone; import com.l2jhellas.gameserver.model.zone.type.L2FishingZone; +import com.l2jhellas.gameserver.model.zone.type.L2FlagZone; import com.l2jhellas.gameserver.model.zone.type.L2JailZone; import com.l2jhellas.gameserver.model.zone.type.L2MotherTreeZone; import com.l2jhellas.gameserver.model.zone.type.L2NoLandingZone; @@ -154,6 +155,8 @@ temp = new L2JailZone(zoneId); else if (zoneType.equals("DerbyTrackZone")) temp = new L2DerbyTrackZone(zoneId); + else if (zoneType.equals("FlagZone")) + temp = new L2FlagZone(zoneId); // Check for unknown type if (temp == null) which is FlagZone code. i use l2jhellas and when create a new zone type FlagZone.java and import the code inside, i get the following errors: The import com.l2jhellas.gameserver.model.L2Character; cannot be resolved The import com.l2jhellas.gameserver.model.actor.instance.L2PlayableInstance; cannot be resolved The type L2FlagZone must implement the inherited abstract method L2ZoneType.onExit(L2Character) L2Character cannot be resolved to a type L2PlayableInstance cannot be resolved to a type can any1 help me to add it to my pack successfully please?
-
ty it worked!
-
guys i just compiled l2jhellas pack and when log with my char while gave him access lvl 1 or 100 in navicat i dont get admin status. tried many times and ways but nothing happens. could u please help me? also i get this message
-
thnx it helped me. problem solved !
-
Guys when i try to compile L2jHellasC i get this error: and when i click on the link it takes me here: please help !
-
Dead link gia to INTERLUDE !
-
thnx dude :) lock this topic problem solved !
-
i want to put it in L2PcInstance after quake system.
-
Noblesse code works fine, about earthquake i get error : Earthquake eq = new Earthquake(killer.getX(), killer.getY(), killer.getZ(), 14, 3); (killer cannot be resolved)
-
Here are the codes that i want to import to my pack (l2jhellas): Index: java/com/l2jserver/gameserver/model/actor/instance/L2RaidBossInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 0) +++ java/com/l2jserver/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 0) @@ -86,4 +86,8 @@ if (player != null) { + int _barakielId = 25325; + if (getNpcId() == _barakielId) + { + player.setNoble(true); + player.sendMessage("You have gained Noblesse status by killing Barakiel!"); + } broadcastPacket(new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL)); if (player.getParty() != null) & Earthquake eq = new Earthquake(activeChar.getX(), activeChar.getY(), activeChar.getZ(), 14, 3); activeChar.broadcastPacket(eq); Broadcast.toAllOnlinePlayers(eq); can you rewrite it for l2jhellas pls? i got error with (activeChar.getX(), activeChar.getY(), activeChar.getZ(), 14, 3); & int _barakielId = 25325; + if (getNpcId() == _barakielId) + { + player.setNoble(true); + player.sendMessage("You have gained Noblesse status by killing Barakiel!"); + }
-
Hello guys, i have a problem trying to start my l2.exe. Everytime i doubleclick on it to start 2 windows pops saying: a) An internal exception occured (Adress:0x0) Please contact support@oreans.com Thank you! & b) The application was unable to start correctly (0xc0000142). Click OK to close the application. I use interlude client, i tried to change system folders, i reinstalled the client, downloaded from another source and reinstalled it again, searched for it on google and cant get any issues. Please if some one knows how to resolve this i would appreciate it. Thanks ! p.s sry for my bad english
-
ekana reboot kai dn ginete tpt, kamia idea pws na ta anoi3w?
-
ekleisa to firewall, kai to antivirus, evala ta port p m leei to guide http://portforward.com/english/routers/port_forwarding/Sagem/Fast-2404/Lineage_II.htm gia connx-router:Sagem Fast-2404 name1 53 53 TCP/UDP 53 53 name2 80 80 TCP/UDP 80 80 name3 2106 2106 TCP/UDP 2106 2106 name4 2009 2009 TCP/UDP 2009 2009 name5 7777 7777 TCP/UDP 7777 7777 name6 9014 9014 TCP/UDP 9014 9014 confings Gameserver: # Enter here (ip) address of your game server, or use the symbol * GameserverHostname = * GameserverPort = 7777 # Configure your external ip ExternalHostname = l2servername.no-ip.biz # Configure your internal ip InternalHostname = 127.0.0.1 # Bunch ID and game server. It is better not to change. LoginPort = 9014 LoginHost = 127.0.0.1 confings Login: # This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname ExternalHostname = l2servername.no-ip.biz # This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname InternalHostname = 127.0.0.1 # Bind ip of the loginServer, use * to bind on all available IPs LoginserverHostname = * LoginserverPort = 2106 # How many times you can provide an invalid account/pass before the IP gets banned LoginTryBeforeBan = 20 # Time you won't be able to login back again after LoginTryBeforeBan tries to login. Provide a value in seconds. Default 10min. (600) LoginBlockAfterBan = 600 GMMinLevel = 100 # The address on which login will listen for GameServers, use * to bind on all available IPs LoginHostname = 127.0.0.1 # The port on which login will listen for GameServers LoginPort = 9014 vrika auto to site : http://www.yougetsignal.com/tools/open-ports/ kai otan plhktrologw ta ports m, m leei pws einai kleista, pws ginetai na ta anoi3w? exw connx sundesh
-
[Δειτε το]Ψαχνω καποιον για συνεργασια
Rio replied to InTheEndॐ's question in Request Server Development Help [Greek]
haha auth akrivws einai h apanthsh sto topic otan to diavasei kapoios, Mp@ !!! -
ara ti na kanw? exw sundesh conn-x (router sagem 2404)
-
den mou vgazei error apla den mporoun na mpoun oi alloi sto server mou.. :/ eine offline gia tous allous egw mia xara mpenw ....
-
[Δειτε το]Ψαχνω καποιον για συνεργασια
Rio replied to InTheEndॐ's question in Request Server Development Help [Greek]
ti 8a sto 8esw alliws, exw egw to server sto pc m mexri na anevei sto mhxanhma, onoma (L2Nightmare), vazoume misa misa lefta, to ftiaxnoume mazi, donations 50% o ka8enas, ti les? -
Re paides exw provlhma, dn boroun na logaroun oi alloi stn server m :S einai offline gia tous e3w, enw exw kanei ta panta, ports ,firewall off,no-ip, swsta configs sto login kai gameserver.... dn einai h prwth fora p anoigw server, apla exw kairw na anoi3w, mhpws 3exasa kati? ti borei na fteei? epishs auth th fora to dokimasa apo windows vista, mhpws fteei auto? kamia idea?
-
Here is elfocrash's code: PcInstance.java: public void PvPSkillRewardSystem() { if (getPvpKills() >= Config.COUNT_PVP_1ST) { addSkill(SkillTable.getInstance().getInfo(Config.1ST_PVP_SKILL, Config.1ST_PVP_SKILL_LVL)); sendMessage("You got a skill! your skill is " + Config.1ST_PVP_SKILL + " level" + Config.1ST_PVP_SKILL_LVL"); } else if (getPvpKills() >= Config.COUNT_PVP_2ND) { addSkill(SkillTable.getInstance().getInfo(Config.2ND_PVP_SKILL, Config.2ND_PVP_SKILL_LVL)); sendMessage("You got a skill! your skill is " + Config.2ND_PVP_SKILL + " level" + Config.2ND_PVP_SKILL_LVL"); } else if (getPvpKills() >= Config.COUNT_PVP_3RD) { addSkill(SkillTable.getInstance().getInfo(Config.3RD_PVP_SKILL, Config.3RD_PVP_SKILL_LVL)); sendMessage("You got a skill! your skill is " + Config.3RD_PVP_SKILL + " level" + Config.3RD_PVP_SKILL_LVL"); } else if (getPvpKills() >= Config.COUNT_PVP_4TH) { addSkill(SkillTable.getInstance().getInfo(Config.4TH_PVP_SKILL, Config.4TH_PVP_SKILL_LVL)); sendMessage("You got a skill! your skill is " + Config.4TH_PVP_SKILL + " level" + Config.4TH_PVP_SKILL_LVL"); } else if (getPvpKills() >= Config.COUNT_PVP_5TH) { addSkill(SkillTable.getInstance().getInfo(Config.5TH_PVP_SKILL, Config.5TH_PVP_SKILL_LVL)); sendMessage("You got a skill! your skill is " + Config.5TH_PVP_SKILL + " level" + Config.5TH_PVP_SKILL_LVL"); } } EnterWorld.java: if(Config.PVP_SKILL_REWARD_ENABLED) { activeChar.PvPSkillRewardSystem(); } how can i add some skills to an warrior and different to a mage?
-
seems cool, ill check it! thnx
-
[HTML] HTML website vote/enter by Invisible* me :)
Rio replied to EliteZ1's topic in Website Templates & Themes (Free)
pls reupload it, when i try to extract the folder, it gives error saying cannot read from the source file of disk :/ -
[Help - Request] On enter play custom sound
Rio replied to Rio's question in Request Server Development Help [L2J]
where should i work this code? EnterWorld? can u pass me the location pls. Also will the sound repeat? cuz i want smth like when a player logs in custom sound plays once "WELCOME" or "pitbulll - lalala song"