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

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

/**

*

* @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.

i am not making a server to oppen it online or anything i am trying to lern

also

 

/**

*

* @author Skyskase

*

*/

 

Everyone can see that its not mine and i never sayed its mine. i ama Newbie as i sayed i cant make something like that

Also only i can see that  ( just i  showed it to you ( i didint want to make this point of "Mine code" ) )

 

 

@Rizel

i will not oppen a server ofc i am doing all this to lern and not to sell or oppen a server

  • 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.

i am not making a server to oppen it online or anything i am trying to lern

also

 

/**

*

* @author Skyskase

*

*/

 

Everyone can see that its not mine and i never sayed its mine. i ama Newbie as i sayed i cant make something like that

Also only i can see that  ( just i  showed it to you ( i didint want to make this point of "Mine code" ) )

 

 

@Rizel

i will not oppen a server ofc i am doing all this to lern and not to sell or oppen a server

  • 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.

i am not making a server to oppen it online or anything i am trying to lern

also

 

/**

*

* @author Skyskase

*

*/

 

Everyone can see that its not mine and i never sayed its mine. i ama Newbie as i sayed i cant make something like that

Also only i can see that  ( just i  showed it to you ( i didint want to make this point of "Mine code" ) )

 

 

@Rizel

i will not oppen a server ofc i am doing all this to lern and not to sell or oppen a server

  • 0
Posted

i am not making a server to oppen it online or anything i am trying to lern

also

 

/**

*

* @author Skyskase

*

*/

 

Everyone can see that its not mine and i never sayed its mine. i ama Newbie as i sayed i cant make something like that

Also only i can see that  ( just i  showed it to you ( i didint want to make this point of "Mine code" ) )

 

 

@Rizel

i will not oppen a server ofc i am doing all this to lern and not to sell or oppen a server

 

at the moment you add

 

 

/**

*

* @author Skyskase

*

*/

 

in a code you are saying that is yours, and you dont even manage to change the call to the bypass i did, or even read a bit to see what is inside the voiced, you just change the @author.

 

  • 0
Posted

i am not making a server to oppen it online or anything i am trying to lern

also

 

/**

*

* @author Skyskase

*

*/

 

Everyone can see that its not mine and i never sayed its mine. i ama Newbie as i sayed i cant make something like that

Also only i can see that  ( just i  showed it to you ( i didint want to make this point of "Mine code" ) )

 

 

@Rizel

i will not oppen a server ofc i am doing all this to lern and not to sell or oppen a server

 

at the moment you add

 

 

/**

*

* @author Skyskase

*

*/

 

in a code you are saying that is yours, and you dont even manage to change the call to the bypass i did, or even read a bit to see what is inside the voiced, you just change the @author.

 

  • 0
Posted

i am not making a server to oppen it online or anything i am trying to lern

also

 

/**

*

* @author Skyskase

*

*/

 

Everyone can see that its not mine and i never sayed its mine. i ama Newbie as i sayed i cant make something like that

Also only i can see that  ( just i  showed it to you ( i didint want to make this point of "Mine code" ) )

 

 

@Rizel

i will not oppen a server ofc i am doing all this to lern and not to sell or oppen a server

 

at the moment you add

 

 

/**

*

* @author Skyskase

*

*/

 

in a code you are saying that is yours, and you dont even manage to change the call to the bypass i did, or even read a bit to see what is inside the voiced, you just change the @author.

 

  • 0
Posted

at the moment you add

 

 

/**

*

* @author Skyskase

*

*/

 

in a code you are saying that is yours, and you dont even manage to change the call to the bypass i did, or even read a bit to see what is inside the voiced, you just change the @author.

 

were i sayed its mine?
  • 0
Posted

at the moment you add

 

 

/**

*

* @author Skyskase

*

*/

 

in a code you are saying that is yours, and you dont even manage to change the call to the bypass i did, or even read a bit to see what is inside the voiced, you just change the @author.

 

were i sayed its mine?
  • 0
Posted

at the moment you add

 

 

/**

*

* @author Skyskase

*

*/

 

in a code you are saying that is yours, and you dont even manage to change the call to the bypass i did, or even read a bit to see what is inside the voiced, you just change the @author.

 

were i sayed its mine?
  • 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;
    }
}

 

/**

*

* @author Skyskase

*

*/

 

there, when you say that you are the author of the code, you are saying that the code is yours.

  • 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;
    }
}

 

/**

*

* @author Skyskase

*

*/

 

there, when you say that you are the author of the code, you are saying that the code is yours.

  • 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;
    }
}

 

/**

*

* @author Skyskase

*

*/

 

there, when you say that you are the author of the code, you are saying that the code is yours.

  • 0
Posted

/**

*

* @author Skyskase

*

*/

 

there, when you say that you are the author of the code, you are saying that the code is yours.

as i told you from 1st time

i did that ONLY FOR ME

you know this is on my pc Only

i just showed it to you to tell me what i will add to the path and NOT TO TELL YOU ITS MINE

  • 0
Posted

/**

*

* @author Skyskase

*

*/

 

there, when you say that you are the author of the code, you are saying that the code is yours.

as i told you from 1st time

i did that ONLY FOR ME

you know this is on my pc Only

i just showed it to you to tell me what i will add to the path and NOT TO TELL YOU ITS MINE

Guest
This topic is now closed to further replies.



×
×
  • Create New...