-
Posts
1,403 -
Credits
0 -
Joined
-
Last visited
-
Days Won
32 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by melron
-
i believe should be ok with this example but let someone else who knows about client to give u a hand
-
Take a look how a gm can start abnormal effect. character.startAbnormalEffect(action); You can take action by decode them (0x) from this list: Bleed 1 Poison 2 Unk3 4 Unk4 8 Unk5 10 Unk6 20 Stun 40 Sleep 80 Mute 100 Root 200 Hold 1 400 Hold 2 800 Unk13 1000 Big Head 2000 Flame 4000 Unk16 8000 Unk17 10000 FloatRoot 20000 DanceStun 40000 FireRStun 80000 Stealth 100000 Imprisio1 200000 Imprisio2 400000 MgcCircle 800000 You can check the passive skill when the player is logging in and if the skill found start the effect if you are looking only for client edit i cant help u :P
-
else if ((classId == 125) && (player.getClassId() == ClassId.maleSoldier)) { - QuestState qs = player.getQuestState(Q00062_PathOfTheTrooper.class.getSimpleName()); - if (player.getLevel() < 20) - { - if ((qs != null) && qs.isCompleted()) - { - htmltext = "32191-13.htm"; // master_all_kamael009ma - } - else - { - htmltext = "32191-14.htm"; // master_all_kamael008ma - } - } - else if ((qs == null) || !qs.isCompleted()) - { - htmltext = "32191-15.htm"; // master_all_kamael010ma - } - else - { takeItems(player, GWAINS_RECOMMENDATION, -1); player.setClassId(125); player.setBaseClass(125); // SystemMessage and cast skill is done by setClassId player.broadcastUserInfo(); giveItems(player, SHADOW_ITEM_EXCHANGE_COUPON_D_GRADE, 15); htmltext = "32191-16.htm"; // master_all_kamael011ma - } } else if ((classId == 126) && (player.getClassId() == ClassId.femaleSoldier)) { - QuestState qs = player.getQuestState(Q00063_PathOfTheWarder.class.getSimpleName()); - if (player.getLevel() < 20) - { - if ((qs != null) && qs.isCompleted()) - { - htmltext = "32191-17.htm"; // master_all_kamael008fa - } - else - { - htmltext = "32191-18.htm"; // master_all_kamael009fa - } - } - else if ((qs == null) || !qs.isCompleted()) - { - htmltext = "32191-19.htm"; // master_all_kamael010fa - } - else - { takeItems(player, STEELRAZOR_EVALUATION, -1); player.setClassId(126); player.setBaseClass(126); // SystemMessage and cast skill is done by setClassId player.broadcastUserInfo(); giveItems(player, SHADOW_ITEM_EXCHANGE_COUPON_D_GRADE, 15); htmltext = "32191-20.htm"; // master_all_kamael011fa - } } try this one
-
Since you need for clan and clan halls why you are checking for castle? wtf? just checks in useitem && enterworld....
-
Request Chat Command For Races
melron replied to mattiamartucci's question in Request Server Development Help [L2J]
try to learn some basics my friend... remove the quotes "" p.sendPacket(new CreatureSay(activeChar.getObjectId(), Say2.ALL, activeChar.getName(), message)); also remove the useless check in boolean p.getAccessLevel().isGm() == true if(p.getRace() == charRace || p.getAccessLevel().isGm()) its like you are saying "if my name is X and my name is X" -
as reborn suggested, your Z should be wrong. take care with '-' value
-
Request Chat Command For Races
melron replied to mattiamartucci's question in Request Server Development Help [L2J]
Equals de? That means the player must send command ".de" and if the command is ".de hi" equals will return false. In his case want the actual command as the message - ".de" . Correct me if I'm wrong -
then something about the Skill list packet? re-send it to check it
-
New Interlude Gm Shop {Stinkymadness}
melron replied to StinkyMadness's topic in Server Shares & Files [L2J]
English section. Learn at least the basics of your pack. gameserver\data\xml\npcs -
[Question] Voice Chat
melron replied to LordOfDarkness's topic in Server Development Discussion [L2J]
everything is possible my friend. -
Code Teleportcustom (Voicedcommandhandlers)
melron replied to tomalko's topic in Server Shares & Files [L2J]
if(command.startsWith("giran")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(82337, 148602, -3467); activeChar.sendMessage("Usted ha sido transportado a Giran"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("dion")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(18492, 145386, -3118); activeChar.sendMessage("Usted ha sido transportado a Dion"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("oren")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(82769, 53573, -1498); activeChar.sendMessage("Usted ha sido transportado a Oren"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("gludio")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(-12864, 122716, -3117); activeChar.sendMessage("Usted ha sido transportado a Gludio"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("gludin")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(-80928, 150055, -3044); activeChar.sendMessage("Usted ha sido transportado a Gludin"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("aden")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(147361, 26953, -2205); activeChar.sendMessage("Usted ha sido transportado a Aden"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("schuttgart")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(87359, -143224, -1293); activeChar.sendMessage("Usted ha sido transportado a Schuttgart"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("orcvillage")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(-44429, -113596, -220); activeChar.sendMessage("Usted ha sido transportado a Orcvillage"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("darkelvenvillage")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(11620, 16780, -4662); activeChar.sendMessage("Usted ha sido transportado a Darkelvenvillage"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("elvenvillage")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(47050, 50767, -2996); activeChar.sendMessage("Usted ha sido transportado a Elvenvillage"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("dwarvenvillage")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(115526, -178660, -945); activeChar.sendMessage("Usted ha sido transportado a Dwarvenvillage"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("heine")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(111396, 219254, -3546); activeChar.sendMessage("Usted ha sido transportado a Heine"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("huntersvillage")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(116440, 76320, -2730); activeChar.sendMessage("Usted ha sido transportado a Huntersvillage"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("floran")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(17144, 170156, -3502); activeChar.sendMessage("Usted ha sido transportado a Floran"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("goddard")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(147720, -55560, -2735); activeChar.sendMessage("Usted ha sido transportado a Goddard"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if(command.startsWith("rune")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(43848, -48033, -797); activeChar.sendMessage("Usted ha sido transportado a Rune"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } public enum Towns { giran(new Location(82337, 148602, -3467)), aden(new Location(147361, 26953, -2205)), ...... oren(new Location(82769, 53573, -1498)); private Location location; Towns(Location loc) { this.location = loc; } public Location getLocation() { return location; } } activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(Towns.valueOf(command).getLocation(), 30); activeChar.sendMessage("Usted ha sido transportado a " + command); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); -
Help How Synchronized Actually Works?
melron replied to Afou To Patisa's question in Request Server Development Help [L2J]
generally synchronized keyword is working to prevent a mess while multiple threads try write/read the same for example variable or a class that uses another class while have access in the same variable. In your case for the same time y, will be a 'pause' between the players reward -
Request Chat Command For Races
melron replied to mattiamartucci's question in Request Server Development Help [L2J]
In case you dont have voiced command handlers... Say2.java IChatHandler handler = ChatHandler.getInstance().getChatHandler(_type); if (handler != null) - handler.handleChat(_type, activeChar, _target, _text); +{ + if (_text.startsWith(".e") && _type != 2 ) //pm case + { + switch(activeChar.getRace()) + { + case ELF: + for (Player player : World.getInstance().getPlayers()) + { + if (player.getRace() == ClassRace.ELF) + player.sendPacket(new CreatureSay(0, _type, player.getName(),_text.substring(2))); + else + player.sendPacket(new CreatureSay(0, _type, player.getName(),activeChar.getName() + " is writing in Elf language")); + + } + break; + case DARK_ELF: + //code + break; + } + } + else + handler.handleChat(_type, activeChar, _target, _text); +} -
Help 456_Dontknowdontcare Quest
melron replied to falcone2's question in Request Server Development Help [Greek]
Βασικα θελει αλλαγη σε πολλα σημεια. Οπως εδω: if ((st.getPlayer().getParty() != null) && (st.getPlayer().getParty().getCommandChannel() != null) && (st.getPlayer().getParty().getCommandChannel().size() >= 18)) { for (Player plr : st.getPlayer().getParty().getCommandChannel()) { st = plr.getQuestState(getName()); if (st != null) { switch (npc.getNpcId()) { case DrakeLord: st.set(String.valueOf(DrakeLordCorpse), 1); break; case BehemothLeader: st.set(String.valueOf(BehemothLeaderCorpse), 1); break; case DragonBeast: st.set(String.valueOf(DragonBeastCorpse), 1); break; } } } } δοκιμασε το ετσι st = plr.getQuestState(getName()); if (st != null) { switch (npc.getNpcId()) { case DrakeLord: st.set(String.valueOf(DrakeLordCorpse), 1); break; case BehemothLeader: st.set(String.valueOf(BehemothLeaderCorpse), 1); break; case DragonBeast: st.set(String.valueOf(DragonBeastCorpse), 1); break; } } -
Help Schedule Event At X Day And N Hour
melron replied to Afou To Patisa's question in Request Server Development Help [L2J]
(Sunday = day 1) As calendar reads for the current week you have to add days. I hope I helped -
Finally something fresh. Good luck!
- 32 replies
-
- lineage ii baron
- l2baron
- (and 7 more)
-
LF Anti Over Enchant
melron replied to Sinister Smile's question in Request Server Development Help [L2J]
Enterworld check isnt the best case.. i can store my +60 weap into wh , log out, log in , withdraw. Add a check in useItem method . You can do many things like in setEnchant method allow only < ur + . -
This is true actually. I dont know why this is happening but here is a little change to fix that... Heal.java SystemMessage sm = new SystemMessage(SystemMessageId.S2_HP_RESTORED_BY_S1); -sm.addString(activeChar.getName()); -sm.addNumber((int) hp); +sm.addNumber((int) hp); +sm.addString(activeChar.getName()); Systemmsg.dat -$s2 HP has been restored by $s1. +$s1 HP has been restored by $s2. SubMsg: $s1 HP
-
SkyLord you will never find a partner man :jew:
-
Request Calculate Positions Between 2 3D Points
melron replied to Afou To Patisa's question in Request Server Development Help [L2J]
if you will play with sqrt should be as x^2,y^2 if im not mistaken. did you try Math.hypot? -
Sup sky? Will you respond this time to your people? :happyforever:
-
A java project could be even x2 times better than offi . i played the first 2 cleaves and , maybe not 4k but 3k for sure. As you said 80% of the players were in high level farm locations and that was amazing. Good luck!
-
Discussion Aggro Management! Help..!
melron replied to One Shot Mario's question in Request Server Development Help [L2J]
u can play with checks ... in doAttack() method you should check if the attacker is gonna hit your boss and then control the mobs you want , send attack take an example: if (this instanceof L2PcInstance && target instanceof L2MonsterInstance) { L2MonsterInstance boss = (L2MonsterInstance) target; if (boss.getNpcId() == your boss id) { for (L2Character mob : boss.getKnownList().getKnownCharactersInRadius(your radius)) { if (mob instanceof L2MonsterInstance && !((L2MonsterInstance)mob).isRaid()) { ((L2MonsterInstance)mob).getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this); } } } } -
LF Items Store Under One Id
melron replied to BaM4yYy's question in Request Server Development Help [L2J]
Just add a check in drop method of your pack. make a list or with one while loop of the items you want and when the retail drop is under dropping just add your drop there. example with a random item: // Check if the autoLoot mode is active if ((isRaid() && Config.AUTO_LOOT_RAID) || (!isRaid() && Config.AUTO_LOOT)) player.doAutoLoot(this, item); // Give this or these Item(s) to the L2PcInstance that has killed the L2Attackable else dropItem(player, item); // drop the item on the ground + int itemId = Rnd.get(1,9000); + ItemInstance extraItem = ItemTable.getInstance().createItem("Extra Item", itemId, 1, player, null); + + while (extraItem == null) + { + itemId = Rnd.get(1,9000); + extraItem = ItemTable.getInstance().createItem("Extra Item", itemId, 1, player, null); + } + + IntIntHolder specialItem = new IntIntHolder(extraItem.getItemId(),1); + //finally + if (your config) + player.doAutoLoot(this, specialItem); + else + dropItem(player, specialItem);