Everything posted by DnR
-
[Help]Problem with Java code
In Olympiad.java,change the code to be like this: L2ItemInstance item = noble.getInventory().getItemByObjectId(_objectId); int lolz0r = item.getItem().getCrystalType(); if (item != null) { if (lolz0r == L2Item.CRYSTAL_S || lolz0r == L2Item.CRYSTAL_S80 || lolz0r == L2Item.CRYSTAL_S84) { noble.sendMessage("You cannot use S grade equipment at the Grand Olympiad games."); return false; } }
-
[Help]Problem with Java code
lol,import for l2item doesnt exist either.import com.l2jserver.gameserver.templates.item.L2Item; Revert my previous post and add the import.
-
[Guide]Pos katalavenete tous nooboserver
An diavasete to first post kala,prepei na arxisete na katalavainete oti oi ellines einai autoi pou ftiaxnoun ta xeirotera "games". Apla,exoume ta megalytera noobakia ston kosmo,dustuxws... Servers tou style paliwn servers px. njoy,fgames,mafia,core ta lene ola.
-
[Help]Problem with Java code
Instead of this:if (lolz0r == L2Item.CRYSTAL_S || lolz0r == L2Item.CRYSTAL_S80 || lolz0r == L2Item.CRYSTAL_S84) try this:if (lolz0r == L2Item.CRYSTAL_S) Compile,login to check if it works and i ll modify it for s80 and s84.
-
[Help]Problem with Java code
Add the import for l2iteminstance in Olympiad.java. Multiple markerS? Oo?It works normally for me... Add the import i told you,and check it again.
-
[Help]Problem with Java code
Not sure about epilogue,try this: import com.l2jserver.Config; import com.l2jserver.gameserver.GameTimeController; +import com.l2jserver.gameserver.model.olympiad.Olympiad; Private int _object...you can add it here: public class Olympiad { private int _objectId; protected static final Logger _log = Logger.getLogger(Olympiad.class.getName()); protected static final Logger _logResults = Logger.getLogger("olympiad"); Has problem?what do you mean?
-
[Help]Problem with Java code
Try this, UseItem.java import net.sf.l2j.Config; +import net.sf.l2j.gameserver.Olympiad; import net.sf.l2j.gameserver.handler.IItemHandler; L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); if (item == null) return; + int lolz0r = item.getItem().getCrystalType(); + if (activeChar.isInOlympiadMode() || Olympiad.getInstance().isRegisteredInComp(activeChar) || +activeChar.getOlympiadGameId() > 0) + { + if (lolz0r == L2Item.CRYSTAL_S || lolz0r == L2Item.CRYSTAL_S80 || lolz0r == L2Item.CRYSTAL_S84) + { + activeChar.sendMessage("You may only use items up to Grade A in the Grand Olympiad Games."); + return; + } + } Olympiad.java public class Olympiad { /** * * @author ascharot * */ + private int _objectId; private class OlympiadGameTask implements Runnable { public L2OlympiadGame _game = null; if (!_inCompPeriod) { sm = new SystemMessage(SystemMessageId.THE_OLYMPIAD_GAME_IS_NOT_CURRENTLY_IN_PROGRESS); noble.sendPacket(sm); return false; } + L2ItemInstance item = noble.getInventory().getItemByObjectId(_objectId); + int lolz0r = item.getItem().getCrystalType(); + if (lolz0r == L2Item.CRYSTAL_S || lolz0r == L2Item.CRYSTAL_S80 || lolz0r == L2Item.CRYSTAL_S84) + { + noble.sendMessage("You cannot use S grade equipment at the Grand Olympiad games."); + return false; + }
-
[Help]Problem with Java code
Maaan,this variable is few lines below,it alrdy exists,dont add it again! Just add the code below that line. >_> if (activeChar.getActiveTradeList() != null) activeChar.cancelActiveTrade(); // NOTE: disabled due to deadlocks // synchronized (activeChar.getInventory()) // { L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); if (item == null) return; + int lolz0r = item.getItem().getCrystalType(); + if (activeChar.isInOlympiadMode() && lolz0r == L2Item.CRYSTAL_S) + { + activeChar.sendMessage("You cannot use S grade equipment at the Grand Olympiad games."); + return; + } if (item.isWear()) { // No unequipping wear-items return; }
-
[Help]Problem with Java code
This one is few lines below,thats what i told him.
-
[Help]Problem with Java code
Add it below this: L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
-
[Help]Problem with Java code
Change this: if (activeChar.isInOlympiadMode() && (weaponGrade != null || armorGrade != null) To: if (activeChar.isInOlympiadMode() && (weaponGrade != null || armorGrade != null)) My fault :P
-
[Help]Problem with Java code
Try this: int weaponGrade = activeChar.getActiveWeaponItem().getCrystalType(); int armorGrade = activeChar.getActiveChestArmorItem().getCrystalType(); - if (activeChar.isInOlympiadMode() && (weaponGrade == L2Item.CRYSTAL_S || armorGrade == L2Item.CRYSTAL_S)) + if (activeChar.isInOlympiadMode() && (weaponGrade != null || armorGrade != null) + { + if (weaponGrade == L2Item.CRYSTAL_S || armorGrade == L2Item.CRYSTAL_S)) { activeChar.sendMessage("You cannot use S grade equipment at the Grand Olympiad games."); return; } + }
-
[Help]Problem with Java code
Can you post the code from your UseItem here?
-
help me kapoia java codes
An 8es zita to java code pou 8es kai mporei kapoios apo dw na to ftiaksei gia sena,an dn einai kati duskolo.
-
Help-a hard one
Feature implemented,requesting lock 8)
-
Help-a hard one
You will need a dekarma for spamming.....
-
Help-a hard one
Guys,when i do transform,the removed skills' reuse time keeps passing. Is it possible to store cooldowns like log out?
-
Question-FloodProtector
I was wondering,would much usage of floodprotector affect server somehow? I mean that a player keeps flooding and protector gets activated many times.
-
[HELP]Kati diskolo..
Basika ego pou xw kamael,core support gia to multisell exei kai to Npc kai to merchant.
-
[SHARE]Raib Boss Gaterkeeper [Hellbound]
Hellbound can be the best one with the current implementions. Most ppl knew HB as the server with working skills up to IL.
-
[SHARE]Raib Boss Gaterkeeper [Hellbound]
Its cool but you have made an orthographical mistake. Its Raid Boss not Raib Boss.
-
help!
Na s pw,to xeis kairo to problima i simera?gt simera exei 29 ara logika 8a ebgainan oi heroes. An den yparxei problima ston server logika aurio 8a doulevei.
-
help!
Mporeis na kaneis paste ta configs tis oly toulaxiston edw? Btw,auto to item pou les s dinei noblesse status i mono to Blessing of Noblesse to skill?
-
Error while loading C6 Client
http://www.pccomputerease.com/l2-c6-full-textures-rapidshare.html download the textures and paste them in LineageII folder.
-
Error while loading C6 Client
As i see,there must be something wrong in Textures. Tried reinstalling? Or find this file somehow: L2Font-e.SmallFont-e