Jump to content

B1ggBoss

Legendary Member
  • Posts

    494
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by B1ggBoss

  1. My account have been used w/o my permission, someone got my pwd somehow.

    To clarify:

    I dont have skype, i dont know who is that dengo or whatver is spelled and i dont sell any vote system code. You just got scammed

    If it makes you feel better, you can ban me. i dont give a f*ck at all.

  2. If you are not going to give a gloval reward, and only want to give away what rb drops, just store in a list every player who gave damage (or maybe in a map with the damange amount). So, those who at least give X damage to raid, will enter in a randomized drop away.

     

    Abstract example:

    L2ItemInstance rewardDrop;
    List<L2PcInstance> playersWhoHitted;
    L2PcInstance randomPlayer = playersWhoHitted.get(Rnd.get(playersWhoHited.size()));
    randomPlayer.addItem("RB Random Drop", item, null, true);
    

  3. I offer myself as server developer (dunno, but lately i feel like i would enjoy working for a server).

    It must be interlude or lower chronicle, and server must be alredy working or in his way to be started (dont plan me to design you a server)

    Interested may pm me here or contact me at twitter

     

    Forget about payments by the moment

  4. Priority just give to the JVM the order in which threads must be executed, from 1 (lower priority) to 10 (max priority). And dont confuse yourself with the configs name. That "urgent" is not supossed for a critical execution peek or smth, the config itself is just the IOPacket thread pool core size.

  5. bad configured, they will ruin your server

    well configured, wont be a big performance impact, in fact, server wont feel so much difference between default config and custom config.

     

    This is a little explanation:

    A thread pool is a "recipent" where threads are create to execute enqueued tasks (Runnable). As you see, first parameters talk about sizes. That size is the number of threads which are created and used to execute those tasks in each Thread pool

     

    L2J Server uses various thread pools:

    General thread pool: to execute general-purpose code

    IO Thread pool: to read from/write to packet bytebuffers packets

    General packet thread pool: to execute the code with the data from bytebuffers packet

     

    It also has scheduled thread pool (thread pools wich executes the task in the future)

    Effect scheduled pool: used to manage effects time, add and removal

    General scheduled pool: general-purpose scheduled thread pool

    AI Scheduled thread pool: used to execute the events comming from AI execution

     

    In total, 6 thread pool, each one with his configured thread pool size.

     

    Now, what you must know and think before change the config is: There will not be never more threads in execution than your machine core processor.

    If you have a Intel i7 quad core with 4x processors, there will not be never more than 4 thread executing at the same time.

     

    Now, to proceed to configure it you should know about the kernel switch context and how it works, how threads are release (even if they are not finished) to give time to other threads, and how to get rid and use the time the cores are released by blocking access from threads.

     

    Resuming, dont touch them

  6. You must add imports yourself

    public final class CustomTeleport extends Quest {
    private static final String qn = "CustomTeleport";
    
    private static final int X = 0; // Coordinate X from spawn;
    private static final int Y = 0; //   "	  "   Y  "     "  
    private static final int Z = 0; //   "    "   Z  "     "
    private static final int HEADING = 0; // Heading. Can be 0
    
    private static final int NPC_ID = 0; // NPC which will be used as teleport
    
    private static final String HTML_TELEPORTED = "<html><title>Custom Teleport</title><center><br>You are being teleported to YOUR_PLACE</center></body></html>";
    private static final String HTML_LOWLEVEL = "<html><title>Custom Teleport</title><center><br>You must be at least level 79</center></body></html>
    
    public CustomTeleport(int questId, String name, String descr) {
    	super(questId, name, descr);
    	addFirstTalkId(NPC_ID);
    }
    
    @Override
    public String onFirstTalk(L2Npc npc, L2PcInstance player) {
    	if(player.getQuestState(qn) == null)
    		newQuestState(player);
    
    	if(player.getLevel() >= 79) {
    		player.teleToLocation(X,Y,Z,HEADING,0);
    		return HTML_TELEPORTED
    	} else 
    		return HTML_LOWLEVEL;
    }
    
    public static void main(String...args) {
    	new CustomTeleport(-1,qn,"Custom Teleport");
    }
    }

  7. 1. Right now i cant tell you exactly where you would have to change it, but i think in the CreateChar packet could be fine: there, you would have to add somthing like getClient().getActiveChar().setInstanceId(id) of the instance where you have setted him to spawn.

    3. You only need to open 7777 and 9014 in TCP protocol. If loginserver and gameserver are in different machines, open 2106 in TCP as well.

    You have to place your lan ip at internalip. you may find your internal ip by run > cmd > ipconfig

    You have to place your wan ip at external ip. you may find your external ip by enter in

    whatismyip.com

    If you have dynamic ip (internal and/or external) you'll have to change configs and restart server everytime it changes (or use a hostname)

  8. the first error i see is, after you set him champ lvl 2, whenever it is a champion or not, you always revoke his lvl 2 status (after fist if block). So, try using a else

     

    public boolean doDie(L2Character killer)
              {
                    if(Config.L2JMOD_CHAMPION_ENABLE)
    	{
    		if(isChampion())
    		{
    			setChampionlv2(true);
    			return true;
    		}
    	} else {
                        setChampion(false);
    	    setChampionlv2(false);
    	}
    
    	//TODO
    	if(Config.L2JMOD_CHAMPION_ENABLE)
    	{
    		//Set champion on next spawn
    		if(!(this instanceof L2GrandBossInstance) 
    		&& !(this instanceof L2RaidBossInstance)
    		&& !isChampionlv2()
    		&& this instanceof L2MonsterInstance
    		&& Config.L2JMOD_CHAMPION_FREQUENCY > 0 
    		&& getLevel() >= Config.L2JMOD_CHAMP_MIN_LVL 
    		&& getLevel() <= Config.L2JMOD_CHAMP_MAX_LVL)
    		{
    			int random = Rnd.get(100);
    			if(random < Config.L2JMOD_CHAMPION_FREQUENCY)
    			{
    				setChampion(true);
    			}
    		}
    	}return true;
    }
    

  9. I coded it using notepad, so may contain typos (and be sure package name match where you are gona place it)

     

    package custom.obtainitemfrommob;
    
    import com.l2jserver.gameserver.model.actor.L2Npc;
    import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
    import com.l2jserver.gameserver.model.quest.Quest;
    import com.l2jserver.gameserver.model.quest.QuestState;
    
    public final class ObtainItemFromMob extends Quest {
    private static final String qn = "ObtainItemFromMob";
    
    private static final int ITEM_ID = 0; //Item given on mob death
    private static final long ITEM_COUNT = 1L; //A-beep-t given (1 by default)
    private static final int[] MOBS = {00000,00001} // Mobs ids separated by ,
    
    public ObtainItemFromMob(int questId, String name, String dscr) {
    	super(questId, name, dscr);
    	for(int i : MOBS)
    		addKillId(i);
    }
    
    @Override
    public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet) {
    	QuestState st = killer.getQuestState(qn);
    	if(st == null)
    		st = newQuestState(killer);
    
    	killer.addItem(qn,ITEM_ID,ITEM_COUNT,npc,true);
    	st.playSound("Itemsound.quest_itemget");
    	return null;
    }
    
    public static void main(String...args) {
    	new ObtainItemFromMob(-1,qn,"");
    }
    }
    

×
×
  • Create New...