Jump to content

Horus

Members
  • Posts

    888
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Horus

  1. Yes there is. Check the admin Pannel's HTMLs/Code there are examples of it
  2. They are already there ? Just make an NPC with the type L2EventManager
  3. Offcourse. Just name the variable w/e you want %onlinecount% html.replace("%onlinecount%", L2World.getInstance().getAllPlayers().count);
  4. What do you mean? If I only code L2j or L2jFree ? or if this code works on all packs?
  5. What part of "SHARE" Forum Area don't you understand? And you can get it from their SVN.
  6. It is you who don't understand. Either you make 4 Different HTMLs and use a Python Script to replace them or you use the append function through java to show something according to conditions just like I showed you.
  7. You're welcome. Next time just make sure you search the source to understand how things work. I did that code, it works ,feel free to use it and claim it your own ;)
  8. I made this without Eclipse so I might have forgotten a thing or two but thats the basic. /* * 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.l2jfree.gameserver; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.l2jfree.gameserver.model.L2World; import com.l2jfree.gameserver.model.entity.events.CTF; import com.l2jfree.gameserver.model.entity.events.TvT; import com.l2jfree.tools.random.Rnd; /** * @author Horus * */ public class EventManager { private static EventManager _instance; private final static Log _log = LogFactory.getLog(EventManager.class.getName()); class StartEvent implements Runnable { public void run() { if(L2World.getInstance().getAllPlayers().size() >= 10) { int _chance = Rnd.get(0, 100); if(_chance >= 0 && _chance <50) { TvT.loadData(); TvT.autoEvent(); } else if(_chance >= 50 && _chance < 101) { CTF.loadData(); CTF.autoEvent(); } } else _log.warn("Event Manager: Event Startup Failed due to lack of Players."); } } public static EventManager getInstance() { if (_instance == null) _instance = new EventManager(); return _instance; } private EventManager() { ThreadPoolManager.getInstance().scheduleGeneral(new StartEvent(), 16000); } } About the NPC just make an NPC with the Type "L2EventManager"
  9. I work with l2jfree too.L2j has a lot of examples of what you're asking for. Just go ingame,find the npcs and see their correspondent HTMLs / Java/ Jython. You'll get there
  10. That was a dumb sentence java != jython. I have absolutely no idea,use the search function.
  11. I did this for you,just replace the random item ID's and minutesatyourmintim minutesatyourmaxtim with what you want and thats it. Next time try to do it yourself. public void useItem(L2PlayableInstance playable, L2ItemInstance item) { if (!(playable instanceof L2PcInstance)) return; L2PcInstance activeChar = (L2PcInstance) playable; int itemId = item.getItemId(); switch(itemId) { case 2132121: if(playable.isInsideZone(L2Zone.FLAG_PEACE)) { playable.sendMessage("You cannot use this item in towns."); return; } break; case 34534543: if(playable.isInsideZone(L2Zone.FLAG_STADIUM)) { playable.sendMessage("You cannot use this item whilte in Olympiad.); return; } break; case 131231: { if(GameTimeController.getInstance().getGameTime() > minutesatyourmintime && GameTimeController.getInstance().getGameTime() > minutesatyourmaxtime) playable.sendMessage("You cannot use this item between timemin - timemax.); return; } break; }
  12. The invis thing was an example.Just mod the file to match your needs.
  13. The video has a really poor quality. If you want just change the Bluff's AI in the source.You can make it do anything, if you want you can make Bluff delete chars or make them invis (dunno what for but w/e).
  14. if(isDonator()) html.setFile("yourhtml"); else html.setFile("yourhtml"); Do something like that. For the Donator Status just mod an existing table with a field like "isDonator" with tiny int values "0,1" and make it being loaded when the char is logged in. Store it in a local variable a make a method to retrieve the variable.Thats it ^^
  15. Can't understand what you mean What exactly do you want Bluff to do?
  16. Oh no that is java and it was just an example. Guess you should make it in Python if you don't know java
  17. I don't have Eclipse here so I'll just write with what I remember. For getting the player count: L2World.getInstance().getAllPlayers().count; For the HTML do something like this: html.replace("%playerName%", getName());
  18. "GODLIKE System" loool its actually called Killing Spree Systme but oke ^^
  19. Its a nice list, it will sure help newbs ::) good job. Just do me one favor, in the .valakas credits go to Horus only not to teh rest ;P
  20. Just make the field, get the field value, getLevel() setLevel(getLevel() - fieldres);
  21. By the way Zonzoo, I don't understand how the credits go to you if the original post was actually in english already lool. But oke ^^
  22. Well TH3On3 I'm just asking,but as far as I can see this is basically Evil33t's (L2JFree's) Faction System am I right? I mean,it doesn't have the prepared Castle Siege's Code,nor TvT (applied to factions), spawn Tents as Headquarters,etc. Right? Note: I'm just asking, don't start the flaming.
  23. Thats exactly why I posted. I cant see your post,so I have to increase my post count ^^ Who says I'm from L2JFree? If I were an egoist I wouldn't have posted 2shares would I ? ;)
  24. You dont need to be exactly a pro java coder to make this but ty anyway ^^
×
×
  • 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