Jump to content
  • 0

"player" Cannot Be Resolved


Question

Posted

Script if someone need it, make all GrandBoss Chaotic Zone http://www.lineager.su/always-pvp-status-in-boss-zone/

 

Someone know why got this error? Thanks guys.

 

Error

 

1449250944_error.png

 

PvpFlagTaskManager.java

/**
 * Updates and clears PvP flag of {@link L2PcInstance} after specified time.
 * @author Tryskell, Hasha
 */
public final class PvpFlagTaskManager implements Runnable
{
    private final Map<L2PcInstance, Long> _players = new ConcurrentHashMap<>();
    
    public static final PvpFlagTaskManager getInstance()
    {
        return SingletonHolder._instance;
    }
    
    protected PvpFlagTaskManager()
    {
        // Run task each second.
        ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(this, 1000, 1000);
    }
    
    /**
     * Adds {@link L2PcInstance} to the PvpFlagTask.
     * @param player : L2PcInstance to be added and checked.
     * @param time : Time in ms, after which the PvP flag is removed.
     */
    public final void add(L2PcInstance player, long time)
    {
        _players.put(player, System.currentTimeMillis() + time);
    }
    
    /**
     * Removes {@link L2PcInstance} from the PvpFlagTask.
     * @param player : {@link L2PcInstance} to be removed.
     */
    public final void remove(L2PcInstance player)
    {
        _players.remove(player);
    }
    
    @Override
    public final void run()
    {
        // List is empty, skip.
        if (_players.isEmpty())
            return;
        
        // Get current time.
        final long currentTime = System.currentTimeMillis();
        
        // Loop all players.
        for (Iterator<Map.Entry<L2PcInstance, Long>> iterator = _players.entrySet().iterator(); iterator.hasNext();)
        {
            // Get entry of current iteration.
            Map.Entry<L2PcInstance, Long> entry = iterator.next();
            
            // Get time left and check.
            final long timeLeft = entry.getValue();
            
            if (_players.isInsideZone(ZoneId.BOSS))
            entry.setValue(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

            
            // Time is running out, clear PvP flag and remove from list.
            if (currentTime > timeLeft)
            {
                entry.getKey().updatePvPFlag(0);
                iterator.remove();
            }
            // Time almost runned out, update to blinking PvP flag.
            else if (currentTime > (timeLeft - 5000))
                entry.getKey().updatePvPFlag(2);
            // Time didn't run out, keep PvP flag.
            else
                entry.getKey().updatePvPFlag(1);
        }
    }
    
    private static class SingletonHolder
    {
        protected static final PvpFlagTaskManager _instance = new PvpFlagTaskManager();
    }
}
Modificar mensaje

3 answers to this question

Recommended Posts

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

    • Introducing: Cloud Hosting and Stream Rewards!   Hey everyone, I'm excited to share something big on top of the recent NimeraCP V2 update I announced a few days ago. We're introducing Cloud Hosting and Stream Rewards!   Starting at 30 euros per month, subscribing to NimeraCP will give you access to deploy your own instance directly through your dashboard on nimeracp.com. This is a huge upgrade for our ecosystem, offering a much more affordable option than self-hosting and simplifying the entire installation process. No more wasting hours setting things up, buying separate dedicated hosts or VPSs, just deploy on our infrastructure and relax.     Currently these packs are available for Cloud Hosting:   aCis r382 aCis r401 aCis r409 L2Scripts Vanguard   More are coming soon as development progresses. If you need your pack to be added, please reach out to us.   On top of that, we've rolled out an update that introduces Stream Rewards. Now, players can link their Kick, Twitch or Trovo accounts to NimeraCP, stream, and earn rewards. Admins can create reward campaigns, set a required streaming time, and when a streamer meets the requirements, they can instantly transfer the reward to their game character.     As I mentioned in our last update, big things are coming, and this is just the beginning.   Best, Splicho
    • There were a few minor hiccups along the way, but the problem was eventually resolved. Overall, he is a very experienced, skilled, and trustworthy developer, and I will definitely continue to use his services in the future. thank yuo .   this topic can be locked please . thank you  
    • 99.99% of the people you 'sell' this to will not see any meaning on any sort of code, as simple or complicated as it may be, so i suggest the video. would be much better for practical reasons. good luck though
    • I've completely decompiled, replicated, and devirtualized the Gamear DLL file. You can see it there; otherwise, wait a day or two and I'll make a video myself. Best regards. static int __fastcall hkAEmitter_Tick_Impl(void* this_, void* /*edx*/, float dt, int levelTick) {     // Ares: if (IsA(this, AEmitter))     if (this_ && g_UClass_Emitter && GX_IsA(this_, g_UClass_Emitter))     {         // Ares: v7 = sub_1300CAA0()         void* v7 = g_localPawn;         if (v7)         {             // Ares: if IsA(v7, APawn) && lvl in (0,8)             if (g_UClass_APawn && GX_IsA(v7, g_UClass_APawn))             {                 const int lvl = (int)InterlockedCompareExchange((volatile LONG*)&g_skipLevel, 0, 0);                 if (lvl > 0 && lvl < 😎                 {                     // Ares: v6 = sub_13026800(this, v7)                     const float v6 = GX_Distance3D(this_, v7);                     // Live-tuning (debug): aplica overrides en runtime                     GX_LiveApply_Tick(this_, v6); Today I'll see how the classic client works on the Eris server. If it works well, I'll proceed to decompile the dll for classic as well. GG.. 🙂
  • 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..