Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: PARTY/DUEL DUPE  (Visto 14231 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline takumi12 #20 Posteado: July 31, 2022, 09:55:54 PM

  • MAESTRO

  • US. DE HONOR

  • LEYENDA

  • Php Coder
  • +11 puntos por ventas
  • *
  • *
  • Rank: Puto amo
  • Posts: 1.310
  • Gracias recibida: 40245
  • mx
Eliminando el rollback del Chaos Mix se ahorran todos los problemas de dupeos a través del Chaos Mix.
El Chaos Mix tiene un rollback exclusivamente por si a alguien se le cierra el juego mientras estaba usando la máquina, entonces antes de cerrar el juego verifica si su transacción con el chaos mix está finalizada y en caso de que no, simplemente le restaura los items hacia el inventario. El problema de esto es que guarda el estado al momento de abrir el chaos mix y todo lo que pase en el medio, si no está bien controlado, se presta a este tipo de cosas. Es por eso que yo opté por directamente eliminar el rollback del chaos mix y ahorrarme mil dolores de cabeza, ya que es muy poco común que a un usuario se le desconecte estando en la máquina chaos.

Si quieren eliminar el rollback del chaos mix hagan esto:

Code: [Select]
bool CObjectManager::CharacterGameClose(int aIndex) // OK
{
if (OBJECT_RANGE(aIndex) == 0)
{
return 0;
}

LPOBJ lpObj = &gObj[aIndex];

if (lpObj->Connected != OBJECT_ONLINE)
{
return 0;
}

if (lpObj->Type != OBJECT_USER || lpObj->MapServerMoveQuit != 0)
{
return 0;
}

if (OBJECT_RANGE(lpObj->SummonIndex) != 0)
{
gObjSummonKill(lpObj->Index);
}

if (lpObj->Interface.use != 0 && (lpObj->Interface.type == INTERFACE_CHAOS_BOX || lpObj->Interface.type == INTERFACE_TRAINER))
{
if (lpObj->IsChaosMixCompleted != 0 || lpObj->IsCastleNPCUpgradeCompleted != 0)
{
gChaosBox.ChaosBoxItemSave(lpObj);
}
//Comment this to fix chaos dupe
//else
//{
// gObjInventoryRollback(aIndex);
//}
}

if (OBJECT_RANGE(lpObj->TargetNumber) != 0)
{
gTrade.ResetTrade(lpObj->TargetNumber);
gTrade.GCTradeResultSend(lpObj->TargetNumber, 0);
gTrade.ResetTrade(aIndex);
}

Y por último paso a explicarles el bug.

-Al tirar party, el gameserver coloca Interface State en 1 y empieza el contador de tiempo del party.
-Al apretar Tab 2 veces, el main envía al gameserver "gNpcTalk.CGNpcTalkCloseRecv" haciendo que cancele el Interface State en 1 y lo ponga en 0
-Al estar el Interface State en 0, nos permite abrir el Chaos Mix, lo cual nuevamente vuelve a poner el Interface State en 1
-Como tiramos party y no recibimos una respuesta, luego de unos segundos automáticamente el party se cancela, por lo que vuelve a colocar el Interface State en 0 y eso genera el bug de tener la máquina de chaos abierta pero que en el gameserver no la tenga en cuenta y nos permita mover, usar baul, etc.
-Una vez que colocamos los items en el baul, si volvemos a la máquina de chaos y cerramos el juego, se ejecutará el rollback debido a que nuestra transacción con la máquina de chaos nunca se completo ya que no realizamos ningún mix, entonces nos restaura los items hasta el punto en donde abrimos la máquina por primera vez pero esos items también quedarán guardados en el baul, lo que genera el dupe.

Esta es mi interpretación del dupeo.

finalizar con el rollback es buena opción, y siguiendo la lógica del closenpctalk se debería agregar check para validar tanto el duel request y party interface, ya que party interface por ende volvería en automatico a none dejando esto como una forma de evitar que se resete los valores de validación de INTERFACE Y use

Code: [Select]
void CNpcTalk::CGNpcTalkCloseRecv(int aIndex) // OK
{
LPOBJ lpObj = &gObj[aIndex];

if(gObjIsConnectedGP(aIndex) == 0)
{
return;
}

if(lpObj->Interface.use == 0
|| lpObj->Interface.type == INTERFACE_NONE
|| lpObj->Interface.type == INTERFACE_PARTY
|| lpObj->Interface.type == INTERFACE_CHAOS_BOX
|| lpObj->Interface.DuelUserReserved != -1
|| lpObj->Interface.DuelUserRequested != -1
)
{
return;
}

switch(lpObj->Interface.type)
{
case INTERFACE_TRADE:
gTrade.CGTradeCancelButtonRecv(aIndex);
break;
case INTERFACE_SHOP:
if(((lpObj->Interface.state==1)?(lpObj->Interface.state=0):1)==0){return;}
lpObj->TargetShopNumber = -1;
break;
case INTERFACE_WAREHOUSE:
gWarehouse.CGWarehouseClose(aIndex);
break;
case INTERFACE_TRAINER:
gChaosBox.ChaosBoxInit(lpObj);
gObjInventoryCommit(aIndex);
break;
case INTERFACE_QUEST_WORLD:
lpObj->QuestWorldMonsterClass = -1;
break;
}

lpObj->Interface.use = 0;
lpObj->Interface.type = INTERFACE_NONE;
lpObj->Interface.state = 0;
}

no lo he probado, pero siguiendo la lógica que estoy leyendo esto debería impedir que se resete los valores de Interface mientras se use PARTY_REQUEST y duel, mañana voy a tocar todo este tema de fixes, para ver a que mas se puede hacer...  dance dance dance dance

Otra cosa también es eliminar el envío del npctalkclose desde el main al presionar el tab y cerrar el minimapa. Ya que no surte ningún efecto lado servidor abrirlo o cerrarlo, directamente no debería hacer ningún envío.
Lo mismo pasa al presionar la T y cerrar la interface de quest si no me equivoco

buen punto

Code: [Select]
SetCompleteHook(0xE9, 0x0082A983, 0x0082A9F3); //ok


Las offset no se crea, ni se destruye, solo se transforma

Offline showmax #21 Posteado: July 31, 2022, 10:49:02 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 205
  • Gracias recibida: 4589
  • vn


fix all done.

Gracias:

OBBY, Viper, HaPKoTuK, thunwa1, zhangjianle865, kryptongamer, pedornela, Djassar, giahuy, dizzys, elmaspijudo, aof10022535, LTP Team, mediodas20, duongcao, dieguitox, dangnhapnee, alvaronfirehd, joaopaulobiesek, aybarchu, S!ngle, vaneavanea31, ratox3, Miisoia, Sandokan, angel321, e911217, saske98, Genius05, Van_Bom, stark98, xlichblack, robiikaaa, ProTecno, kanam3, Smudevelop, Almdar, hardcoremd, BrayanMix2016, 2str0kE, Halloween, Peluuca, pagoga, Lude, tutu100, Evangelio, weakedsick, DEATH, yolorf, lkt22, PachoRasta, Shaper, usersa, samsung13, tcbaoanh, h3yShOk, CorsarioDgx, HazzdeN, clockbooster, acelot, bustafa, ruojing, webmonkey, zekcrom, mocorongo, concac123, Dieguinho, amitnet1, FrancoB, ohmagic, haintbn, truongtienhp, solar, thuongdo07, joelsobrin95, RifleMaN_, RaduOnica, gameconcac, nsynecs, nofeara, ziza, zlethanhlong, hichay, LABMU, okilove23, son1xx2, nic269, TheKing027, NoobDK, armamor, PS Sistemas, Andres-, waltervg91, Percy, zhujianhui, tammadall, sagamacus, hu7vo6, xiazaipw, ductruong1, GoldSun, oxey.mu, 183358, Nexus, m1sterio, gega, lstuan, vipgale01, Wendigo, stopk, cri0, victorrz17, zerg24, realman, dlawls662, sagat202, T-LEGENDARY, animator, Tester1838a, kksky, gang, comelon666, Phoenix666, andreyzz, kenh14, dasgrid, Asura, zeroalenda, Ultima, Cartman, NghienMU, NVPGame, miracle1, djnansr, jhonhy, muccone, darkjano, UnCleanOne, makyntosh, kaisudo, Karuritoku, zerosp, ledemkhoc, MuDragonBall, quyanxu, iamzuika, GX_KYO, mugloves99, whisky123, xianwen, herjuni, SaintZeus, camxano1, judakiss21, manifestacja, dhaomao, donciukas14, Genilson23, Kosh, hatchet, zodiacddos, ImportedPotato, takumi12, ArcSyS, alexfy, c4nhsatcodong, Nakamura, Zeus, AZURE, phuongcuongmsqm, LuciferXT, superrin, axeman192, Odisk, PhantomKr, kayito, npt.formu, samsunggon, victhorinox, Realez, knight.php, kimrubi, dahouzi, spartacus, Ifreat, Wikka

Offline samsunggon #22 Posteado: August 01, 2022, 02:08:39 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 435
  • Gracias recibida: 1346
  • ph
thanks all fix now :D


DISCORD: valentino1515


Offline whisky123 #23 Posteado: August 01, 2022, 08:55:17 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 25
  • tw
Edit Dupe, find it from the latest Solar files :)


Offline samsunggon #24 Posteado: August 01, 2022, 09:56:03 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 435
  • Gracias recibida: 1346
  • ph
Edit Dupe, find it from the latest Solar files :)
SHow video :D


DISCORD: valentino1515


Offline whisky123 #25 Posteado: August 01, 2022, 11:00:01 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 96
  • Gracias recibida: 25
  • tw
Edit Dupe, find it from the latest Solar files :)
SHow video :D

Sent to you to view in PM.



Offline zeroalenda #26 Posteado: August 01, 2022, 01:27:38 PM | Modificado: August 01, 2022, 01:57:51 PM by zeroalenda

  • +1 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 87
  • Gracias recibida: 3230
  • br
User.cpp


NpcTalk.cpp


Credits : SolarMu


Offline UnCleanOne #27 Posteado: August 06, 2022, 09:03:04 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 29
  • Gracias recibida: 10
  • ph
Is there anyway to fix other Dupe in NPC? like NPC ELPIS/AIDA/SEED MASTER/TRAINER?

Thanks in Advance


Offline showmax #28 Posteado: August 06, 2022, 09:33:29 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 205
  • Gracias recibida: 4589
  • vn
Is there anyway to fix other Dupe in NPC? like NPC ELPIS/AIDA/SEED MASTER/TRAINER?

Thanks in Advance


void gObjInterfaceCheckTime(LPOBJ lpObj) // OK
{
   if(lpObj->Interface.use == 0)
   {
      return;
   }

   if((GetTickCount()-lpObj->InterfaceTime) < 5000)
   {
      return;
   }

   if(lpObj->Interface.type == INTERFACE_TRADE)
   {
      if(lpObj->Interface.state == 0)
      {
         if(OBJECT_RANGE(lpObj->TargetNumber) != 0)
         {
            gObj[lpObj->TargetNumber].Interface.use = 0;
            gObj[lpObj->TargetNumber].Interface.type = INTERFACE_NONE;
            gObj[lpObj->TargetNumber].Interface.state = 0;
            gObj[lpObj->TargetNumber].TargetNumber = -1;

            gTrade.GCTradeResultSend(lpObj->TargetNumber,3);
         }

         lpObj->Interface.use = 0;
         lpObj->Interface.type = INTERFACE_NONE;
         lpObj->Interface.state = 0;
         lpObj->TargetNumber = -1;

         gTrade.GCTradeResultSend(lpObj->Index,3);
      }
   }

   if(lpObj->Interface.type == INTERFACE_PARTY)
   {
      if(lpObj->Interface.state == 0)
      {
         if(OBJECT_RANGE(lpObj->TargetNumber) != 0)
         {
            gObj[lpObj->TargetNumber].Interface.use = 0;
            gObj[lpObj->TargetNumber].Interface.type = INTERFACE_NONE;
            gObj[lpObj->TargetNumber].Interface.state = 0;
            gObj[lpObj->TargetNumber].TargetNumber = -1;
            gObj[lpObj->TargetNumber].PartyTargetUser = -1;

            gParty.GCPartyResultSend(lpObj->TargetNumber,0);
         }

         lpObj->Interface.use = 0;
         lpObj->Interface.type = INTERFACE_NONE;
         lpObj->Interface.state = 0;
         lpObj->TargetNumber = -1;
         lpObj->PartyTargetUser = -1;

         gParty.GCPartyResultSend(lpObj->Index,0);
      }
   }

   lpObj->InterfaceTime = GetTickCount();
}

Gracias:


Offline UnCleanOne #29 Posteado: August 06, 2022, 09:55:01 AM | Modificado: August 06, 2022, 09:59:09 AM by UnCleanOne

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 29
  • Gracias recibida: 10
  • ph

Offline samsunggon #30 Posteado: August 07, 2022, 10:22:33 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 435
  • Gracias recibida: 1346
  • ph


DUPE OTHER NPC


DISCORD: valentino1515


Offline odin #31 Posteado: August 08, 2022, 04:50:37 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 13
  • Gracias recibida: 66
  • at


DUPE OTHER NPC
As I said above, it's very easy, either way, let's just do it normally and don't have to fix it. Fixed at Rollback Only, even if you can make a bug, the item can't be copied anyway.



use base ROX


Offline phuongcuongmsqm #32 Posteado: August 08, 2022, 05:07:07 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 61
  • Gracias recibida: 15
  • vn


DUPE OTHER NPC
As I said above, it's very easy, either way, let's just do it normally and don't have to fix it. Fixed at Rollback Only, even if you can make a bug, the item can't be copied anyway.



use base ROX
you share?


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
679 Views
Last post November 14, 2018, 06:40:45 AM
by cachobmx
6 Replies
2161 Views
Last post December 04, 2018, 10:00:31 PM
by JYachelini
12 Replies
7259 Views
Last post May 17, 2023, 07:55:16 AM
by Evangelio
13 Replies
12071 Views
Last post October 16, 2022, 10:13:18 AM
by RaduOnica
3 Replies
653 Views
Last post January 10, 2024, 06:34:50 PM
by bin9xhn2