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

File mou sou leei akrivos se poia java prepei na ta peraseis

L2PcInstance.java
AnswerTradeRequest.java
TradeRequest.java

  • 0
Posted

oka aderfe. alla mhpws kses pws mporw na brw pio line einai to 125 gia paradeigma? :S

Dld to anaferei kapou kserw gw h patas kapou kai to blepeis kapios as m pei please

  • 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

    • Hi everyone,   In 2014, I completely stepped away from developing L2 servers and doing L2J-related work. Since then, I’ve only opened this server about once a year and helped a few servers and individuals for free. I haven’t taken on any paid L2J work since then.   LINEAGE2.GOLD is a project that has reached about Season 6. The first season launched at the end of 2020 and was a fully rebuilt Gold-style server on the Classic client (protocol 110). It featured many custom systems and enhancements. After several seasons, I decided to abandon the Mobius-based project and move to Lucera, as my goal was to get as close as possible to Interlude PTS behavior while still staying on the L2J platform.   The current project was once again completely rebuilt, this time on the Essence client (protocol 306), and is based on Lucera. Because of that, acquiring a license from Deazer is required.   My Lucera extender includes, but is not limited to: Formulas.java Basic anti-bot detection, which proved quite effective, we caught most Adrenaline users using relatively simple server-side logic, logged them, and took staff action. Simple admin account lookup commands based on IP, HWID, and similar identifiers. In-game Captcha via https://lineage2.gold/code, protected by Cloudflare, including admin commands for blacklisting based on aggression levels and whitelisting. Additional admin tools such as Auto-Play status checks, Enchanted Hero Weapon live sync, force add/remove clans from castle sieges, item listeners for live item monitoring, and more. A fully rewritten Auto-Play system with support for ExAutoPlaySetting, while still using the Auto-Play UI wheel, featuring: Debuff Efficiency Party Leader Assist Respectful Hunting Healer AI Target Mode Range Mode Summoner buff support Dwarf mechanics Reworked EffectDispelEffects to restore buffs after Cancellation. Raid Bomb item support. Reworked CronZoneSwitcher. Prime Time Raid Respawn Service. Community Board features such as Top rankings and RB/Epic status. Custom systems for Noblesse, Subclasses, support-class rewards, and much more.   Depending on the deal, the project can include: The lineage2.gold domain The website built on the Laravel PHP framework The server’s Discord Client Interface source Server files and extender source The server database (excluding private data such as emails and passwords)   I’m primarily looking for a serious team to continue the project, as it would be a shame to see this work abandoned. This is not cheap. You can DM me with offers. If you’re wondering why I’m doing this: I’ve felt a clear lack of appreciation from the L2 community, and I’m not interested in doing charity work for people who don’t deserve it. I’m simply not someone who tolerates BS. Server Info: https://lineage2.gold/info Server for test: https://lineage2.gold/download Over 110 videos YouTube playlist: https://www.youtube.com/watch?v=HO7BZaxUv2U&list=PLD9WZ0Nj-zstZaYeWxAxTKbX7ia2M_DUu&index=113
    • ACTUALIZATION > SAMURAI CROW PRICE. 500$ (P542) 300$ (P520) 200$ (P509)  
  • 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..

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