Jump to content
  • 0

Character Killing Monument


Question

Posted (edited)

Hello MxC!

I am trying to adapt a event that every day will spawn a npc with the outfit of the top player. I managed to add the patch that i found but on aCis 401 that im using a lot of things are changes. I dont have any error but the npc doesn't appear as it has. here is the patch for what i did.

https://pastebin.com/nnpTSaJ9

 I think the problem is on this lines

+    public void setPolymorphInfo(CharSelectInfoPackage polymorphInfo)
+    {
+        _polymorphInfo = polymorphInfo;
+        
+        for (L2Object object : getKnownList().getKnownObjects())
+        {
+            if (object instanceof L2PcInstance)
+            {
+                sendInfo(object.getActingPlayer());
+            }
+        }
+    }

this is from an older acis pack.

 

I did it like this:

    public void setPolymorphInfo(CharSelectSlot polymorphInfo)
    {
        _polymorphInfo = polymorphInfo;
        
        for (Object object : getKnownTypeInRadius(Player.class, 2000))
        {
            if (object instanceof Player)
            {
                sendInfo(((Player) object).getActingPlayer());
            }
        }
    }

if anyone can help i will apreciate it

Edited by Vision

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

no.

image.png.dd26519cb8013ca92d8eb4e834b32dff.png

Im stupid. fixed.

    public void setPolymorphInfo(CharSelectSlot polymorphInfo)
    {
        _polymorphInfo = polymorphInfo;
        
        for (WorldObject object : getKnownType(Player.class))
        {
            if (object instanceof Player)
            {
                sendInfo(object.getActingPlayer());
            }
        }
    }

its not Object its WorldObject.

There are more to fix. I will update the patch when im done for anyone interesting

https://pastebin.com/MdMQdEwe

 

 

Edited by andy1984
None
  • 0
Posted

Hello again!

I found something that is bothering me a lot on this system. When i spawn the npc and no active winner to show his monument the heading on npc  is fine. When a winner exist and his monument spawn, heading is always to the east. i tryed to change is in the serverpacket and made it even static number to check and nothing happened. Any clue?

  • 0
Posted
10 hours ago, xJustMe said:

Maybe try this, i dont know if it will help 😄
 

 

I allready tryed it. Its always the same. Even when you login a normal character always is heading to the east.

  • 0
Posted
for (WorldObject object : getKnownType(Player.class))
{
if (object instanceof Player)
{
sendInfo(object.getActingPlayer());
}
}

>

getKnownType(Player.class).forEach(p -> sendInfo(p));
  • 0
Posted
33 minutes ago, Tryskell said:

for (WorldObject object : getKnownType(Player.class))
{
if (object instanceof Player)
{
sendInfo(object.getActingPlayer());
}
}

>

getKnownType(Player.class).forEach(p -> sendInfo(p));

is there any difference in performance ( faster completing task ) in the different types ?

  • 0
Posted
2 hours ago, Tryskell said:

for (WorldObject object : getKnownType(Player.class))
{
if (object instanceof Player)
{
sendInfo(object.getActingPlayer());
}
}

>

getKnownType(Player.class).forEach(p -> sendInfo(p));

thanks for the top. any clue about heading?

  • 0
Posted (edited)
  1. + private void broadcastPvPMorphUpdate(L2PcPolymorph npc, CharSelectSlot winnerPvPKillsInfo)
  2. + {
  3. + if (winnerPvPKillsInfo == null)
  4. + {
  5. + npc.setPolymorphInfo(null);
  6. + return;
  7. + }
  8. + npc.setVisibleTitle(Config.CKM_PVP_NPC_TITLE.replaceAll("%kills%", String.valueOf(_winnerPvPKillsCount)));
  9. + npc.setTitleColor(Config.CKM_PVP_NPC_TITLE_COLOR);
  10. + npc.setNameColor(Config.CKM_PVP_NPC_NAME_COLOR);
  11. + npc.setPolymorphInfo(winnerPvPKillsInfo);
  12. + npc.broadcastPacket(new SocialAction(npc, 16));'
  13.  ++ npc.setHeading(VALUE)
  14. + }
  15. +
  16. + private void broadcastPKMorphUpdate(L2PcPolymorph npc, CharSelectSlot winnerPKKillsInfo)
  17. + {
  18. + if (winnerPKKillsInfo == null)
  19. + {
  20. + npc.setPolymorphInfo(null);
  21. + return;
  22. + }
  23. + npc.setVisibleTitle(Config.CKM_PK_NPC_TITLE.replaceAll("%kills%", String.valueOf(_winnerPKKillsCount)));
  24. + npc.setTitleColor(Config.CKM_PK_NPC_TITLE_COLOR);
  25. + npc.setNameColor(Config.CKM_PK_NPC_NAME_COLOR);
  26. + npc.setPolymorphInfo(winnerPKKillsInfo);
  27. + npc.broadcastPacket(new SocialAction(npc, 16));
  28.  ++ npc.setHeading(VALUE)
  29. + }
  30. +
 
  1. + public void broadcastMorphUpdate()
  2. + {
  3. + final CharSelectSlot winnerPvPKillsInfo = getWinnerPvPKillsInfo();
  4. + for (L2PcPolymorph npc : pvpMorphListeners)
  5. + {
  6. + broadcastPvPMorphUpdate(npc, winnerPvPKillsInfo);
  7.  npc.setHeading(VALUE)
  8. + }
  9. +
  10. + final CharSelectSlot winnerPKKillsInfo = getWinnerPKKillsInfo();
  11. + for (L2PcPolymorph npc : pkMorphListeners)
  12. + {
  13. + broadcastPKMorphUpdate(npc, winnerPKKillsInfo);
  14.  npc.setHeading(VALUE)
  15. + }
  16. + }
try this
Edited by LoVe+

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Vouch for @Ave i can say im very statisfied with the order I've made he was fast and reliable i totally recommend him to anyone who wants a decent updater with high quality design.
    • What can I say other than that I’m satisfied with the order I made. The guy is reliable and very good at what he does. I recommend him 100%.
    • Lineage2 Freya High Five @ Reshade with fog and rain etc @ Gracia final epilogue atmosphere   this reshade will eat lots of GPU power 50% or more of an RTX 3060 so be carefull depending on what effects are activated and their settings will eat even more GPU recomended 60hz monitor settings and via nvidia panel in Lineage2 game profile vsync settings to on effects are set up till film deck and the rest are not used but still working again this can eat alot of GPU Don't overheat GPU this is for freya high five but might work on others too copy in the  System  folder the folder  reshade-shaders  and the files  d3d9.dll  ReShade.ini  ReShadePreset.ini  ReShade.log  CccDddCcc.ini insert opens the menu and delete is on and of some settings need  ctrl + left click  to be changed   making another profile will reset the not activated effects to their default values so just copy the profile  CccDddCcc  and rename if needed also something needs to be closed from settings in game menu, the blur at distance and advanced shaders but keeping the advanced water effects all reflections   for those that don't like the h5 look of the sky and the red fog and rain and ambien red at night on all maps well if we want the cool gracia final epilogue back then we need to do this rename the  Maps  folder to Mapsretail or whatever copy the  Maps  folder from gracia final epilogue to h5 also we need the  L2_Skies.utx  from gracia final epilogue  Textures  folder to be replaced and also we need to do the same to the files  timeenv0.int  timeenv1.int  timeenv2.int  timeenv3.int  found in  system  folder   another setting that will probably be needed but not really tested out is to open file  option.ini  from  system  folder and add cachesize like this   [FirstRun] FirstRun=2   [Engine.GameEngine] CacheSizeMegs=512   also maybe is good to change those to 4.000000   [ClippingRange] Terrain=4.000000 Actor=4.000000 StaticMesh=4.000000 StaticMeshLod=4.000000 Pawn=4.000000       sorry bad english   https://mega.nz/file/aRNXxDrQ#mbxrNERBtW0XEEezK6w8-86oZWuX1k6NgtR6RZWKRVM   the compression on the video is kinda bad but meh    
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..