Jump to content

Kara

Banned
  • Posts

    2,100
  • Joined

  • Last visited

  • Days Won

    46
  • Feedback

    100%

Everything posted by Kara

  1. C4 rape C6 easily. L2Elite is 15 years old server and holds 2k people right now without website.
  2. Make C4 and im goin to join your server :'(
  3. Interlude in 2019 almost. Plz ban this chronicle.
  4. Obviously i don't compare a veteran program like AE with Photoshop but in both programs you have the option to either create elements or take merge pngs with some color. In your case all i see is google images with some color-correct which is bad. The elf is over-contrasted, the lighting looks plain fake rotated image the Logo is a fail downloaded template with a bad font that does not match with the overal image, the smile(teeth thing) is amateur childish. PS. i dont know why i even write these. Strain just posted the images you took. You didn't even do the color correction and you want sell this? What you want scam people with other's images? And you're gold member? Shame on you..
  5. You don't agree that nowadays people just merge few png together and no actual design elements? You don't have to agree with it cause it wasn't my opinion. It's fact.
  6. Ston maxtor parapona, dn leei na me kanei.
  7. After i finish few clients and 1 event engine which i want sell for few bucks since there is no active event engine in the community now other than some buggy phoenix and erlandys that no develop anymore i'll share some more code. For now i focus on my clients.
  8. I know trust me, you can use a interface and not extend, and about creating object you can use a reflection though a enum as i said like that: /** * @author Kara` */ public enum GhostType { CAPTURE_THE_FLAG(1, CTF.class); final int _id; final Class<? extends AbstractGhost> _type; GhostType(int id, Class<? extends AbstractGhost> type) { _id = id; _type = type; } public int getId() { return _id; } public Class<? extends AbstractGhost> getType() { return _type; } } Multiple ways to shorten it but still it's a nice system compared to: In my next share you will realise that i love organized and shrinked java code. @Elfocrash PS i chaged the array as you mentioned: values = new Object[3] { r, g, b };
  9. Typo. Changed to values = new Object[2]; I also had declared duplicated new Item i changed that too. Also the idea was to call it though enum and reflect it to avoid copy paste line getAttr() blabla but i'ts fine this way.
  10. KaraData.getKara().getKara(Kara.this());
  11. 100 in 2018 C6 server? Rolf not even 10.
  12. Einai pio asteio an to skefteis giati sto video einai nifalios :'(
  13. Can he affort me? :'(
  14. Κατσε καλα..... σε ειδαμε και εσενα
  15. Greek developer out of the question? There is no "albanian" developer in the forum. PS. margazea don't sell him shared codes :'(
  16. You're right, i forgot to name the class itself KaraData. Thanks a lot ! Maybe im foolish, maybe im blind, thinking i can see though this and see whats behind. Got no way to prove it so maybe im blind. But i'm only kara after all, i'm kara after all, don't put the blame on me. Take a look in my code, what do you see,,, in what you believe??
  17. Just because you opened a topic to ask for the rates instantly mean 0 and don't bother. It's cleary you have no imagination and you depend on other's opinion. PS. Interlude is dead chronicle. Only wannabe pride servers. C4-Epiloque-Freya-H5-Classic is the chronicle to play with.
  18. @SweeTs Gift for your server :'(
  19. Σταματα να μου την πεφτεις εχω σχεση και RX8-cosmos.
  20. Sagapaw PANA8EMASE RE KWLOPAIDI ama xanafugis apo to forum 8a pw sto niko na stin rixi monima.
  21. Long time since i shared something. I made this code in 10 minute. It's a Procedural PvP reward system which you can extend and add anything you like. Basically each time a player get a PvP, system check if he can get any reward (Item, Color, Skill) and reward him. It has protection to avoid duplicated rewards in case he reduce his PvP and repeat the procedure. Index: java/kara/PvPData.java =================================================================== --- java/kara/PvPData.java (revision 0) +++ java/kara/PvPData.java (revision 0) @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2004-2018 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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 kara; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +import com.l2jserver.Config; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.variables.PlayerVariables; +import com.l2jserver.util.data.xml.IXmlReader; + +import kara.model.PEvent; +import kara.model.events.PvPColor; +import kara.model.events.PvPReward; +import kara.model.events.PvPSkill; + +/** + * @author Kara` + */ +public class PvPData implements IXmlReader +{ + final Map<Integer, List<PEvent>> HOLDER = new HashMap<>(); + + public PvPData() + { + load(); + } + + @Override + public void load() + { + HOLDER.clear(); + parseDatapackFile(Config.DATAPACK_ROOT + "data/pvpData.xml"); + LOGGER.info("[" + PvPData.class.getName() + "] Loaded " + HOLDER.size() + " holders."); + } + + @Override + public void parseDocument(Document doc) + { + for (Node d = doc.getFirstChild(); d != null; d = d.getNextSibling()) + { + if (d.getNodeName().equals("list")) + { + for (Node holder = d.getFirstChild(); holder != null; holder = holder.getNextSibling()) + { + if (holder.getNodeName().equals("holder")) + { + List<PEvent> list = new ArrayList<>(); + + for (Node pevent = holder.getFirstChild(); pevent != null; pevent = pevent.getNextSibling()) + { + NamedNodeMap attr = pevent.getAttributes(); + + try + { + if (pevent.getNodeName().equals("color")) + { + list.add(new PvPColor(Integer.parseInt(attr.getNamedItem("r").getNodeValue()), Integer.parseInt(attr.getNamedItem("g").getNodeValue()), Integer.parseInt(attr.getNamedItem("b").getNodeValue()))); + } + if (pevent.getNodeName().equals("item")) + { + list.add(new PvPReward(Integer.parseInt(attr.getNamedItem("id").getNodeValue()), Integer.parseInt(attr.getNamedItem("count").getNodeValue()))); + } + if (pevent.getNodeName().equals("skill")) + { + list.add(new PvPSkill(Integer.parseInt(attr.getNamedItem("id").getNodeValue()), Integer.parseInt(attr.getNamedItem("level").getNodeValue()))); + } + } + catch (Exception e) + { + e.printStackTrace(); + continue; + } + } + + HOLDER.put(Integer.parseInt(holder.getAttributes().getNamedItem("require").getNodeValue()), list); + } + } + } + } + } + + /** + * Check if player has any given rewards. <br> + * Info: if player decreased pvp somehow he <b> wont </b> receive. + * @param player + */ + public void executeEvent(L2PcInstance player) + { + PlayerVariables variables = player.getVariables(); + + if (variables.getInt("lastPvP", 0) >= player.getPvpKills()) + { + return; + } + + List<PEvent> list = HOLDER.get(player.getPvpKills()); + + if (list == null) + { + return; + } + + variables.set("lastPvP", player.getPvpKills()); + + list.forEach(s -> s.getEffect(player)); + } + + public static PvPData getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final PvPData _instance = new PvPData(); + } +} \ No newline at end of file Index: java/kara/model/PEvent.java =================================================================== --- java/kara/model/PEvent.java (revision 0) +++ java/kara/model/PEvent.java (revision 0) @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2004-2018 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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 kara.model; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * @author Kara` + */ +public abstract class PEvent +{ + protected Object[] values; + + public abstract void getEffect(L2PcInstance player); +} Index: java/kara/model/events/PvPColor.java =================================================================== --- java/kara/model/events/PvPColor.java (revision 0) +++ java/kara/model/events/PvPColor.java (revision 0) @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2004-2018 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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 kara.model.events; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +import kara.model.PEvent; + +/** + * @author Kara` + */ +public class PvPColor extends PEvent +{ + public PvPColor(int r, int g, int b) + { + values = new Object[3] { r, g, b }; + } + + @Override + public void getEffect(L2PcInstance player) + { + player.getAppearance().setNameColor((int) values[0], (int) values[1], (int) values[2]); + player.broadcastUserInfo(); + } +} Index: java/kara/model/events/PvPReward.java =================================================================== --- java/kara/model/events/PvPReward.java (revision 0) +++ java/kara/model/events/PvPReward.java (revision 0) @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2004-2018 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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 kara.model.events; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +import kara.model.PEvent; + +/** + * @author Kara` + */ +public class PvPReward extends PEvent +{ + public PvPReward(int id, int count) + { + values = new Object[2]{ id, count }; + } + + @Override + public void getEffect(L2PcInstance player) + { + player.addItem("Reward", (int) values[0], (int) values[1], player, true); + } +} Index: java/kara/model/events/PvPSkill.java =================================================================== --- java/kara/model/events/PvPSkill.java (revision 0) +++ java/kara/model/events/PvPSkill.java (revision 0) @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2004-2018 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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 kara.model.events; + +import com.l2jserver.gameserver.datatables.SkillData; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.skills.Skill; + +import kara.model.PEvent; + +/** + * @author Kara` + */ +public class PvPSkill extends PEvent +{ + public PvPSkill(int id, int level) + { + values = new Object[2] { id, level }; + } + + @Override + public void getEffect(L2PcInstance player) + { + Skill skill = SkillData.getInstance().getSkill((int) values[0], (int) values[1]); + + if (skill == null) + { + return; + } + + player.addSkill(skill); + } +} Xml: <!-- TODO : That minions need to be moved in spawn system when is done! --> <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/pvpData.xsd"> <!-- Created by Kara` --> <holder require="10"> <color r="80" g="212" b="168" /> <item id="57" count="100000000" /> <skill id="6393" level="1" /> </holder> <holder require="30"> <color r="120" g="120" b="168" /> <item id="6393" count="100" /> <skill id="6393" level="1" /> </holder> </list> How to use it? It's pretty simple: In GameServer.java somewhere add the following line: To use it just go in the L2PcInstance.java and find the method that increasePvpKills and somewhere inside add the Hope you like it. PS. Coded for L2J-H5
  22. I was diggin my PC and i found some Speed-ARTS i used to do for my facebook. @Nightwolf like like!!
  23. This is one of my "10-15 min" work that i used to do to relax every night. These are for sell, yours are just merged png. Am i wrong? Correct me please. PS. Thank you for calling me GOD >.> it flatter me
  24. The site is stupid? Then why you're here beggin people to make you codes? Crawl back to your cave. I hope you get a perma ban and i hope maxtor block incoming IP from your gipsy country. Monkey boy.
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock