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
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

    • New Release World & atmosphere A complete dynamic weather system has arrived, with Clear, Light Rain, Rain, Heavy Rain, Storm, Snow, and Windy presets. Rain and snow react to roofs, wind moves foliage, lightning illuminates storms, exposed ground becomes wet and develops puddles, and snow builds up and melts over time. Weather includes Low to Ultra quality levels and advanced controls for precipitation, wind, cloud cover, lightning, surface wetness, puddles, and snow. The game server can also select or restore the current weather while local quality settings continue to control rendering cost. The weather can be controlled from the server with custom packets. For more details use Shift+Alt+P. Enhanced lighting now allows authored lamps, fires, and other light sources to illuminate towns and interiors. Lights can pulse, flicker, blink, and strobe, flames produce warm dynamic light, and lamps display depth-aware halos. Remastered emissive surfaces are now supported, beginning with illuminated windows in Giran that glow and cast light into their surroundings. Broadcasting Towers now use their correct original scale and animated rings and glow effects. Map, quests & navigation A complete quest journal has been added, with active and completed quests, expandable stages, descriptions, requirements, item progress, quest inventory integration, location controls, and quest cancellation. Quest objectives now appear through flashing minimap and world-map markers, an overhead directional guide, a notification button beside chat, and rotating quest symbols above eligible NPCs. Server-directed radar markers now work across the live minimap and world map, including the original overhead guidance effect and arrival behavior. The original tutorial system now works, including scrollable tutorial pages, animated illustrations, the flashing question button, tutorial links, and movement, camera, pickup, and sit/rest progression events. Server-opened town maps now display their original artwork and the supplied player marker. Shops, storage & items Personal, clan, castle, and freight warehouses now work, including deposits, withdrawals, stack quantities, fees, weight and capacity previews, tooltips, and the original warning and empty-storage dialogs. Account freight now works through the original recipient picker and delivery window, allowing items to be sent to another character on the same account. Multisell exchanges now work, with paged recipe lists, product details, required materials, quantity selection, warnings, and server-backed completion. Manor seed purchasing is now supported through the shop interface, including availability and pricing. Inventory items can now be dragged to the trash button and destroyed after the appropriate warning or quantity prompt. The original in-game calculator now works with mouse and keyboard input. Community The Community Board is now available from the system menu or Alt+B, with Home, Favorites, Region, Clan, Memo, Mail, and Friends sections, retained navigation, forms, scrolling, minimization, and server-provided pages. Characters, cameras & events Striders and Wyverns now render as fully animated mounts with the rider attached correctly. Striders remain ground-based, while Wyverns support three-dimensional flight. Characters now enter a proper falling state after high drops or airborne dismounts, with falling animations and server-authoritative landing and fall-damage handling. Players can now sit on authored world chairs using the correct sit, wait, and stand animations. Server-driven special camera sequences now work, including target tracking, interpolation, duration, widescreen bars, and restoration to the normal camera. GM camera mode and server-authorized ///fly movement are now supported. The original 102-second Kamael teaser sequence has been restored with its complete slideshow, transitions, panning artwork, localized subtitles, and narration. Hats, masks, circlets, and other hair accessories now use their authored head placement and correctly adjust the character's hairstyle. Timed server confirmation dialogs, short-duration status effects, regeneration previews, and the seasonal Christmas Seal presentation are now supported. Interface & performance Character creation has been refined with corrected description wrapping, clipping, layout, and name-entry presentation. Tutorial and NPC dialog windows now use polished proportional scrollbars, improved HTML layout, and correctly sized illustrations and controls. A new independent 3D render-resolution setting offers Native, 720p, 900p, 1080p, 1440p, and 4K choices while keeping the window, HUD, text, and FermaUI at native resolution. Major rendering optimizations reduce unnecessary work in local lighting, shadows, visibility, exposure, bloom, post-processing, and GPU diagnostics. Download from the launcher you have installed, or at https://updates.fermata.gg/ if you don't have the launcher. Fermata Light Engine Preview All lights can be baked in the client, shipped to the users, and exported and imported as .femlight files.
  • 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..