.Incredible™ 8 Posted February 26, 2019 Share Posted February 26, 2019 Is there a possibility to allow armor changes only every 5 seconds to prevent the "Wallhack" bug? Link to comment Share on other sites More sharing options...
Heathcliff 183 Posted February 26, 2019 Share Posted February 26, 2019 Hi! Try this: char.h search: //PREVENT_REFINE_HACK int GetRefineTime() const { return m_iRefineTime; } void SetRefineTime() { m_iRefineTime = thecore_pulse(); } int m_iRefineTime; //END_PREVENT_REFINE_HACK Add this under: //PREVENT_ARMOR_WALLHACK int GetArmorUseTime() const { return m_iArmorUseTime; } void SetArmorUseTime() { m_iArmorUseTime = thecore_pulse(); } int m_iArmorUseTime; //END_PREVENT_ARMOR_WALLHACK Then open char_item.cpp and search this in "CHARACTER::EquipItem" function: if (iWearCell < 0) return false; Add this under: int equipTime = 5; int iPulse = thecore_pulse(); if (iWearCell == WEAR_BODY) SetArmorUseTime(); if (iWearCell == WEAR_BODY && iPulse - GetArmorUseTime() < PASSES_PER_SEC(equipTime)) { ChatPacket(CHAT_TYPE_INFO, "You can't equip armor so fast"); return false; } Not tested so I'm not sure it works! Regards Link to comment Share on other sites More sharing options...
Premium EnKor 42 Posted February 27, 2019 Premium Share Posted February 27, 2019 20 hours ago, .Incredible™ said: Is there a possibility to allow armor changes only every 5 seconds to prevent the "Wallhack" bug? Or, u can block trade armor in mounts... In ox map... Etc... if pc.get_sex() == true and npc.get_sex() == false then npc.purge() end Link to comment Share on other sites More sharing options...
.Incredible™ 8 Posted February 27, 2019 Author Share Posted February 27, 2019 vor 50 Minuten schrieb EnKor: Or, u can block trade armor in mounts... In ox map... Etc... I know, but i want a Cooldown becouse i think you can Crash a core when you Go outside The map with wallhack Link to comment Share on other sites More sharing options...
Heathcliff 183 Posted February 28, 2019 Share Posted February 28, 2019 20 hours ago, .Incredible™ said: I know, but i want a Cooldown becouse i think you can Crash a core when you Go outside The map with wallhack Sorry, my first post was buggy. I've corrected so, it works fine for me. do the char.h part again, then go to char_item.cpp and search this: if (iWearCell < 0) return false; Paste this under: int equipTime = 5; int iPulse = thecore_pulse(); if (iWearCell == WEAR_BODY) { if (iPulse - GetArmorUseTime() < PASSES_PER_SEC(equipTime)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't equip armor so fast")); return false; } else SetArmorUseTime(); } Regards 1 Link to comment Share on other sites More sharing options...
Thrall 182 Posted May 4, 2021 Share Posted May 4, 2021 Hi, im sorry to inform this is bugged idk how but people can't use armour after adding Link to comment Share on other sites More sharing options...
Sobolanescu 6 Posted May 4, 2021 Share Posted May 4, 2021 (edited) You cand use a client side + server side(like the one mentioned above) combination to be sure this is not working. clientside: Open uiinventory.py and search: Spoiler def __init__(self): Add: Spoiler self.lastArmorEquiped = 0 Search: Spoiler def __UseItem(self, slotIndex): ItemVNum = player.GetItemIndex(slotIndex) item.SelectItem(ItemVNum) Add under: Spoiler if item.GetItemType() == item.ITEM_TYPE_ARMOR and item.GetItemSubType() == item.ARMOR_BODY: if app.GetTime() < self.lastArmorEquiped + 5: chat.AppendChat(chat.CHAT_TYPE_INFO, "Poti schimba armura doar peste 5 secunde.") return else: self.lastArmorEquiped = app.GetTime() Edited May 4, 2021 by Sobolanescu 2 2 Link to comment Share on other sites More sharing options...
Heathcliff 183 Posted May 5, 2021 Share Posted May 5, 2021 (edited) In char_item.cpp, search: if (iWearCell < 0) return false; Add under: if (iWearCell == WEAR_BODY) { int ArmorUseTime = GetQuestFlag("prevent_wallhack.armor_use_time"); if (ArmorUseTime) { if (get_global_time() < ArmorUseTime /* limit */) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't equip armor so fast")); return false; } else SetQuestFlag("prevent_wallhack.armor_use_time", get_global_time() + 3); } } In inpug_login.cpp, search: ch->StartCheckSpeedHackEvent(); Add under: ch->SetQuestFlag("prevent_wallhack.armor_use_time", get_global_time()); It works 100%. I'm using this too The other two I posted was just a freakin' junk, so sorry for that. Have a nice day guys! Edited May 5, 2021 by Heathcliff™ 1 Link to comment Share on other sites More sharing options...
Thrall 182 Posted May 6, 2021 Share Posted May 6, 2021 I am using now only the client side version and still seems alright, but thank you a lot anyway! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now