Jump to content

L2OLDPLAYER

Members
  • Posts

    10
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by L2OLDPLAYER

  1. How I can do this? EDIT : I see I need buy this for H5 if someone have this system send me a PM with price
  2. <item id="65379" type="Armor" name="Eternal"> <!-- Formal wear appears as a wedding dress for female characters and as a tuxedo for male characters. --> <set name="icon" val="Eternal_armor.armor_t703_u_i00" /> <set name="default_action" val="EQUIP" /> <set name="armor_type" val="HEAVY" /> <set name="bodypart" val="alldress" /> <set name="immediate_effect" val="true" /> <set name="material" val="CLOTH" /> <set name="weight" val="1000" /> <set name="price" val="5000000" /> </item> anyone know how to add skin to the server exactly item so that it does not replace armor ? this is the file I added to the server ;/
  3. Does anyone have skins for H5? or do you need to buy them? if you need to buy and someone has it, let them give a price + some preview
  4. It's windows but in fact if I buy vps hosting and put the server there, the website can be on localhost and it will work, right?
  5. I change this in mysql # Change here for bind listening # bind-address="127.0.0.1" # bind-address = ::1 # for ipv6 bind-address ="0.0.0.0" and add new user to detabase with all privilages , so now how configure this firewall?
  6. So how do I configure this account builder?
  7. could you elaborate? Add a user with some special accesses? I use Navicat
  8. Hello I have a problem because I don't understand something I have a website on xxx.com server I have a script uploaded there to create accounts for the server and now so if I have a server made on my computer on localhost then in the config I give $server_host = 'My IP not localhost ; <---. $db_user_name = 'root'; $db_user_password = ''; $db_database = 'l2jmobiusclassicinterlude; but when I want to connect to it the page says : Failed to connect to MySQL: Access denied for user 'root'@'localhost' (using password: NO) so how to connect it so that the script from the website on another server works with my server and the database which is standing on my computer
  9. it's ok but it's for frozen acis and lucera projects for interlude l2j mobius is not here
  10. Hello, recently I was cleaning up my disk and found an event from 2018 when I used to write events on my own. I'm not sure if I finished this one or if it even works, but I'm sharing the code here in case someone finds it useful as a base. The event involves two teams - the attacking blue team and the defending red team. The event lasts for 15 minutes, and the blue team must obtain a specific item mentioned in the code (which needs to be changed in the config), along with spawn locations and buffs. If the blue team obtains the item within the 15 minutes, the event ends, and the attacking team wins. If they fail to obtain the item, the defending red team wins. Cheers! GiranCastleSiegeEvent.java import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.team.PvpTeam; import net.sf.l2j.gameserver.model.zone.ZoneId; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.templates.spawn.SpawnTemplate; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.Calendar; import java.util.List; import java.util.ArrayList; import java.util.TimeZone; import java.util.Collections; public class GiranCastleSiegeEvent extends AbstractPvpEvent { private static final String CONFIG_FILE_PATH = "./configsiegeevent.txt"; private Location redTeamSpawnLocation; private Location blueTeamSpawnLocation; private int eventDurationMinutes; private int winningItemId; private int[] rewardItemIds; private int startHour1; private int startMinute1; private int startHour2; private int startMinute2; private int startHour3; private int startMinute3; private int startHour4; private int startMinute4; private int startHour5; private int startMinute5; private int registrationNpcX; private int registrationNpcY; private int registrationNpcZ; private int minLevelRequirement = 76; private int maxLevelRequirement = 80; private boolean isRedTeamWinner = false; private boolean isBlueTeamWinner = false; // sprawdzanie lvl private List<L2PcInstance> eligiblePlayers = new ArrayList<>(); // dead/respawn private List<L2PcInstance> deadPlayers = new ArrayList<>(); public GiranCastleSiegeEvent() { super("GiranCastleSiege", "Giran Castle Siege Event", 15); loadConfig(); spawnRegistrationNpc(); } private void loadConfig() { try (BufferedReader br = new BufferedReader(new FileReader(CONFIG_FILE_PATH))) { String line; while ((line = br.readLine()) != null) { String[] parts = line.trim().split("="); if (parts.length == 2) { String key = parts[0].trim().toUpperCase(); String value = parts[1].trim(); switch (key) { case "RED_TEAM_SPAWN": redTeamSpawnLocation = parseLocation(value); break; case "BLUE_TEAM_SPAWN": blueTeamSpawnLocation = parseLocation(value); break; case "EVENT_DURATION_MINUTES": eventDurationMinutes = Integer.parseInt(value); break; case "WINNING_ITEM_ID": winningItemId = Integer.parseInt(value); break; case "REWARDS_IDS": String[] rewardIdsStr = value.split(","); rewardItemIds = new int[rewardIdsStr.length]; for (int i = 0; i < rewardIdsStr.length; i++) { rewardItemIds[i] = Integer.parseInt(rewardIdsStr[i].trim()); } break; case "START_HOUR_1": startHour1 = Integer.parseInt(value); break; case "START_MINUTE_1": startMinute1 = Integer.parseInt(value); break; case "START_HOUR_2": startHour2 = Integer.parseInt(value); break; case "START_MINUTE_2": startMinute2 = Integer.parseInt(value); break; case "START_HOUR_3": startHour3 = Integer.parseInt(value); break; case "START_MINUTE_3": startMinute3 = Integer.parseInt(value); break; case "START_HOUR_4": startHour4 = Integer.parseInt(value); break; case "START_MINUTE_4": startMinute4 = Integer.parseInt(value); break; case "START_HOUR_5": startHour5 = Integer.parseInt(value); break; case "START_MINUTE_5": startMinute5 = Integer.parseInt(value); break; case "REGISTRATION_NPC_X": registrationNpcX = Integer.parseInt(value); break; case "REGISTRATION_NPC_Y": registrationNpcY = Integer.parseInt(value); break; case "REGISTRATION_NPC_Z": registrationNpcZ = Integer.parseInt(value); break; case "MIN_LEVEL_REQUIREMENT": minLevelRequirement = Integer.parseInt(value); break; case "MAX_LEVEL_REQUIREMENT": maxLevelRequirement = Integer.parseInt(value); break; } } } } catch (IOException | NumberFormatException e) { e.printStackTrace(); redTeamSpawnLocation = new Location(0, 0, 0, 0); blueTeamSpawnLocation = new Location(0, 0, 0, 0); eventDurationMinutes = 15; winningItemId = 25543; rewardItemIds = new int[]{34245, 67834, 45686}; startHour1 = 8; startMinute1 = 0; startHour2 = 12; startMinute2 = 0; startHour3 = 16; startMinute3 = 0; startHour4 = 20; startMinute4 = 0; startHour5 = 0; startMinute5 = 0; registrationNpcX = 0; registrationNpcY = 0; registrationNpcZ = 0; minLevelRequirement = 76; maxLevelRequirement = 80; } } private Location parseLocation(String value) { String[] parts = value.split(","); if (parts.length == 4) { int x = Integer.parseInt(parts[0]); int y = Integer.parseInt(parts[1]); int z = Integer.parseInt(parts[2]); int heading = Integer.parseInt(parts[3]); return new Location(x, y, z, heading); } return new Location(0, 0, 0, 0); } // spawnowanie npc private void spawnRegistrationNpc() { try { L2NpcTemplate template = NpcData.getInstance().getTemplate(23654); if (template != null) { SpawnTemplate spawnTemplate = new SpawnTemplate(); spawnTemplate.setNpcId(template.getNpcId()); spawnTemplate.setX(registrationNpcX); spawnTemplate.setY(registrationNpcY); spawnTemplate.setZ(registrationNpcZ); spawnTemplate.setHeading(0); L2Spawn spawn = new L2Spawn(spawnTemplate); spawn.init(); spawn.setRespawnDelay(1); spawn.startRespawn(); } } catch (Exception e) { e.printStackTrace(); } } private boolean isPlayerLevelValid(L2PcInstance player) { int playerLevel = player.getLevel(); return playerLevel >= minLevelRequirement && playerLevel <= maxLevelRequirement; } // usuwanie bufow i lista buf event private void buffPlayers() { for (L2PcInstance player : eligiblePlayers) { player.stopAllEffects(); // Usuń wszystkie bufy for (int buffId : new int[]{56, 67, 35, 77, 865, 436, 356, 32, 678, 34, 12, 45, 18, 111, 22, 33, 44, 55, 66, 77, 88, 99, 98, 75}) { player.doCast(SkillData.getInstance().getSkill(buffId).getSkill()); } } } // funcka reespawn po smierci private void respawnDeadPlayers() { for (L2PcInstance player : deadPlayers) { // spawn start PvpTeam team = getTeam(player); if (team != null) { Location spawnLocation = team == getRedTeam() ? redTeamSpawnLocation : blueTeamSpawnLocation; player.teleToLocation(spawnLocation, false); // Przywróć bufy gracza player.stopAllEffects(); for (int buffId : new int[]{56, 67, 35, 77, 865, 436, 356, 32, 678, 34, 12, 45, 18, 111, 22, 33, 44, 55, 66, 77, 88, 99, 98, 75}) { player.doCast(SkillData.getInstance().getSkill(buffId).getSkill()); } } } deadPlayers.clear(); } private class RespawnTask implements Runnable { private final L2PcInstance player; public RespawnTask(L2PcInstance player) { this.player = player; } public void run() { player.setIsDead(false); respawnDeadPlayers(); } } protected Location getRedTeamSpawnLocation() { return redTeamSpawnLocation; } protected Location getBlueTeamSpawnLocation() { return blueTeamSpawnLocation; } protected void onEventStart() { buffPlayers(); // buff graczy } public void onKill(L2Character killer, L2Character victim, boolean isPet) { if (isRunning() && victim instanceof L2PcInstance && eligiblePlayers.contains(victim)) { L2PcInstance player = (L2PcInstance) victim; player.setIsDead(true); deadPlayers.add(player); ThreadPoolManager.getInstance().schedule(new RespawnTask(player), 10000); // Respawn po 10 sekundach } } public boolean canUseUnstuck(L2PcInstance player) { // usuwanie funkcji teleportu return !isRunning() || !eligiblePlayers.contains(player); } public boolean canUseTeleportScroll(L2PcInstance player, ItemInstance scroll) { // blokada scroli return !isRunning() || !eligiblePlayers.contains(player); } } configsiegeevent.txt # Configurations for Giran Castle Siege Event RED_TEAM_SPAWN = 10000,20000,30000,0 BLUE_TEAM_SPAWN = 40000,50000,60000,0 EVENT_DURATION_MINUTES = 15 WINNING_ITEM_ID = 25543 REWARDS_IDS = 34245,67834,45686 START_HOUR_1 = 8 START_MINUTE_1 = 0 START_HOUR_2 = 12 START_MINUTE_2 = 0 START_HOUR_3 = 16 START_MINUTE_3 = 0 START_HOUR_4 = 20 START_MINUTE_4 = 0 START_HOUR_5 = 0 START_MINUTE_5 = 0 REGISTRATION_NPC_X = 2345672364 REGISTRATION_NPC_Y = 343253535 REGISTRATION_NPC_Z = 34543545 MIN_LEVEL_REQUIREMENT = 76 MAX_LEVEL_REQUIREMENT = 80 RESPAWN_DELAY_SECONDS = 10 I immediately noticed that there is a mistake. I didn't add that players from the defending red team cannot pick up the item that causes victory for the attacking blue team... this needs to be added to the code. update onKill method public void onKill(L2Character killer, L2Character victim, boolean isPet) { if (isRunning() && victim instanceof L2PcInstance && eligiblePlayers.contains(victim)) { L2PcInstance player = (L2PcInstance) victim; if (isRedTeamPlayer(player) && player.isCarryingItem(winningItemId)) { player.sendMessage("You cannot pick up the winning item as you are from the defending team."); return; } player.setIsDead(true); deadPlayers.add(player); ThreadPoolManager.getInstance().schedule(new RespawnTask(player), respawnDelaySeconds * 1000); } } and update for isRedTeamPlayer method private boolean isRedTeamPlayer(L2PcInstance player) { return getTeam(player) == getRedTeam(); } Good Luck Guys
      • 2
      • Like
×
×
  • Create New...