Jump to content

StealthyS4m

Members
  • Posts

    127
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by StealthyS4m

  1. Wow,Stacy,You really deserve "Gold Member" status.Nice archive. Thank You!
  2. Hello guys, I've created a new project - L2Cyrex and I want to advertise it a bit.I posted some posts about in ~5forums,but I can't find any more.If I check other servers from my country the biggest amount of people are from Greece,Brasil and Lithuania(Country I am from).I am pretty sure they do not spend too much money on advertising,so any of You guys know any forums,where I could post some posts? ^_^ Thank You in advance. P.S. I am not sure if this is the right section,cause I didn't find any section more fitting to this discussion.If I am wrong please remove it.
  3. I remember having the same problem,but I can't recall how I fixed it(it was very long time ago). Try checking your ports.Open all of your ports and try to connect,if it works it's port related. Try to get a new system.Download some famous server's system and just edit l2.ini.(Patched system on this forum doesn't work with WINDOWS XP)
  4. As I don't have frozen,I am not sure what lines are 137,but I believe You have to add this code inside method "onEnter" and is AQ zone's id really 12019?
  5. Hello guys, I am selling domain name: l2amaze.eu Starting price: 4€ The domain name is bought on "Interneto Vizija" http://www.iv.lt P.S. I believe it's allowed to sell domain names,if not I am really sorry.
  6. I've played one season in this server.I didn't play it too much,but I know that there was a guy named "Personazas",who had buffed stats(admin gave him passive skills).His P.Atk and M.Atk was maybe 2-3 times higher than usual and in OLY he did about 700-1000damage per hit WITH HIS FISTS! Oh,btw: These screenshots are not mine,just wanted to share them.They were uploaded by "xKaroona" on one forum
  7. L2 - CYREX Website Main info: 500xp/500sp/1aden/1drop Starting Level/Subclass Level - 1/40 Offline shop system Rebirth system Castle sieges every week Currency - Gold Drakes 4 Tattooes Enchanting: Safe:4 Max:20 Chance: 70% Chance from 16+: 50% Augumentation: Chance - 12% Maximum 1 Active and 1 Passive Olympiad: Starts 18:00 Ends 00:00 Period - 1 week Unique items: Mighty boss slayer's trophy - Using this item will grant you few privileges: 1) You can check Mighty Bosses' respawn time 2) Higher augument chance(+5%) 3) Black nickname color Valakas Tattoo - Dropped from Valakas.Enchants your stats. Vote system: Vote reward - Vote Coin. Vote coin can be used to buy items in shop You can also use vote coin to get Voter's buff.(Double click on Vote coin) Player of the Day - Unique Event.The man with most PvP in day becomes a hero for a next day. Period - 1 Day. Hero time - 1 Day. Event starting/ending - 00:00 Commands - /daypvp (Shows TOP 10 Players of the Day) PvP Zone: ☑ When you enter the zone you get nobless effect. ☑ Entering the zone will change your nickname to "PlayerX" and your title to PvP and PK count. ☑ On zone enter you are set to Flag(Purple nick) ☑ Everytime you get a kill your title is refreshed ☑ Added respawn timer,you automatically respawn after 5seconds. ☑ If you press "To Village" you will be returned to the Main Town ☑ On respawn You get nobless effect ☑ Exiting the zone will change your nickname and title to your set. ☑ You can't exit or restart inside the zone. ☑ Neither you can have a party in zone. Server's start - April 11th 20:00(GMT +02)
  8. I believe this line return RANDOM_LOCATIONS[Rnd.get(1, 6)] doesn't work because you are generating random from 1 to 6(1,2,3,4,5,6) and while array is counted from zero (0,1,2,3,4,5 -- 6Elements).
  9. ScheduledFuture<?> thread = ThreadPoolManager.getInstance().schedule(new Something(), 5000L); class Something implements Runnable{ public void run(){ if(conditionMeansCancel){ cancel(thread); } } } public void cancel(ScheduledFuture<?> thread){ thread.cancel(); } Wouldn't it make it work?I believe only in C++ it creates new copy when passing variable to argument.
  10. You mean something like this: ThreadPoolManager tpm = ThreadPoolManager.getInstance(); if(condition_means_shutdown) tpm.shutdown(); Is my method,the one who works(second one) fine?Or does it use too many resources for such an easy task?
  11. If you can read the whole post,I've got 2ways to do my thing and one of them is working,just I am not sure if it's the best way. I may have been a bit unclear in my first post.But countdown--; is the number that will be written on sysmsg. For example,at first countdown is 5,after second the thread runs again and this time countdown is 4,so it will say "You will respawn after 4 seconds",then "You will respawn after 3seconds" and so on.The reason it gets shorter is because when you die second time my method creates another thread,so now there is two threads,which are subtracting countdown.The more you die,the less respawn time is. To fix it I need to know how to destroy ThreadPoolManager after it runs everything it needs: public void run(){ if(player.isDead()){ if(countdown >0){ SystemMessage smg = SystemMessage.getSystemMessage(SystemMessageId.RESPAWN_AFTER_S1_SECONDS); smg.addString(String.valueOf(countdown)); player.sendPacket(SystemMessageId.RESPAWN_AFTER_S1_SECONDS); countdown--; }else if(countdown == 0){ player.doRevive(); int x = 174132 + (int)(Math.random() * ((179862 - 174132) + 1)); int y = 112225 + (int)(Math.random() * ((117715 - 112225) + 1)); int z = -7708; Location loc = new Location(x, y, z); player.teleToLocation(loc,0); }else{ DestroyThisThreadSomehow(); } } } P.S. I believe I have problems expressing my problems associated with programming in English language,cause I am not very good in both of them. ^_^
  12. Hello guys, I have a custom zone and whenever you die in that zone it shows you the timer when you will respawn and after timer reaches 0 it respawns you.This was my first try: public void onDieInside(L2Character character) { if(character instanceof L2PcInstance){ final L2PcInstance player = (L2PcInstance) character; countdown = 5; ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable(){ @Override public void run(){ if(player.isDead()){ if(countdown >0){ SystemMessage smg = SystemMessage.getSystemMessage(SystemMessageId.RESPAWN_AFTER_S1_SECONDS); smg.addString(String.valueOf(countdown)); player.sendPacket(SystemMessageId.RESPAWN_AFTER_S1_SECONDS); countdown--; }else if(countdown == 0){ player.doRevive(); int x = 174132 + (int)(Math.random() * ((179862 - 174132) + 1)); int y = 112225 + (int)(Math.random() * ((117715 - 112225) + 1)); int z = -7708; Location loc = new Location(x, y, z); player.teleToLocation(loc,0); } } } } ,0,1000); } } It works fine for first time,but then it just get shorter and shorter.I believe it's because thread doesn't stop working after respawning player,so whenever a player dies again the countdown is set to 5,but there is 2threads running and subtracting 1from countdown and then threads just keep increasing. My second try was this method: public void onDieInside(L2Character character) { if(character instanceof L2PcInstance){ final L2PcInstance player = (L2PcInstance) character; countdown = 5; while(countdown > 0 && player.isDead()){ ThreadPoolManager.getInstance().scheduleGeneral(new showCountdown(countdown,player), 6000-countdown*1000); countdown--; } ThreadPoolManager.getInstance().scheduleGeneral(new Runnable(){ @Override public void run(){ if(player.isDead()){ player.doRevive(); int x = 174132 + (int)(Math.random() * ((179862 - 174132) + 1)); int y = 112225 + (int)(Math.random() * ((117715 - 112225) + 1)); int z = -7708; Location loc = new Location(x, y, z); player.teleToLocation(loc,0); } } }, 6000); } } This is showCountdown class: class showCountdown implements Runnable{ int timer = 0; L2PcInstance player; public showCountdown(int countdown,L2PcInstance p){ timer = countdown; player = p; } @Override public void run(){ SystemMessage smg = SystemMessage.getSystemMessage(SystemMessageId.RESPAWN_AFTER_S1_SECONDS); smg.addNumber(timer); player.sendPacket(smg); } } It works just fine,but it seems dumb just to create so many Threads for a simple countdown.
  13. uhmm..Infinity shot? Like archers not using arrows when they are shooting from bow?
  14. I believe this section is only for Lineage 2 hacks. Plus the website isn't in English language.
  15. What can I tell you guys?That proggramming is weird as fuck,you would never guess when I did think of solution. ......... When I was chopping down some trees in forest. ^_^ Just changed L2MonsterInstance method like this: public boolean doDie(L2Character killer) { if (isCustomBoss()) { CustomBossManager.getInstance().getCustomBoss(getNpcId()).delete(); } if (!super.doDie(killer)) return false; if (_master != null) _master.getMinionList().onMinionDie(this, _master.getSpawn().getRespawnDelay() / 2); return true; } But still ,Tryskell, I need your explanation how this shit works. This is L2Character doDie method,where all shit is happening: public boolean doDie(L2Character killer) { // killing is only possible one time synchronized (this) { if (isDead()) return false; // now reset currentHp to zero setCurrentHp(0); setIsDead(true); } // Set target to null and cancel Attack or Cast setTarget(null); // Stop movement stopMove(null); // Stop Regeneration task, and removes all current effects getStatus().stopHpMpRegeneration(); stopAllEffectsExceptThoseThatLastThroughDeath(); calculateRewards(killer); // Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform broadcastStatusUpdate(); // Notify L2Character AI if (hasAI()) getAI().notifyEvent(CtrlEvent.EVT_DEAD, null); if (getWorldRegion() != null) getWorldRegion().onDeath(this); getAttackByList().clear(); return true; } and this is Mister who does everything method calculator: protected void calculateRewards(L2Character killer) { } so how? Is L2Character method calculateRewards is only like abstract method and L2MonsterInstance is using the first calculateRewards() it finds in its path,so in this example it uses CalculateRewards of L2Attackable? I am so sorry for asking so much questions,but I want to understand everything better.
  16. Yeah,I was thinking the same,but my custom bosses are set as L2Monsters: <set name="type" val="L2Monster"/> this is the L2MonsterInstance.java doDie() method: public boolean doDie(L2Character killer) { if (isCustomBoss()) { CustomBossManager.getInstance().getCustomBoss(getNpcId()).delete(); } if (!super.doDie(killer)) return false; if (_master != null) _master.getMinionList().onMinionDie(this, _master.getSpawn().getRespawnDelay() / 2); return true; } and CustomBoss delete() method: public void delete() { if (_lastSpawn == null) { return; } _lastSpawn.getLastSpawn().deleteMe(); _lastSpawn.stopRespawn(); SpawnTable.getInstance().deleteSpawn(_lastSpawn, false); _lastSpawn = null; setStatus(0); setRespawnTime((System.currentTimeMillis()/1000)+((getMinutes()*60) + (randInt(0, (int)getDelay()*60)))); updateDbResp(getNpcId(), getRespawnTime()+(System.currentTimeMillis()/1000) , getStatus()); ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() { @Override public void run() { doSpawn(); } }, getRespawnTime()*1000); Announcements.announceToAll("Mighty Boss "+getName()+" has been killed!"); }
  17. I believe I have done what you are telling me. ^_^ I included a photo of my droplist: http://imgur.com/bFvNWkn Could it have to do anything with scripts?Because most of the scripts are disabled. I am using this engine(a bit modified): http://www.maxcheaters.com/topic/180781-easy-boss-engine/
  18. Oh,yeah when I click on droplist it shows all the items. I believe that droplist show drops that are in npc's xml and drops are managed on java side. I think the method is called rewardPlayer() or calculateReward() or something like that,but it requires player instance,but I just want items to drop on the ground.
  19. Uhm..I am sorry I didn't understand you completely,but this is my npc file: <npc id="50017" idTemplate="25437" name="Jaryl" title=""> <set name="level" val="80"/> <set name="radius" val="24"/> <set name="height" val="52"/> <set name="rHand" val="145"/> <set name="lHand" val="0"/> <set name="type" val="L2Monster"/> <set name="exp" val="2179535"/> <set name="sp" val="140740"/> <set name="hp" val="96596"/> <set name="mp" val="300.8"/> <set name="hpRegen" val="208"/> <set name="mpRegen" val="2.1"/> <set name="pAtk" val="505"/> <set name="pDef" val="1252"/> <set name="mAtk" val="8"/> <set name="mDef" val="529"/> <set name="crit" val="4"/> <set name="atkSpd" val="383"/> <set name="str" val="60"/> <set name="int" val="76"/> <set name="dex" val="73"/> <set name="wit" val="70"/> <set name="con" val="57"/> <set name="men" val="80"/> <set name="corpseTime" val="300"/> <set name="walkSpd" val="80"/> <set name="runSpd" val="230"/> <set name="dropHerbGroup" val="0"/> <set name="attackRange" val="40"/> <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> <skills> </skills> <drops> <category id="1"><drop itemid="6661" min="1" max="1" chance="300000"/></category> <category id="2"><drop itemid="3485" min="40" max="40" chance="1000000"/></category> <category id="3"><drop itemid="3485" min="40" max="40" chance="1000000"/></category> <category id="4"><drop itemid="3485" min="40" max="40" chance="1000000"/></category> <category id="5"><drop itemid="3485" min="40" max="40" chance="1000000"/></category> <category id="6"><drop itemid="3485" min="40" max="40" chance="1000000"/></category> <category id="7"><drop itemid="6577" min="1" max="1" chance="1000000"/></category> <category id="7"><drop itemid="6578" min="1" max="1" chance="1000000"/></category> <category id="8"><drop itemid="6577" min="1" max="1" chance="1000000"/></category> <category id="8"><drop itemid="6578" min="1" max="1" chance="1000000"/></category> <category id="9"><drop itemid="8762" min="1" max="1" chance="1000000"/></category> </drops> </npc>
  20. I've got a custom boss engine and whenever boss dies it uses this method: public void delete() { if (_lastSpawn == null) { return; } _lastSpawn.getLastSpawn().deleteMe(); _lastSpawn.stopRespawn(); SpawnTable.getInstance().deleteSpawn(_lastSpawn, false); _lastSpawn = null; setStatus(0); setRespawnTime((System.currentTimeMillis()/1000)+((getMinutes()*60) + (randInt(0, (int)getDelay()*60)))); updateDbResp(getNpcId(), getRespawnTime()+(System.currentTimeMillis()/1000) , getStatus()); ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() { @Override public void run() { doSpawn(); } }, getRespawnTime()*1000); Announcements.announceToAll("Mighty Boss "+getName()+" has been killed!"); } but it doesn't drop anything,what do I have to change so it starts dropping items?I've watched other instances,but it requires instance and I just want to drop items on the ground and everyone can pick them up.
  21. Ok,I am going to try my best now to explain what I wanted and how I got it. This is how I get top player: PreparedStatement statement = con.prepareStatement("SELECT char_name,hero,obj_Id FROM characters ORDER BY zone_pvp DESC LIMIT 1"); So I wanted to create l2player instance out of it and use player.setHero(true); So I built a method which returns my l2player instance. public static L2PcInstance getPlayerById(int id){ final Collection<L2PcInstance> allPlayers = L2World.getInstance().getAllPlayers().values(); final int playersCount = allPlayers.size(); final L2PcInstance[] players = allPlayers.toArray(new L2PcInstance[playersCount]); for(int a = 0;a<playersCount;a++){ if(players[a].getObjectId() == id){ _log.log(Level.WARNING,"Player is online!"); return players[a]; } } return null; } Then I turned player into hero using this method: static void makeHero(Connection con,String name,int id) throws SQLException{ PreparedStatement makeHero = con.prepareStatement("UPDATE characters SET is_pvphero=?,hero=? WHERE char_name=?"); makeHero.setInt(1, 1); makeHero.setInt(2, 1); makeHero.setString(3, name); L2PcInstance player = getPlayerById(id); makeHero.executeUpdate(); makeHero.close(); if(player !=null){ player.setHero(true); player.broadcastUserInfo(); } } and added these lines to L2PcInstance,so players after restart are stil heroes: private static final String RESTORE_CHARACTER = "SELECT ............. is_pvphero FROM characters WHERE obj_id=?"; player.setHero(rset.getInt("is_pvphero")==1); I hope I made it a bit clearer. Could you tell me how to improve my code? And I have a question,when player becomes a hero through olympiad does hero column value in characters table is changed to 1?
×
×
  • Create New...