Jump to content

Paysafe Donation Manager


Recommended Posts

Try this...

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jfrozen.gameserver.model.actor.instance;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Collection;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;

import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;

import javolution.text.TextBuilder;

/**
* @author Autos! 1-0
*
*/
public class L2PscDonateInstance extends L2FolkInstance
{


public L2PscDonateInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);

}

@Override
public void onBypassFeedback(final L2PcInstance player, String command)
  {
	      if(player == null)
	      {
	         return;
	      }
	      
	      if(command.startsWith("dlist"))
	      {
	    	  info(player);
	      }
	      
	      if(command.startsWith("donate"))
	      {
	    	  StringTokenizer st = new StringTokenizer(command);
	    	  st.nextToken();
	    	  String quantity = null;
	    	  int pin1 = 0;
	    	  int pin2 = 0;
	    	  int pin3 = 0;
	    	  int pin4 = 0;
	    	  String message = "";
	    	  
	    	  quantity = st.nextToken();
	    	  try
	    	  {
	    		  pin1 = Integer.parseInt(st.nextToken());
	    		  pin2 = Integer.parseInt(st.nextToken());
	    		  pin3 = Integer.parseInt(st.nextToken());
	    		  pin4 = Integer.parseInt(st.nextToken());
	    	  }
	    	  catch(NumberFormatException enf)
	    	  {
	    		  player.sendMessage("Enter a valid pin.");
return;
	    	  }

	    	  catch(NoSuchElementException enf)
	    	  {
	    		  player.sendMessage("Enter a valid pin.");
return;
	    	  }
	    	  
	    	  try
	    	  { 
	    		 while(st.hasMoreTokens())
	    			 message = message + st.nextToken() + " ";
	    		 
	    		 String fname = "data/donates/"+player.getName()+".txt";
	    		 File file = new File(fname);
	    		 boolean exist = file.createNewFile();
	    		 if(!exist)
	    		 {
	    		     player.sendMessage("You have already sent a donation , GMs must check it first");
	    		     return;
	    		 }
	    		 FileWriter fstream = new FileWriter(fname);
	    		 BufferedWriter out = new BufferedWriter(fstream);
	    		 out.write("Character Info: [Character: "+ player.getName() +"["+ player.getObjectId()+"] - Account: "+ player.getAccountName()+" - IP: "+player.getClient().getConnection().getInetAddress().getHostAddress()+"]\nMessage : donate "+ quantity +" "+ message + " "+ pin1+ " "+ pin2+ " "+ pin3+ " "+ pin4);
	    		 out.close();
	    		 player.sendMessage("Donation sent. GMs will check it soon. Thanks...");
	    		 
	    		 Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();
	    			 for (L2PcInstance gms : pls)
	    				{
	    				 	if(gms.isGM())
	    				 	gms.sendMessage(player.getName() +" sent a donation.");
	    				}
	    	  }
	    	  catch(Exception e)
	    	  {
	    		  e.printStackTrace();
	    	  }

	      }
	      
  }

  @Override
  public void onAction(L2PcInstance player)
  {
    if (!canTarget(player)) 
    {
      return;
    }
      showHtmlWindow(player);
  }

  private void showHtmlWindow(L2PcInstance activeChar)
  {
		TextBuilder tb = new TextBuilder();
		NpcHtmlMessage html = new NpcHtmlMessage(1);
		        
		tb.append("<html><head><title>Donation Manager</title></head><body><center><table width=\"250\" bgcolor=\"000000\"><tr><td align=center><font color=\"6fd3d1\">Easy Donation With Paysafe Card</font></td></tr></table>_______________________________________<br><br><table width=\"250\"><tr><td><font color=\"ddc16d\">Select Donation quantity:</font></td><td><combobox width=80 height=17 var=quantity list=10-Euro;25-Euro;50-Euro;100-Euro;></td></tr></table><br><br><font color=\"ddc16d\">Paysafe Card Pin:</font><table width=\"250\"><tr><td><edit var=\"pin1\" width=50 height=12 type=number></td><td><edit var=\"pin2\" width=50 height=12 type=number></td><td><edit var=\"pin3\" width=50 height=12 type=number></td><td><edit var=\"pin4\" width=50 height=12 type=number></td></table><br><br><multiedit var=\"message\" width=240 height=40><br><br><button value=\"Donate!\" action=\"bypass -h npc_"+getObjectId()+"_donate $quantity $pin1 $pin2 $pin3 $pin4 $message\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><button value=\"Donation List\" action=\"bypass -h npc_"+getObjectId()+"_dlist\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><font color=\"a1df64\">Created by KnipeX (if he says so, huh)</font></center></body></html>");
		        
		html.setHtml(tb.toString());
		activeChar.sendPacket(html);
  }
  
  private void info(L2PcInstance activeChar)
  {
		TextBuilder tb = new TextBuilder();
		NpcHtmlMessage html = new NpcHtmlMessage(1);
		        
		tb.append("<html><head><title>Donation Manager</title></head><body><center>Info goes here</center></body></html>");
		html.setHtml(tb.toString());
		activeChar.sendPacket(html);
  }
} 

Link to comment
Share on other sites

Try this...

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jfrozen.gameserver.model.actor.instance;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Collection;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;

import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;

import javolution.text.TextBuilder;

/**
* @author Autos! 1-0
*
*/
public class L2PscDonateInstance extends L2FolkInstance
{


public L2PscDonateInstance(int objectId, L2NpcTemplate template)
{
	super(objectId, template);

}

@Override
public void onBypassFeedback(final L2PcInstance player, String command)
  {
	      if(player == null)
	      {
	         return;
	      }
	      
	      if(command.startsWith("dlist"))
	      {
	    	  info(player);
	      }
	      
	      if(command.startsWith("donate"))
	      {
	    	  StringTokenizer st = new StringTokenizer(command);
	    	  st.nextToken();
	    	  String quantity = null;
	    	  int pin1 = 0;
	    	  int pin2 = 0;
	    	  int pin3 = 0;
	    	  int pin4 = 0;
	    	  String message = "";
	    	  
	    	  quantity = st.nextToken();
	    	  try
	    	  {
	    		  pin1 = Integer.parseInt(st.nextToken());
	    		  pin2 = Integer.parseInt(st.nextToken());
	    		  pin3 = Integer.parseInt(st.nextToken());
	    		  pin4 = Integer.parseInt(st.nextToken());
	    	  }
	    	  catch(NumberFormatException enf)
	    	  {
	    		  player.sendMessage("Enter a valid pin.");
return;
	    	  }

	    	  catch(NoSuchElementException enf)
	    	  {
	    		  player.sendMessage("Enter a valid pin.");
return;
	    	  }
	    	  
	    	  try
	    	  { 
	    		 while(st.hasMoreTokens())
	    			 message = message + st.nextToken() + " ";
	    		 
	    		 String fname = "data/donates/"+player.getName()+".txt";
	    		 File file = new File(fname);
	    		 boolean exist = file.createNewFile();
	    		 if(!exist)
	    		 {
	    		     player.sendMessage("You have already sent a donation , GMs must check it first");
	    		     return;
	    		 }
	    		 FileWriter fstream = new FileWriter(fname);
	    		 BufferedWriter out = new BufferedWriter(fstream);
	    		 out.write("Character Info: [Character: "+ player.getName() +"["+ player.getObjectId()+"] - Account: "+ player.getAccountName()+" - IP: "+player.getClient().getConnection().getInetAddress().getHostAddress()+"]\nMessage : donate "+ quantity +" "+ message + " "+ pin1+ " "+ pin2+ " "+ pin3+ " "+ pin4);
	    		 out.close();
	    		 player.sendMessage("Donation sent. GMs will check it soon. Thanks...");
	    		 
	    		 Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();
	    			 for (L2PcInstance gms : pls)
	    				{
	    				 	if(gms.isGM())
	    				 	gms.sendMessage(player.getName() +" sent a donation.");
	    				}
	    	  }
	    	  catch(Exception e)
	    	  {
	    		  e.printStackTrace();
	    	  }

	      }
	      
  }

  @Override
  public void onAction(L2PcInstance player)
  {
    if (!canTarget(player)) 
    {
      return;
    }
      showHtmlWindow(player);
  }

  private void showHtmlWindow(L2PcInstance activeChar)
  {
		TextBuilder tb = new TextBuilder();
		NpcHtmlMessage html = new NpcHtmlMessage(1);
		        
		tb.append("<html><head><title>Donation Manager</title></head><body><center><table width=\"250\" bgcolor=\"000000\"><tr><td align=center><font color=\"6fd3d1\">Easy Donation With Paysafe Card</font></td></tr></table>_______________________________________<br><br><table width=\"250\"><tr><td><font color=\"ddc16d\">Select Donation quantity:</font></td><td><combobox width=80 height=17 var=quantity list=10-Euro;25-Euro;50-Euro;100-Euro;></td></tr></table><br><br><font color=\"ddc16d\">Paysafe Card Pin:</font><table width=\"250\"><tr><td><edit var=\"pin1\" width=50 height=12 type=number></td><td><edit var=\"pin2\" width=50 height=12 type=number></td><td><edit var=\"pin3\" width=50 height=12 type=number></td><td><edit var=\"pin4\" width=50 height=12 type=number></td></table><br><br><multiedit var=\"message\" width=240 height=40><br><br><button value=\"Donate!\" action=\"bypass -h npc_"+getObjectId()+"_donate $quantity $pin1 $pin2 $pin3 $pin4 $message\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><button value=\"Donation List\" action=\"bypass -h npc_"+getObjectId()+"_dlist\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><font color=\"a1df64\">Created by KnipeX (if he says so, huh)</font></center></body></html>");
		        
		html.setHtml(tb.toString());
		activeChar.sendPacket(html);
  }
  
  private void info(L2PcInstance activeChar)
  {
		TextBuilder tb = new TextBuilder();
		NpcHtmlMessage html = new NpcHtmlMessage(1);
		        
		tb.append("<html><head><title>Donation Manager</title></head><body><center>Info goes here</center></body></html>");
		html.setHtml(tb.toString());
		activeChar.sendPacket(html);
  }
} 

 

Thank you dude. Working and the problem fixed. Only the target not fixed...

GG

 

==================================================

 

you shut up nab...is just a fail

Be carefull how you talk. Next time you will be punished.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

[javac] Compiling 1464 source files to C:\workspace\L2jFrozen_GameServer\build\classes

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6

    [javac] 1 warning

 

its my first time install a java code or create a class so......i have this warning whats wrong?

 

i create the class i put the code on it, then save it.

but the icon of "L2PscDonateInstance.java" its not like the others

it has a "?" on it....why?

Link to comment
Share on other sites

No errors but when I click on the Npc it doesn't target it, it just show the html window and my char can't move until I change the target to myself. How do we fix this?

Thank you.

yeah happens and to me.
Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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

    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: We are offering the best in market Division 2 hacks without detection. If you are wondering where to get the best cheats and hacks for The Division 2, you are at the right place! Our private TD2  hack has been completely undetected since we released it! Also, our cheat has all the most necessary functions such as aimbot, esp, etc. And the limited slots will give even more security to our product. SUPPORTED ANTI-CHEATS: (read more on official website) - Easy Anti-Cheat (EAC): Undetected & Safe - FairFight AC: Undetected & Safe Our The Division 2 cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Enable aim - No recoil - Silent aim - Aim distance - Aim fov - Draw aim fov - Fov change - Weakspot - Aim hitbox - Head - Neck - Chest - Random ESP: - Enable visuals - Enable radar - Skeleton - Weakspot - Pre-rendering - ESP distance - Radar distance - Auto - Enemy - Name - Blacklist - Whitelist - Custom color - Clear whitelist - Clear blacklist MISC: - Auto fire/Triggerbot - Rapid of fire rate - Shotgun of fire rate - Magic bullets - Fast reload - Unlimited ammo - Shoot in safehouse - Accelerate - Noclip REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: Yes - Supported game modes: Windowed, Borderless - Supported platforms: Steam / Uplay / Epic Games - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website.   IN-GAME SCREENSHOTS:   - Check on the official website.
    • 50% discount for the next 3 copies Price 150 , will try for test server not guaranteed
    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt  
  • Topics

×
×
  • Create New...