Jump to content

Question

Posted

Hello everyone, 

 

I'm trying to add a custom npc and it keeps saying applicant information is incorrect...

 


<npc id="50009" idTemplate="30952" name="Gatekeeper" title="Global">
        <set name="level" val="70"/>
        <set name="radius" val="7"/>
        <set name="height" val="35"/>
        <set name="rHand" val="0"/>
        <set name="lHand" val="0"/>
        <set name="type" val="L2Teleporter"/>
        <set name="usingServerSideName" val="true"/>
        <set name="usingServerSideTitle" val="true"/>
        <set name="exp" val="0"/>
        <set name="sp" val="0"/>
        <set name="hp" val="2444.46819"/>
        <set name="mp" val="1345.8"/>
        <set name="hpRegen" val="7.5"/>
        <set name="mpRegen" val="2.7"/>
        <set name="pAtk" val="688.86373"/>
        <set name="pDef" val="295.91597"/>
        <set name="mAtk" val="470.40463"/>
        <set name="mDef" val="216.53847"/>
        <set name="crit" val="4"/>
        <set name="atkSpd" val="253"/>
        <set name="str" val="40"/>
        <set name="int" val="21"/>
        <set name="dex" val="30"/>
        <set name="wit" val="20"/>
        <set name="con" val="43"/>
        <set name="men" val="20"/>
        <set name="corpseTime" val="7"/>
        <set name="walkSpd" val="50"/>
        <set name="runSpd" val="120"/>
        <set name="dropHerbGroup" val="0"/>
        <set name="attackRange" val="40"/>
        <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
        <skills>
            <skill id="4045" level="1"/>
            <skill id="4416" level="19"/>
        </skills>
    </npc>

 

Whenever i change 

 <set name="type" val="L2Teleporter"/>

to

 <set name="type" val="Teleporter"/>

i cant see the npc and the html but i cant go to the locations

13 answers to this question

Recommended Posts

  • 0
Posted (edited)

Your Buffer have type SchemeBuffer, so your rev is 367+, so you should use type as Gatekeeper and not L2Teleporter. 

Take a look on instances and make your npcs.

 

It should look like this: Copy and paste it.

        <npc id="50009" idTemplate="30952" name="Global Gatekeeper" title="Portal">
        <set name="usingServerSideName" val="true"/>
        <set name="usingServerSideTitle" val="true"/>
        <set name="level" val="70"/>
        <set name="radius" val="7"/>
        <set name="height" val="35"/>
        <set name="rHand" val="0"/>
        <set name="lHand" val="0"/>
        <set name="type" val="Gatekeeper"/>
        <set name="exp" val="0"/>
        <set name="sp" val="0"/>
        <set name="hp" val="2444.46819"/>
        <set name="mp" val="1345.8"/>
        <set name="hpRegen" val="7.5"/>
        <set name="mpRegen" val="2.7"/>
        <set name="pAtk" val="688.86373"/>
        <set name="pDef" val="295.91597"/>
        <set name="mAtk" val="470.40463"/>
        <set name="mDef" val="216.53847"/>
        <set name="crit" val="4"/>
        <set name="atkSpd" val="253"/>
        <set name="str" val="40"/>
        <set name="int" val="21"/>
        <set name="dex" val="30"/>
        <set name="wit" val="20"/>
        <set name="con" val="43"/>
        <set name="men" val="20"/>
        <set name="corpseTime" val="7"/>
        <set name="walkSpd" val="50"/>
        <set name="runSpd" val="120"/>
        <set name="dropHerbGroup" val="0"/>
        <skills>
            <skill id="4045" level="1"/>
            <skill id="4416" level="18"/>
        </skills>
    </npc>

Edited by 'Baggos'
  • Upvote 1
  • 0
Posted
9 minutes ago, andrepain said:

Hello everyone, 

 

I'm trying to add a custom npc and it keeps saying applicant information is incorrect...

 

 

 

 

Whenever i change 

 


 <set name="type" val="L2Teleporter"/>

 

to

 


 <set name="type" val="Teleporter"/>

 

i cant see the npc and the html but i cant go to the locations

 

Why would you want to do that? Leave it L2Teleporter.

  • 0
Posted
1 minute ago, Solomun said:

 

Why would you want to do that? Leave it L2Teleporter.

Because when it leave it L2Teleporter i get this message when trying to //spawn "applicant information is incorrect"

  • 0
Posted
2 minutes ago, andrepain said:

 

data\xml\npcs\50000-50999.xml

Do you get any console errors or wanings?

 

Dont npc XML files increase by 100? Your file is named 50999 instead of 50099. Maybe this is the problem.

  • 0
Posted
3 minutes ago, Solomun said:

Do you get any console errors or wanings?

 

Dont npc XML files increase by 100? Your file is named 50999 instead of 50099. Maybe this is the problem.

I've changed the file to name to 50000-50099 but keeps the same error...  and no i dont get any console errors or warning when i do //spawn 50009

  • 0
Posted
6 minutes ago, andrepain said:

I've changed the file to name to 50000-50099 but keeps the same error...  and no i dont get any console errors or warning when i do //spawn 50009

Do you have NPC with id 50008? If yes, can u spawn it?

  • 0
Posted
1 minute ago, Solomun said:

Do you have NPC with id 50008? If yes, can u spawn it?

yes i do 


<npc id="50008" idTemplate="30519" name="Tryskell" title="Crappy Buffer">
        <set name="usingServerSideName" val="true"/>
        <set name="usingServerSideTitle" val="true"/>
        <set name="level" val="70"/>
        <set name="radius" val="7"/>
        <set name="height" val="18"/>
        <set name="rHand" val="0"/>
        <set name="lHand" val="0"/>
        <set name="type" val="SchemeBuffer"/>
        <set name="exp" val="0"/>
        <set name="sp" val="0"/>
        <set name="hp" val="2444.46819"/>
        <set name="mp" val="1345.8"/>
        <set name="hpRegen" val="7.5"/>
        <set name="mpRegen" val="2.7"/>
        <set name="pAtk" val="688.86373"/>
        <set name="pDef" val="295.91597"/>
        <set name="mAtk" val="470.40463"/>
        <set name="mDef" val="216.53847"/>
        <set name="crit" val="4"/>
        <set name="atkSpd" val="253"/>
        <set name="str" val="40"/>
        <set name="int" val="21"/>
        <set name="dex" val="30"/>
        <set name="wit" val="20"/>
        <set name="con" val="43"/>
        <set name="men" val="20"/>
        <set name="corpseTime" val="7"/>
        <set name="walkSpd" val="50"/>
        <set name="runSpd" val="120"/>
        <set name="dropHerbGroup" val="0"/>
        <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
        <skills>
            <skill id="4045" level="1"/>
            <skill id="4416" level="18"/>
        </skills>
    </npc>

 

And i can spawn it 

  • 0
Posted

If you can see the npc and the html but you cant teleport, the bypass is wrong for the specific instance

  • 0
Posted (edited)

<set name="type" val="Gatekeeper"/>

then you get the id <npc id="51001" .... >

you go and create a file html/teleporter/51001.htm

 

and you add something like:

<html>
<body>
    <table width="300">
        <tr>
            <td align="center">
                <font color="FF9900">
                    Gatekeeper Belladonna
                </font>
                <img src="L2UI.SquareWhite" width="300" height="1"><br>
            </td>
        </tr>
        <tr>
            <td align="center">
                <table width="300">
                    <tr>
                        <td width="38">
                            <a action="bypass -h npc_%objectId%_Chat 1">
                                Towns
                            </a>
                        </td>
                        <td>
                            <a action="bypass -h npc_%objectId%_Chat 2">
                                Low lvl zones
                            </a>
                        </td>
                        <td>
                            <font color="FF9900">
                                [High lvl zones]
                            </font>
                        </td>
                        <td>
                            <a action="bypass -h npc_%objectId%_Chat 3">
                                Other Zones
                            </a>
                        </td>
                    </tr>
                </table><br>
                <img src="L2UI.SquareWhite" width="300" height="1"><br>
                <table width="320">
                    <tr>
                        <td width="75">
                            The Cemetary:
                        </td>
                        <td width="75">
                            <table>
                                <tr>
                                    <td width="10">
                                        <a action="bypass -h npc_%objectId%_goto 11033">
                                            1
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 11034">
                                            2
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="75">
                            [49-55]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a action="bypass -h npc_%objectId%_goto 11035">
                                Blazing Swamp
                            </a>
                        </td>
                        <td>
                            
                        </td>
                        <td>
                            [55-65]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Antharas' Lair:
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td width="10">
                                        <a action="bypass -h npc_%objectId%_goto 11036">
                                            1
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 11037">
                                            2
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            [65-73]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Imperial Tomb:
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td width="10">
                                        <a action="bypass -h npc_%objectId%_goto 11038">
                                            1
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 11039">
                                            2
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 11040">
                                            3
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 11041">
                                            4
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            [70-76]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a action="bypass -h npc_%objectId%_goto 11042">
                                Varka Silenos Outpost
                            </a>
                        </td>
                        <td>
                            
                        </td>
                        <td>
                            [70-76]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Tower of Insolence:
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td width="10">
                                        <a action="bypass -h npc_%objectId%_goto 11043">
                                            8
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            [70-75]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Forge of the Gods:
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td width="10">
                                        <a action="bypass -h npc_%objectId%_goto 12012">
                                            1
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 12013">
                                            2
                                        </a>
                                    </td>
                                    <td>
                                        <a action="bypass -h npc_%objectId%_goto 12010">
                                            3
                                        </a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            [72-85]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a action="bypass -h npc_%objectId%_goto 11044">
                                Elven Fortress
                            </a>
                        </td>
                        <td>
                            (Mantra Farm)
                        </td>
                        <td>
                            [72-78]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a action="bypass -h npc_%objectId%_goto 11045">
                                Elven Ruins
                            </a>
                        </td>
                        <td>
                            (Party Zone)
                        </td>
                        <td>
                            [72-78]
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

where chat 1 is 51001-1.htm and so on, where goto is id on teleportLocations.xml

Edited by Nightw0lf
  • 0
Posted

When it says information incorrect that means the npc was not loaded, aka you typed the instance name that does not exists, inside sources.

If npc is loaded correctly and bypass do not work, that means the location ID does not exists or the instance type is wrong aka does not recognize the bypass. 

Guest
This topic is now closed to further replies.


  • Posts

    • what pack you use  send me on discord for it
    • package custom.events.RandomZoneEvent; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ScheduledFuture; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.commons.time.SchedulingPattern; import org.l2jmobius.commons.time.TimeUtil; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.managers.ZoneManager; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Event; import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.model.zone.type.RandomZone; import org.l2jmobius.gameserver.util.Broadcast; /** * Random Zone Event - Activates one random PvP zone temporarily. No modifica la clase de la zona: usa flags PvP en runtime. * @author Juan */ public class RandomZoneEvent extends Event { private static final String CONFIG_FILE = "data/scripts/custom/events/RandomZoneEvent/config.xml"; private static int EVENT_DURATION_MINUTES = 15; private static boolean _isActive = false; private ScheduledFuture<?> _eventTask = null; private final List<ZoneType> _availableZones = new ArrayList<>(); private ZoneType _activeZone = null; public RandomZoneEvent() { loadConfig(); loadZones(); registerZoneListeners(); } /** * Registra listeners a TODAS LAS ZONAS random */ private void registerZoneListeners() { for (ZoneType zone : _availableZones) { addEnterZoneId(zone.getId()); addExitZoneId(zone.getId()); LOGGER.info("[RandomZoneEvent] Registered listener for zone: " + zone.getName()); } } private void loadConfig() { new IXmlReader() { @Override public void load() { parseDatapackFile(CONFIG_FILE); } @Override public void parseDocument(Document doc, File file) { forEach(doc, "event", eventNode -> { final StatSet att = new StatSet(parseAttributes(eventNode)); final String name = att.getString("name"); for (Node node = eventNode.getFirstChild(); node != null; node = node.getNextSibling()) { if ("schedule".equals(node.getNodeName())) { final StatSet attributes = new StatSet(parseAttributes(node)); final String pattern = attributes.getString("pattern"); final SchedulingPattern schedulingPattern = new SchedulingPattern(pattern); final StatSet params = new StatSet(); params.set("Name", name); params.set("SchedulingPattern", pattern); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer("Schedule_" + name, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Event " + name + " scheduled at " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } }); } }.load(); } private void loadZones() { for (ZoneType zone : ZoneManager.getInstance().getAllZones(RandomZone.class)) { if ((zone.getName() != null) && zone.getName().toLowerCase().startsWith("random_zone")) { _availableZones.add(zone); LOGGER.info("[RandomZoneEvent] Loaded zone: " + zone.getName() + " (id=" + zone.getId() + ")"); } } LOGGER.info("[RandomZoneEvent] Total random zones loaded: " + _availableZones.size()); } @Override public void onTimerEvent(String event, StatSet params, Npc npc, Player player) { if (event.startsWith("Schedule_")) { eventStart(null); final SchedulingPattern schedulingPattern = new SchedulingPattern(params.getString("SchedulingPattern")); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer(event, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Rescheduled for " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } @Override public boolean eventStart(Player eventMaker) { if (_isActive) { if (eventMaker != null) { eventMaker.sendMessage("RandomZoneEvent already active."); } return false; } if (_availableZones.isEmpty()) { Broadcast.toAllOnlinePlayers("[RandomZoneEvent] No zones configured."); return false; } _isActive = true; Broadcast.toAllOnlinePlayers("⚔️ Random Zone Event has started!"); _eventTask = ThreadPool.schedule(this::activateRandomZone, 5_000); return true; } private void activateRandomZone() { _activeZone = _availableZones.get(new Random().nextInt(_availableZones.size())); _activeZone.setEnabled(true); Broadcast.toAllOnlinePlayers("🔥 Random Zone Event: " + _activeZone.getName() + " is now PvP for " + EVENT_DURATION_MINUTES + " minutes!"); _eventTask = ThreadPool.schedule(this::eventStop, EVENT_DURATION_MINUTES * 60 * 1000L); } @Override public boolean eventStop() { if (!_isActive) { return false; } _isActive = false; if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } if (_activeZone != null) { _activeZone.setEnabled(false); Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended. " + _activeZone.getName() + " is back to normal."); _activeZone = null; } else { Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended."); } return true; } @Override public void onEnterZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, true); if (creature.isPlayer()) { creature.sendMessage("Esta zona está en modo PvP temporalmente."); } } } @Override public void onExitZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, false); if (creature.isPlayer()) { creature.sendMessage("Abandonaste la zona PvP temporal."); } } } @Override public boolean eventBypass(Player player, String bypass) { return true; } @Override public String onEvent(String event, Npc npc, Player player) { return super.onEvent(event, npc, player); } @Override public String onFirstTalk(Npc npc, Player player) { return null; } public static void main(String[] args) { new RandomZoneEvent(); } } i have this but its not working
  • 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