I'm just wondering if it is possible to remove the restrictions for attacks so that you can use all skills against people without needing to duel. Simply for fun openworld pvp purposes
Printable View
I'm just wondering if it is possible to remove the restrictions for attacks so that you can use all skills against people without needing to duel. Simply for fun openworld pvp purposes
if is possible? Yes is possible.
if anybody is going to do? No, i don't think so.
since i think the method to make "this" working, is the same used for making the "Dinossaur" from TLQ 1 make attackable '-'
I see, ok then, Luiz do you know the world id numbers for tlq? I have only found maybe 11 world's that work
Each tlq has a differente world tblidx.
Example, for TLQ 1 is 120000
if you are choosing do a hardcore, i'd suggest go back and check the CDboTS* classes, since each worldTblidx for TLQ/Dungeon are hidden in the portals, but you only achieve then using the "CDboTS" classes, checking through the container and checking the action from UG_TS_STEP Confirm
well i hope you can Dev, and make your way, but if you think if this way isnt done before here is my OLD class that i've done from the past(fixed numbers, now im rewriting without this shit):
TLQHandler.h
TLQHandler.cppCode:#pragma once
#include "SharedType.h"
#include <conio.h>
#include <stdio.h>
#include <dos.h>
#include <ctype.h>
#include <windows.h>
#ifndef TLQ_HANDLER_CLASS_H
#define TLQ_HANDLER_CLASS_H
class CClientSession;
class CGameServer;
class CNtlPacket;
class TLQHandler
{
///-------------Constructor & Destructor-------------///
public:
TLQHandler();
~TLQHandler();
///--------------------------------------------------///
private:
//Members
NTL_TS_T_ID questID;
NTL_TS_T_ID GetTlqID();
PlayersMain* myPlayer;
public:
//Functions
void SetTLQAccessForPlayer(NTL_TS_T_ID QuestID, PlayersMain* cPlayersMain);
void LoadMobForTLQ(NTL_TS_T_ID QuestID, RwUInt32 avatarHandle);
void SendDirectPlayAckForTLQ();
};
#endif
As you can see is not a "good way" this is why i dropped everything to back and started to write the server from scratchCode:#include "stdafx.h"
#include "GameServer.h"
TLQHandler::TLQHandler()
{
}
TLQHandler::~TLQHandler()
{
}
//Return current TLQ
NTL_TS_T_ID TLQHandler::GetTlqID()
{
return this->questID;
}
//Sets the TLQ For the player and send him to TLQ Quest
void TLQHandler::SetTLQAccessForPlayer(NTL_TS_T_ID QuestID, PlayersMain* cPlayersMain)
{
this->questID = QuestID;
this->myPlayer = cPlayersMain;
CGameServer * app = (CGameServer*)NTLSfxGetApp();
CWorldTable* pWorldTable = app->g_pTableContainer->GetWorldTable();
CNtlPacket packetQ(sizeof(sGU_AVATAR_WORLD_INFO));
sGU_AVATAR_WORLD_INFO*as = (sGU_AVATAR_WORLD_INFO*)packetQ.GetPacketData();
//Teleport to Initial Location of TLQ 1
if (QuestID == 6000)
{
sWORLD_TBLDAT* pWorldTbldat = reinterpret_cast<sWORLD_TBLDAT*>(pWorldTable->FindData(120000));
as->worldInfo.hTriggerObjectOffset = 100000;
as->worldInfo.sRuleInfo.byRuleType = GAMERULE_TLQ;
as->worldInfo.tblidx = 120000;
as->worldInfo.worldID = 120000;
//printf("WorldID:%d\n\r", pWorldTbldat->dwWorldResourceID);
as->vCurDir.x = pWorldTbldat->vStart1Dir.x;
as->vCurDir.y = 0;
as->vCurDir.z = pWorldTbldat->vStart1Dir.z;
as->vCurLoc.x = pWorldTbldat->vStart1Loc.x;
as->vCurLoc.y = pWorldTbldat->vStart1Loc.y;
as->vCurLoc.z = pWorldTbldat->vStart1Loc.z;
as->wOpCode = GU_AVATAR_WORLD_INFO;
packetQ.SetPacketLen(sizeof(sGU_AVATAR_WORLD_INFO));
g_pApp->Send(this->myPlayer->GetSession(), &packetQ);
cPlayersMain->SetWorldID(120000);
cPlayersMain->SetWorldTblidx(120000);
}
//Teleport to the Main World
else if (QuestID == 6002)
{
sWORLD_TBLDAT* pWorldTbldat = reinterpret_cast<sWORLD_TBLDAT*>(pWorldTable->FindData(1));
as->worldInfo.hTriggerObjectOffset = 100000;
as->worldInfo.sRuleInfo.byRuleType = GAMERULE_NORMAL;
as->worldInfo.tblidx = 1;
as->worldInfo.worldID = 1;
//printf("WorldID:%d\n\r", pWorldTbldat->dwWorldResourceID);
as->vCurDir.x = pWorldTbldat->vStart1Dir.x;
as->vCurDir.y = 0;
as->vCurDir.z = pWorldTbldat->vStart1Dir.z;
as->vCurLoc.x = pWorldTbldat->vStart1Loc.x;
as->vCurLoc.y = pWorldTbldat->vStart1Loc.y;
as->vCurLoc.z = pWorldTbldat->vStart1Loc.z;
as->wOpCode = GU_AVATAR_WORLD_INFO;
packetQ.SetPacketLen(sizeof(sGU_AVATAR_WORLD_INFO));
g_pApp->Send(this->myPlayer->GetSession(), &packetQ);
}
else if (QuestID == 989898)
{
sWORLD_TBLDAT* pWorldTbldat = reinterpret_cast<sWORLD_TBLDAT*>(pWorldTable->FindData(120000));
as->worldInfo.hTriggerObjectOffset = 100000;
as->worldInfo.sRuleInfo.byRuleType = GAMERULE_TLQ;
as->worldInfo.tblidx = 120000;
as->worldInfo.worldID = 120000;
//printf("WorldID:%d\n\r", pWorldTbldat->dwWorldResourceID);
as->vCurDir.x = pWorldTbldat->vStart1Dir.x;
as->vCurDir.y = 0;
as->vCurDir.z = pWorldTbldat->vStart1Dir.z;
as->vCurLoc.x = pWorldTbldat->vStart1Loc.x;
as->vCurLoc.y = pWorldTbldat->vStart1Loc.y;
as->vCurLoc.z = pWorldTbldat->vStart1Loc.z;
as->wOpCode = GU_AVATAR_WORLD_INFO;
packetQ.SetPacketLen(sizeof(sGU_AVATAR_WORLD_INFO));
g_pApp->Send(this->myPlayer->GetSession(), &packetQ);
}
else if (QuestID == 989898)
{
sWORLD_TBLDAT* pWorldTbldat = reinterpret_cast<sWORLD_TBLDAT*>(pWorldTable->FindData(120000));
as->worldInfo.hTriggerObjectOffset = 100000;
as->worldInfo.sRuleInfo.byRuleType = GAMERULE_TLQ;
as->worldInfo.tblidx = 120000;
as->worldInfo.worldID = 120000;
//printf("WorldID:%d\n\r", pWorldTbldat->dwWorldResourceID);
as->vCurDir.x = pWorldTbldat->vStart1Dir.x;
as->vCurDir.y = 0;
as->vCurDir.z = pWorldTbldat->vStart1Dir.z;
as->vCurLoc.x = pWorldTbldat->vStart1Loc.x;
as->vCurLoc.y = pWorldTbldat->vStart1Loc.y;
as->vCurLoc.z = pWorldTbldat->vStart1Loc.z;
as->wOpCode = GU_AVATAR_WORLD_INFO;
packetQ.SetPacketLen(sizeof(sGU_AVATAR_WORLD_INFO));
g_pApp->Send(this->myPlayer->GetSession(), &packetQ);
}
}
//This Send the SendDirectPlay to the current quest
void TLQHandler::SendDirectPlayAckForTLQ()
{
CGameServer * app = (CGameServer*)NTLSfxGetApp();
CNtlPacket packet(sizeof(sGU_CHAR_DIRECT_PLAY));
sGU_CHAR_DIRECT_PLAY* res = (sGU_CHAR_DIRECT_PLAY*)packet.GetPacketData();
CDirectionLinkTable* pLinkTbl = app->g_pTableContainer->GetDirectionLinkTable();
//Just to tell the client we won't play any script
if (this->GetTlqID() == 6000)
{
res->bSynchronize = true;
res->byPlayMode = 1;
res->directTblidx = 0;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 1 Stage 1 - Spawn the Metour
else if (this->GetTlqID() == 454544)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1026));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1026;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 2 Stage 0 - dont know
else if (this->GetTlqID() == 95654)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1036));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1036;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 2 Stage 1 - dont know
else if (this->GetTlqID() == 95654)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1031));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1031;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 2 Stage 2 - dont know
else if (this->GetTlqID() == 95654)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1032));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1032;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 3 Stage 1 - dont know
else if (this->GetTlqID() == 554)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1041));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1041;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 3 Stage 2 - dont know
else if (this->GetTlqID() == 554)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1042));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1042;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ 3 Stage 3 - dont know
else if (this->GetTlqID() == 554)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1044));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1044;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
//TLQ Stage 4 - dont know
else if (this->GetTlqID() == 554)
{
sDIRECTION_LINK_TBLDAT *pLinkTblData = reinterpret_cast<sDIRECTION_LINK_TBLDAT*>(pLinkTbl->FindData(1043));
res->bSynchronize = false;
res->byPlayMode = 1;
res->directTblidx = 1043;
res->hSubject = this->myPlayer->GetAvatarHandle();
res->wOpCode = GU_CHAR_DIRECT_PLAY;
packet.SetPacketLen(sizeof(sGU_CHAR_DIRECT_PLAY));
g_pApp->Send(this->myPlayer->GetSession(), &packet);
}
}
//Load Mob to player X for TLQ Y
void TLQHandler::LoadMobForTLQ(NTL_TS_T_ID QuestID, RwUInt32 avatarHandle)
{
if (QuestID == 11600)
{
g_pMobManager->CreateMobByTblidx(3, avatarHandle);
}
}
:)
Edit: Maybe you need change somethings here
Thks for your hard work @luiz45