Jump to content

Question

Posted

Hi Paides brika ayto to fix ka8ws epsaxna apo ton rizel:

 

clientpackets.TradeRequest.java (about line 125)

 

 

+        if (partner.getAllowTrade() == false)

+      {

+        player.sendMessage("Target is not allowed to receive more than one trade request at the same time.");

+        return;

+        }

+        partner.setAllowTrade(false);

+        player.setAllowTrade(false);

player.onTransactionRequest(partner);

partner.sendPacket(new SendTradeRequest(player.getObjectId()));

SystemMessage sm = new SystemMessage(SystemMessageId.REQUEST_S1_FOR_TRADE);

sm.addString(partner.getName());

player.sendPacket(sm);

 

 

 

 

-----------------------------------------------------------

 

clientpackets.AnswerTradeRequest.java (about line 69)

 

 

        L2PcInstance partner = player.getActiveRequester();

        if (partner == null || L2World.getInstance().findObject(partner.getObjectId()) == null)

        {

            // Trade partner not found, cancel trade

player.sendPacket(new SendTradeDone(0));

            SystemMessage msg = new SystemMessage(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);

            player.sendPacket(msg);

player.setActiveRequester(null);

+ player.setAllowTrade(true);

+ partner.setAllowTrade(true);

msg = null;

            return;

        }

 

 

- if (_response == 1) player.startTrade(partner);

 

 

 

+ if (_response == 1)

+ {

+ player.startTrade(partner);

+ partner.setAllowTrade(true);

+ player.setAllowTrade(true);

+ }

 

 

 

else

{

SystemMessage msg = new SystemMessage(SystemMessageId.S1_DENIED_TRADE_REQUEST);

msg.addString(player.getName());

partner.sendPacket(msg);

+ player.setAllowTrade(true);

msg = null;

}

 

 

 

 

------------------------------------------

 

L2PcInstance.java (about line 497)

 

    private int _apprentice = 0;

    private int _sponsor = 0;

 

+    public boolean _allowTrade = true;

   

private long _clanJoinExpiryTime;

private long _clanCreateExpiryTime;

 

 

 

L2PcInstance.java (about line 8121)

 

 

    public void setClanPrivileges(int n)

    {

        _clanPrivileges = n;

    }

 

+    public boolean getAllowTrade()

+    {

+    return _allowTrade;

+    }

+   

+    public void setAllowTrade(boolean a)

+    {

+    _allowTrade = a;

+    }

 

 

Pou akribws bazw ayto to code sto eclipse?

9 answers to this question

Recommended Posts

  • 0
Posted

sto L2PcInstance.java briskis me search afto public void setClanPrivileges(int n)

}

 

+    public boolean getAllowTrade()

+    {

+      return _allowTrade;

+    }

+    public void setAllowTrade(boolean a)

+    {

+      _allowTrade = a;

+    } kai opos dixni bazis afto, min kitas afto aplos ena paradigma dixno gia na katalabis

  • 0
Posted

File mou leipon.

 

1:  kane install ayto look

2: ola ta .java tha ta kaneis open me ayto to programa.

3: to kathe pack  se kathe .java mporei na exei  peraseis code dika tou i na exei aferesei kai pote na min einai sto line ayto pou

sou lew to code pou theleis na peraseis..

4: kaneis ctrl+f sou bgazei tin  search ekei tha  to akrivos katw apo to code pou exei ta + oste na to breis akrivos epano i katw tou i analoga paei

  • 0
Posted

Kane edit ta post ean exeis kati na aferaiseis h prostheseis.

Mh kaneis anousia posts.

Ο μόνος που κάνει ανούσια ποστς εδώ είσαι εσύ.

ennow pws dld katelabainw pio lane einai to 125 h to 69 h to ka8ekseis? soz gia ta polla post

Άκου.

μέσα στο eclipse με ctrl + l (και βάζεις το νούμερο μέσα) βρίσκεις τη γραμμή(lane) που σου ζητάει.Με ctrl + f (και μέσα τη λέξη) κάνεις αναζητηση λέξεις.

 

Επίσης σε συμβουλεύω να κοιτάξεις λίγο τους οδηγούς και στο ελληνικό και στο αγγλικό σέξιον που υπάρχουνε.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • If you want to make your thread stand out a bit more, adding quick proof pics or a small stock update usually helps buyers feel safer. I’ve had smoother chats with traders after doing that. On a side note, when I’m taking a break from trading, I mess around with the security puzzles in ModsCraft, which has been a fun way to clear my head between deals.
    • ━━━━━━━━━━━━━━━━━━━━━━ L2-SCRIPTS UPDATE ━━━━━━━━━━━━━━━━━━━━━━ Dear MaxCheaters users, We have updated the prices in the first post. Specially for the MaxCheaters community, we significantly reduced prices on many of our old developments, archived projects and source packs. Most of our older Lineage 2 sources are now much more affordable than before, including many Classic and Essence projects. This is a great opportunity for smaller teams, startup servers and developers who always wanted to work with our projects but previously could not afford them. ━━━━━━━━━━━━━━━━━━━━━━ For the past years we were mostly absent from the public scene because our team was working privately on large projects and contract-based development. During this time we accumulated a huge amount of private materials, systems, source codes, client modifications, website solutions and infrastructure developments that were never publicly released. Now, according to completed agreements and partnerships, we finally have the ability to publish and offer part of these materials as our private services and developments. In the upcoming weeks we will also publish a list of our works and services from the last 5 years of private development. ━━━━━━━━━━━━━━━━━━━━━━ Upcoming publications will include: • Private server development • Custom gameplay systems • Client modifications • Websites & ACP systems • Protection solutions • Infrastructure solutions • MMO / Web projects ━━━━━━━━━━━━━━━━━━━━━━ Thank you to everyone who stayed with us all these years.   Telegram:  @L2scripts Websites:  L2-scripts.com    L2-scripts.ru    Mmore.dev Sguard site:  Sguard   Best Regards! ━━━━━━━━━━━━━━━━━━━━━━
    • Tightening the timer to fifteen minutes sounds spot on, especially for players who don’t want to sit around waiting. I’ve had a few hosting hiccups on past projects, and sorting out configs felt a lot like the headaches I solved after dealing with armadiofashion.com for a separate issue where a server kept failing to connect. Little tweaks like that usually smooth things out fast.
    • Could you please re-upload the files 😞
    • We are back on MaxCheaters.   After a long break, we are officially returning to public activity and support for our projects. During this time, SGuard has been heavily reworked: some outdated features were removed, the architecture was simplified and optimized, and the protection itself became more stable, faster, and easier to use. Our goal has always been simple — to provide a protection system that actually works, does not create unnecessary problems for administrators, and does not turn server maintenance into a constant battle with bugs and configuration issues.   What we offer now: • Updated version of SGuard • Simple and fast installation • Stable operation without constant crashes • Support for old and latest chronicles • Java and PTS support • Regular updates and technical support • Private solutions for large projects   We continue to improve our products and are once again open for new clients and partnerships. Thank you to everyone who stayed with us all these years.   ---------------------------------------------------------- Telegram: @l2scripts   L2S Guard: http://guard.l2-scripts.com L2-Scripts Studio: https://l2-scripts.com Private Development: https://mmore.dev
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..