Jump to content

Recommended Posts

Posted

i was looking at this forums and found a lot of tricks/bugs to how to get out from jail

so i searched a little on the net and found this ! i hope it will be useful :

L2Extend.ini

[JailSystem]
ModEnabled=1
BlockChat=1
BlockParty=1
BlockItems=1
BlockAttack=1
BlockGeneralActions=1

 

CJailSystem.h

class CJailSystem
{
public:

	CJailSystem() { }
	~CJailSystem() { }
	static void Initialize();
	static bool IncommingPackets(CSocket *pSocket, CSPacket *pPacket, INT16 nPacketLen, BYTE nPacketID);
	static bool BlockPacket(CSocket *pSocket, BYTE *packet);
	static bool Say2(CSocket *pSocket, CSPacket *pPacket, int nPacketID, int Length);
	static bool RequestSendFriendMsg(CSocket *pSocket, CSPacket *pPacket, int nPacketID, int Length);
	static bool RequestJoinParty(CSocket *pSocket, CSPacket *pPacket, int nPacketID, int Length);

private:

	bool bModEnabled;
	bool bBlockChat;
	bool bBlockParty;
	bool bBlockItems;
	bool bBlockAttack;
	bool bBlockGeneralActions;
};

CJailSystem *pJS = NULL;

void CJailSystem::Initialize()
{
// Initializing the Object
pJS = new CJailSystem();

// Parsing the Config File
pJS->bModEnabled = CIniFile::GetIntValue("ModEnabled","JailSystem","L2Extend.ini") == 1 ? true : false;
pJS->bBlockChat = CIniFile::GetIntValue("BlockChat","JailSystem","L2Extend.ini") == 1 ? true : false;
pJS->bBlockParty = CIniFile::GetIntValue("BlockParty","JailSystem","L2Extend.ini") == 1 ? true : false;
pJS->bBlockItems = CIniFile::GetIntValue("BlockItems","JailSystem","L2Extend.ini") == 1 ? true : false;
pJS->bBlockAttack = CIniFile::GetIntValue("BlockAttack","JailSystem","L2Extend.ini") == 1 ? true : false;
pJS->bBlockGeneralActions = CIniFile::GetIntValue("BlockGeneralActions","JailSystem","L2Extend.ini") == 1 ? true : false;

}

INT32 nJailSystemIncommingPackets = 0;
bool CJailSystem::IncommingPackets(CSocket *pSocket, CSPacket *pPacket, INT16 nPacketLen, BYTE nPacketID)
{
L2SERVER_SHARED_GUARD(nJailSystemIncommingPackets);
TLS_TRACE_BEGIN;

bool bResult = true;

if ( pJS->bModEnabled && pSocket->user->IsValidUser() )
{
	if ( !pSocket->user->SD->nBuilderLevel ) {

		// Is in jail
		if ( pSocket->user->IsInJail() ) {
			switch ( nPacketID )
			{
				case 0x21: //RequestBypassToServer
				case 0x2e: //RequestMagicSkillList
				case 0x33: //RequestShortCutReg
				case 0x34: //RequestShortCutUse
				case 0x35: //RequestShortCutDel
				case 0x3f: //RequestSkillList
				case 0x63: //RequestQuestList
				case 0x64: //RequestDestroyQuest
				case 0xcd: //RequestShowMiniMap
				case 0x5b: //SendBypassBuildCmd
				case 0x5e: //RequestFriendInvite
				case 0x5f: //RequestFriendAddReply
				case 0x61: //RequestFriendDel
				case 0x6d: //RequestRestartPoint
				case 0x6e: //RequestGMCommand
				case 0x81: //RequestGMList
				case 0x82: //RequestJoinAlly
				case 0x83: //RequestAnswerJoinAlly
				case 0x84: //RequestWithdrawAlly
				case 0x85: //RequestOustAlly
				case 0x86: //RequestDismissAlly
				case 0x87: //RequestSetAllyCrest
				case 0x88: //RequestAllyCrest
				case 0x89: //RequestChangePetName
				case 0xa0: //RequestBlock
				case 0xac: //RequestRecipeBookOpen
				case 0xad: //RequestRecipeBookDestroy
					if (pJS->bBlockGeneralActions) bResult = BlockPacket(pSocket, pPacket->GetBytes(0x00));
					break;

				case 0x1e: //RequestSellItem
				case 0x0f: //ItemList
				case 0x11: //RequestUnEquipItem
				case 0x12: //RequestDropItem 0x17 RequestDropItemFromPet (?)
				case 0x13: //GetItem (not used any more?)
				case 0x14: //UseItem
				case 0x15: //TradeRequest
				case 0x72: //RequestCrystallizeItem
				case 0x73: //RequestPrivateStoreManageSell
				case 0x74: //SetPrivateStoreListSell
				case 0x1f: //RequestBuyItem
				case 0x44: //AnswerTradeRequest
				case 0x58: //RequestEnchantItem
				case 0x59: //RequestDestroyItem
				case 0x8a: //RequestPetUseItem
				case 0x8b: //RequestGiveItemToPet
				case 0x76: //RequestPrivateStoreQuitSell
				case 0x91: //SetPrivateStoreListBuy
				case 0x92: //RequestPrivateStoreBuyManageCancel
				case 0x93: //RequestPrivateStoreBuyQuit
					if (pJS->bBlockItems) bResult = BlockPacket(pSocket, pPacket->GetBytes(0x00));
					break;

				case 0x0A: //Attack
				case 0x2F: //RequestMagicSkillUse
					if (pJS->bBlockAttack) bResult = BlockPacket(pSocket, pPacket->GetBytes(0x00));
					break;

				case 0x29: //RequestJoinParty
				case 0x2A: //RequestAnswerJoinParty
				case 0x2B: //RequestWithDrawalParty
					if (pJS->bBlockParty) bResult = BlockPacket(pSocket, pPacket->GetBytes(0x00));
					break;

				case 0xCC: //RequestSendFriendMsg
					if (pJS->bBlockChat) bResult = RequestSendFriendMsg(pSocket, pPacket, nPacketID, nPacketLen);
					break;
				case 0x38: //Say2
					if (pJS->bBlockChat) bResult = Say2(pSocket, pPacket, nPacketID, nPacketLen);
					break;

				default:
					bResult = true;
					break;
			}
		}
		// Try to interact with someone in jail
		else {
			switch ( nPacketID )
			{
				case 0xCC: //RequestSendFriendMsg
					if (pJS->bBlockChat) bResult = RequestSendFriendMsg(pSocket, pPacket, nPacketID, nPacketLen);
					break;
				case 0x38: //Say2
					if (pJS->bBlockChat) bResult = Say2(pSocket, pPacket, nPacketID, nPacketLen);
					break;
				case 0x29: //RequestJoinParty
					if (pJS->bBlockParty) bResult = RequestJoinParty(pSocket, pPacket, nPacketID, nPacketLen);
					break;

				default:
					bResult = true;
					break;
			}
		}
	}
}

if (!bResult) {
	//CLog::AddAnsi(1,"[%s] Blocked Pckt[0x%02X] from [%ls]",__FUNCTION__,nPacketID,pSocket->user->SD->wszName);
}

TLS_TRACE_END;
return bResult;
}

INT32 nBlockPacket = 0;
bool CJailSystem::BlockPacket(CSocket *pSocket, BYTE *packet)
{
L2SERVER_SHARED_GUARD(nBlockPacket);
TLS_TRACE_BEGIN;

if(pSocket->user->IsValidUser()) {
	pSocket->Send("c", 0x25); // 0x1F - ActionFailed
	goto ACTION_FAILED;
}

TLS_TRACE_END;
return true;

ACTION_FAILED:
TLS_TRACE_END;
return false;

}

INT32 nSay2 = 0;
bool CJailSystem::Say2(CSocket *pSocket, CSPacket *pPacket, int nPacketID, int Length)
{
L2SERVER_SHARED_GUARD(nSay2);
TLS_TRACE_BEGIN;

INT32 nPos = 0;
wstring sText		= pPacket->GetWString(nPos) ; nPos += ((sText.size()*2)+2);
INT32 nType			= pPacket->GetDWord(nPos) ; nPos += 4;
wstring sTarget     = pPacket->GetWString(nPos) ; nPos += ((sTarget.size()*2)+2);

if(pSocket->user->IsValidUser()) {
	if (pSocket->user->IsInJail() && nType>1) {
		pSocket->SendSystemMessage(1357); // You have been blocked from chatting with that contact.
		goto ACTION_FAILED;
	}
	else if (nType == 2) {
		CObjectEx *pTargetEx = CPlayerTracker::GetUserByName(sTarget);
		if ( pTargetEx && pTargetEx->pCreature->IsValidUser() ) {
			if ( pTargetEx->pCreature->IsInJail() && pTargetEx->pCreature->SD->nBuilderLevel==0 ) {
				pSocket->SendSystemMessage(1355); // That contact is currently blocked from chatting
				goto ACTION_FAILED;
			}
		}
	}
}

TLS_TRACE_END;
return true;

ACTION_FAILED:
TLS_TRACE_END;
return false;
}

INT32 nRequestSendFriendMsg = 0;
bool CJailSystem::RequestSendFriendMsg(CSocket *pSocket, CSPacket *pPacket, int nPacketID, int Length)
{
L2SERVER_SHARED_GUARD(nRequestSendFriendMsg);
TLS_TRACE_BEGIN;

INT32 nPos = 0;
wstring sText		= pPacket->GetWString(nPos) ; nPos += ((sText.size()*2)+2);
wstring sTarget     = pPacket->GetWString(nPos) ; nPos += ((sTarget.size()*2)+2);

if(pSocket->user->IsValidUser()) {
	CObjectEx *pTargetEx = CPlayerTracker::GetUserByName(sTarget);
	if ( pTargetEx && pTargetEx->pCreature->IsValidUser() ) {
		if ( pSocket->user->IsInJail() ) {
			pSocket->SendSystemMessage(1357); // You have been blocked from chatting with that contact.
			goto ACTION_FAILED;
		}
		else if ( pTargetEx->pCreature->IsInJail() && pTargetEx->pCreature->SD->nBuilderLevel==0 ) {
			pSocket->SendSystemMessage(1355); // That contact is currently blocked from chatting
			goto ACTION_FAILED;
		}
	}
}

TLS_TRACE_END;
return true;

ACTION_FAILED:
TLS_TRACE_END;
return false;
}


INT32 nRequestJoinParty = 0;
bool CJailSystem::RequestJoinParty(CSocket *pSocket, CSPacket *pPacket, int nPacketID, int Length)
{
L2SERVER_SHARED_GUARD(nRequestJoinParty);
TLS_TRACE_BEGIN;

INT32 nPos = 0;
wstring sTarget         = pPacket->GetWString(nPos); nPos += ((sTarget.size()*2)+2);
INT32 nItemDistribution = pPacket->GetDWord(nPos);   nPos += 4;

if(pSocket->user->IsValidUser()) {
	CObjectEx *pTargetEx = CPlayerTracker::GetUserByName(sTarget);
	if ( pTargetEx && pTargetEx->pCreature->IsValidUser() ) {
		if ( pSocket->user->IsInJail() ) goto ACTION_FAILED;
		else if ( pTargetEx->pCreature->IsInJail() && pTargetEx->pCreature->SD->nBuilderLevel==0 ) goto ACTION_FAILED;
	}
}

TLS_TRACE_END;
return true;

ACTION_FAILED:
TLS_TRACE_END;
return false;
}

 

this will block almost everything a player can do

credits go to fidow for making it and me for share it here

Posted

hmmmm this might work.... but is a funny way to get out from jail.....TESTED...in over 10 servers....low-mid-high-rate srvs......is a sort of bug that it cannot be resolved......if u want to know how to escape from jail send me a msg.....love this bug:X:X:X:X:X:X

  • 3 weeks later...
  • 5 weeks later...
  • 3 weeks later...
  • Vision changed the title to Gracia CT 2 jail system

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

    • Close that LOLserver. And change name to L2Wipe&Money.
    • Open Beta January 17th & 21:00 UTC +2 Launch Date January 24th & 21:00 UTC +2 Click Here to Explore Vanilla Gracia Final Low-Rate Server. Join our Discord Community     Following the success of our Vanilla project, we decided to launch it again as Last PlayINERA’s Server! Core Settings *Vanilla will have Strict Botting & Client Limitation Rules and Chronicle Progression from Gracia Final to Gracia Epilogue to H5 in Long term! XP: x4 SP: x4 Adena: x2 Drop: x2 Spoil: x3 Manor: x0.4 (60% reduction) - Festive sweeper enabled! Seal Stones: x2 Herbs: x1 Safe Enchant: +3 Maximum Enchant: Retail Enchant Rate: Dynamic General Settings Auto-loot Can be toggled Buffs Adventurer Guide buffs are free, retail level limit removed. Buff Slots: 20 (+ 4) Summon buffs will remain on re-summoning & on death while Noblesse blessing is applied! (Olympiad excluded) Pet buffs will be saved on relog but not during summon/unsummon. Event Buffer [NEW] Event Buffer is enabled and will spawn randomly between 18:00 ~ 23:00 in Giran for 10 minutes, it will apply Farm Only buffs that are cancelled in PvP, Siege / Epic PvP zones & while in a chaotic state! Duration: 1-hour! Territory Wars every two weeks on Saturday. Castle sieges every two weeks on Sunday Class Transfer 1st Class Transfer: Available for purchase with either Adena or iCoin 2nd Class Transfer: Available for purchase with either Adena or iCoin 3rd Class Transfer: Quest or iCoin (the 3rd class transfer will become available for purchase with iCoin as soon as someone has entered the Hall of Fame for completing the 3rd class transfer quest for the class in question) Hellbound Hellbound Lv. 0-6: ATOD x1 Hellbound Lv. 7-12: ATOD x2 Tiat & Ekimus will become available at Stage 12 Hellbound can only be leveled up by killing monsters. No quests or raids are needed To open Hellbound, a party must kill Baylor in the Crystal Caverns The following items are now tradable: Ancient Tome of the Demon  Hidden First Page  Hidden Second Page  Demon Contract Fragment INERA Hub Library Clan Recruitment System Options Services Milestone Rewards Earn rewards for reaching various daily/one-time goals Client Limit: 1 (+1 with Standard Premium) Shift + Click Information on Monsters SP are required to learn new skills Offline shops Lasts for 15 days Olympiad Olympiad period: 1st and 15th day of the month (14th & Last day of month is the last day) 3 Vs. 3 match disabled Class-based matches will be held over the weekends One registration per HWID (PC) Minimum participants: 9 Party Matching System Earn bonuses for finding a group via the Party Matching system Vote Reward System World Chat No limits for first day! Available from level 20 Raid Bosses Epic Raid Boss zones will turn into a PvP zone while the Epic Raid Boss is alive ( + means Random) Server will start with all grand raids dead. Normal Raids: 12h (+6 hours random). Subclass raids, respawn 12h (+6 hours random). Noblesse Barakiel 12h (+6 hours random, PvP zone). Anakim & Lilith are static 24 hours respawn. Queen Ant: 24 hours (+2 hours random). Core: 40 hours (+2 hours random). Orfen: 32 hours (+2 hours random). Antharas Respawn: 8 Days. Randomly spawns at 19:00 ~ 21:00 Boosted to level 83 on Hellbound stage 7. Valakas Respawn: 10 Days. Randomly spawns at 19:00 ~ 21:00 Baium Respawn: 5 Days. Randomly spawns at 21:00 ~ 23:00 Boosted to level 83 on Hellbound stage 7. Frintezza Respawn: 2 Days. Randomly spawns at 21:00 ~ 23:00 Instanced Zaken Zaken (Day): Monday, Wednesday, Friday at 6:30. Zaken (Day): 9 players, LvL 55-65, 1hr max. Zaken (Night): Wednesday at 6:30 Zaken (Night): 18-45 players, LvL 55-65, 6hr max. Tiat: Saturday at 6:30, 18-36 players, 2 hrs max. Boosted to level 85. Ekimus: 24h at 6:30, 18-27 players, 1hr max. Tully’s Workshop (Darion & Tully): 24h +-1h. Tower of Naia (Beleth): 5 days, 18 min. & 36 max.
  • Topics

×
×
  • Create New...