Jump to content
  • 0

Question

Posted (edited)

Hi everyone, how i change that send donate manager to send in my paypal account, and not in L2jSunrise project donate moneys?

Now, if player donate there, money will send to L2jSunrise and not in y paypal.

 

http://25f7Cmt.jpg

Edited by criss22

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

This is L2DOnateManagerInstance

package l2r.gameserver.model.actor.instance;

import java.util.StringTokenizer;

import l2r.Config;
import l2r.gameserver.ThreadPoolManager;
import l2r.gameserver.data.sql.CharNameTable;
import l2r.gameserver.data.sql.ClanTable;
import l2r.gameserver.data.xml.impl.MultisellData;
import l2r.gameserver.data.xml.impl.SkillData;
import l2r.gameserver.data.xml.impl.TransformData;
import l2r.gameserver.enums.InstanceType;
import l2r.gameserver.idfactory.IdFactory;
import l2r.gameserver.model.actor.FakePc;
import l2r.gameserver.model.actor.L2Npc;
import l2r.gameserver.model.actor.templates.L2NpcTemplate;
import l2r.gameserver.network.SystemMessageId;
import l2r.gameserver.network.serverpackets.ActionFailed;
import l2r.gameserver.network.serverpackets.NpcHtmlMessage;
import l2r.gameserver.network.serverpackets.PartySmallWindowAll;
import l2r.gameserver.network.serverpackets.PartySmallWindowDeleteAll;
import l2r.gameserver.util.Util;

import gr.sr.aioItem.runnable.TransformFinalizer;
import gr.sr.configsEngine.configs.impl.DonateManagerConfigs;
import gr.sr.donateEngine.DonateHandler;
import gr.sr.imageGeneratorEngine.CaptchaImageGenerator;
import gr.sr.main.Conditions;
import gr.sr.securityEngine.SecurityActions;
import gr.sr.securityEngine.SecurityType;

public class L2DonateManagerInstance extends L2Npc
{
	public L2DonateManagerInstance(L2NpcTemplate template)
	{
		super(template);
		setInstanceType(InstanceType.L2DonateManagerInstance);
		FakePc fpc = getFakePc();
		if (fpc != null)
		{
			setTitle(fpc.title);
		}
	}
	
	// Variable Section
	// Global Variable Item ID To Check or Destroy
	private static int itemIdToGet;
	private static int price;
	
	/**
	 * Method to send the html to char
	 * @param player
	 * @param html
	 */
	public void sendPacket(L2PcInstance player, String html)
	{
		NpcHtmlMessage msg = new NpcHtmlMessage(getObjectId());
		msg.setFile(player.getHtmlPrefix(), "/data/html/sunrise/DonateManager/" + html);
		msg.replace("%objectId%", String.valueOf(getObjectId()));
		player.sendPacket(msg);
	}
	
	@Override
	public void showChatWindow(L2PcInstance player)
	{
		player.sendPacket(ActionFailed.STATIC_PACKET);
		
		NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
		html.setFile(player.getHtmlPrefix(), "data/html/sunrise/DonateManager/main.htm");
		html.replace("%objectId%", String.valueOf(getObjectId()));
		player.sendPacket(html);
	}
	
	@Override
	public void onBypassFeedback(final L2PcInstance player, String command)
	{
		final String[] subCommand = command.split("_");
		
		// No null pointers
		if (player == null)
		{
			return;
		}
		
		// Restrictions Section
		if (!Conditions.checkPlayerBasicConditions(player))
		{
			return;
		}
		
		// Page navigation, html command how to starts
		if (command.startsWith("Chat"))
		{
			if (subCommand[1].isEmpty() || (subCommand[1] == null))
			{
				return;
			}
			NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
			html.setFile(player.getHtmlPrefix(), "data/html/sunrise/DonateManager/" + subCommand[1]);
			html.replace("%objectId%", String.valueOf(getObjectId()));
			player.sendPacket(html);
		}
		
		// Add all clan skills
		else if (command.startsWith("givefullclan"))
		{
			itemIdToGet = DonateManagerConfigs.GET_FULL_CLAN_COIN;
			price = DonateManagerConfigs.GET_FULL_CLAN_PRICE;
			
			if ((player.getClan() == null) || (!player.isClanLeader()))
			{
				player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
				return;
			}
			
			if (!Conditions.checkPlayerItemCount(player, itemIdToGet, price))
			{
				return;
			}
			
			player.destroyItemByItemId("Clan donate", itemIdToGet, price, player, true);
			player.getClan().changeLevel(11);
			player.sendMessage("Clan level set to 11.");
			player.getClan().addReputationScore(DonateManagerConfigs.REPUTATION_POINTS_TO_ADD, true);
			player.getClan().addNewSkill(SkillData.getInstance().getInfo(391, 1));
			for (int mainSkill : DonateManagerConfigs.CLAN_MAIN_SKILLS)
			{
				player.getClan().addNewSkill(SkillData.getInstance().getInfo(mainSkill, 3));
			}
			for (int squadSkill : DonateManagerConfigs.CLAN_SQUAD_SKILLS)
			{
				player.getClan().addNewSkill(SkillData.getInstance().getInfo(squadSkill, 3), 0);
			}
			player.sendMessage("You have successfully perform this action.");
		}
		// Change player name
		else if (command.startsWith("changename"))
		{
			try
			{
				itemIdToGet = DonateManagerConfigs.CHANGE_NAME_COIN;
				price = DonateManagerConfigs.CHANGE_NAME_PRICE;
				String val = command.substring(11);
				// TODO: Need More checks?
				if (!Util.isAlphaNumeric(val))
				{
					player.sendMessage("Invalid character name.");
					return;
				}
				
				if (!Conditions.checkPlayerItemCount(player, itemIdToGet, price))
				{
					return;
				}
				
				if (CharNameTable.getInstance().getIdByName(val) > 0)
				{
					player.sendMessage("Warning, name " + val + " already exists.");
					return;
				}
				player.destroyItemByItemId("Name Change", itemIdToGet, price, player, true);
				player.setName(val);
				player.getAppearance().setVisibleName(val);
				player.store();
				
				player.sendMessage("Your name has been changed to " + val);
				player.broadcastUserInfo();
				
				if (player.isInParty())
				{
					// Delete party window for other party members
					player.getParty().broadcastToPartyMembers(player, new PartySmallWindowDeleteAll());
					for (L2PcInstance member : player.getParty().getMembers())
					{
						// And re-add
						if (member != player)
						{
							member.sendPacket(new PartySmallWindowAll(member, player.getParty()));
						}
					}
				}
				if (player.getClan() != null)
				{
					player.getClan().broadcastClanStatus();
				}
			}
			catch (StringIndexOutOfBoundsException e)
			{
				// Case of empty character name
				player.sendMessage("Player name box cannot be empty.");
			}
		}
		// Change clan name
		else if (command.startsWith("changeclanname"))
		{
			try
			{
				itemIdToGet = DonateManagerConfigs.CHANGE_CNAME_COIN;
				price = DonateManagerConfigs.CHANGE_CNAME_PRICE;
				String val = command.substring(15);
				// TODO: Need More checks?
				if ((player.getClan() == null) || (!player.isClanLeader()))
				{
					player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
					return;
				}
				if (!Util.isAlphaNumeric(val))
				{
					player.sendPacket(SystemMessageId.CLAN_NAME_INCORRECT);
					return;
				}
				
				if (!Conditions.checkPlayerItemCount(player, itemIdToGet, price))
				{
					return;
				}
				
				if (ClanTable.getInstance().getClanByName(val) != null)
				{
					player.sendMessage("Warning, clan name " + val + " already exists.");
					return;
				}
				
				player.destroyItemByItemId("Clan Name Change", itemIdToGet, price, player, true);
				player.getClan().setName(val);
				player.getClan().updateClanNameInDB();
				player.sendMessage("Your clan name has been changed to " + val);
				player.broadcastUserInfo();
				
				if (player.isInParty())
				{
					// Delete party window for other party members
					player.getParty().broadcastToPartyMembers(player, new PartySmallWindowDeleteAll());
					for (L2PcInstance member : player.getParty().getMembers())
					{
						// And re-add
						if (member != player)
						{
							member.sendPacket(new PartySmallWindowAll(member, player.getParty()));
						}
					}
				}
				if (player.getClan() != null)
				{
					player.getClan().broadcastClanStatus();
				}
			}
			catch (StringIndexOutOfBoundsException e)
			{
				// Case of empty character name
				player.sendMessage("Clan name box cannot be empty.");
			}
		}
		// Change gender options
		else if (command.startsWith("changeGender"))
		{
			if (command.startsWith("changeGenderDonate"))
			{
				itemIdToGet = DonateManagerConfigs.CHANGE_GENDER_DONATE_COIN;
				price = DonateManagerConfigs.CHANGE_GENDER_DONATE_PRICE;
			}
			
			if (!Conditions.checkPlayerItemCount(player, itemIdToGet, price))
			{
				return;
			}
			
			player.destroyItemByItemId("changeGender", itemIdToGet, price, player, true);
			player.getAppearance().setSex(player.getAppearance().getSex() ? false : true);
			player.sendMessage("Your gender has been changed.");
			player.broadcastUserInfo();
			// Transform-untransorm player quickly to force the client to reload the character textures
			TransformData.getInstance().transformPlayer(105, player);
			player.setSkillCast(ThreadPoolManager.getInstance().scheduleGeneral(new TransformFinalizer(player), 200));
		}
		// GM Shop
		else if (command.startsWith("showMultiSellWindow"))
		{
			try
			{
				int multi = Integer.valueOf(subCommand[1]);
				if (DonateManagerConfigs.MULTISELL_LIST.contains(multi))
				{
					player.setIsUsingAioMultisell(true);
					MultisellData.getInstance().separateAndSend(multi, player, null, false);
				}
				else
				{
					SecurityActions.startSecurity(player, SecurityType.DONATE_MANAGER);
				}
			}
			catch (Exception e)
			{
				SecurityActions.startSecurity(player, SecurityType.DONATE_MANAGER);
			}
		}
		// Donate generate captcha code
		else if (command.startsWith("donateFormMain"))
		{
			NpcHtmlMessage playerReply = new NpcHtmlMessage();
			
			// Random image file name
			int imgId = IdFactory.getInstance().getNextId();
			// Conversion from .png to .dds, and crest packed send
			CaptchaImageGenerator.getInstance().captchaLogo(player, imgId);
			playerReply.setHtml("<html><body><title>Donate Manager</title><center><br><img src=\"l2ui.SquareGray\" width=270 height=1><br1><table width=\"262\" cellpadding=\"5\" bgcolor=\"151515\"><tr><td valign=\"top\"><center><font color=\"EBDF6C\">L2 Sunrise</font> donate manager<br>Support our server by donating and receive special coins! Exchange here your donated coins for staff or services.</center></td></tr></table><br1><img src=\"l2ui.SquareGray\" width=270 height=1><br></center><br><center><img src=\"L2UI.SquareGray\" width=270 height=1><br><center><font color=\"EBDF6C\">Enter the 5-digits numbers to continue.</font></center><br><img src=\"Crest.crest_" + Config.SERVER_ID + "_" + imgId + "\" width=256 height=64>" + "<br><font color=\"888888\">(There are only numbers.)</font>" + "<br><edit var=\"captcha\" width=110><br><button value=\"Confirm\" action=\"bypass -h npc_%objectId%_confirmDonateCode $captcha\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"></center><br><img src=\"l2ui.SquareGray\" width=270 height=1></body></html>");
			playerReply.replace("%objectId%", String.valueOf(getObjectId()));
			player.sendPacket(playerReply);
			player.setDonateCode(CaptchaImageGenerator.getInstance().getFinalString());
			CaptchaImageGenerator.getInstance().getFinalString().replace(0, 5, "");
			return;
		}
		// Donate captcha code
		else if (command.startsWith("confirmDonateCode"))
		{
			String value = command.substring(17);
			StringTokenizer st = new StringTokenizer(value, " ");
			try
			{
				String newpass = null, repeatnewpass = null;
				if (st.hasMoreTokens())
				{
					newpass = st.nextToken();
				}
				repeatnewpass = player.getDonateCode();
				
				if (!((newpass == null) || (repeatnewpass == null)))
				{
					if (newpass.equals(repeatnewpass)) // Right:)
					{
						sendPacket(player, "donateform.htm");
						return;
					}
				}
				if ((newpass == null) || !newpass.equals(repeatnewpass))
				{
					player.sendMessage("Incorrect captcha code try again.");
				}
			}
			catch (Exception e)
			{
				player.sendMessage("A problem occured while adding captcha!");
				_log.warn(String.valueOf(e));
			}
		}
		// Donate form
		else if (command.startsWith("sendDonateForm"))
		{
			DonateHandler.sendDonateForm(player, command);
		}
	}
}

 and isn't here Paypal mail or something like that.

I find Engine.jar. But i can't open that classes from that .jar file. What plugin in eclipse i need to open that?

Edited by criss22

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

    • From Salvation onwards I think you need a patched nwindow.dll that allows such modifications, try to see if you get what you need here: https://drive.google.com/drive/u/1/folders/1LLbQFGf8KlR-O0Iv5umfF-pwZgrDh9bd
    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
  • Topics

×
×
  • Create New...