Jump to content

werlex

Members
  • Posts

    35
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by werlex

  1. i saw this L2PetInstance pet = (L2PetInstance) activeChar.getPet(); and i thought that this code with pet :D
  2. this is not for pet? when activechar get lvl 20 with pet exp will decrease by 2 for activechar?
  3. Horus, Firstly i said that iam just starting work with java, Secondly your code with attacker is wrong because i get error for attacker (with intrepid we was talking about this), Third what you help for me with this code? Intrepid said that need to put else, i put it and everything okay then ... what you said more than "1 is neutral, we can dont write it". If you need that credits ill write ... its not very hard for me ...
  4. that code was not finished :D with my java knoweledge i need your help :D
  5. horus sorry for my english ... when character reach level 76 then exp rate will be 5 for him... lakis Dont spam ...
  6. Hello, here is my first share. This code is good when you want to do something like when mob lvl is 76 or bigger, exp rate can be smaller. Iam using L2jarchid. open com.l2jarchid.gamesserver.model.actor.L2npc.java Find: public int getExpReward() { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } REPLACE IT TO: public int getExpReward() { if (getLevel() > 75) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 1); } else { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } } rateXp * 1 is exp rate you can change it to 20 or etc (number only change)... This code is when mob lvl is 76 or bigger exp rate will be 1... if you want to do intervals like from 52 to 65 - 20 exp , 65-76 - 10 exp 76 or bigger - 5 exp rate ... write this code public int getExpReward() { if (getLevel() > 52 && getLevel() < 66) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 20); } if (getLevel() > 66 && getLevel() < 75) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 10); } if (getLevel() > 75) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 5); } else { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } } I think this code will be usefull Credits to Intrepid,Horus and me ... P.S. if someone will share code for character exp(when character reach 76lvl then exp for him will count as 1) will be great :) public int getExpReward() { L2Attackable attacker; if (getLevel() > 75) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 5); } else { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } } if some1 can test write feedback (i dont test it, maybe it work, for characters lvl)
  7. if character leve <76 , he get's only exp from <76 mobs ... this return; i think dont help me yea? ... maybe is possible to make something like when mob level lover 3 levels than character level then character will dont get exp ?
  8. no sorry for my mistake everything is ok ... just when mob is 75 level xp rate is 200 ... when mob is 76 exp rate is 1 exp ... everything ok just now need to think how to do when lvl mob is lover than 76 people dont get exp ....
  9. if (getLevel() > 76) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 1); } else { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } } with this code when mob is 76 lvl he 1 exp rate .... thank you now just need to do when level 76 or lover dont get exp from lover mobs ... its possible?
  10. if (getLevel() > 76) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 1); } else { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } } something like this ? or with horus offer?
  11. put here your buffer ... because we dont know what kind of buffs you are using ... clan hall or normal...
  12. yes ... dont need that 1?
  13. hi i have edited model.actor.l2npc.java file if (getLevel() > 76) { double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * 1.0); } double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } i want to do something like after 76lvl exp rate become 1 exp ... maybe some1 can help me with this thing ? Real code Real code [code] } double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null); return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP); } [/code]
  14. thank you very much ... i will try this ... :)
  15. dont need new soe put into sql databasE? Thank you very much for this tutorial ....
  16. omg maybe dont spam and replty to the topic? from this u can understand that iam working with eclipse and just dont know where is that changes ...
  17. its l2j archid 1055 rev, added just few custom and fix exploits... forum have about 10 threads with same fixes and more customs ... but anyway kkep up the date ...
  18. in gameserver console any errors you have? what pack you using and rev?
  19. look in geodata folder just put these files yea? or need do put text file in that folder with other fileS?
  20. or its possible in combat zone make, when kills each other they get pvp kill? i looked at l2pcinstance but didnt find nothing with zone_pvp increasepvpkills ... maybe look in other place?
  21. L2Characters private long _timeFirstKilled = 0; public boolean getFirstTimeKilled(L2PcInstance target) { long _curTime = System.currentTimeMillis(); if ((_timeFirstKilled + 240000) > _curTime) return true; else if ((_timeFirstKilled + 240000) < _curTime) _curTime = System.currentTimeMillis(); return false; } i did this in l2characters , this code is cant target last target yea? but need to not increase pvp kills count string pvp1=get.... string pvp2=get... if (pvp1.equals(pvp2)) { this.sendMessage("Farm is punishable with Ban! Gm informed."); _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and " + target.getName() +". SAME Target."); return; } but this wouldnot help me yea? maybe could help coz iam just learning java ...
  22. or its possible to make not increasing level but increasing expereance for each pvp?
  23. if((getobjectID() > 0 && target.getObjectid() > 0 && getobjectid() == target.getobjectid())) { this.sendMessage("Farm is punishable with Ban! Gm informed."); _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and" + target.getName() +". same target"); return; } this code will works?
  24. thanks ... maybe you can say where we can find tutorial how to make own phpbb3 template?
  25. or this code is good when i want just custom title for all? + // Custom Pk Color System - Start + public void updatePkColor(int pkKillAmount) + { + //Check if the character has GM access and if so, let them be, like above. + if (isGM()) + return; + { + if ((pkKillAmount >= (0))) + { + getAppearance().setTitleColor(#FFF333); + } + } + } + //Custom Pk Color System - End + @Override public final void updateEffectIcons(boolean partyOnly) { // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); } @@ -5047,6 +5120,10 @@ setPkKills(getPkKills() + 1); setKarma(getKarma() + newKarma); + //Update the character's title color if they reached any of the 5 PK levels. + updatePkColor(getPkKills()); + broadcastUserInfo(); + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); }
×
×
  • Create New...