Jump to content

Tryskell

Legendary Member
  • Posts

    5,346
  • Credits

  • Joined

  • Last visited

  • Days Won

    52
  • Feedback

    0%

Everything posted by Tryskell

  1. Well, it totally depends of the "idea" of your mod. A captcha system have more reasons to exist on the entrance of any player (enterWorld.java) than in the DoDie method of any L2Attackable monster/summon/player. Considering your captcha thing is *CURRENTLY* : - generating correctly a random code, and make the association code/input text (well your code is primitive, but it seems to work); - sending a window at the death of a player (killing anything other than a player show a NPE atm, from what I think); - punishing the player if the code is wrong; The only thing you have to do is to remove all the code from L2Attackable and edit it for EnterWorld. Basically your code fits for EnterWorld, as it misses all good instances checks, and enterWorld is "made" for players only. ------ Revert back your code in L2Attackable then /** * Kill the L2Attackable (the corpse disappeared after 7 seconds), distribute rewards (EXP, SP, Drops...) and notify Quest Engine. * * Actions: * Distribute Exp and SP rewards to L2PcInstance (including Summon owner) that hit the L2Attackable and to their Party members * Notify the Quest Engine of the L2Attackable death if necessary * Kill the L2NpcInstance (the corpse disappeared after 7 seconds) * * Caution: This method DOESN'T GIVE rewards to L2PetInstance * * @param killer The L2Character that has killed the L2Attackable */ @Override public boolean doDie(L2Character killer) { // Kill the L2NpcInstance (the corpse disappeared after 7 seconds) if (!super.doDie(killer)) return false; // Notify the Quest Engine of the L2Attackable death if necessary try { L2PcInstance player = null; if (killer != null) player = killer.getActingPlayer(); if (player != null) { if (getTemplate().getEventQuests(Quest.QuestEventType.ON_KILL) != null) for (Quest quest: getTemplate().getEventQuests(Quest.QuestEventType.ON_KILL)) ThreadPoolManager.getInstance().scheduleEffect(new OnKillNotifyTask(this, quest, player, killer instanceof L2Summon), _onKillDelay); } } catch (Exception e) { _log.log(Level.SEVERE, "", e); } return true; } And in enterworld.java, find the good place to put (around the end, as enterWorld initializes many things) - I perhaps made errors, I just edited with notepad and didn't check synthax/logic : if (Config.ENABLE_ANTIBOT_SYSTEM) { private static int AntiBotKills = 0; private static int Change = 0; int AntiBotKillsCheck = (Config.ANTIBOT_KILLS_CHECK); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(0); Change = Rnd.get(8); AntiBotKills++; if (AntiBotKills >= AntiBotKillsCheck) { killer.setIsParalyzed(true); AntiBotKills = 0; switch(Change) { case 0: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 3 + 9 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 12\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 1: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 21 - 7 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 14\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 2: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 9 + 7 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 16\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 3: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 36 - 18 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 18\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 4: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 10 + 0 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 10\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 5: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 7 + 6 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 13\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 6: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 7 + 6 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 13\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 7: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 7 + 6 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 13\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; case 8: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 7 + 6 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 13\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); break; default: npcHtmlMessage.setHtml("<html><title>Antibot System</title><body><center>Enter a code below and click CONFIRM<br><br>Question: <font color=\"66FF00\"> 1 + 8 </font> = ?<br><edit var=\"antibot\" width=110><br><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot 9\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><font color=\"FFFFFF\"> If your Type is Incorrect you will be Punished !</font></center></body></html>"); killer.sendPacket(npcHtmlMessage); } } } I didn't test your mechanism, so don't tell it doesn't works (this is your system if I didn't fock the c/p :D), and I don't know how the player isn't supposed to be de-paralized, I guess the voiced command got it. killer have to be replaced to activeChar, imports have surely to be corrected, and such.
  2. This system is already shared : - basic idea is the "quake system" thing shared over MxC, - a most developed idea is from BigBoss shares. If he comes here, he will tell you better than me :P.
  3. This system is already shared : - basic idea is the "quake system" thing shared over MxC, - a most developed idea is from BigBoss shares. If he comes here, he will tell you better than me :P.
  4. Use your words clearly, you want it works with fists (aka unnarmed) or with dual fists (aka tyrant normal weapon). Currently it's work for both, right ? And what chronicle you use ? Well the fact to use count=1 and the weaponAllowed=number made it "Interlude", but the "using kind" on each effect made it... Interlude custom :P. So explain better. ---- You have to edit : <set name="weaponsAllowed" val="1024"/> <!-- Fist, Dual Fist --> And each line with using : <using kind="Fist, Dual Fist"/> if you don't want the effect works with this weapon.
  5. Use your words clearly, you want it works with fists (aka unnarmed) or with dual fists (aka tyrant normal weapon). Currently it's work for both, right ? And what chronicle you use ? Well the fact to use count=1 and the weaponAllowed=number made it "Interlude", but the "using kind" on each effect made it... Interlude custom :P. So explain better. ---- You have to edit : <set name="weaponsAllowed" val="1024"/> <!-- Fist, Dual Fist --> And each line with using : <using kind="Fist, Dual Fist"/> if you don't want the effect works with this weapon.
  6. Info / pack / screenshot / code / size of your... no, not this one. About balance server... I'm screaming in a corner of my dark room. Need someone else to explain because my tears flood my room. ---- As a moderator / section admin could update rules once and for all, to litterally delete such topics with non-consistant infos ? We lose our time reading crap, and answering the same over and over.
  7. Info / pack / screenshot / code / size of your... no, not this one. About balance server... I'm screaming in a corner of my dark room. Need someone else to explain because my tears flood my room. ---- As a moderator / section admin could update rules once and for all, to litterally delete such topics with non-consistant infos ? We lose our time reading crap, and answering the same over and over.
  8. addItem() exists whatever chronicle is, the only difference is the number/type of parameters entered. So find occurences of addItem through the code, count the number/type of parameter inside, and verify if it matches. ------------------------------------------------------ Here are the 2 possibilities on Freya : public void addItem(String process, L2ItemInstance item, L2Object reference, boolean sendMessage) public L2ItemInstance addItem(String process, int itemId, long count, L2Object reference, boolean sendMessage) The itemCount is wrong then, as in your vote system it's an array which is given, and it's a simple number which is asked in Freya. Update your vote system, or edit/add a new method in L2PcInstance to match with an array.
  9. addItem() exists whatever chronicle is, the only difference is the number/type of parameters entered. So find occurences of addItem through the code, count the number/type of parameter inside, and verify if it matches. ------------------------------------------------------ Here are the 2 possibilities on Freya : public void addItem(String process, L2ItemInstance item, L2Object reference, boolean sendMessage) public L2ItemInstance addItem(String process, int itemId, long count, L2Object reference, boolean sendMessage) The itemCount is wrong then, as in your vote system it's an array which is given, and it's a simple number which is asked in Freya. Update your vote system, or edit/add a new method in L2PcInstance to match with an array.
  10. I don't think this is the best place to put such code... It should be placed at enterworld.java, imagine on a pvp server you die often and each time you die you have to enter a code :P. Anyway, just my 50 cents. ---- And even if you want your system, L2Attackable is still a bad place... L2PcInstance will fit better. Except if I missed a part, your system will work with any L2Attackable... In your log info, I think you killed a mob, so the code became crazy at each mob kill. Move your code in L2PcInstance then, that will avoid you many many checks. ---- For people who doesn't understand, it's a catpcha system... You think monsters, summons and such are enough clever to enter godamn codes ? :P. This is not Blade Runner, a robot is a robot, not a living form which got emotions.
  11. I don't think this is the best place to put such code... It should be placed at enterworld.java, imagine on a pvp server you die often and each time you die you have to enter a code :P. Anyway, just my 50 cents. ---- And even if you want your system, L2Attackable is still a bad place... L2PcInstance will fit better. Except if I missed a part, your system will work with any L2Attackable... In your log info, I think you killed a mob, so the code became crazy at each mob kill. Move your code in L2PcInstance then, that will avoid you many many checks. ---- For people who doesn't understand, it's a catpcha system... You think monsters, summons and such are enough clever to enter godamn codes ? :P. This is not Blade Runner, a robot is a robot, not a living form which got emotions.
  12. Assembla is used by over 300k people (well, it's what they say), and many projects are hosted on it, so turn off your antivirus and stop offtopic. If you don't know what is Assembla, just google it and see. It has nothing to be involved about aCis, Frozen and many other L2 projects use it. It's a 3rd software tool, developped by a company. ------ Rev 72 near to be up.
  13. Assembla is used by over 300k people (well, it's what they say), and many projects are hosted on it, so turn off your antivirus and stop offtopic. If you don't know what is Assembla, just google it and see. It has nothing to be involved about aCis, Frozen and many other L2 projects use it. It's a 3rd software tool, developped by a company. ------ Rev 72 near to be up.
  14. Rofl, that makes me smile at 7h00 of morning. The joy of customs... Search first in your config files if there isn't an option about it. ---- I invite you to check MapRegionTable (gameserver.datatables), and search through code for if (player.getKarma() > 0) to know where exactly the code sends you. For me it's //Karma player land out of city if (player.getKarma() > 0) return TownManager.getClosestTown(activeChar).getChaoticSpawnLoc(); But it's supposed to be clean code, and postIL version. ---- To understand the concept, basically : - you die - you send a RequestRestartPoint packet (clicking on "To Village" is the default option) - it sends you to MapRegionTable, which says "what do what where and when". - on "normal" packs, it sends you on the closest town, using preconfigured chaotic spawns entered in zones.xml (postIL)
  15. Hey, stop with that "aCis is unstable" thing :P. It's perfectly stable. It can't be currently be used as live, but it's stable. About Frozen, they made an experiment using boneCP instead the current C3P0 pooler than any project normally have. And for that, you can say it's experimental and non-live anymore, as aCis became non-live around rev 40 (but me I announced it wasn't non-live, when you, you think Frozen is still live-able). I won't say aCis is better than Frozen. Frozen uses Scoria as base, they got a lot of stuff already made but inherits Scoria problems (as any pack have their own problems), so they have to correct inherent L2J problems, Scoria ones and avoiding to add own problems. Both projects got a different public (light vs custom), goal (propose a clean base for any server type vs propose a end-based server) && conception ideals (refactor entirely parts of code will fix bugs vs fixing bugs without refactors). Both projects got PROS and CONS and different types of visitors. A discussion with Shyla (on my forum 2 months ago, when aCis just born) ended with the fact my and his project just couldn't merge, because my PoV of what a server must offer is different of its PoV. I stop with semi-offtopic, even if it's always interesting to know what happens in background :).
  16. Before it was a mix of SQLs and XMLs, now only XMLs :). With that added, you will perhaps notice some itemhandlers completely dissapear (potions, scrolls). Potions task have migrated to L2PcInstance, when SoE and SoR are handled on skillhandler/skill effects (from what I rem). And yeah, I will have soon to refactor all this crap... This is another big chapter to refactor on IL :D Sad story bro'.
  17. A simpliest way to do it without using zones is to use a radius formula, and for all players found on this radius, you do whatever you want. isInsideRadius() method, there are some applications of this. DoDie () method of the instance you want to add that. I invite you to do a new instance, else it will change behavior of existing instance, which isn't perhaps what you want to do. Well it depends exactly you want to do, if your goal was simply that, it's a far simpliest way.
  18. Common problem, people think private are better than free, and only because they can't see how bad it is, they must buy it in order to see all defaults. Snake eats his tail. Imagine I put aCis private, and I say all skills work 100% and such impossible things... Guess what, people will buy the pack in order to see if it's real or wrong haha. GG about paying fork and no support haha. ---- About main question, check L2VillageMasterInstance, and copy parts of Freya.
  19. Well I wanted to answer but Matim got 4 hands :P. You have to understand how works the Zone system. Basically you got 2 possibilities : - You can create TownZones and put respawn areas "not peace zone". It depends of chronicle, this feature isn't implemented on IL from what I rem. - You can create a whole new ZoneType, where each leveling zone got its own self number. Those special areas can be improved with time. Check L2TownZone. In both cases, you will have to create a zone in zone.xml, depending if it is already existing or not.
  20. When Sido said it to me, I was laughing... Ty to read in my mind, I had this idea some days ago, but was risky to put in place (forum wipe with backup and such) :). You made at least one victim haha.
  21. I must steal your brain, then build a machine to read memories in order to know them ?
  22. RequestRestartPoint clientpacket, located in gameserver / network / clientpackets for postIL or gameserver / serverpackets in IL and before.
  23. Right click on the dp_installer and edit mySQL path, password and login of your database, and database name if you don't use a normal one. The database have to be created first, use a tool such as navicat to create one first. I invite you to read tutorials, they're pretty explicit.
  24. I gave you the whole solution, the only thing I was talking about being lazy was the diff patch.As I like to say, giving you a fish won't help you, when a fishrod could stop your hungry :). All is supposed to work, just use CTRL+H (search function) in order to find good places. You know already 1 place, you have to search for the 2 last (must be siegemanager, siege and castle). You can c/p the code I make, it works whatever is your chronicle/pack normally. I removed sentence in last post which could make think it wasn't complete code. Regards, Tk.
×
×
  • Create New...