Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Cooldown Teleport skill IGCN  (Visto 780 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline shinji1311 Posteado: August 15, 2021, 12:42:57 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 9
  • Gracias recibida: 0
  • vn
I want to cool down teleport skill of DW.
Want change to 3s/ 1 teleport.
Im edited in gameserver/date/skill.txt (range, delay).
Restart server but not working.
On client, i found data/local/eng/skill_eng.bmd
Im edited by bmddec.exe to .text and edit.
but when run main.exe announcements failed.
How to change?



Offline Tester1838a #1 Posteado: August 16, 2021, 02:48:50 PM | Modificado: August 16, 2021, 02:54:06 PM by Tester1838a

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 10
  • Gracias recibida: 466
  • bg
If you have source code of GameServer you can put this cooldown in GameServer directly.

Function you need to edit is :
Code: [Select]
 void CGTeleportRecv(PMSG_TELEPORT* lpMsg, int aIndex)

Add:
Code: [Select]
if ( (GetTickCount() - gObj[aIndex].TeleportSkillTime) < 3000 )
{

::GCServerMsgStringSend("Skill cant be cast so fast!",aIndex,1);

PMSG_TELEPORT_RESULT pTeleportResult;
pTeleportResult.h.c = 0xC3;
pTeleportResult.h.size = sizeof(pTeleportResult);
pTeleportResult.h.headcode = 0x1C;
pTeleportResult.MoveNumber = 0;
pTeleportResult.MapNumber = gObj[aIndex].MapNumber;
pTeleportResult.MapX = gObj[aIndex].X;
pTeleportResult.MapY = gObj[aIndex].Y;
pTeleportResult.Dir = gObj[aIndex].Dir;
DataSend(aIndex, (LPBYTE)&pTeleportResult, pTeleportResult.h.size);
return;
}

gObj[aIndex].TeleportSkillTime = GetTickCount();

In user.cpp have to add in function void gObjCharZeroSet(int aIndex):

Code: [Select]
lpObj->TeleportSkillTime = 0;

In user.h objectstruct:
Code: [Select]
DWORD TeleportSkillTime;

P.s.: GameServer Skill.txt Delay option file doesnt take any effect at all.
And editing client will only take advantage user who have valid skill_eng.bmd file.
Which means if it's not CRC protected or so anyone can modify it and you wont be done anything again.
So the only good way is use code above and patch it server side.

Gracias:


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
955 Views
Last post June 30, 2020, 07:16:08 AM
by erickmalfoy
7 Replies
668 Views
Last post February 23, 2021, 04:08:15 AM
by adc16999
0 Replies
398 Views
Last post August 10, 2021, 11:16:15 PM
by alivejr
30 Replies
2370 Views
Last post May 05, 2024, 10:37:35 AM
by gang
5 Replies
372 Views
Last post December 16, 2023, 12:47:31 AM
by Odisk