Jump to content

Recommended Posts

Posted

Requested σε pm και ειπα να το κανω share,ισως το θελει καποιος.

Ενα απλο npc που οποιος παιχτης παει διπλα του τον κανει heal αυτοματα χωρις target , τπτ.Επισης οποιος δει τον κωδικα και απορει αν ο κωδικας μπορει να φερει lag , η απαντηση ειναι ΟΧΙ και ο λογος ειναι οτι χιλιαδες tasks τρεχουν την ιδια ωρα.Σκεφτειτε οτι το baium κανει ανα 1-2 δευτερολεπτο actions που χρησιμοποιουν tasks.Αρα δεν υπαρχει προβλημα..

 

Type στο navicat: L2Healer

 

/*
* 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 java.util.concurrent.ScheduledFuture;

import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.serverpackets.MagicSkillUser;
import net.sf.l2j.gameserver.templates.L2NpcTemplate;

/**
* @author irat
*
*/
public class L2HealerInstance extends L2NpcInstance
{

private ScheduledFuture<?> _aiTask;

public L2HealerInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);

	if (_aiTask != null)
            _aiTask.cancel(true);

    _aiTask = ThreadPoolManager.getInstance().scheduleAiAtFixedRate(new Heal(this), 3000, 3000);
}

public void deleteMe()
    {
       if (_aiTask != null)
        {
           _aiTask.cancel(true);
           _aiTask = null;
        }
    }

private class Heal implements Runnable
    {
        private L2HealerInstance _heal;

        protected Heal(L2HealerInstance caster)
        {
            _heal = caster;
        }

        public void run()
        {
        	L2Skill skill = SkillTable.getInstance().getInfo(1218, 1);
          for (L2PcInstance player : getKnownList().getKnownPlayersInRadius(100))
          {
                   if(player == null)
                	   continue;
                  
                 player.sendPacket(new MagicSkillUser(player, player, 1218, 1, skill.getHitTime(),0));
                 player.setCurrentHp(player.getMaxHp());
                 player.setCurrentCp(player.getMaxCp());
                 player.setCurrentMp(player.getMaxMp());
          }
      }
    }
}

 

 

Posted

Ti tha ginei omos ama poli pextes pali oloi mazi sto npc?Epeishs kalo tha itan na valeis kai merika restriction ;)

Posted

Ti tha ginei omos ama poli pextes pali oloi mazi sto npc?Epeishs kalo tha itan na valeis kai merika restriction ;)

restriction μπορει να βαλει ο καθενας πιστευω , απλα αυτο ειναι το βασικο δηλαδη το σημαντικο μερος.
  • 3 weeks later...
  • 2 weeks later...

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

    • No, the real purpose is cheating and custom  development for games.  I'm building a custom AI moderator specially for checking illegal activity and flag current topica.
    • Hello trying to edit Armorgrp_Classic.dat using L2ClientDat Editor - l2jmobius edition I can normally open a file but can't save, even can't save "clean" version of file (just open and then click save) Other files i can normally open, edit and save. but there is problem with Armorgrp_Classic.dat Anyone find solution, or other Editor for protocol 166 ?   [25/12 15:10:11] --------------------------------------- [25/12 15:10:11] Open file: Armorgrp_Classic.dat [25/12 15:10:11] File Armorgrp_Classic.dat encrypted. Lineage2Ver413 decrypt ... [25/12 15:10:11] Decrypt Armorgrp_Classic.dat file successfully by v413_encdec decrypter. [25/12 15:10:11] Read the file structure ... [25/12 15:10:11] Unpacking [L2GameDataName.dat] [25/12 15:10:11] GameDataName: Load 97534 count. [25/12 15:10:11] Completed. [25/12 15:11:32] Wrong param count for wrapper: fertheia_mesh_add, paramIndex: 1, params: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} -node: fertheia_mesh_add[WRAPPER][null][null] param: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} org.l2jmobius.xml.exceptions.PackDataException: Wrong param count for wrapper: fertheia_mesh_add, paramIndex: 1, params: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} -node: fertheia_mesh_add[WRAPPER][null][null] param: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} at org.l2jmobius.xml.DescriptorWriter.packData(DescriptorWriter.java:275) at org.l2jmobius.xml.DescriptorWriter.packData(DescriptorWriter.java:184) at org.l2jmobius.xml.DescriptorWriter.parseData(DescriptorWriter.java:100) at org.l2jmobius.actions.SaveDat.action(SaveDat.java:70) at org.l2jmobius.actions.ActionTask.doInBackground(ActionTask.java:48) at org.l2jmobius.actions.ActionTask.doInBackground(ActionTask.java:27) at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:303) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328) at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:340) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619) at java.base/java.lang.Thread.run(Thread.java:1447) [25/12 15:11:32] buff == null.  
    • Leave your contact information or write to me on Telegram @dieorditsa
    • Hello everyone, I’m looking for a graphic designer to design a custom logo that will be used in NPC HTML interfaces for Lineage. Please send me a private message if you are interested.
    • ok sounds good sign me up
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock