Jump to content
  • 0

[Requst qustion]How to call xml files


Question

Posted

So lets start

i am using .aio command

and when i press shop/weapon its all ok

but THE PROBLEM is after that

when press s80 for example i doesnt do anytning

 

When i call the xml File

Htmls works fine the Xml files dont work

 

So Can someone tell how to call the Xml files on java Code ?

 

I use L2JGracia Epilogue !!!!

 

 

So i want this think

 

 

35bbj2u.png

Recommended Posts

  • 0
Posted

ok i am starting

 

Can you mabe make me the  voicecommand?

 

try to do it by youself and if you got any problems ill help you :)

  • 0
Posted

u serious? there are many guides and ready voiced commands so just do it by yourself.

i used the same that i have for aio :D

but 1 question here what i wil add?

Voiced command "shop"

{

 

                      String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/mainhtml-0.htm");

                      if (htmContent != null)

                      {

                              NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);

                              infoHtml.setHtml(htmContent);

                              activeChar.sendPacket(infoHtml);

                      }

  • 0
Posted

u serious? there are many guides and ready voiced commands so just do it by yourself.

i used the same that i have for aio :D

but 1 question here what i wil add?

Voiced command "shop"

{

 

                      String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/mainhtml-0.htm");

                      if (htmContent != null)

                      {

                              NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);

                              infoHtml.setHtml(htmContent);

                              activeChar.sendPacket(infoHtml);

                      }

  • 0
Posted

u serious? there are many guides and ready voiced commands so just do it by yourself.

i used the same that i have for aio :D

but 1 question here what i wil add?

Voiced command "shop"

{

 

                      String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/mainhtml-0.htm");

                      if (htmContent != null)

                      {

                              NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);

                              infoHtml.setHtml(htmContent);

                              activeChar.sendPacket(infoHtml);

                      }

  • 0
Posted

Voiced

package handlers.voicedcommandhandlers;

import java.util.logging.Logger;

import com.l2jserver.Config;
import com.l2jserver.gameserver.GameServer;
import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;



/**
*
* @author Skyskase
*
*/
public class shop implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS = { "shop" };
    private static final Logger _log = Logger.getLogger(GameServer.class.getName());
    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    { 
        if (command.equalsIgnoreCase("shop"))
       {
               if (activeChar.isInJail())
            {
               activeChar.sendMessage("You can't use this command while being in Jail!");
               return false;
            }

            else if (activeChar.isInDuel() && !Config.VCAIO_AND_DUEL)
            {
               activeChar.sendMessage("You can't use this command while dueling!");
               return false;
            }

            else if (activeChar.isDead() && !Config.VCAIO_AND_DEAD)
            {
               activeChar.sendMessage("You can't use this command while being dead!");
               return false;
            }

            else if (activeChar.isInOlympiadMode() && !Config.VCAIO_AND_OLY)
            {
               activeChar.sendMessage("You can't use this command while being in Olympiad!");
               return false;
            }

            else if (activeChar.getKarma() > 0 && !Config.VCAIO_AND_KARMA)
            {
               activeChar.sendMessage("You can't use this command while having Karma!");
               return false;
            }

            else if (activeChar.getPvpFlag() > 0 && !Config.VCAIO_AND_FLAG)
            {
               activeChar.sendMessage("You can't use this command while being Flagged!");
               return false;
            }

            else if (activeChar.inObserverMode() && !Config.VCAIO_AND_OBSERVER)
            {
               activeChar.sendMessage("You can't use this command while observing an olympiad match!");
               return false;
            }

            else if (activeChar.isFestivalParticipant() && !Config.VCAIO_AND_FESTIVAL)
            {
               activeChar.sendMessage("You can't use this command while participating in the Festival!");
                return false;
            }

            else if (activeChar.isFishing() && !Config.VCAIO_AND_FISHING)
            {
               activeChar.sendMessage("You can't use this command while fishing!");
               return false;
            }

            else if (activeChar.isInCombat() && !Config.VCAIO_AND_COMBAT)
               {
                       activeChar.sendMessage("You can't use this command while being in combat!");
                       return false;
               }

               else if (activeChar.isParalyzed() && !Config.VCAIO_AND_PARA)
               {
                       activeChar.sendMessage("You can't use this command while being paralyzed!");
                       return false;
               }

               else if (activeChar.isFakeDeath() && !Config.VCAIO_AND_FD)
               {
                       activeChar.sendMessage("You can't use this command while using the 'Fake Death' skill!");
                       return false;
               }

               else if (activeChar.isChatBanned() && !Config.VCAIO_AND_CHATBAN)
               {
                       activeChar.sendMessage("You can't use this command while being Chat Banned!");
                       return false;
               }

               else if (activeChar.isCursedWeaponEquipped()&& !Config.VCAIO_AND_CW_EQUIPPED)
               {
                       activeChar.sendMessage("You can't use this command while holding a Cursed Weapon!");
                       return false;
               }

               else if (activeChar.isRooted() && !Config.VCAIO_AND_ROOT)
               {
                       activeChar.sendMessage("You can't use this command while being rooted to the ground!");
                       return false;
               }

               else if (activeChar.isSitting() && !Config.VCAIO_AND_SITTING)
               {
                       activeChar.sendMessage("You can't use this command while sitting down!");
                       return false;
               }

               else if (activeChar.isImmobilized() && !Config.VCAIO_AND_IMOBILE)
               {
                       activeChar.sendMessage("You can't use this command while being imobilised!");
                       return false;
               }

               else if (activeChar.isIn7sDungeon() && !Config.VCAIO_AND_7SDUNGEON)
               {
                       activeChar.sendMessage("You can't use this command while being at the 7 Signs Dungeon!");
                       return false;
               }
               else
               {

                       String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/mainhtml-0.htm");
                       if (htmContent != null)
                       {
                               NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                               infoHtml.setHtml(htmContent);
                               activeChar.sendPacket(infoHtml);
                       }
                       else
                       {
                               _log.info("Failed to load File! Make sure that you fix it soon!");
                       }
               }
        }
               return false;
    }

    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }
}

 

bypass

else if (_command.startsWith("aio_store"))
            {
                   if (Config.ENABLE_Aio_store)
                    {
                	String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/merchant/10002.htm");                                      
                    if (htmContent != null)
                    {
                            NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                            infoHtml.setHtml(htmContent);
                            activeChar.sendPacket(infoHtml);
          }
                    }
            }

 

Config

 

public static boolean ENABLE_Aio_store;
ENABLE_Aio_store = Boolean.valueOf(VoicedAIOCmd.getProperty("AIOEnablstore", "true"));

 

now my only prolem is what link i will put on voiced as i asked you

  • 0
Posted

Voiced

package handlers.voicedcommandhandlers;

import java.util.logging.Logger;

import com.l2jserver.Config;
import com.l2jserver.gameserver.GameServer;
import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;



/**
*
* @author Skyskase
*
*/
public class shop implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS = { "shop" };
    private static final Logger _log = Logger.getLogger(GameServer.class.getName());
    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    { 
        if (command.equalsIgnoreCase("shop"))
       {
               if (activeChar.isInJail())
            {
               activeChar.sendMessage("You can't use this command while being in Jail!");
               return false;
            }

            else if (activeChar.isInDuel() && !Config.VCAIO_AND_DUEL)
            {
               activeChar.sendMessage("You can't use this command while dueling!");
               return false;
            }

            else if (activeChar.isDead() && !Config.VCAIO_AND_DEAD)
            {
               activeChar.sendMessage("You can't use this command while being dead!");
               return false;
            }

            else if (activeChar.isInOlympiadMode() && !Config.VCAIO_AND_OLY)
            {
               activeChar.sendMessage("You can't use this command while being in Olympiad!");
               return false;
            }

            else if (activeChar.getKarma() > 0 && !Config.VCAIO_AND_KARMA)
            {
               activeChar.sendMessage("You can't use this command while having Karma!");
               return false;
            }

            else if (activeChar.getPvpFlag() > 0 && !Config.VCAIO_AND_FLAG)
            {
               activeChar.sendMessage("You can't use this command while being Flagged!");
               return false;
            }

            else if (activeChar.inObserverMode() && !Config.VCAIO_AND_OBSERVER)
            {
               activeChar.sendMessage("You can't use this command while observing an olympiad match!");
               return false;
            }

            else if (activeChar.isFestivalParticipant() && !Config.VCAIO_AND_FESTIVAL)
            {
               activeChar.sendMessage("You can't use this command while participating in the Festival!");
                return false;
            }

            else if (activeChar.isFishing() && !Config.VCAIO_AND_FISHING)
            {
               activeChar.sendMessage("You can't use this command while fishing!");
               return false;
            }

            else if (activeChar.isInCombat() && !Config.VCAIO_AND_COMBAT)
               {
                       activeChar.sendMessage("You can't use this command while being in combat!");
                       return false;
               }

               else if (activeChar.isParalyzed() && !Config.VCAIO_AND_PARA)
               {
                       activeChar.sendMessage("You can't use this command while being paralyzed!");
                       return false;
               }

               else if (activeChar.isFakeDeath() && !Config.VCAIO_AND_FD)
               {
                       activeChar.sendMessage("You can't use this command while using the 'Fake Death' skill!");
                       return false;
               }

               else if (activeChar.isChatBanned() && !Config.VCAIO_AND_CHATBAN)
               {
                       activeChar.sendMessage("You can't use this command while being Chat Banned!");
                       return false;
               }

               else if (activeChar.isCursedWeaponEquipped()&& !Config.VCAIO_AND_CW_EQUIPPED)
               {
                       activeChar.sendMessage("You can't use this command while holding a Cursed Weapon!");
                       return false;
               }

               else if (activeChar.isRooted() && !Config.VCAIO_AND_ROOT)
               {
                       activeChar.sendMessage("You can't use this command while being rooted to the ground!");
                       return false;
               }

               else if (activeChar.isSitting() && !Config.VCAIO_AND_SITTING)
               {
                       activeChar.sendMessage("You can't use this command while sitting down!");
                       return false;
               }

               else if (activeChar.isImmobilized() && !Config.VCAIO_AND_IMOBILE)
               {
                       activeChar.sendMessage("You can't use this command while being imobilised!");
                       return false;
               }

               else if (activeChar.isIn7sDungeon() && !Config.VCAIO_AND_7SDUNGEON)
               {
                       activeChar.sendMessage("You can't use this command while being at the 7 Signs Dungeon!");
                       return false;
               }
               else
               {

                       String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/mainhtml-0.htm");
                       if (htmContent != null)
                       {
                               NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                               infoHtml.setHtml(htmContent);
                               activeChar.sendPacket(infoHtml);
                       }
                       else
                       {
                               _log.info("Failed to load File! Make sure that you fix it soon!");
                       }
               }
        }
               return false;
    }

    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }
}

 

bypass

else if (_command.startsWith("aio_store"))
            {
                   if (Config.ENABLE_Aio_store)
                    {
                	String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/merchant/10002.htm");                                      
                    if (htmContent != null)
                    {
                            NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                            infoHtml.setHtml(htmContent);
                            activeChar.sendPacket(infoHtml);
          }
                    }
            }

 

Config

 

public static boolean ENABLE_Aio_store;
ENABLE_Aio_store = Boolean.valueOf(VoicedAIOCmd.getProperty("AIOEnablstore", "true"));

 

now my only prolem is what link i will put on voiced as i asked you

  • 0
Posted

Voiced

package handlers.voicedcommandhandlers;

import java.util.logging.Logger;

import com.l2jserver.Config;
import com.l2jserver.gameserver.GameServer;
import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;



/**
*
* @author Skyskase
*
*/
public class shop implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS = { "shop" };
    private static final Logger _log = Logger.getLogger(GameServer.class.getName());
    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    { 
        if (command.equalsIgnoreCase("shop"))
       {
               if (activeChar.isInJail())
            {
               activeChar.sendMessage("You can't use this command while being in Jail!");
               return false;
            }

            else if (activeChar.isInDuel() && !Config.VCAIO_AND_DUEL)
            {
               activeChar.sendMessage("You can't use this command while dueling!");
               return false;
            }

            else if (activeChar.isDead() && !Config.VCAIO_AND_DEAD)
            {
               activeChar.sendMessage("You can't use this command while being dead!");
               return false;
            }

            else if (activeChar.isInOlympiadMode() && !Config.VCAIO_AND_OLY)
            {
               activeChar.sendMessage("You can't use this command while being in Olympiad!");
               return false;
            }

            else if (activeChar.getKarma() > 0 && !Config.VCAIO_AND_KARMA)
            {
               activeChar.sendMessage("You can't use this command while having Karma!");
               return false;
            }

            else if (activeChar.getPvpFlag() > 0 && !Config.VCAIO_AND_FLAG)
            {
               activeChar.sendMessage("You can't use this command while being Flagged!");
               return false;
            }

            else if (activeChar.inObserverMode() && !Config.VCAIO_AND_OBSERVER)
            {
               activeChar.sendMessage("You can't use this command while observing an olympiad match!");
               return false;
            }

            else if (activeChar.isFestivalParticipant() && !Config.VCAIO_AND_FESTIVAL)
            {
               activeChar.sendMessage("You can't use this command while participating in the Festival!");
                return false;
            }

            else if (activeChar.isFishing() && !Config.VCAIO_AND_FISHING)
            {
               activeChar.sendMessage("You can't use this command while fishing!");
               return false;
            }

            else if (activeChar.isInCombat() && !Config.VCAIO_AND_COMBAT)
               {
                       activeChar.sendMessage("You can't use this command while being in combat!");
                       return false;
               }

               else if (activeChar.isParalyzed() && !Config.VCAIO_AND_PARA)
               {
                       activeChar.sendMessage("You can't use this command while being paralyzed!");
                       return false;
               }

               else if (activeChar.isFakeDeath() && !Config.VCAIO_AND_FD)
               {
                       activeChar.sendMessage("You can't use this command while using the 'Fake Death' skill!");
                       return false;
               }

               else if (activeChar.isChatBanned() && !Config.VCAIO_AND_CHATBAN)
               {
                       activeChar.sendMessage("You can't use this command while being Chat Banned!");
                       return false;
               }

               else if (activeChar.isCursedWeaponEquipped()&& !Config.VCAIO_AND_CW_EQUIPPED)
               {
                       activeChar.sendMessage("You can't use this command while holding a Cursed Weapon!");
                       return false;
               }

               else if (activeChar.isRooted() && !Config.VCAIO_AND_ROOT)
               {
                       activeChar.sendMessage("You can't use this command while being rooted to the ground!");
                       return false;
               }

               else if (activeChar.isSitting() && !Config.VCAIO_AND_SITTING)
               {
                       activeChar.sendMessage("You can't use this command while sitting down!");
                       return false;
               }

               else if (activeChar.isImmobilized() && !Config.VCAIO_AND_IMOBILE)
               {
                       activeChar.sendMessage("You can't use this command while being imobilised!");
                       return false;
               }

               else if (activeChar.isIn7sDungeon() && !Config.VCAIO_AND_7SDUNGEON)
               {
                       activeChar.sendMessage("You can't use this command while being at the 7 Signs Dungeon!");
                       return false;
               }
               else
               {

                       String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/mainhtml-0.htm");
                       if (htmContent != null)
                       {
                               NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                               infoHtml.setHtml(htmContent);
                               activeChar.sendPacket(infoHtml);
                       }
                       else
                       {
                               _log.info("Failed to load File! Make sure that you fix it soon!");
                       }
               }
        }
               return false;
    }

    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }
}

 

bypass

else if (_command.startsWith("aio_store"))
            {
                   if (Config.ENABLE_Aio_store)
                    {
                	String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/merchant/10002.htm");                                      
                    if (htmContent != null)
                    {
                            NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
                            infoHtml.setHtml(htmContent);
                            activeChar.sendPacket(infoHtml);
          }
                    }
            }

 

Config

 

public static boolean ENABLE_Aio_store;
ENABLE_Aio_store = Boolean.valueOf(VoicedAIOCmd.getProperty("AIOEnablstore", "true"));

 

now my only prolem is what link i will put on voiced as i asked you

  • 0
Posted

/**

*

* @author Skyskase

*

*/

 

that voiced is from coyote, i mean can you even try to do things by yourself? or at least not changing the author when you did nothing.

 

also, im tired of this, im not keep going helping you out with this cos you dont even try, i did at least 60% of the work and you dont even read a bit. im done with this.

  • 0
Posted

/**

*

* @author Skyskase

*

*/

 

that voiced is from coyote, i mean can you even try to do things by yourself? or at least not changing the author when you did nothing.

 

also, im tired of this, im not keep going helping you out with this cos you dont even try, i did at least 60% of the work and you dont even read a bit. im done with this.

  • 0
Posted

/**

*

* @author Skyskase

*

*/

 

that voiced is from coyote, i mean can you even try to do things by yourself? or at least not changing the author when you did nothing.

 

also, im tired of this, im not keep going helping you out with this cos you dont even try, i did at least 60% of the work and you dont even read a bit. im done with this.

  • 0
Posted

I don't want to be mean or anything, but I can't understand why ppl wants to make servers without any programming knowledge. It's like trying to compose music without seeing any chords before. If you can't do it yourself, hire someone who can, or learn to do it.

  • 0
Posted

I don't want to be mean or anything, but I can't understand why ppl wants to make servers without any programming knowledge. It's like trying to compose music without seeing any chords before. If you can't do it yourself, hire someone who can, or learn to do it.

  • 0
Posted

I don't want to be mean or anything, but I can't understand why ppl wants to make servers without any programming knowledge. It's like trying to compose music without seeing any chords before. If you can't do it yourself, hire someone who can, or learn to do it.

  • 0
Posted

I don't want to be mean or anything, but I can't understand why ppl wants to make servers without any programming knowledge. It's like trying to compose music without seeing any chords before.

 

the problem isn´t knowledge, as you know everyone here start from 0 or almost everyone, the problem is that if you have 0 java knowledge you should at least read a bit, or not even read cos you know got a shitload of videos at youtube, you can easily learn the basics there.

 

but if you dont want to do anything and you want everything to be fixed and you also want to take credits for other ppl work you are not going to learn never.

  • 0
Posted

I don't want to be mean or anything, but I can't understand why ppl wants to make servers without any programming knowledge. It's like trying to compose music without seeing any chords before.

 

the problem isn´t knowledge, as you know everyone here start from 0 or almost everyone, the problem is that if you have 0 java knowledge you should at least read a bit, or not even read cos you know got a shitload of videos at youtube, you can easily learn the basics there.

 

but if you dont want to do anything and you want everything to be fixed and you also want to take credits for other ppl work you are not going to learn never.

Guest
This topic is now closed to further replies.



×
×
  • Create New...