Ir para conteúdo
  • Cadastre-se

[ADM]Mystogan

Membro
  • Total de itens

    297
  • Registro em

  • Última visita

  • Prêmios recebidos

    1

Tudo que [ADM]Mystogan postou

  1. aconselho trocar sua system caso nao resolva e algum bug do seu proprio client do l2
  2. ja tentei a extensao fica na parte do ZoneType.java return (Player) PLAGUESEEKER_LAIR.isCharacterInZone().stream().filter(creature -> creature instanceof Player && isHealer((Player) creature) && creature.isDead()).findFirst().orElse(null); tenho que atualizar toda essa linha para o mod funcionar ele esta para uma versao antigo da Acis as mais novas ja mudou todos os imports praticamente
  3. Galerinha queria saber qual eo comando referente a for (Creature creature : PLAGUESEEKER_LAIR.getCharactersInside()) "getCharactersInside" que a L2jAcis utiliza para por no local estou tentando adaptar esse mod mais estou agarrado nesse comando...
  4. sim sim a questao e esse enchant ai em especifico e tipo glow de sword mais ele tem essas pontas na frente como se a sword tivesse um dente antes da ponta
  5. as quest estao Ok os items de grade teria que modificar algumas coisas no core do faker para ele utilizar items de diferentes grades mais fica meio tenso o fato dos que farma nao bater em alguem flag "algo simples de concerta" se alguem souber adaptar o mod L2jRoboto para a network fico muito grato em montar uma source junto
  6. sera que teria como por ao menos o audio de quando ele bate ? rsrs ta meio estranho
  7. entendo mais acredito que os bots farmando e batendo pvp da um ar mais real. tenho ate a linha aqui em java se vc quiser aplicar
  8. duas pequenas duvidas vc nao poderia por o mesmo faker para bater pvp e farma ? outra coisinha eque os fakesplayers estao com um limite entre 116 a 124 começa a dar erro no gameserver
  9. alguem tem a lista de todos os efeitos de enchant do L2 Interlude ou apenas desse da foto abaixo ? [Hidden Content]
  10. poderia concerta o core eo Data pack do C5 ?
  11. Estou com o seguinte problema na Rev L2jLisvus nao sei oque pode estar ocorrendo de errado meu amigo tenta logar pelo hamachi em meu servidor nao cria a conta da apenas o aviso caso ele tente inumeras vezes o FloodProtection acusa as tentativas vindas do IP dele. Assim esta no Loginserver # This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname ExternalHostname=25.10.93.136 # This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname InternalHostname=25.10.93.136 # Bind ip of the loginserver, use * to bind on all available IPs LoginserverHostname=25.10.93.136 LoginserverPort=2106 # How many times you can provide an invalid account/pass before the IP gets banned LoginTryBeforeBan=10 # Time you won't be able to login back again after LoginTryBeforeBan tries to login. Provide a value in seconds. # Default 10min. (600) LoginBlockAfterBan=600 GMMinLevel=100 # The address on which login will listen for GameServers, use * to bind on all available IPs LoginHostname=25.10.93.136 # The port on which login will listen for GameServers LoginPort=9014 # If set to true any GameServer can register on your login's free slots AcceptNewGameServer = True # If false, the licence (after the login) will not be shown # It is highly recommended for Account Security to leave this option as default (True) ShowLicence = True # Database info Driver=com.mysql.jdbc.Driver #Driver=org.hsqldb.jdbcDriver #Driver=com.microsoft.sqlserver.jdbc.SQLServerDriver URL=jdbc:mysql://localhost/l2jdb #URL=jdbc:hsqldb:hsql://localhost/l2jdb #URL=jdbc:sqlserver://localhost/database=l2jdb/user=sa/password= Login=root Password= MaximumDbConnections=10 # Connection close time. # Default: 60000 ConnectionCloseTime = 60000 # Useable values: "true" - "false", use this option to choose whether accounts will be created # automatically or not. AutoCreateAccounts=True # Datapack root directory. # Defaults to current directory from which the server is started. DatapackRoot = . # ============================================================== # Test server setting, shoudnt be touched in online game server # ============================================================== Debug = False Assert = False Developer = False #FloodProtection. time in ms EnableFloodProtection=True FastConnectionLimit=15 NormalConnectionTime=700 FastConnectionTime=350 MaxConnectionPerIP=50 Esse aqui eo gameserver # Bind ip of the gameserver, use * to bind on all available IPs GameserverHostname=25.10.93.136 GameserverPort=7777 # This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname # If this ip is resolvable by Login just leave * ExternalHostname=25.10.93.136 # This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname # If this ip is resolvable by Login just leave * InternalHostname=25.10.93.136 # The Loginserver host and port LoginPort=9014 LoginHost=25.10.93.136 # This is the server id that the gameserver will request (i.e. 0 is Bartz) RequestServerID = 1 # If set to true, the login will give an other id to the server if the requested id is allready reserved AcceptAlternateID = True # Database info Driver=com.mysql.jdbc.Driver #Driver=org.hsqldb.jdbcDriver #Driver=com.microsoft.sqlserver.jdbc.SQLServerDriver URL=jdbc:mysql://localhost/l2jdb #URL=jdbc:hsqldb:hsql://localhost/l2jdb #URL=jdbc:sqlserver://localhost/database=l2jdb/user=sa/password= Login=root Password= MaximumDbConnections=10 # The time before a database connection closes (in milliseconds) # If a query takes longer to execute than the time defined here, the server will throw "Unclosed Connection!" error. # If you get often this error message, try increasing this. # Default: 60000ms ConnectionCloseTime = 60000 # Datapack root directory. # Defaults to current directory from which the server is started unless the below line is uncommented. # WARNING: <u><b><font color="red">If the specified path is invalid, it will lead to multiple errors!</font></b></u> #Default: . DatapackRoot = . # Define character name template # Example to use only : CnameTemplate=[A-Z][a-z]{3,3}[A-Za-z0-9]* # will allow names with first capital letter, next three small letters, # and any (capital or not) letter or number, like ZbigN1eW # Most rational to have CnameTemplate=[A-Z][a-z]* # meaning names only of letters with first one capital, like Zbigniew # Default .* - any namy of any symbols CnameTemplate=.* PetNameTemplate=.* # Maximum number of chars per account - Default 7 (0 = unlimited [7 is the client limit]) CharMaxNumber = 7 # Define how many players are allowed to play simultaneously on your server. MaximumOnlineUsers=100 # Minimum and maximum protocol revision that server allow to connect. # You must keep MinProtocolRevision <= MaxProtocolRevision. MinProtocolRevision = 656 MaxProtocolRevision = 665 ai o L2.ini [URL] Protocol=unreal ProtocolDescription=Unreal Protocol Name=Player Map=Index.unr LocalMap=Entry.unr Host= Portal= MapExt=unr EXEName=l2.exe SaveExt=usa Port=7777 Class=LineageWarrior.MFighter ServerAddr=25.10.93.136 IsL2NetLogin=True IsL2Console=True IsL2Seamless=True IsL2Projector=True ISL2Mark=2 ForceAspectRatio=False AspectRatio=1.334 IsDefaultShaodw=False IsUnderWaterEffect=False IsUseCommand=True L2VersionCheck=false IsL2MemLog=False L2ThreadFilter=0 L2TestServer=false EnablePurgeLevel=True SharedSky=True L2MaxPawnResourceLoad=1.0 L2UseKeyCrypt=false L2UseReplayManager=true EnableSecondWindow=true [L2WaterEffect] ColorReference=(A=180,R=38,G=56,B=64,RR=150) EffectResolution=512 [LanguageSet] Language=0 [FontSet] ;Font=L2Font.Japan ;Glyph=Japan.gly Font=L2Font.gulim Glyph=gulim.gly [CharacterDisplay] Name=true Dist=1000 [ClippingRange] PawnMax=3.0 PawnMin=1.5 AntiPortal=1.5 Terrain=8.0 StaticMesh=4.0 Projector=0.2 StaticMeshLod=5.0 Pawn=2.0 Actor=4.0 [AutoLogOn] IsL2AutoLogOn=Ture L2ID=zodiac L2Passwd=zodiac L2Slot=7 [FirstRun] FirstRun=2110 [Engine.Engine] RenderDevice=D3DDrv.D3DRenderDevice ;RenderDevice=Engine.NullRenderDevice ;RenderDevice=OpenGLDrv.OpenGLRenderDevice AudioDevice=ALAudio.ALAudioSubsystem ;AudioDevice=XboxAudio.XboxAudioSubsystem NetworkDevice=IpDrv.TcpNetDriver DemoRecordingDevice=Engine.DemoRecDriver Console=Engine.Console DefaultPlayerMenu=UDebugMenu.UDebugRootWindow Language=int GameEngine=Engine.GameEngine EditorEngine=Editor.EditorEngine GUIController=Engine.BaseGUIController ;DefaultGame=WarfareGame.WarfareTeamGame ;DefaultServerGame=WarfareGame.WarfareTeamGame DefaultGame=Engine.GameInfo DefaultServerGame=Engine.GameInfo ViewportManager=WinDrv.WindowsClient ;ViewportManager=XboxDrv.XboxClient ;ViewportManager=SDLDrv.SDLClient Render=Render.Render Input=Engine.Input Canvas=Engine.Canvas DefaultPlayerController=Engine.LineagePlayerController L2NetHandler=Engine.NetHandler L2Console=NWindow.ConsoleWnd L2Font=NWindow.L2Font [Core.System] PurgeCacheDays=30 SavePath=../Save CachePath=../Cache CacheExt=.uxx Paths=../System/*.u Paths=../StaticMeshes/*.usx Paths=../Textures/*.utx Paths=../Sounds/*.uax Paths=../Voice/*.uax Paths=../Maps/*.unr ;Paths=../Music/*.umx Paths=../Animations/*.ukx Paths=../SysTextures/*.utx Paths=../Animations/*.usk Paths=../Saves/*.uvx Suppress=DevLoad Suppress=DevSave Suppress=DevNetTraffic Suppress=DevGarbage Suppress=DevKill Suppress=DevReplace Suppress=DevCompile Suppress=DevBind Suppress=DevBsp [Engine.GameEngine] CacheSizeMegs=32 UseSound=True ;ServerActors=IpDrv.UdpBeacon ;ServerActors=IpServer.UdpServerQuery ;ServerActors=IpServer.UdpServerUplink MasterServerAddress=unreal.epicgames.com MasterServerPort=27900 ;ServerActors=UWeb.WebServer ServerPackages=AmbientCreatures ;ServerPackages=WarEffects ;ServerPackages=Decorations ServerPackages=GamePlay ServerPackages=UnrealGame ;ServerPackages=WarfareGame ;ServerPackages=WarClassLight ;ServerPackages=WarClassHeavy ;ServerPackages=WarClassMisc ;ServerPackages=Pickups [WinDrv.WindowsClient] WindowedViewportX=640 WindowedViewportY=480 FullscreenViewportX=1024 FullscreenViewportY=768 MenuViewportX=640 MenuViewportY=480 Brightness=0.800000 Contrast=0.700000 Gamma=0.800000 UseJoystick=True CaptureMouse=True StartupFullscreen=True UseWindowFrame=True ScreenFlashes=True NoLighting=False MinDesiredFrameRate=35.000000 Decals=True Coronas=True DecoLayers=True Projectors=True NoDynamicLights=False ReportDynamicUploads=False TextureDetailInterface=Higher TextureDetailTerrain=Higher TextureDetailWeaponSkin=Higher TextureDetailPlayerSkin=Higher TextureDetailWorld=Higher TextureDetailRenderMap=Higher TextureDetailLightmap=Higher NoFractalAnim=False ScaleHUDX=0.0 [SDLDrv.SDLClient] WindowedViewportX=640 WindowedViewportY=480 FullscreenViewportX=800 FullscreenViewportY=600 MenuViewportX=640 MenuViewportY=480 Brightness=0.800000 Contrast=0.700000 Gamma=0.800000 UseJoystick=True JoystickNumber=0 IgnoreHat=False JoystickHatNumber=0 CaptureMouse=True StartupFullscreen=True ScreenFlashes=True NoLighting=False MinDesiredFrameRate=35.000000 Decals=True Coronas=True DecoLayers=True Projectors=True NoDynamicLights=False ReportDynamicUploads=False TextureDetailInterface=Normal TextureDetailTerrain=Normal TextureDetailWeaponSkin=Normal TextureDetailPlayerSkin=Normal TextureDetailWorld=Normal TextureDetailRenderMap=Normal TextureDetailLightmap=UltraHigh NoFractalAnim=False [Engine.Player] ConfiguredInternetSpeed=10000 ConfiguredLanSpeed=20000 [ALAudio.ALAudioSubsystem] UseEAX=False Use3DSound=False UseDefaultDriver=True CompatibilityMode=False UsePrecache=True ReverseStereo=false Channels=32 MusicVolume=0.1 AmbientVolume=1.0 SoundVolume=1.0 DopplerFactor=1.0 Rolloff=0.5 TimeBetweenHWUpdates=15 DisablePitch=False LowQualitySound=False [IpDrv.TcpNetDriver] AllowDownloads=True ConnectionTimeout=15.0 InitialConnectTimeout=500.0 AckTimeout=1.0 KeepAliveTime=0.2 MaxClientRate=20000 SimLatency=0 RelevantTimeout=5.0 SpawnPrioritySeconds=1.0 ServerTravelPause=4.0 NetServerMaxTickRate=20 LanServerMaxTickRate=35 DownloadManagers=IpDrv.HTTPDownload DownloadManagers=Engine.ChannelDownload [IpDrv.HTTPDownload] RedirectToURL= ProxyServerHost= ProxyServerPort=3128 UseCompression=True [Engine.DemoRecDriver] DemoSpectatorClass=Warriors.CHSpectator MaxClientRate=25000 ConnectionTimeout=15.0 InitialConnectTimeout=500.0 AckTimeout=1.0 KeepAliveTime=1.0 SimLatency=0 RelevantTimeout=5.0 SpawnPrioritySeconds=1.0 ServerTravelPause=4.0 NetServerMaxTickRate=60 LanServerMaxTickRate=60 [Engine.GameReplicationInfo] ServerName=Another Unreal Server ShortName=Unreal Server [IpDrv.TcpipConnection] SimPacketLoss=0 SimLatency=0 [IpServer.UdpServerQuery] GameName=ut [IpDrv.UdpBeacon] DoBeacon=True BeaconTime=0.50 BeaconTimeout=5.0 BeaconProduct=ut [XboxDrv.XboxClient] TextureDetail=Medium SkinDetail=Medium LightmapDetail=High TextureMinLOD=6 TextureMaxLOD=9 Brightness=0.8 Contrast=0.7 Gamma=0.8 NoFractalAnim=True [XBoxAudio.XBoxAudioSubsystem] ReverseStereo=False Channels=32 MusicVolume=1.0 SoundVolume=1.0 AmbientFactor=1.0 UsePrecache=True [D3DDrv.D3DRenderDevice] DetailTextures=True HighDetailActors=True SuperHighDetailActors=True UsePrecaching=True UseTrilinear=True AdapterNumber=-1 ReduceMouseLag=True UseTripleBuffering=False UseHardwareTL=True UseHardwareVS=True UseCubemaps=True DesiredRefreshRate=60 UseCompressedLightmaps=True UseStencil=False Use16bit=False Use16bitTextures=False MaxPixelShaderVersion=255 UseVSync=False LevelOfAnisotropy=1 DetailTexMipBias=0.8 DefaultTexMipBias=-0.5 UseNPatches=False TesselationFactor=1.0 CheckForOverflow=False [OpenGLDrv.OpenGLRenderDevice] DetailTextures=True HighDetailActors=True SuperHighDetailActors=True UsePrecaching=True UseCompressedLightmaps=True UseTrilinear=True UseStencil=False MaxTextureUnits=8 VARSize=32 ReduceMouseLag=False [Engine.NullRenderDevice] DetailTextures=True HighDetailActors=True SuperHighDetailActors=True UsePrecaching=True UseCompressedLightmaps=True UseStencil=False [Editor.EditorEngine] UseSound=True CacheSizeMegs=32 GridEnabled=True SnapVertices=False SnapDistance=10.000000 GridSize=(X=16.000000,Y=16.000000,Z=16.000000) RotGridEnabled=True RotGridSize=(Pitch=1024,Yaw=1024,Roll=1024) GameCommandLine=-log FovAngleDegrees=90.000000 GodMode=True AutoSave=True AutoSaveTimeMinutes=5 AutoSaveIndex=6 UseAxisIndicator=True MatineeCurveDetail=0.1 LoadEntirePackageWhenSaving=0 EditPackages=Core EditPackages=Engine EditPackages=Fire EditPackages=Editor EditPackages=UWindow EditPackages=UnrealEd EditPackages=IpDrv EditPackages=GamePlay EditPackages=LineageEffect EditPackages=LineageWarrior EditPackages=LineageNpc EditPackages=LineageMonster EditPackages=LineageMonster2 EditPackages=LineageVehicle EditPackages=LineageDeco EditPackages=LineageEnv EditPackages=UDebugMenu ;EditPackages=WarEffects ;EditPackages=Decorations ;EditPackages=WarfareGame ;EditPackages=IHVDemoContent ;EditPackages=Pickups ;EditPackages=WarClassLight ;EditPackages=WarClassHeavy ;EditPackages=WarClassMisc ;EditPackages=AmbientCreatures ;EditPackages=Vehicles ;EditPackages=UPreview [UMenu.UnrealConsole] RootWindow=UMenu.UMenuRootWindow UWindowKey=IK_Esc ShowDesktop=True [UMenu.UMenuMenuBar] ShowHelp=True GameUMenuDefault=UTMenu.UTGameMenu MultiplayerUMenuDefault=UTMenu.UTMultiplayerMenu OptionsUMenuDefault=UTMenu.UTOptionsMenu [Engine.GameInfo] bLowGore=False bVeryLowGore=False [UWeb.WebServer] ;Applications[0]=UTServerAdmin.UTServerAdmin ;ApplicationPaths[0]=/ServerAdmin ;Applications[1]=UTServerAdmin.UTImageServer ;ApplicationPaths[1]=/images DefaultApplication=0 bEnabled=False [Engine.LevelInfo] PhysicsDetailLevel=PDL_Medium [Engine.Console] ConsoleKey=9 [WindowPositions] GameLog=(X=0,Y=0,XL=512,YL=256)
  12. Nao estou com sorte. estou com esse erro agora para dar Chekout no project... [Hidden Content]
  13. Obrigado ambos estavao com erro importanto um jdk 1.8.0_151 agr ajustei ao meu 1.8.0_610 funcionou certinho obrigado mesmo tayran agr posso voltar ao projeto C4
  14. [Hidden Content] ai esta a foto do erro porem a tecla F4 não abriu nem uma janela
  15. entendo mais agora quando eu clico em compilar da o seguinte erro JDK (1.8) needed to run this Ant target is incorrectly configured. Please update your settings in the Project Structure dialog.
  16. Tayran sabe resolver esse erro ? [Hidden Content] isso aparece apos clicar em Fix it. [Hidden Content]
  17. estou tentando adaptar um script de vote aqui se der certo te passo ele... alguem ai esta com um problema de nao atualizar o dinheiro depois de comprar algo na loja de itens ?
  18. eu uso a lisvus C4 arrumei maior parte do site mais agr ao comprar os itens ele desconta o valor e nao entrega nada vou dar uma lida nesse arquivo ja que ele que e reponsavel pelo ato de entregar items ... obrigado
  19. obrigado fiz aqui uma coisa agr que estou com erro e nao esta acusando em nada eu compro os itens pelo site mais nao estao entregando na minha conta oque poderia estar causando isso ?
  20. painel muito bacana acabo de conseguir adaptar ele todo para a rev l2jlisvus so nao consegui achar onde alterar o enchant limitie gostaria de por o +10 no lugar do +16 e tb o valor do nobles limpar pk etc pf ficaria mt grato
  21. Aqui o arquivo "RequestEnchantItem.java" completo /* * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * [Hidden Content] */ package net.sf.l2j.gameserver.clientpackets; import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.Inventory; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.*; import net.sf.l2j.gameserver.templates.L2Item; import net.sf.l2j.gameserver.templates.L2WeaponType; import net.sf.l2j.gameserver.util.IllegalPlayerAction; import net.sf.l2j.gameserver.util.Util; import net.sf.l2j.util.Rnd; import java.util.logging.Logger; public class RequestEnchantItem extends L2GameClientPacket { protected static final Logger _log = Logger.getLogger(Inventory.class.getName()); private static final String _C__58_REQUESTENCHANTITEM = "[C] 58 RequestEnchantItem"; private static final int[] crystalScrolls = { 731, 732, 949, 950, 953, 954, 957, 958, 961, 962 }; private int _objectId; @Override protected void readImpl() { _objectId = 0; try { _objectId = readD(); } catch (Exception e) { } } @Override public void runImpl() { L2PcInstance activeChar = getClient().getActiveChar(); if ((activeChar == null) || (_objectId == 0)) { return; } if (activeChar.isProcessingTransaction() || (activeChar.getPrivateStoreType() != 0)) { activeChar.sendPacket(new SystemMessage(1688)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem(); if ((item == null) || (scroll == null)) { activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } // can't enchant rods and hero weapons if ((item.getItem().getItemType() == L2WeaponType.ROD) || (!Config.ALLOW_HERO_ENCHANT && (item.getItemId() >= 6611) && (item.getItemId() <= 6621)) || ((item.getItemId() >= 7816) && (item.getItemId() <= 7831))) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if (item.isWear()) { Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } switch (item.getLocation()) { case INVENTORY: case PAPERDOLL: { if (item.getOwnerId() != activeChar.getObjectId()) { activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } break; } default: { Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to use enchant Exploit!", IllegalPlayerAction.PUNISH_KICKBAN); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } } if (activeChar.getActiveWarehouse() != null) { activeChar.setActiveWarehouse(null); } int itemType2 = item.getItem().getType2(); boolean blessedScroll = false; boolean enchantItem = false; int crystalId = 0; /** pretty code ;D */ switch (item.getItem().getCrystalType()) { case L2Item.CRYSTAL_S: crystalId = 1462; switch (scroll.getItemId()) { case 959: case 961: case 6577: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 960: case 962: case 6578: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_A: crystalId = 1461; switch (scroll.getItemId()) { case 729: case 731: case 6569: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 730: case 732: case 6570: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_B: crystalId = 1460; switch (scroll.getItemId()) { case 947: case 949: case 6571: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 948: case 950: case 6572: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_C: crystalId = 1459; switch (scroll.getItemId()) { case 951: case 953: case 6573: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 952: case 954: case 6574: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_D: crystalId = 1458; switch (scroll.getItemId()) { case 955: case 957: case 6575: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 956: case 958: case 6576: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; } if (!enchantItem) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } // Get the scroll type - Yesod if ((scroll.getItemId() >= 6569) && (scroll.getItemId() <= 6578)) { blessedScroll = true; } else { for (int crystalscroll : crystalScrolls) { if (scroll.getItemId() == crystalscroll) { blessedScroll = true; } break; } } int chance = 0; int maxEnchantLevel = 0; if (item.getItem().getType2() == L2Item.TYPE2_WEAPON) { if (blessedScroll) { chance = Config.BLESSED_ENCHANT_CHANCE_WEAPON; } else { chance = Config.ENCHANT_CHANCE_WEAPON; } maxEnchantLevel = Config.ENCHANT_MAX_WEAPON; } else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR) { if (blessedScroll) { chance = Config.BLESSED_ENCHANT_CHANCE_ARMOR; } else { chance = Config.ENCHANT_CHANCE_ARMOR; } maxEnchantLevel = Config.ENCHANT_MAX_ARMOR; } else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY) { if (blessedScroll) { chance = Config.BLESSED_ENCHANT_CHANCE_JEWELRY; } else { chance = Config.ENCHANT_CHANCE_JEWELRY; } maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY; } if (item.getItem().getType2() == L2Item.TYPE2_WEAPON) { if (blessedScroll) { chance = Config.CRYSTAL_ENCHANT_CHANCE_WEAPON; } maxEnchantLevel = Config.CRYSTALENCHANT_MAX_WEAPON; } else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR) { if (blessedScroll) { chance = Config.CRYSTAL_ENCHANT_CHANCE_ARMOR; } maxEnchantLevel = Config.CRYSTALENCHANT_MAX_ARMOR; } else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY) { if (blessedScroll) { chance = Config.CRYSTAL_ENCHANT_CHANCE_JEWELRY; } else { chance = Config.CRYSTAL_ENCHANT_CHANCE_JEWELRY; } maxEnchantLevel = Config.CRYSTALENCHANT_MAX_JEWELRY; } if ((item.getEnchantLevel() >= maxEnchantLevel) && (maxEnchantLevel != 0)) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } scroll = activeChar.getInventory().destroyItem("Enchant", scroll, activeChar, item); if (scroll == null) { activeChar.sendPacket(new SystemMessage(SystemMessage.NOT_ENOUGH_ITEMS)); Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a scroll he doesnt have", Config.DEFAULT_PUNISH); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if ((item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX) || ((item.getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR) && (item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL))) { chance = 100; } boolean failed = false; SystemMessage sm; if (Rnd.get(100) < chance) { synchronized (item) { if (item.getOwnerId() != activeChar.getObjectId()) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if ((item.getLocation() != L2ItemInstance.ItemLocation.INVENTORY) && (item.getLocation() != L2ItemInstance.ItemLocation.PAPERDOLL)) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if (item.getEnchantLevel() == 0) { sm = new SystemMessage(SystemMessage.S1_SUCCESSFULLY_ENCHANTED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessage.S1_S2_SUCCESSFULLY_ENCHANTED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } item.setEnchantLevel(item.getEnchantLevel() + 1); item.updateDatabase(); } } else { failed = true; if (!blessedScroll) { if (item.getEnchantLevel() > 0) { sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_S2_EVAPORATED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_EVAPORATED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } if (item.isEquipped()) { if (item.getEnchantLevel() > 0) { sm = new SystemMessage(SystemMessage.EQUIPMENT_S1_S2_REMOVED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessage.S1_DISARMED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot()); InventoryUpdate iu = new InventoryUpdate(); for (L2ItemInstance element : unequiped) { iu.addModifiedItem(element); } activeChar.sendPacket(iu); activeChar.broadcastUserInfo(); } int count = item.getCrystalCount() - ((item.getItem().getCrystalCount() + 1) / 2); if (count < 1) { count = 1; } L2ItemInstance destroyItem = activeChar.getInventory().destroyItem("Enchant", item, activeChar, null); if (destroyItem == null) { activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } L2ItemInstance crystals = activeChar.getInventory().addItem("Enchant", crystalId, count, activeChar, destroyItem); sm = new SystemMessage(SystemMessage.EARNED_S2_S1_s); sm.addItemName(crystals.getItemId()); sm.addNumber(count); activeChar.sendPacket(sm); if (!Config.FORCE_INVENTORY_UPDATE) { InventoryUpdate iu = new InventoryUpdate(); if (destroyItem.getCount() == 0) { iu.addRemovedItem(destroyItem); } else { iu.addModifiedItem(destroyItem); } iu.addItem(crystals); activeChar.sendPacket(iu); } else { activeChar.sendPacket(new ItemList(activeChar, true)); } StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); activeChar.sendPacket(su); activeChar.broadcastUserInfo(); L2World.getInstance().removeObject(destroyItem); activeChar.sendPacket(new EnchantResult(1)); } else { activeChar.sendPacket(new SystemMessage(SystemMessage.BLESSED_ENCHANT_FAILED)); item.setEnchantLevel(0); item.updateDatabase(); activeChar.sendPacket(new EnchantResult(2)); } } sm = null; StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); activeChar.sendPacket(su); su = null; if (!failed) { activeChar.sendPacket(new EnchantResult(0)); } activeChar.sendPacket(new ItemList(activeChar, false)); // TODO update only the enchanted item activeChar.broadcastUserInfo(); activeChar.setActiveEnchantItem(null); } /* * (non-Javadoc) * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#getType() */ @Override public String getType() { return _C__58_REQUESTENCHANTITEM; } }
  22. Bem vamos la estou tentando desenvolver meu primeiro "Mod Java" da chance e do limite do crystal enchant para o L2jLisvus mais esta com um problema que as config não estão 100% apenas o limite esta Ok a chance não esta oque poderia ser ? Other.properties # % Chance of succeding to enchant an item when it has a chance of breaking EnchantChanceWeapon = 65 EnchantChanceArmor = 65 EnchantChanceJewelry = 65 # % Chance of succeding to enchant an item without a chance of breaking BlessedEnchantChanceWeapon = 70 BlessedEnchantChanceArmor = 70 BlessedEnchantChanceJewelry = 70 +# Crystal Scroll By [ADM]Mystogan +CrystalEnchantChanceWeapon = 100 +CrystalEnchantChanceArmor = 100 +CrystalEnchantChanceJewelry = 100 # Enchant limit [default = 0 (unlimited)] EnchantMaxWeapon = 20 EnchantMaxArmor = 20 EnchantMaxJewelry = 20 +# Crystal Enchant limit By [ADM]Mystogan [default = 0 (unlimited)] +CrystalEnchantMaxWeapon = 10 +CrystalEnchantMaxArmor = 8 +CrystalEnchantMaxJewelry = 8 Config.java BLESSED_ENCHANT_CHANCE_JEWELRY = Integer.parseInt(otherSettings.getProperty("BlessedEnchantChanceJewelry", "54")); + CRYSTAL_ENCHANT_CHANCE_WEAPON = Integer.parseInt(otherSettings.getProperty("CrystalEnchantChanceWeapon", "100")); + CRYSTAL_ENCHANT_CHANCE_ARMOR = Integer.parseInt(otherSettings.getProperty("CrystalEnchantChanceArmor", "100")); + CRYSTAL_ENCHANT_CHANCE_JEWELRY = Integer.parseInt(otherSettings.getProperty("CrystalEnchantChanceJewelry", "100")); /* limit on enchant */ ENCHANT_MAX_WEAPON = Integer.parseInt(otherSettings.getProperty("EnchantMaxWeapon", "25")); ENCHANT_MAX_ARMOR = Integer.parseInt(otherSettings.getProperty("EnchantMaxArmor", "25")); ENCHANT_MAX_JEWELRY = Integer.parseInt(otherSettings.getProperty("EnchantMaxJewelry", "25")); + CRYSTALENCHANT_MAX_WEAPON = Integer.parseInt(otherSettings.getProperty("CrystalEnchantMaxWeapon", "10")); + CRYSTALENCHANT_MAX_ARMOR = Integer.parseInt(otherSettings.getProperty("CrystalEnchantMaxArmor", "8")); + CRYSTALENCHANT_MAX_JEWELRY = Integer.parseInt(otherSettings.getProperty("CrystalEnchantMaxJewelry", "8")); public static int BLESSED_ENCHANT_CHANCE_JEWELRY; + public static int CRYSTAL_ENCHANT_CHANCE_WEAPON; + public static int CRYSTAL_ENCHANT_CHANCE_ARMOR; + public static int CRYSTAL_ENCHANT_CHANCE_JEWELRY; /** Maximum level of enchantment */ public static int ENCHANT_MAX_WEAPON; public static int ENCHANT_MAX_ARMOR; public static int ENCHANT_MAX_JEWELRY; + public static int CRYSTALENCHANT_MAX_WEAPON; + public static int CRYSTALENCHANT_MAX_ARMOR; + public static int CRYSTALENCHANT_MAX_JEWELRY; RequestEnchantItem.java maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY; } + if (item.getItem().getType2() == L2Item.TYPE2_WEAPON) + { + if (blessedScroll) + { + chance = Config.CRYSTAL_ENCHANT_CHANCE_WEAPON; + } + maxEnchantLevel = Config.CRYSTALENCHANT_MAX_WEAPON; + } + else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR) + { + if (blessedScroll) + { + chance = Config.CRYSTAL_ENCHANT_CHANCE_ARMOR; + } + maxEnchantLevel = Config.CRYSTALENCHANT_MAX_ARMOR; + } + else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY) + { + if (blessedScroll) + { + chance = Config.CRYSTAL_ENCHANT_CHANCE_JEWELRY; + } + else + { + chance = Config.CRYSTAL_ENCHANT_CHANCE_JEWELRY; + } + maxEnchantLevel = Config.CRYSTALENCHANT_MAX_JEWELRY; + } + if ((item.getEnchantLevel() >= maxEnchantLevel) && (maxEnchantLevel != 0)) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; }
  23. Alguem poderia fazer com que o Scroll Enchant Normal Falhar e voltar para o +0 como o Blessed Enchant Faz ? gostaria de fazer com que cada um tenha sua chance especifica /* * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * [Hidden Content] */ package net.sf.l2j.gameserver.clientpackets; import java.util.logging.Logger; import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.Inventory; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.EnchantResult; import net.sf.l2j.gameserver.serverpackets.InventoryUpdate; import net.sf.l2j.gameserver.serverpackets.ItemList; import net.sf.l2j.gameserver.serverpackets.StatusUpdate; import net.sf.l2j.gameserver.serverpackets.SystemMessage; import net.sf.l2j.gameserver.templates.L2Item; import net.sf.l2j.gameserver.templates.L2WeaponType; import net.sf.l2j.gameserver.util.IllegalPlayerAction; import net.sf.l2j.gameserver.util.Util; import net.sf.l2j.util.Rnd; public class RequestEnchantItem extends L2GameClientPacket { protected static final Logger _log = Logger.getLogger(Inventory.class.getName()); private static final String _C__58_REQUESTENCHANTITEM = "[C] 58 RequestEnchantItem"; private static final int[] crystalScrolls = { 731, 732, 949, 950, 953, 954, 957, 958, 961, 962 }; private int _objectId; @Override protected void readImpl() { _objectId = 0; try { _objectId = readD(); } catch (Exception e) { } } @Override public void runImpl() { L2PcInstance activeChar = getClient().getActiveChar(); if ((activeChar == null) || (_objectId == 0)) { return; } if (activeChar.isProcessingTransaction() || (activeChar.getPrivateStoreType() != 0)) { activeChar.sendPacket(new SystemMessage(1688)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem(); if ((item == null) || (scroll == null)) { activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } // can't enchant rods and hero weapons if ((item.getItem().getItemType() == L2WeaponType.ROD) || (!Config.ALLOW_HERO_ENCHANT && (item.getItemId() >= 6611) && (item.getItemId() <= 6621)) || ((item.getItemId() >= 7816) && (item.getItemId() <= 7831))) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if (item.isWear()) { Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } switch (item.getLocation()) { case INVENTORY: case PAPERDOLL: { if (item.getOwnerId() != activeChar.getObjectId()) { activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } break; } default: { Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to use enchant Exploit!", IllegalPlayerAction.PUNISH_KICKBAN); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } } if (activeChar.getActiveWarehouse() != null) { activeChar.setActiveWarehouse(null); } int itemType2 = item.getItem().getType2(); boolean blessedScroll = false; boolean enchantItem = false; int crystalId = 0; /** pretty code ;D */ switch (item.getItem().getCrystalType()) { case L2Item.CRYSTAL_S: crystalId = 1462; switch (scroll.getItemId()) { case 959: case 961: case 6577: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 960: case 962: case 6578: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_A: crystalId = 1461; switch (scroll.getItemId()) { case 729: case 731: case 6569: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 730: case 732: case 6570: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_B: crystalId = 1460; switch (scroll.getItemId()) { case 947: case 949: case 6571: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 948: case 950: case 6572: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_C: crystalId = 1459; switch (scroll.getItemId()) { case 951: case 953: case 6573: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 952: case 954: case 6574: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; case L2Item.CRYSTAL_D: crystalId = 1458; switch (scroll.getItemId()) { case 955: case 957: case 6575: if (itemType2 == L2Item.TYPE2_WEAPON) { enchantItem = true; } break; case 956: case 958: case 6576: if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) { enchantItem = true; } break; } break; } if (!enchantItem) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } // Get the scroll type - Yesod if ((scroll.getItemId() >= 6569) && (scroll.getItemId() <= 6578)) { blessedScroll = true; } else { for (int crystalscroll : crystalScrolls) { if (scroll.getItemId() == crystalscroll) { blessedScroll = true; } break; } } int chance = 0; int maxEnchantLevel = 0; if (item.getItem().getType2() == L2Item.TYPE2_WEAPON) { if (blessedScroll) { chance = Config.BLESSED_ENCHANT_CHANCE_WEAPON; } else { chance = Config.ENCHANT_CHANCE_WEAPON; } maxEnchantLevel = Config.ENCHANT_MAX_WEAPON; } else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR) { if (blessedScroll) { chance = Config.BLESSED_ENCHANT_CHANCE_ARMOR; } else { chance = Config.ENCHANT_CHANCE_ARMOR; } maxEnchantLevel = Config.ENCHANT_MAX_ARMOR; } else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY) { if (blessedScroll) { chance = Config.BLESSED_ENCHANT_CHANCE_JEWELRY; } else { chance = Config.ENCHANT_CHANCE_JEWELRY; } maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY; } if ((item.getEnchantLevel() >= maxEnchantLevel) && (maxEnchantLevel != 0)) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } scroll = activeChar.getInventory().destroyItem("Enchant", scroll, activeChar, item); if (scroll == null) { activeChar.sendPacket(new SystemMessage(SystemMessage.NOT_ENOUGH_ITEMS)); Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a scroll he doesnt have", Config.DEFAULT_PUNISH); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if ((item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX) || ((item.getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR) && (item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL))) { chance = 100; } boolean failed = false; SystemMessage sm; if (Rnd.get(100) < chance) { synchronized (item) { if (item.getOwnerId() != activeChar.getObjectId()) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if ((item.getLocation() != L2ItemInstance.ItemLocation.INVENTORY) && (item.getLocation() != L2ItemInstance.ItemLocation.PAPERDOLL)) { activeChar.sendPacket(new SystemMessage(SystemMessage.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } if (item.getEnchantLevel() == 0) { sm = new SystemMessage(SystemMessage.S1_SUCCESSFULLY_ENCHANTED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessage.S1_S2_SUCCESSFULLY_ENCHANTED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } item.setEnchantLevel(item.getEnchantLevel() + 1); item.updateDatabase(); } } else { failed = true; if (!blessedScroll) { if (item.getEnchantLevel() > 0) { sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_S2_EVAPORATED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_EVAPORATED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } if (item.isEquipped()) { if (item.getEnchantLevel() > 0) { sm = new SystemMessage(SystemMessage.EQUIPMENT_S1_S2_REMOVED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessage.S1_DISARMED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot()); InventoryUpdate iu = new InventoryUpdate(); for (L2ItemInstance element : unequiped) { iu.addModifiedItem(element); } activeChar.sendPacket(iu); activeChar.broadcastUserInfo(); } int count = item.getCrystalCount() - ((item.getItem().getCrystalCount() + 1) / 2); if (count < 1) { count = 1; } L2ItemInstance destroyItem = activeChar.getInventory().destroyItem("Enchant", item, activeChar, null); if (destroyItem == null) { activeChar.setActiveEnchantItem(null); activeChar.sendPacket(new EnchantResult(2)); return; } L2ItemInstance crystals = activeChar.getInventory().addItem("Enchant", crystalId, count, activeChar, destroyItem); sm = new SystemMessage(SystemMessage.EARNED_S2_S1_s); sm.addItemName(crystals.getItemId()); sm.addNumber(count); activeChar.sendPacket(sm); if (!Config.FORCE_INVENTORY_UPDATE) { InventoryUpdate iu = new InventoryUpdate(); if (destroyItem.getCount() == 0) { iu.addRemovedItem(destroyItem); } else { iu.addModifiedItem(destroyItem); } iu.addItem(crystals); activeChar.sendPacket(iu); } else { activeChar.sendPacket(new ItemList(activeChar, true)); } StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); activeChar.sendPacket(su); activeChar.broadcastUserInfo(); L2World.getInstance().removeObject(destroyItem); activeChar.sendPacket(new EnchantResult(1)); } else { activeChar.sendPacket(new SystemMessage(SystemMessage.BLESSED_ENCHANT_FAILED)); item.setEnchantLevel(0); item.updateDatabase(); activeChar.sendPacket(new EnchantResult(2)); } } sm = null; StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); activeChar.sendPacket(su); su = null; if (!failed) { activeChar.sendPacket(new EnchantResult(0)); } activeChar.sendPacket(new ItemList(activeChar, false)); // TODO update only the enchanted item activeChar.broadcastUserInfo(); activeChar.setActiveEnchantItem(null); } /* * (non-Javadoc) * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#getType() */ @Override public String getType() { return _C__58_REQUESTENCHANTITEM; } }
  24. Ola galera gostaria de tirar uma duvida com voces estou modificando as olympiadas para rodas sabado e domingo e entregar o hero na segunda deixando terça quarta quinta e sexta em tempo de espera alguem ai ja tem um codigo pronto para isso ? ou pode me informa que dia esta terminando a minha com o codigo conforme esta.... Calendar currentTime = Calendar.getInstance(); currentTime.add(Calendar.WEEK_OF_MONTH, 1); currentTime.set(Calendar.DAY_OF_MONTH, 1); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0); currentTime.set(Calendar.SECOND, 0); _olympiadEnd = currentTime.getTimeInMillis(); Calendar nextChange = Calendar.getInstance(); _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD; scheduleWeeklyChange(); }
×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.