Jump to content
  • 0

Admin_Tradeoff On L2Jfrozen 1004Rev


Selim

Question

How to add it?

 

I put

 

adminadmin.java this code:

         case admin_tradeoff:
            
            try
            {
                String mode = command.substring(15);
                if(mode.equalsIgnoreCase("on"))
                {
                    activeChar.setTradeRefusal(true);
                    activeChar.sendMessage("Trade refusal enabled.");
                }
                else if(mode.equalsIgnoreCase("off"))
                {
                    activeChar.setTradeRefusal(false);
                    activeChar.sendMessage("Trade refusal disabled.");
                }
            }
            catch(Exception ex)
            {
                if(activeChar.getTradeRefusal())
                {
                    activeChar.setTradeRefusal(false);
                    activeChar.sendMessage("Trade refusal disabled.");
                }
                else
                {
                    activeChar.setTradeRefusal(true);
                    activeChar.sendMessage("Trade refusal enabled.");
                }
            }

and to pcinstance.java this:

//Line 1202

    private boolean _tradeRefusal = false;

//Line 14245

    public void setTradeRefusal(boolean mode)
    {
        _tradeRefusal = mode;
    }

    public boolean getTradeRefusal()
    {
        return _tradeRefusal;
    }

Compile succes, admin comand in panel when i use it i see sysmsg "trade refusal enabled/disabled" but i still can give trade to gm, i think i must add somethink else to activate it to work but i dont know what and where :/

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Ok i fix it, don't know if is good but all work fine ;p i add to traderequest.java this code:

		if (partner.getTradeRefusal())
		{
			player.sendMessage("Target is in trade refusal mode.");
			player.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}

When i use .tradeoff/tradeon all fine, but when i use admin comand tradeoff in admin panel it work fine but i have error in console like on screen, someone know what is wrong?

 

 

post-135130-0-32810600-1396210464_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • i tryed to copy the admin    serverinfo.htm  to the communityboard.  the command  %onlineALL%  but it does not work.   any advice?   <html><title>Admin Server Info</title><body> <center> <table width=270> <tr> <td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td width=180><center>Server Info</center></td> <td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> </tr> </table> <br> <font color="LEVEL">General:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>OS:</td> <td><font color="00FF00">%os_name%</font></td> </tr> <tr> <td>OS version:</td> <td><font color="00FF00">%os_ver%</font></td> </tr> <tr> <td>Server slots:</td> <td><font color="00FF00">%slots%</font></td> </tr> <tr> <td>Server UpTime:</td> <td><font color="00FF00">%serverUpTime%</font></td> </tr> <tr> <td>Server Time:</td> <td><font color="00FF00">%serverTime%</font></td> </tr> <tr> <td>Game Time:</td> <td><font color="00FF00">%gameTime% (%dayNight%)</font></td> </tr> <tr> <td>Pathfinding:</td> <td><font color="00FF00">%geodata%</font></td> </tr> </table> <br> <font color="LEVEL">Players:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>Total players count:</td> <td><font color="00FF00">%onlineAll%</font></td> </tr> <tr> <td>Offline trade count:</td> <td><font color="00FF00">%offlineTrade%</font></td> </tr> <tr> <td>Online GM count:</td> <td><font color="00FF00">%onlineGM%</font></td> </tr> <tr> <td>Real player count:</td> <td><font color="00FF00">%onlineReal%</font></td> </tr> </table> <br> <font color="LEVEL">Memory:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>Used Memory:</td> <td><font color="00FF00">%usedMem% MB</font></td> </tr> <tr> <td>Free Memory:</td> <td><font color="00FF00">%freeMem% MB</font></td> </tr> <tr> <td>Total Memory:</td> <td><font color="00FF00">%totalMem% MB</font></td> </tr> </table> </center> </body></html>  
    • IntelliJ IDE has native support for Gradle, as far as I'm aware.
    • please is any one here that can  take the surces from grable to normal eclipse and reshare it here cause i don't have any clue how to install them On Eclipse 😕  if is any one here that can understand how those surces can be instaled please any help gonna be perfect iven i can  pay bay paypal. thanks
    • Wts A/S grade gear (armors weapons jewelery) Great Wolf with top eq Kokabora lvl 55+  Baium zaken frintezza   ADENA - 1kk - 0.25$ (big stock)   I can sell grand khavatarii with noblesse and subclass with email (can be with gear or clear)    Payment by PayPal, can use middleman   PM here  
  • Topics

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