Ir para conteúdo
  • Cadastre-se

Classificação de Membros

Popular Content

Showing content with the highest reputation on 03/06/18 em todas as áreas

  1. Iae Galera venho aqui postar provavelmente minha ultima contribuição no fórum bem vamos lá: Meu projeto foi baseado na ultima versão da Frozen 1132 pré configurado e copilado por min, Servidor perfeito para no custom já que corrigir todas as falhas da até para enganar chamar de L2OFF, Passei mais de 2 anos configurando L2JFrozen então já sabia todos os bugs que tinha e como resolver, Se botar max enchante +10 ou +16 garanto que vai ver até classe de summoner matando, Passei trez meses Balanceando Classes e skills e resolvendo bug de armas e armaduras, não foi por que configurei mais servidor está beirando a perfeição nesse sentido eu garanto, estou postando a rev por que não pretendo mais mexer nela nem botar online. Demonstração de uma das arenas Olympiadas: Informações Basicas: Rates: XP: 100x SP: 100x Adena: 200x Drop: 200x Economia do Servidor: Equipamentos "C", "B", "A" comercializado por adena, Equipamentos "S" vendidos em shop por drop medal Free Buffs: NPC Basic Buffer Grátis 5 Horas 32 Slots + 7 Debuff Vip Buffs: Heroic Valor, Rhematism, Cholera, Flu, Malaria, Active: Might, Active: Empower Scrolls Enchant's Chance: Normal: 75%. Blessed: 85% Golden 100% Scroll Enchant's Rates: Safe +5 / Maxcimo Weapon, Armor, Jewellerys +20 Golden Scroll Enchant's: 100% até +20, +21:80%, 22:60%, 23:40%, 24:20%, 25:10%. Break Enchant: Blessed Retorna +5 Golden Retorna +20 Novatos: Inicio top No-Grad com SS e Vip Coin 3 dias Party Farm: Dino Sland: Tyrannosaurus Áreas de Drop Medal: Pagan Temple: "Andreas' Royal Guards" Drop: Imperial Warlod Zombie 5% chance, "Ritual Offering" Drop: Dusk Shield 10% Chance Boss Drop Silver Coin: Ketras Hero Hekaton, Ketras Commander Tayr, Ketras Chief Brakki, Varkas Hero Shadith, Varkas Commander Mos, Varkas Chief Horus, Queen Shyeed, Ember, Uruka. Itens customs: Enfeites, TitaniumArmor, IcarusWeapons, Shirts Tattos, Abyssal Armor e Weapons Oly Período: 30 dias Castle Siege Período: 14 dias Max Sub Classe: 9 Bugs Resolvidos: Bug de adena drop dos mobs que dropava muito pouco S.A das armas corrigidos Skills efeitos, hitdamage e delay corrigidos Classes rebalanceadas e corrigidas Atacar players em giran Efeito SS Java Mods Adicionados: .menu Admin startup super haste Restarte Automático Game Server and Login Server Show tutorial Nobless kill barakiel Clan iten: clan full skill, level 8, 10k reputação Vip Itens: vip newbie 3 days, vip Iten 30 days Vip Rates: XP, SP AIo Iten Adicionar Aio dual e remover dual Bloqueios Aio Fora da city e eventos LSstackable / BOGstackable / ENCHANTEstackable ShowNpcCrest ShortCuts Actions Advanced PvP, PK Color System Disable nobless and clan change title Anti-Bot Chaotic Zone Core Buff + Vip Buff Contador de kill no título TVT Sub Class em todos os NPC's Bloquear Trade Modo de Combate PvP e PK Anuncio no Topo Fixes Correções V2 Anti Duplicate Itens Custom Cancel Seconds 20 segundos Modificações: Adicional CP, HP, MP: Wings of Destiny Circlet Bloqueada nas oly Annouce de outra cor sem o nome do ADM Limite de letras no nick ao criar personagem: permitido uma letra ou numero Olympiadas arenas unerground Coliseum Shield Imperial Walord Zombie é Dusk Shield: Renomeados e modificados Para Grade "S" Todos os itens Armor Weapons e Jewellerys já vem enchantados no safe do servidor Crystal Enchante Modificado para Golden Enchante Removido todos os lixos drop dos mob por exemplo: "Suede" Anuncios TVT e CTF modificados para annoucements comun Modificado Status de joias Boss para skills funcionarem e um pouco de status a mais Drop de Adena 100% de chance de dropar Removido Drop Dos EPIC boss se quiser botar como low rates tem que readicionar Removido drop dos Grand Boss listados e adicionado Silver Coin Custom Comandos: /oly: Para ver pontuação e lutas nas olympiadas /escape: inicia unstuck para a cidade mais procima Demostração NPC's Com Efeitos: Gatekeeper Global: Gm Shop: Core Buff Vip: ScreeShot's: Algumas Cores do Pvp Color: https://imgur.com/NlZGzV0 Mesagens ao Logar no Servidor: https://imgur.com/9ib9Hiu Fotos Infeites Customs: https://imgur.com/NBUgJ7g Observação: não renomear system nem trocar l2.exe pois ela tem uma proteção e pode dar erro, o mais comum e não passar da tela de login. Recomendações: programas para rodar servidor sem erros: Java - JDK - 7 ou 8 Mysql - 5.5.28 Navicat Premium Enterprise v11.2.6 Download Servidor Custom: Recomendado Servidor + Backup: 4shared Zippyshare Full Patch L2Brazil: Mediafire 4shared Fix HTML Auction: Mediafire 4shared Zippyshare Download Servidor NO Custom: Não Recomendado Servidor + Backup: Mediafire 4shared Full Patch L2Brazil: 4shared Zippyshare Modificado servidor recomendando e não recomendado , o custom está mais completo e o patch está sem falhas ! Quando tiver com tempo posto mais pré configurados, Feliz natal e prospero ano novo a todos.
    1 point
  2. Neste guia eu vou explicar passo a passo como você pode verificar, remover e criar sua zona. Passo I - Verificar o tipo de zona (caso aCis) A maneira mais fácil de descobrir o tipo de zona é comando // zone_check, porem é acessível também a partir do painel de administração, // admin -> Server-> Zone Check. Passo II - Removendo o tipo de zona Agora, quando você sabe o tipo(s) da zona (sabemos devido o Passo I) e você quiser removê-lo, vá para o arquivo correspondente (todas as zonas são gravados dentro de /data/xml/zones/). Por exemplo, se você quiser remover a zona de paz, digamos a partir de Primeval Island, você abre o PeaceZone.xml e você procurar o registro. Eles estão com comentarios <! - Xxx ->, por isso não vai ser difícil quanto você pensa. <zone type="PeaceZone" shape="NPoly" minZ="-4792" maxZ="208"><!-- primeval_peace2 --> <node X="4850" Y="-4736" /> <node X="7294" Y="-4712" /> <node X="8529" Y="-820" /> <node X="3615" Y="-737" /> </zone> Simplesmente remova a parte do código e salve. A praia não é mais uma zona de paz. Passo III - Tipos de zona Em primeiro lugar, antes de criar uma nova zona, você deve saber as possíveis formas que existem Cuboid Zones: ------------- Exigir 2 nós (vértices), para fazer um quadrado, por exemplo: O . . . . . . . . . . . . . . O O = Nó (vertice) NPoly Zones: ------------ Requer 3 ou mais nós (vértices), para fazer um polígono ou outro modelo geométrico, por exemplo um triangulo: O / \ / \ / \ O - - - O O = Nó (vertice) Cylinder Zones: --------------- Exigir um nó (vértice) e raio para fazer um circulo, por exemplo: * * * * * * * * * * * * * * * * O * * * * * * * * * * * * * * * * O = Nó (vertice) * = Raio Passo IV - Criando uma Nova zona Cuboid Requer apenas 2 nós, como foi dito no passo III acima. Você deve obter apenas 2 nós / vértices (digitando ingame /loc) e outros dois serão gerados automaticamente. Como? É simples, quando as duas linhas se cruzam uns aos outros, o nó é gerado. Bom exemplo da forma Cuboid são as Arenas. Você pega dois cantos opostos e feito. <zone type="ArenaZone" shape="Cuboid" minZ="-3596" maxZ="0"><!-- dion_monster_pvp --> <node X="11947" Y="183019" /> <node X="12943" Y="184010" /> <spawn X="12312" Y="182752" Z="-3558" /> </zone> NPoly Com a NPoly, você pode criar qualquer forma que você imaginar, não há restrições, mas atenção .. Você deve criá-lo com a "cabeça", sem linhas de passagem sobre as outras, caso ocorra, pode ser que algum canto de determinada área fique com a zona. A maior parte das zonas usa NPoly, então provavelmente você vai usar-la. Aqui está um exemplo: <zone type="JailZone" shape="NPoly" minZ="-2992" maxZ="-2792"> <!-- gm_prison --> <node X="-116390" Y="-251581" /> <node X="-112756" Y="-251617" /> <node X="-112720" Y="-248199" /> <node X="-116354" Y="-248217" /> </zone> Cylinder Requer requer apenas um ponto central. Você declara que o raio com rad = "XX". Na prática, pegue o ponto médio, e simplesmente ande para a frente, pare no lugar que você quer e comparar o valor Y com o valor Y do seu ponto médio, esse valor sera o seu raio. <zone type="ArenaZone" shape="Cylinder" minZ="-2320" maxZ="-2120" rad="700"> <!-- hot springs circle --> <node X="151555" Y="-127082" /> </zone> Quando você decidiu que forma de usar e você tem as coordenadas, não se esqueça do set / alterar o seu type. Se o seu novo zona personalizada é chamado FlagZone, então você deve declate-lo sob type = "" <zone type = "FlagZone"> Basicamente, você pode colocar o código de zona a qualquer arquivo que você deseja, mas a melhor maneira mesmo é manter as coisas organizadas para criar um novo arquivo, nesse caso, FlagZone.xml - você pode copiar qualquer arquivo existente, renomeá-lo, remover todos < zona> registros e colar lá o seu. Dessa forma, você sabe onde procurar se você quiser adicionar mais zonas ou remover. Estas são as formas disponíveis. X e Y é óbvio, agora você quer saber qual deve ser o valor Z. Bem, basicamente, valor Z depende da forma território, se for plano ou acidentada, existem montanhas ou não. Se é plano, mais ou menos, você deve estar bem com + -100 a partir do valor de base gerada a partir de / loc. Você pode adicionar maior para ter 100% de certeza que quando alguém montar o strider, voar com wyvern, não vai sair de sua zona. por exemplo, quando você der /loc o loc der um valor 500, eu aconselharia você colocar algo em torno de minZ="400" maxZ="600" Tudo marcado, tudo ok? Agora é hora de ver se ele está funcionando. Inicie o servidor, vá para a nova zona e digite // zone_check, senão vai para o painel de admin -> Server-> Zone Check ( igual o passo I). Você pode pressionar Visualize All para ver a forma. O resultado será mostrado adena no chão, como você pode notar na imagem abaixo. Basicamente, é isso. ps: não sei se já existe algo do tipo no forum, mas não custa nada compartilhar um guia bem feito. Crédito: Inteiramente do SweeTs
    1 point
  3. cara chama no privado te envio meu contato e olho isso pra vc so não garanto que consigo hoje . não sei o motivo mais minha net é de 100Mbps e ta baixando de 3 a 7Kbps testei download pesado em outros sites e ta normal mais nesse link infeliz misericordia
    1 point
  4. cara gostei de algumas skills mais algumas achei muito feio o efeito vou baixar e dar uma testada e ver oq consigo fazer pra editar esses efeitos //edit entrei no forum deles e o ultimo patch tem a opção de usar a hydro original vc deu uma lida nos arquivos?
    1 point
  5. Toma ele com algumas modificacoes que eu fiz Index: aCis_datapack/data/html/admin/server_menu.htm =================================================================== --- aCis_datapack/data/html/admin/server_menu.htm (revision 3) +++ aCis_datapack/data/html/admin/server_menu.htm (working copy) @@ -18,7 +18,7 @@ Reload <table width=240> <tr> - <td><combobox width=120 height=21 var="cb" list=acar;announcement;config;crest;cw;door;htm;item;multisell;npc;npcwalker;skill;teleport;zone;></td> + <td><combobox width=120 height=21 var="cb" list=acar;aio;announcement;config;crest;cw;door;htm;item;multisell;npc;npcwalker;pvp;skill;teleport;zone;></td> <td><button value="Reload" action="bypass -h admin_reload $cb" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td> </tr> </table><br> Index: aCis_datapack/data/html/mods/aio/50001-1.htm =================================================================== --- aCis_datapack/data/html/mods/aio/50001-1.htm (revision 0) +++ aCis_datapack/data/html/mods/aio/50001-1.htm (working copy) @@ -0,0 +1,46 @@ +<html> + <body> + <center> + <br> + <img src="l2ui.bbs_lineage2" width=78 height=13> + <font color="FF6EB4">%servername% AIOManager</font> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="256"> + <tr><td width="256" align="left"><font color="a1a1a1">Let's trade, I'm sure we can arrive at a mutually beneficial arrangement.</font></td></tr> + </table> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="224"> + <tr><td width="224" align="center"><font color="FF6EB4">Add or Update Aio</font></td></tr> + </table> + <table width="256"> + <tr><td width="256" align="center">Do not have aio privileges? <font color="LEVEL">Add</font> it!</td></tr> + </table> + <br> + <table width="128" cellspacing="2"> + <tr><td width="128" align="center"><a action="bypass -h npc_%objectId%_AddAio 1">30 days ~ 100kk adenas</a></td></tr> + <tr><td width="128" align="center"><a action="bypass -h npc_%objectId%_AddAio 2">60 days ~ 175kk adenas</a></td></tr> + <tr><td width="128" align="center"><a action="bypass -h npc_%objectId%_AddAio 3">90 days ~ 250kk adenas</a></td></tr> + </table> + <br> + <table width="256"> + <tr><td width="256" align="center">Already have aio privileges? <font color="LEVEL">Update</font> it!</td></tr> + </table> + <br> + <table width="128" cellspacing="2"> + <tr><td width="128" align="center"><a action="bypass -h npc_%objectId%_UpdateAio 1">30 days ~ 100kk adenas</a></td></tr> + <tr><td width="128" align="center"><a action="bypass -h npc_%objectId%_UpdateAio 2">60 days ~ 175kk adenas</a></td></tr> + <tr><td width="128" align="center"><a action="bypass -h npc_%objectId%_UpdateAio 3">90 days ~ 250kk adenas</a></td></tr> + </table> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="160" cellspacing="2"> + <tr><td width="160" align="center"><button value="Menu" action="bypass -h npc_%objectId%_Chat 0" msg="811;Elven Village" width=65 height=19 back="L2UI_ch3.smallbutton2_down" fore="L2UI_ch3.smallbutton2"></td></tr> + </table> + </center> + </body> +</html> \ No newline at end of file Index: aCis_datapack/data/html/mods/aio/50001-2.htm =================================================================== --- aCis_datapack/data/html/mods/aio/50001-2.htm (revision 0) +++ aCis_datapack/data/html/mods/aio/50001-2.htm (working copy) @@ -0,0 +1,31 @@ +<html> + <body> + <center> + <br> + <img src="l2ui.bbs_lineage2" width=78 height=13> + <font color="FF6EB4">%servername% AIOManager</font> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="256"> + <tr><td width="256" align="left"><font color="a1a1a1">I cannot understand you trying to remove aio privileges, but...</font></td></tr> + </table> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="224"> + <tr><td width="224" align="center"><font color="FF6EB4">Remove Aio</font></td></tr> + </table> + <br> + <table width="160" cellspacing="2"> + <tr><td width="160" align="center"><a action="bypass -h npc_%objectId%_RemoveAio">Remove Aio Privileges</a></td></tr> + </table> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="160" cellspacing="2"> + <tr><td width="160" align="center"><button value="Menu" action="bypass -h npc_%objectId%_Chat 0" msg="811;Elven Village" width=65 height=19 back="L2UI_ch3.smallbutton2_down" fore="L2UI_ch3.smallbutton2"></td></tr> + </table> + </center> + </body> +</html> \ No newline at end of file Index: aCis_datapack/data/html/mods/aio/50001.htm =================================================================== --- aCis_datapack/data/html/mods/aio/50001.htm (revision 0) +++ aCis_datapack/data/html/mods/aio/50001.htm (working copy) @@ -0,0 +1,32 @@ +<html> + <body> + <center> + <br> + <img src="l2ui.bbs_lineage2" width=78 height=13> + <font color="FF6EB4">%servername% AIOManager</font> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="256"> + <tr><td width="256" align="left"><font color="a1a1a1">Are you feeling weak? Today is your lucky day! I am teaching new skills for everyone that wants to pay for my services.<br>After learning my skills, you will lose your base skills.<br>Hmmm, ready?!</font></td></tr> + </table> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="224"> + <tr><td width="224" align="center"><font color="FF6EB4">Available Services</font></td></tr> + </table> + <br> + <table width="160" cellspacing="2"> + <tr><td width="160" align="center"><button value="Add or Update Aio" action="bypass -h npc_%objectId%_Chat 1" msg="811;The Town of Giran" width=140 height=21 back="bigbutton3_over" fore="bigbutton3"></td></tr> + <tr><td width="160" align="center"><button value="Remove Aio" action="bypass -h npc_%objectId%_Chat 2" msg="811;The Town of Giran" width=140 height=21 back="bigbutton3_over" fore="bigbutton3"></td></tr> + </table> + <table width="100%" align="center"> + <tr><td><font color=4F4F4F>_____________________________________________</font></td></tr> + </table> + <table width="160" cellspacing="2"> + <tr><td width="160" align="center"><button value="Close" action="bypass -h npc_%objectId%_Close" msg="811;Elven Village" width=65 height=19 back="L2UI_ch3.smallbutton2_down" fore="L2UI_ch3.smallbutton2"></td></tr> + </table> + </center> + </body> +</html> \ No newline at end of file Index: aCis_datapack/data/xml/admin_commands_rights.xml =================================================================== --- aCis_datapack/data/xml/admin_commands_rights.xml (revision 3) +++ aCis_datapack/data/xml/admin_commands_rights.xml (working copy) @@ -354,4 +354,9 @@ <aCar name="admin_zone_check" accessLevel="1" /> <aCar name="admin_zone_visual" accessLevel="1" /> + <!-- AIO --> + <aCar name="admin_add_aio" accessLevel="1" /> + <aCar name="admin_update_aio" accessLevel="1" /> + <aCar name="admin_remove_aio" accessLevel="1" /> + </list> \ No newline at end of file Index: aCis_datapack/data/xml/aio_manager.xml =================================================================== --- aCis_datapack/data/xml/aio_manager.xml (revision 0) +++ aCis_datapack/data/xml/aio_manager.xml (working copy) @@ -0,0 +1,9 @@ +<?xml version='1.0' encoding='utf-8'?> +<list> + <!-- 30 days --> + <service id="1" duration="30" feeId="57" feeVal="100000000" /> + <!-- 60 days --> + <service id="2" duration="60" feeId="57" feeVal="175000000" /> + <!-- 90 days --> + <service id="3" duration="90" feeId="57" feeVal="250000000" /> +</list> \ No newline at end of file Index: aCis_datapack/data/xml/items/AIO-Itens.xml =================================================================== --- aCis_datapack/data/xml/items/AIO-Itens.xml (revision 0) +++ aCis_datapack/data/xml/items/AIO-Itens.xml (working copy) @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<list> + + <item id="9209" type="Weapon" name="AIO-Duals"> + <set name="default_action" val="equip" /> + <set name="weapon_type" val="DUAL" /> + <set name="bodypart" val="lrhand" /> + <set name="random_damage" val="10" /> + <set name="attack_range" val="40" /> + <set name="damage_range" val="0;0;46;120" /> + <set name="material" val="BONE" /> + <set name="weight" val="1840" /> + <set name="is_tradable" val="false" /> + <set name="is_dropable" val="false" /> + <set name="is_destroyable" val="false" /> + <set name="is_sellable" val="false" /> + <set name="is_depositable" val="false" /> + <for> + <set order="0x08" stat="pAtk" val="361" /> + <set order="0x08" stat="mAtk" val="137" /> + <set order="0x08" stat="rCrit" val="8" /> + <set order="0x08" stat="pAtkSpd" val="325" /> + </for> + </item> + <item id="9210" type="Armor" name="AIO Helm"> + <set name="default_action" val="equip" /> + <set name="bodypart" val="head" /> + <set name="crystal_type" val="A" /> + <set name="material" val="CLOTH" /> + <set name="weight" val="1" /> + <set name="is_tradable" val="false" /> + <set name="is_dropable" val="false" /> + <set name="is_destroyable" val="false" /> + <set name="is_sellable" val="false" /> + <set name="is_depositable" val="false" /> + <for> + <add order="0x10" stat="pDef" val="69" /> + <enchant order="0x0C" stat="pDef" val="0" /> + </for> + </item> + <item id="9211" type="Armor" name="AIO Doublet"> + <set name="default_action" val="equip" /> + <set name="armor_type" val="MAGIC" /> + <set name="bodypart" val="fullarmor" /> + <set name="crystal_type" val="A" /> + <set name="material" val="LEATHER" /> + <set name="weight" val="1" /> + <set name="is_tradable" val="false" /> + <set name="is_dropable" val="false" /> + <set name="is_destroyable" val="false" /> + <set name="is_sellable" val="false" /> + <set name="is_depositable" val="false" /> + <for> + <add order="0x10" stat="pDef" val="139" /> + <add order="0x40" stat="maxMp" val="665" /> + <enchant order="0x0C" stat="pDef" val="0" /> + </for> + </item> + <item id="9212" type="Armor" name="AIO Silk Gloves"> + <set name="default_action" val="equip" /> + <set name="bodypart" val="gloves" /> + <set name="crystal_type" val="A" /> + <set name="material" val="LEATHER" /> + <set name="weight" val="1" /> + <set name="is_tradable" val="false" /> + <set name="is_dropable" val="false" /> + <set name="is_destroyable" val="false" /> + <set name="is_sellable" val="false" /> + <set name="is_depositable" val="false" /> + <for> + <add order="0x10" stat="pDef" val="46" /> + <enchant order="0x0C" stat="pDef" val="0" /> + </for> + </item> + <item id="9213" type="Armor" name="AIO Sandals"> + <set name="default_action" val="equip" /> + <set name="bodypart" val="feet" /> + <set name="crystal_type" val="A" /> + <set name="material" val="BLOOD_STEEL" /> + <set name="weight" val="1" /> + <set name="is_tradable" val="false" /> + <set name="is_dropable" val="false" /> + <set name="is_destroyable" val="false" /> + <set name="is_sellable" val="false" /> + <set name="is_depositable" val="false" /> + <for> + <add order="0x10" stat="pDef" val="46" /> + <enchant order="0x0C" stat="pDef" val="0" /> + </for> + </item> +</list> \ No newline at end of file Index: aCis_datapack/data/xml/npcs/50000-50999.xml =================================================================== --- aCis_datapack/data/xml/npcs/50000-50999.xml (revision 3) +++ aCis_datapack/data/xml/npcs/50000-50999.xml (working copy) @@ -1,5 +1,41 @@ <?xml version="1.0" encoding="utf-8"?> <list> + <npc id="50001" idTemplate="31294" name="Bardock" title="Aio Manager"> + <set name="level" val="80"/> + <set name="radius" val="8"/> + <set name="height" val="23.5"/> + <set name="rHand" val="94"/> + <set name="lHand" val="0"/> + <set name="type" val="L2AioManager"/> + <set name="exp" val="0"/> + <set name="sp" val="0"/> + <set name="hp" val="3290.11306877694"/> + <set name="mp" val="1674.8"/> + <set name="hpRegen" val="8.5"/> + <set name="mpRegen" val="3"/> + <set name="pAtk" val="970.537548504614"/> + <set name="pDef" val="341.375"/> + <set name="mAtk" val="662.751329129412"/> + <set name="mDef" val="249.80341"/> + <set name="crit" val="4"/> + <set name="atkSpd" val="253"/> + <set name="str" val="40"/> + <set name="int" val="21"/> + <set name="dex" val="30"/> + <set name="wit" val="20"/> + <set name="con" val="43"/> + <set name="men" val="20"/> + <set name="corpseTime" val="7"/> + <set name="walkSpd" val="50"/> + <set name="runSpd" val="120"/> + <set name="dropHerbGroup" val="0"/> + <set name="attackRange" val="40"/> + <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="1000" canMove="true" seedable="false"/> + <skills> + <skill id="4045" level="1"/> + <skill id="4416" level="14"/> + </skills> + </npc> <npc id="50006" idTemplate="31228" name="Roy the Cat" title="Class Manager"> <set name="level" val="70"/> <set name="radius" val="9"/> Index: aCis_datapack/data/xml/skills/AIO-Recovery.xml =================================================================== --- aCis_datapack/data/xml/skills/AIO-Recovery.xml (revision 0) +++ aCis_datapack/data/xml/skills/AIO-Recovery.xml (working copy) @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='utf-8'?> +<list> + <skill id="7065" levels="1" name="AIO-Recovery"> + <set name="target" val="TARGET_SELF"/> + <set name="skillType" val="BUFF"/> + <set name="operateType" val="OP_PASSIVE"/> + <for> + <add order="0x40" stat="maxMp" val="10000" /> + <add order="0x40" stat="regMp" val="10000"/> + <add order="0x40" stat="mAtkSpd" val="1900"/> + <add order="0x40" stat="pAtkSpd" val="1900"/> + <add order="0x40" stat="runSpd" val="80"/> + </for> + </skill> +</list> \ No newline at end of file Index: aCis_datapack/sql/character_aio.sql =================================================================== --- aCis_datapack/sql/character_aio.sql (revision 0) +++ aCis_datapack/sql/character_aio.sql (working copy) @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS `character_aio` ( + `objectId` INT NOT NULL DEFAULT 0, + `duration` BIGINT NOT NULL DEFAULT 0, + PRIMARY KEY (`objectId`) +); Index: aCis_datapack/tools/database_installer.bat =================================================================== --- aCis_datapack/tools/database_installer.bat (revision 3) +++ aCis_datapack/tools/database_installer.bat (working copy) @@ -66,6 +66,7 @@ %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/castle_manor_procure.sql %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/castle_manor_production.sql %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/castle_trapupgrade.sql +%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/character_aio.sql %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/character_friends.sql %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/character_hennas.sql %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/character_macroses.sql Index: aCis_datapack/tools/database_installer.sh =================================================================== --- aCis_datapack/tools/database_installer.sh (revision 3) +++ aCis_datapack/tools/database_installer.sh (working copy) @@ -87,6 +87,7 @@ $MYG < ../sql/castle_manor_production.sql &> /dev/null $MYG < ../sql/castle_siege_guards.sql &> /dev/null $MYG < ../sql/castle_trapupgrade.sql &> /dev/null +$MYG < ../sql/character_aio.sql &> /dev/null $MYG < ../sql/character_friends.sql &> /dev/null $MYG < ../sql/character_hennas.sql &> /dev/null $MYG < ../sql/character_macroses.sql &> /dev/null Index: aCis_datapack/tools/full_install.sql =================================================================== --- aCis_datapack/tools/full_install.sql (revision 3) +++ aCis_datapack/tools/full_install.sql (working copy) @@ -10,6 +10,7 @@ DROP TABLE IF EXISTS castle_manor_procure; DROP TABLE IF EXISTS castle_manor_production; DROP TABLE IF EXISTS castle_trapupgrade; +DROP TABLE IF EXISTS character_aio; DROP TABLE IF EXISTS character_friends; DROP TABLE IF EXISTS character_hennas; DROP TABLE IF EXISTS character_macroses; Index: aCis_gameserver/config/l2jcustom/aio.properties =================================================================== --- aCis_gameserver/config/l2jcustom/aio.properties (revision 0) +++ aCis_gameserver/config/l2jcustom/aio.properties (working copy) @@ -0,0 +1,50 @@ +#============================================================= +# AIO System settings +#============================================================= +# Enable / Disable title +AllowAioTitle = True + +# Title for players with aio privileges +# Default: Aio +AioTitle = Aio + +# Enable / Disable title Color +AllowAioTitleColor = True + +# Title color for players with aio privileges +# Default: 606060 +AioTitleColor = 606060 + +# Enable / Disable title +AllowAioName = True + +# Name for players with aio privileges +# Default: Aio +AioName = [AIO]- + +# Enable / Disable name Color +AllowAioNameColor = True + +# Name color for players with aio privileges +# Default: 606060 +AioNameColor = 606060 + +# Restricted classes that cannot receive aio privileges +# Syntax: classId,classId, ... +AioRestrictedClasses = 0 + +# Acquired items by players with aio privileges +# Syntax: itemId,amount;itemId,amount; ... +AioItems = 9209,1;9210,1;9211,1;9212,1;9213,1; + +# Acquired skills by players with aio privileges +# Syntax: skillId,skillLv;skillId,skillLv; ... +AioSkills = 7065,1;1085,3;1304,3;1087,3;1354,1;1062,2;1243,6;1045,6;1048,6;1429,1;163,1;\ ++1311,6;213,8;1007,3;1309,3;1552,3;1006,3;1308,3;1253,3;1284,3;1392,3;1393,3;214,1;\ ++1009,3;1310,4;1363,1;1362,1;1397,3;1292,6;1078,6;307,1;276,1;309,1;274,1;275,1;164,3;\ ++272,1;277,1;273,1;311,1;366,1;365,1;310,1;271,1;1242,3;1353,3;1391,3;1002,3;\ ++1352,1;229,7;228,3;1077,3;1218,33;1059,3;1219,33;1388,3;1389,3;1240,3;1413,1;\ ++1086,2;1036,2;1035,4;1068,3;1356,1;1355,1;1357,1;1307,3;1410,1;1409,1;1353,1;\ ++1044,3;1182,3;1191,3;1189,3;1259,4;1306,6;234,23;1040,3;364,1;264,1;306,1;\ ++269,1;270,1;265,1;363,1;349,1;308,1;305,1;304,1;267,1;266,1;268,1;1390,3;1303,2;\ ++1204,2;1268,4;4699,13;4700,13;4702,13;4703,13;1323,1;1251,2;1328,7;1329,9;1330,8 \ No newline at end of file Index: aCis_gameserver/java/net/sf/l2j/Config.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/Config.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/Config.java (working copy) @@ -51,6 +51,7 @@ public static final String PLAYERS_FILE = "./config/players.properties"; public static final String SERVER_FILE = "./config/server.properties"; public static final String SIEGE_FILE = "./config/siege.properties"; + public static final String AIO_FILE = "./config/l2jcustom/aio.properties"; public static final String PROTECT_FILE = "./config/l2jcustom/protect.properties"; // -------------------------------------------------- @@ -646,6 +647,10 @@ public static int ZONE_TOWN; public static boolean DISABLE_TUTORIAL; + // -------------------------------------------------- + // Custom MODS + // -------------------------------------------------- + /** Bots Prevention */ public static boolean L2WALKER_PROTECTION; public static boolean BOTS_PREVENTION; @@ -655,6 +660,22 @@ public static int PUNISHMENT; public static int PUNISHMENT_TIME; + /** AIO System */ + public static boolean ALLOW_AIO_TITLE; + public static String AIO_TITLE; + public static boolean ALLOW_AIO_TITLE_COLOR; + public static int AIO_TITLE_COLOR; + public static boolean ALLOW_AIO_NAME; + public static String AIO_NAME; + public static boolean ALLOW_AIO_NAME_COLOR; + public static int AIO_NAME_COLOR; + public static String AIO_RESTRICTED_CLASSES; + public static List<Integer> LIST_AIO_RESTRICTED_CLASSES; + public static String AIO_ITEMS; + public static Map<Integer, Integer> LIST_AIO_ITEMS; + public static String AIO_SKILLS; + public static Map<Integer, Integer> LIST_AIO_SKILLS; + // -------------------------------------------------- // Those "hidden" settings haven't configs to avoid admins to fuck their server // You still can experiment changing values here. But don't say I didn't warn you. @@ -1384,6 +1405,44 @@ } + private static final void loadAioSystem() + { + final ExProperties aio = initProperties(AIO_FILE); + ALLOW_AIO_TITLE = aio.getProperty("AllowAioTitle", false); + AIO_TITLE = aio.getProperty("AioTitle", "Aio"); + ALLOW_AIO_TITLE_COLOR = aio.getProperty("AllowAioTitleColor", false); + AIO_TITLE_COLOR = Integer.decode("0x" + aio.getProperty("AioTitleColor", "606060")); + ALLOW_AIO_NAME = aio.getProperty("AllowAioName", false); + AIO_NAME = aio.getProperty("AioName", "Aio"); + ALLOW_AIO_NAME_COLOR = aio.getProperty("AllowAioNameColor", false); + AIO_NAME_COLOR = Integer.decode("0x" + aio.getProperty("AioNameColor", "606060")); + AIO_RESTRICTED_CLASSES = aio.getProperty("AioRestrictedClasses", "0,0"); + LIST_AIO_RESTRICTED_CLASSES = new ArrayList<>(); + for (String val : AIO_RESTRICTED_CLASSES.split(",")) + { + int classId = Integer.parseInt(val); + LIST_AIO_RESTRICTED_CLASSES.add(classId); + } + AIO_ITEMS = aio.getProperty("AioItems", "0,0"); + LIST_AIO_ITEMS = new HashMap<>(); + for (String val : AIO_ITEMS.split(";")) + { + String[] valSplit = val.split(","); + int itemId = Integer.parseInt(valSplit[0]); + int amount = Integer.parseInt(valSplit[1]); + LIST_AIO_ITEMS.put(itemId, amount); + } + AIO_SKILLS = aio.getProperty("AioSkills", "0,0"); + LIST_AIO_SKILLS = new HashMap<>(); + for (String val : AIO_SKILLS.split(";")) + { + String[] valSplit = val.split(","); + int skillId = Integer.parseInt(valSplit[0]); + int skillLv = Integer.parseInt(valSplit[1]); + LIST_AIO_SKILLS.put(skillId, skillLv); + } + } + /** * Loads loginserver settings.<br> * IP addresses, database, account, misc. @@ -1456,6 +1515,9 @@ // Protect settings loadProtect(); + + // AIO System settings + loadAioSystem(); } public static final void loadLoginServer() Index: aCis_gameserver/java/net/sf/l2j/gameserver/datatables/AioManagerTable.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/datatables/AioManagerTable.java (revision 0) +++ aCis_gameserver/java/net/sf/l2j/gameserver/datatables/AioManagerTable.java (working copy) @@ -0,0 +1,101 @@ +/* + * 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 net.sf.l2j.gameserver.datatables; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +import net.sf.l2j.gameserver.templates.L2Aio; +import net.sf.l2j.gameserver.templates.StatsSet; +import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +/** + * @author rapfersan92 + */ +public class AioManagerTable +{ + private static final Logger _log = Logger.getLogger(AioManagerTable.class.getName()); + + private final List<L2Aio> _services; + + public static AioManagerTable getInstance() + { + return SingletonHolder._instance; + } + + protected AioManagerTable() + { + _services = new ArrayList<>(); + load(); + } + + public void reload() + { + _services.clear(); + load(); + } + + public void load() + { + try + { + File f = new File("./data/xml/aio_manager.xml"); + Document doc = XMLDocumentFactory.getInstance().loadDocument(f); + + Node n = doc.getFirstChild(); + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if (d.getNodeName().equalsIgnoreCase("service")) + { + NamedNodeMap attrs = d.getAttributes(); + int id = Integer.valueOf(attrs.getNamedItem("id").getNodeValue()); + long duration = Long.valueOf(attrs.getNamedItem("duration").getNodeValue()); + int feeId = Integer.valueOf(attrs.getNamedItem("feeId").getNodeValue()); + int feeVal = Integer.valueOf(attrs.getNamedItem("feeVal").getNodeValue()); + + StatsSet aioData = new StatsSet(); + aioData.set("id", id); + aioData.set("duration", duration); + aioData.set("feeId", feeId); + aioData.set("feeVal", feeVal); + + _services.add(new L2Aio(aioData)); + } + } + } + catch (Exception e) + { + _log.severe("Exception: AioManagerTable load: " + e); + } + + _log.info("AioManagerTable: Loaded " + _services.size() + " aio services."); + } + + public List<L2Aio> getAioTable() + { + return _services; + } + + private static class SingletonHolder + { + protected static final AioManagerTable _instance = new AioManagerTable(); + } +} Index: aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -37,6 +37,7 @@ import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager; import net.sf.l2j.gameserver.datatables.AccessLevels; import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights; +import net.sf.l2j.gameserver.datatables.AioManagerTable; import net.sf.l2j.gameserver.datatables.AnnouncementTable; import net.sf.l2j.gameserver.datatables.ArmorSetsTable; import net.sf.l2j.gameserver.datatables.AugmentationData; @@ -74,6 +75,7 @@ import net.sf.l2j.gameserver.handler.SkillHandler; import net.sf.l2j.gameserver.handler.UserCommandHandler; import net.sf.l2j.gameserver.idfactory.IdFactory; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.instancemanager.AuctionManager; import net.sf.l2j.gameserver.instancemanager.AutoSpawnManager; import net.sf.l2j.gameserver.instancemanager.BoatManager; @@ -190,6 +192,7 @@ PetitionManager.getInstance(); StringUtil.printSection("Characters"); + AioManager.getInstance(); CharTemplateTable.getInstance(); CharNameTable.getInstance(); HennaTable.getInstance(); @@ -247,6 +250,7 @@ L2Manor.getInstance(); StringUtil.printSection("NPCs"); + AioManagerTable.getInstance(); BufferTable.getInstance(); HerbDropTable.getInstance(); NpcTable.getInstance(); Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java (working copy) @@ -18,6 +18,7 @@ import java.util.Map; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAdmin; +import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAio; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAnnouncements; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminBan; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminBookmark; @@ -76,6 +77,7 @@ protected AdminCommandHandler() { registerAdminCommandHandler(new AdminAdmin()); + registerAdminCommandHandler(new AdminAio()); registerAdminCommandHandler(new AdminAnnouncements()); registerAdminCommandHandler(new AdminBan()); registerAdminCommandHandler(new AdminBookmark()); Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (working copy) @@ -22,6 +22,7 @@ import net.sf.l2j.gameserver.cache.CrestCache; import net.sf.l2j.gameserver.cache.HtmCache; import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights; +import net.sf.l2j.gameserver.datatables.AioManagerTable; import net.sf.l2j.gameserver.datatables.AnnouncementTable; import net.sf.l2j.gameserver.datatables.DoorTable; import net.sf.l2j.gameserver.datatables.GmListTable; @@ -32,6 +33,7 @@ import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.datatables.TeleportLocationTable; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager; import net.sf.l2j.gameserver.instancemanager.ZoneManager; import net.sf.l2j.gameserver.model.L2Object; @@ -191,6 +193,12 @@ AdminCommandAccessRights.getInstance().reload(); activeChar.sendMessage("Admin commands rights have been reloaded."); } + else if (type.startsWith("aio")) + { + AioManagerTable.getInstance().reload(); + AioManager.getInstance().reload(); + activeChar.sendMessage("Aio's system have been reloaded."); + } else if (type.startsWith("announcement")) { AnnouncementTable.getInstance().reload(); @@ -267,8 +275,8 @@ } catch (Exception e) { - activeChar.sendMessage("Usage : //reload <acar|announcement|config|crest|door>"); - activeChar.sendMessage("Usage : //reload <htm|item|multisell|npc|npcwalker>"); + activeChar.sendMessage("Usage : //reload <acar|aio|announcement|config|crest>"); + activeChar.sendMessage("Usage : //reload <door|htm|item|multisell|npc|npcwalker>"); activeChar.sendMessage("Usage : //reload <skill|teleport|zone>"); } } Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAio.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAio.java (revision 0) +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAio.java (working copy) @@ -0,0 +1,141 @@ +/* + * 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 net.sf.l2j.gameserver.handler.admincommandhandlers; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.handler.IAdminCommandHandler; +import net.sf.l2j.gameserver.instancemanager.AioManager; +import net.sf.l2j.gameserver.model.L2Object; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.network.SystemMessageId; +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * @author rapfersan92 + */ +public class AdminAio implements IAdminCommandHandler +{ + private static final String[] ADMIN_COMMANDS = + { + "admin_add_aio", + "admin_update_aio", + "admin_remove_aio" + }; + + @Override + public boolean useAdminCommand(String command, L2PcInstance activeChar) + { + final L2Object target = activeChar.getTarget(); + if (target == null || !(target instanceof L2PcInstance)) + { + activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); + return false; + } + + if (command.startsWith("admin_add_aio")) + { + try + { + int duration = Integer.parseInt(command.substring(14)); + addAio(activeChar, (L2PcInstance) target, duration); + } + catch (Exception e) + { + activeChar.sendMessage("You must use //add_aio <days>"); + } + } + else if (command.startsWith("admin_update_aio")) + { + try + { + int duration = Integer.parseInt(command.substring(17)); + updateAio(activeChar, (L2PcInstance) target, duration); + } + catch (Exception e) + { + activeChar.sendMessage("You must use //update_aio <days>"); + } + } + else if (command.equalsIgnoreCase("admin_remove_aio")) + removeAio(activeChar, (L2PcInstance) target); + + return true; + } + + private static void addAio(L2PcInstance activeChar, L2PcInstance targetChar, long duration) + { + if (duration <= 0) + { + activeChar.sendMessage("The value you have entered is incorrect."); + return; + } + else if (AioManager.getInstance().hasAioPrivileges(targetChar.getObjectId())) + { + activeChar.sendMessage("Your target already have aio privileges."); + return; + } + else if (Config.LIST_AIO_RESTRICTED_CLASSES.contains(targetChar.getTemplate().getClassId().getId())) + { + activeChar.sendMessage("Your target cannot receive aio privileges with a character in their current class."); + return; + } + else if (targetChar.isSubClassActive()) + { + activeChar.sendMessage("Your target cannot receive aio privileges with a character in their subclass."); + return; + } + + AioManager.getInstance().addAio(targetChar.getObjectId(), System.currentTimeMillis() + duration * 86400000); + activeChar.sendMessage("You have added the aio privileges to " + targetChar.getName() + "."); + targetChar.sendPacket(new ExShowScreenMessage("Your aio privileges were added by the admin.", 10000)); + } + + private static void updateAio(L2PcInstance activeChar, L2PcInstance targetChar, long duration) + { + if (duration <= 0) + { + activeChar.sendMessage("The value you have entered is incorrect."); + return; + } + else if (!AioManager.getInstance().hasAioPrivileges(targetChar.getObjectId())) + { + activeChar.sendMessage("Your target does not have aio privileges."); + return; + } + + AioManager.getInstance().updateAio(targetChar.getObjectId(), duration * 86400000); + activeChar.sendMessage("You have updated aio privileges from " + targetChar.getName() + "."); + targetChar.sendPacket(new ExShowScreenMessage("Your aio privileges were updated by the admin.", 10000)); + } + + private static void removeAio(L2PcInstance activeChar, L2PcInstance targetChar) + { + if (!AioManager.getInstance().hasAioPrivileges(targetChar.getObjectId())) + { + activeChar.sendMessage("Your target does not have aio privileges."); + return; + } + + AioManager.getInstance().removeAio(targetChar.getObjectId()); + activeChar.sendMessage("You have removed aio privileges from " + targetChar.getName() + "."); + targetChar.sendPacket(new ExShowScreenMessage("Your aio privileges were removed by the admin.", 10000)); + } + + @Override + public String[] getAdminCommandList() + { + return ADMIN_COMMANDS; + } +} Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/AioManager.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/AioManager.java (revision 0) +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/AioManager.java (working copy) @@ -0,0 +1,231 @@ +/* + * 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 net.sf.l2j.gameserver.instancemanager; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ScheduledFuture; +import java.util.logging.Logger; + +import net.sf.l2j.Config; +import net.sf.l2j.L2DatabaseFactory; +import net.sf.l2j.commons.concurrent.ThreadPool; +import net.sf.l2j.gameserver.datatables.SkillTable; +import net.sf.l2j.gameserver.model.L2Skill; +import net.sf.l2j.gameserver.model.L2World; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.item.instance.ItemInstance; +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * @author rapfersan92 + */ +public class AioManager +{ + private static final Logger _log = Logger.getLogger(AioManager.class.getName()); + + private final Map<Integer, Long> _aios; + protected final Map<Integer, Long> _aiosTask; + private ScheduledFuture<?> _scheduler; + + public static AioManager getInstance() + { + return SingletonHolder._instance; + } + + protected AioManager() + { + _aios = new ConcurrentHashMap<>(); + _aiosTask = new ConcurrentHashMap<>(); + _scheduler = ThreadPool.scheduleAtFixedRate(new AioTask(), 1000, 1000); + load(); + } + + public void reload() + { + _aios.clear(); + _aiosTask.clear(); + if (_scheduler != null) + _scheduler.cancel(true); + _scheduler = ThreadPool.scheduleAtFixedRate(new AioTask(), 1000, 1000); + load(); + } + + public void load() + { + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + PreparedStatement statement = con.prepareStatement("SELECT objectId, duration FROM character_aio ORDER BY objectId"); + ResultSet rs = statement.executeQuery(); + while (rs.next()) + _aios.put(rs.getInt("objectId"), rs.getLong("duration")); + rs.close(); + statement.close(); + } + catch (Exception e) + { + _log.warning("Exception: AioManager load: " + e.getMessage()); + } + + _log.info("AioManager: Loaded " + _aios.size() + " characters with aio privileges."); + } + + public void addAio(int objectId, long duration) + { + _aios.put(objectId, duration); + _aiosTask.put(objectId, duration); + manageAioPrivileges(objectId, true); + + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + PreparedStatement statement = con.prepareStatement("INSERT INTO character_aio (objectId, duration) VALUES (?, ?)"); + statement.setInt(1, objectId); + statement.setLong(2, duration); + statement.execute(); + statement.close(); + } + catch (Exception e) + { + _log.warning("Exception: AioManager addAio: " + e.getMessage()); + } + } + + public void updateAio(int objectId, long duration) + { + duration += _aios.get(objectId); + _aios.put(objectId, duration); + _aiosTask.put(objectId, duration); + + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + PreparedStatement statement = con.prepareStatement("UPDATE character_aio SET duration = ? WHERE objectId = ?"); + statement.setLong(1, duration); + statement.setInt(2, objectId); + statement.execute(); + statement.close(); + } + catch (Exception e) + { + _log.warning("Exception: AioManager updateAio: " + e.getMessage()); + } + } + + public void removeAio(int objectId) + { + _aios.remove(objectId); + _aiosTask.remove(objectId); + manageAioPrivileges(objectId, false); + + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + PreparedStatement statement = con.prepareStatement("DELETE FROM character_aio WHERE objectId = ?"); + statement.setInt(1, objectId); + statement.execute(); + statement.close(); + } + catch (Exception e) + { + _log.warning("Exception: AioManager removeAio: " + e.getMessage()); + } + } + + public boolean hasAioPrivileges(int objectId) + { + return _aios.containsKey(objectId); + } + + public long getAioDuration(int objectId) + { + return _aios.get(objectId); + } + + public void addAioTask(int objectId, long duration) + { + _aiosTask.put(objectId, duration); + } + + public void removeAioTask(int objectId) + { + _aiosTask.remove(objectId); + } + + public void manageAioPrivileges(int objectId, boolean apply) + { + final L2PcInstance player = L2World.getInstance().getPlayer(objectId); + player.broadcastUserInfo(); + + for (Map.Entry<Integer, Integer> entry : Config.LIST_AIO_ITEMS.entrySet()) + { + final int itemId = entry.getKey(); + final int amount = entry.getValue(); + if (apply) + player.addItem("add aio item", itemId, amount, player, true); + else + { + final ItemInstance item = player.getInventory().getItemByItemId(itemId); + if (item != null && item.isStackable() && amount > 1) + player.destroyItemByItemId("delete aio item", itemId, item.getCount(), player, true); + else + { + for (int i = 0; i < amount; i++) + player.destroyItemByItemId("delete aio item", itemId, 1, player, true); + } + } + } + + for (int val : Config.LIST_AIO_SKILLS.keySet()) + { + final L2Skill skill = SkillTable.getInstance().getInfo(val, Config.LIST_AIO_SKILLS.get(val)); + if (apply) + player.addSkill(skill, true); + else + player.removeSkill(skill); + } + + player.giveAvailableSkills(); + player.sendSkillList(); + } + + public class AioTask implements Runnable + { + @Override + public final void run() + { + if (_aiosTask.isEmpty()) + return; + + for (Map.Entry<Integer, Long> entry : _aiosTask.entrySet()) + { + final long duration = entry.getValue(); + if (System.currentTimeMillis() > duration) + { + final int objectId = entry.getKey(); + removeAio(objectId); + + final L2PcInstance player = L2World.getInstance().getPlayer(objectId); + player.sendPacket(new ExShowScreenMessage("Your aio privileges were removed.", 10000)); + } + } + } + } + + private static class SingletonHolder + { + protected static final AioManager _instance = new AioManager(); + } +} Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2AioManagerInstance.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2AioManagerInstance.java (revision 0) +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2AioManagerInstance.java (working copy) @@ -0,0 +1,130 @@ +/* + * 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 net.sf.l2j.gameserver.model.actor.instance; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.datatables.AioManagerTable; +import net.sf.l2j.gameserver.instancemanager.AioManager; +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; +import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage; +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; +import net.sf.l2j.gameserver.templates.L2Aio; + +/** + * @author rapfersan92 + */ +public class L2AioManagerInstance extends L2NpcInstance +{ + public L2AioManagerInstance(int objectId, NpcTemplate template) + { + super(objectId, template); + } + + @Override + public void showChatWindow(L2PcInstance player, int val) + { + String name = "data/html/mods/aio/" + getNpcId() + ".htm"; + if (val != 0) + name = "data/html/mods/aio/" + getNpcId() + "-" + val + ".htm"; + + NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); + html.setFile(name); + html.replace("%objectId%", getObjectId()); + player.sendPacket(html); + player.sendPacket(ActionFailed.STATIC_PACKET); + } + + @Override + public void onBypassFeedback(L2PcInstance player, String command) + { + if (command.startsWith("AddAio")) + { + int serviceId = Integer.parseInt(command.substring(7)); + addAio(player, serviceId); + } + else if (command.startsWith("UpdateAio")) + { + int serviceId = Integer.parseInt(command.substring(10)); + updateAio(player, serviceId); + } + else if (command.equalsIgnoreCase("RemoveAio")) + removeAio(player); + + super.onBypassFeedback(player, command); + } + + private static void addAio(L2PcInstance player, int serviceId) + { + for (L2Aio service : AioManagerTable.getInstance().getAioTable()) + { + if (service.getId() != serviceId) + continue; + + if (AioManager.getInstance().hasAioPrivileges(player.getObjectId())) + { + player.sendMessage("Your already have aio privileges."); + return; + } + else if (Config.LIST_AIO_RESTRICTED_CLASSES.contains(player.getTemplate().getClassId().getId())) + { + player.sendMessage("You cannot receive aio privileges with a character in their current class."); + return; + } + else if (player.isSubClassActive()) + { + player.sendMessage("You cannot receive aio privileges with a character in their subclass."); + return; + } + else if (player.destroyItemByItemId("delete aio fee", service.getFeeId(), service.getFeeVal(), null, true)) + { + AioManager.getInstance().addAio(player.getObjectId(), System.currentTimeMillis() + service.getDuration() * 86400000); + player.sendPacket(new ExShowScreenMessage("Your aio privileges were added.", 10000)); + } + } + } + + private static void updateAio(L2PcInstance player, int serviceId) + { + for (L2Aio service : AioManagerTable.getInstance().getAioTable()) + { + if (service.getId() != serviceId) + continue; + + if (!AioManager.getInstance().hasAioPrivileges(player.getObjectId())) + { + player.sendMessage("You do not have aio privileges."); + return; + } + else if (player.destroyItemByItemId("delete aio fee", service.getFeeId(), service.getFeeVal(), null, true)) + { + AioManager.getInstance().updateAio(player.getObjectId(), service.getDuration() * 86400000); + player.sendPacket(new ExShowScreenMessage("Your aio privileges were updated.", 10000)); + } + } + } + + private static void removeAio(L2PcInstance player) + { + if (!AioManager.getInstance().hasAioPrivileges(player.getObjectId())) + { + player.sendMessage("You do not have aio privileges."); + return; + } + + AioManager.getInstance().removeAio(player.getObjectId()); + player.sendPacket(new ExShowScreenMessage("Your aio privileges were removed.", 10000)); + } +} Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -17,10 +17,12 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Collection; +import java.util.Date; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -67,6 +69,7 @@ import net.sf.l2j.gameserver.handler.IItemHandler; import net.sf.l2j.gameserver.handler.ItemHandler; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditChar; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.instancemanager.CastleManager; import net.sf.l2j.gameserver.instancemanager.CoupleManager; import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager; @@ -167,6 +170,7 @@ import net.sf.l2j.gameserver.network.serverpackets.ExFishingStart; import net.sf.l2j.gameserver.network.serverpackets.ExOlympiadMode; import net.sf.l2j.gameserver.network.serverpackets.ExSetCompassZoneCode; +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage; import net.sf.l2j.gameserver.network.serverpackets.ExStorageMaxCount; import net.sf.l2j.gameserver.network.serverpackets.FriendList; import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle; @@ -4283,6 +4287,7 @@ PvpFlagTaskManager.getInstance().remove(this); GameTimeTaskManager.getInstance().remove(this); ShadowItemTaskManager.getInstance().remove(this); + AioManager.getInstance().removeAioTask(getObjectId()); } /** @@ -6544,6 +6549,15 @@ return false; } + if (AioManager.getInstance().hasAioPrivileges(getObjectId())) + { + if (!isInsideZone(ZoneId.TOWN) ? true : !skill.isAioSkill()) + { + sendPacket(ActionFailed.STATIC_PACKET); + return false; + } + } + // Players wearing Formal Wear cannot use skills. final ItemInstance formal = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST); if (formal != null && formal.getItem().getBodyPart() == Item.SLOT_ALLDRESS) @@ -8075,6 +8089,8 @@ else if (getMountType() == 2) // Only Wyvern skills are available isDisabled = !s.isFlyingSkill(); } + else if (AioManager.getInstance().hasAioPrivileges(getObjectId())) + isDisabled = !isInsideZone(ZoneId.TOWN) ? true : !s.isAioSkill(); if (isWearingFormalWear) isDisabled = true; @@ -8471,6 +8487,13 @@ sendMessage("Entering world in Message Refusal mode."); } + if (AioManager.getInstance().hasAioPrivileges(getObjectId())) + { + long duration = AioManager.getInstance().getAioDuration(getObjectId()); + sendPacket(new ExShowScreenMessage("Your aio privileges ends at " + new SimpleDateFormat("MMM dd, yyyy HH:mm").format(new Date(duration)) + ".", 10000)); + AioManager.getInstance().addAioTask(getObjectId(), duration); + } + revalidateZone(true); notifyFriends(true); } Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy) @@ -24,6 +24,7 @@ import net.sf.l2j.gameserver.datatables.ClanTable; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.datatables.SkillTreeTable; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.instancemanager.SiegeManager; import net.sf.l2j.gameserver.model.L2Clan; import net.sf.l2j.gameserver.model.L2Clan.SubPledge; @@ -173,6 +174,12 @@ return; } + if (AioManager.getInstance().hasAioPrivileges(player.getObjectId())) + { + player.sendMessage("You cannot manage a subclass under aio privileges."); + return; + } + // Affecting subclasses (add/del/change) if registered in Olympiads makes you ineligible to compete. if (OlympiadManager.getInstance().isRegisteredInComp(player)) OlympiadManager.getInstance().unRegisterNoble(player); Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Item.java (working copy) @@ -378,7 +378,7 @@ */ public final boolean isSellable() { - return _sellable; + return Config.LIST_AIO_ITEMS.containsKey(_itemId) ? false : _sellable; } /** @@ -387,7 +387,7 @@ */ public final boolean isDropable() { - return _dropable; + return Config.LIST_AIO_ITEMS.containsKey(_itemId) ? false : _dropable; } /** @@ -396,7 +396,7 @@ */ public final boolean isDestroyable() { - return _destroyable; + return Config.LIST_AIO_ITEMS.containsKey(_itemId) ? false : _destroyable; } /** @@ -405,7 +405,7 @@ */ public final boolean isTradable() { - return _tradable; + return Config.LIST_AIO_ITEMS.containsKey(_itemId) ? false : _tradable; } /** @@ -414,7 +414,7 @@ */ public final boolean isDepositable() { - return _depositable; + return Config.LIST_AIO_ITEMS.containsKey(_itemId) ? false : _depositable; } /** Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java (working copy) @@ -22,6 +22,7 @@ import net.sf.l2j.commons.util.ArraysUtil; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.datatables.SkillTreeTable; import net.sf.l2j.gameserver.geoengine.GeoEngine; @@ -540,6 +541,11 @@ return _isStriderSkill; } + public final boolean isAioSkill() + { + return Config.LIST_AIO_SKILLS.containsKey(getId()); + } + public final boolean isSiegeSummonSkill() { return _isSiegeSummonSkill; Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadManager.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadManager.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadManager.java (working copy) @@ -21,6 +21,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import net.sf.l2j.Config; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; @@ -153,6 +154,12 @@ return false; } + if (AioManager.getInstance().hasAioPrivileges(player.getObjectId())) + { + player.sendMessage("You cannot participate in the Olympiad games under aio privileges."); + return false; + } + switch (type) { case CLASSED: Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java (working copy) @@ -15,6 +15,7 @@ package net.sf.l2j.gameserver.network.serverpackets; import net.sf.l2j.Config; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.datatables.NpcTable; import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager; import net.sf.l2j.gameserver.model.Location; @@ -51,7 +52,12 @@ writeD(_activeChar.getZ()); writeD(_activeChar.getHeading()); writeD(_activeChar.getObjectId()); - writeS(_activeChar.getName()); + + if (Config.ALLOW_AIO_NAME) + writeS(AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_NAME + _activeChar.getName() : _activeChar.getName()); + else + writeS(_activeChar.getName()); + writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex().ordinal()); @@ -138,8 +144,11 @@ if (gmSeeInvis) writeS("Invisible"); else - writeS(_activeChar.getTitle()); - + if (Config.ALLOW_AIO_TITLE) + writeS(AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_TITLE : _activeChar.getTitle()); + else + writeS(_activeChar.getTitle()); + writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); @@ -206,15 +215,21 @@ writeD(0); } - writeD(_activeChar.getAppearance().getNameColor()); - + if (Config.ALLOW_AIO_NAME_COLOR) + writeD(AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_NAME_COLOR : _activeChar.getAppearance().getNameColor()); + else + writeD(_activeChar.getAppearance().getNameColor()); + writeD(0x00); // isRunning() as in UserInfo? writeD(_activeChar.getPledgeClass()); writeD(_activeChar.getPledgeType()); - writeD(_activeChar.getAppearance().getTitleColor()); - + if (Config.ALLOW_AIO_TITLE_COLOR) + writeD(AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_TITLE_COLOR : _activeChar.getAppearance().getTitleColor()); + else + writeD(_activeChar.getAppearance().getTitleColor()); + if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponsManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); else Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java (revision 3) +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java (working copy) @@ -15,6 +15,7 @@ package net.sf.l2j.gameserver.network.serverpackets; import net.sf.l2j.Config; +import net.sf.l2j.gameserver.instancemanager.AioManager; import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager; import net.sf.l2j.gameserver.model.L2Object.PolyType; import net.sf.l2j.gameserver.model.Location; @@ -51,7 +52,10 @@ writeD(_activeChar.getHeading()); writeD(_activeChar.getObjectId()); - writeS((_activeChar.getPolyTemplate() != null) ? _activeChar.getPolyTemplate().getName() : _activeChar.getName()); + if (Config.ALLOW_AIO_NAME) + writeS((_activeChar.getPolyTemplate() != null) ? _activeChar.getPolyTemplate().getName() : AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_NAME + _activeChar.getName() : _activeChar.getName()); + else + writeS((_activeChar.getPolyTemplate() != null) ? _activeChar.getPolyTemplate().getName() : _activeChar.getName()); writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex().ordinal()); @@ -197,7 +201,10 @@ writeD(_activeChar.getAppearance().getFace()); writeD(_activeChar.isGM() ? 1 : 0); // builder level - writeS((_activeChar.getPolyType() != PolyType.DEFAULT) ? "Morphed" : _activeChar.getTitle()); + if (Config.ALLOW_AIO_TITLE) + writeS((_activeChar.getPolyType() != PolyType.DEFAULT) ? "Morphed" : AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_TITLE : _activeChar.getTitle()); + else + writeS((_activeChar.getPolyType() != PolyType.DEFAULT) ? "Morphed" : _activeChar.getTitle()); writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); @@ -264,7 +271,10 @@ writeD(0); } - writeD(_activeChar.getAppearance().getNameColor()); + if (Config.ALLOW_AIO_NAME_COLOR) + writeD(AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_NAME_COLOR : _activeChar.getAppearance().getNameColor()); + else + writeD(_activeChar.getAppearance().getNameColor()); // new c5 writeC(_activeChar.isRunning() ? 0x01 : 0x00); // changes the Speed display on Status Window @@ -272,7 +282,10 @@ writeD(_activeChar.getPledgeClass()); // changes the text above CP on Status Window writeD(_activeChar.getPledgeType()); - writeD(_activeChar.getAppearance().getTitleColor()); + if (Config.ALLOW_AIO_TITLE_COLOR) + writeD(AioManager.getInstance().hasAioPrivileges(_activeChar.getObjectId()) ? Config.AIO_TITLE_COLOR : _activeChar.getAppearance().getTitleColor()); + else + writeD(_activeChar.getAppearance().getTitleColor()); if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponsManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1); Index: aCis_gameserver/java/net/sf/l2j/gameserver/templates/L2Aio.java =================================================================== --- aCis_gameserver/java/net/sf/l2j/gameserver/templates/L2Aio.java (revision 0) +++ aCis_gameserver/java/net/sf/l2j/gameserver/templates/L2Aio.java (working copy) @@ -0,0 +1,54 @@ +/* + * 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 net.sf.l2j.gameserver.templates; + +/** + * @author rapfersan92 + */ +public class L2Aio +{ + private int _id; + private long _duration; + private int _feeId; + private int _feeVal; + + public L2Aio(StatsSet set) + { + _id = set.getInteger("id"); + _duration = set.getLong("duration"); + _feeId = set.getInteger("feeId"); + _feeVal = set.getInteger("feeVal"); + } + + public int getId() + { + return _id; + } + + public long getDuration() + { + return _duration; + } + + public int getFeeId() + { + return _feeId; + } + + public int getFeeVal() + { + return _feeVal; + } +}
    1 point
×
×
  • 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.