Jump to content

Thug!!

Banned
  • Posts

    265
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Thug!!

  1.  

    62    protected String _playerOneName;
    63    protected String _playerTwoName;
    64 +    protected String _try1;
    65 +    protected String _try2;
    
    100            _players = list;
    101            _playerOne = list.get(0);
    102            _playerTwo = list.get(1);
    103            
    104            try
    105            {
    106    +            _try1 = _playerOne.getClassId().name();
    107    +            _try2 = _playerTwo.getClassId().name();
    
    921    protected String getTitle()
    922    {
    923        String msg = "";
    924    -    msg += _playerOneName + " / " + _playerTwoName;
    924 + msg += _try1 + " vs " + _try2;
    925        return msg;
    926    }
    

     

    where to add this ? Acis :S :S 

  2. AMAZING man. Can you make it to be hero till character relog ? or only for 24 hours ? ( it will be nice if its posible to set time. )

    And can you shere the code for Hero item. Once i played one server that you can get 1 hero coint that's make you hero for 24 hours . :)

    about hero item,

     

     

    // Hero Custom Item , Created By Stefoulis15
    // Added From Stefoulis15 Into The Core.
    // Visit www.MaxCheaters.com For Support 
    // Source File Name:   HeroCustomItem.java
    // Modded by programmos, sword dev
     
    package com.l2jfrozen.gameserver.handler.itemhandlers;
     
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.util.logging.Level;
    import java.util.logging.Logger;
     
    import com.l2jfrozen.Config;
    import com.l2jfrozen.gameserver.handler.IItemHandler;
    import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
    import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
    import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
    import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
    import com.l2jfrozen.util.CloseUtil;
    import com.l2jfrozen.util.database.L2DatabaseFactory;
     
    public class HeroCustomItem implements IItemHandler
    {
     
    public HeroCustomItem()
    {
    //null
    }
     
    protected static final Logger _log = Logger.getLogger(HeroCustomItem.class.getName());
     
    String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator, hero_end_date) VALUES (?,?,?,?,?,?)";
     
    @Override
    public void useItem(L2PlayableInstance playable, L2ItemInstance item)
    {
    if(Config.HERO_CUSTOM_ITEMS)
    {
    if(!(playable instanceof L2PcInstance))
    return;
     
    L2PcInstance activeChar = (L2PcInstance) playable;
     
    if(activeChar.isInOlympiadMode())
    {
    activeChar.sendMessage("This Item Cannot Be Used On Olympiad Games.");
    }
     
    if(activeChar.isHero())
    {
    activeChar.sendMessage("You Are Already A Hero!.");
    }
    else
    {
    activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16));
    activeChar.setHero(true);
    updateDatabase(activeChar, Config.HERO_CUSTOM_DAY * 24L * 60L * 60L * 1000L);
    activeChar.sendMessage("You Are Now a Hero,You Are Granted With Hero Status , Skills ,Aura.");
    activeChar.broadcastUserInfo();
    playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
    activeChar.getInventory().addItem("Wings", 6842, 1, activeChar, null);
    }
    activeChar = null;
    }
    }
     
    @Override
    public int[] getItemIds()
    {
    return ITEM_IDS;
    }
     
    private void updateDatabase(L2PcInstance player, long heroTime)
    {
    Connection con = null;
    try
    {
    if(player == null)
    return;
     
    con = L2DatabaseFactory.getInstance().getConnection(false);
    PreparedStatement stmt = con.prepareStatement(INSERT_DATA);
     
    stmt.setInt(1, player.getObjectId());
    stmt.setString(2, player.getName());
    stmt.setInt(3, 1);
    stmt.setInt(4, player.isNoble() ? 1 : 0);
    stmt.setInt(5, player.isDonator() ? 1 : 0);
    stmt.setLong(6, heroTime == 0 ? 0 : System.currentTimeMillis() + heroTime);
    stmt.execute();
    stmt.close();
    stmt = null;
    }
    catch(Exception e)
    {
    if(Config.ENABLE_ALL_EXCEPTIONS)
    e.printStackTrace();
     
    _log.log(Level.SEVERE, "Error: could not update database: ", e);
    }
    finally
    {
    CloseUtil.close(con);
     
    con = null;
    }
    }
     
    private static final int ITEM_IDS[] =
    {
    Config.HERO_CUSTOM_ITEM_ID
    };
     
    }
    
  3. 1) i have remove all of this from data/zones/TownZone.xml and i puted all of this to MultifunctionZone.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <list>
    <zone type="MultiFunctionZone" shape="NPoly" minZ="-400" maxZ="-200"><!-- Orc Village -->
    <node X="-45528" Y="-110079" />
    <node X="-45711" Y="-110075" />
    <node X="-45704" Y="-110164" />
    <node X="-46633" Y="-110080" />
    <node X="-46625" Y="-109992" />
    <node X="-46803" Y="-109993" />
    <node X="-47345" Y="-109973" />
    <node X="-47388" Y="-110012" />
    <node X="-47388" Y="-113001" />
    <node X="-47351" Y="-113039" />
    <node X="-47102" Y="-113038" />
    <node X="-47107" Y="-113382" />
    <node X="-47326" Y="-113379" />
    <node X="-47326" Y="-113829" />
    <node X="-47114" Y="-113826" />
    <node X="-47102" Y="-114171" />
    <node X="-47350" Y="-114170" />
    <node X="-47388" Y="-114199" />
    <node X="-47391" Y="-117182" />
    <node X="-47339" Y="-117239" />
    <node X="-46791" Y="-117240" />
    <node X="-46607" Y="-117240" />
    <node X="-46619" Y="-117151" />
    <node X="-45701" Y="-117000" />
    <node X="-45705" Y="-117085" />
    <node X="-45523" Y="-117088" />
    <node X="-44169" Y="-116722" />
    <node X="-44147" Y="-116804" />
    <node X="-43838" Y="-116717" />
    <node X="-43855" Y="-116638" />
    <node X="-43779" Y="-116620" />
    <node X="-42581" Y="-115424" />
    <node X="-42472" Y="-115258" />
    <node X="-42051" Y="-113671" />
    <node X="-42050" Y="-113502" />
    <node X="-42474" Y="-111925" />
    <node X="-42554" Y="-111775" />
    <node X="-43843" Y="-110456" />
    <node X="-44147" Y="-110375" />
    <node X="-45529" Y="-110078" />
    </zone>
    </list>
    

    2) come skype in can :D

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