Register for your free account! | Forgot your password?

You last visited: Today at 14:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



help for code

Discussion on help for code within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2019
Posts: 53
Received Thanks: 5
help for code

if(Rebot::Config.AutoMP && Rebot::Config.AutoPotion && Rebot::Config.MpItemID != 0 && ((((float)g_pCICPlayer->m_mpCurrent/(float)g_pCICPlayer->m_mpMax) * 100) < Rebot::Config.MpPercent) && g_pCICPlayer && g_pCICPlayer->Status !=2)
{
CIFSlotWithHelp* pSlot;
CIFInventory* pInventory = g_pCGInterface->GetMainPopup()->GetInventory();
if(pInventory)
{
for (int i = 0; i < g_pCICPlayer->m_inventorySize; i++)
{
pSlot = *reinterpret_cast<CIFSlotWithHelp**>(pInventory->pSlots + (i * 4));
if(pSlot->ItemInfo && pSlot)
{
if ( pSlot->ItemInfo->GetItemData()->m_id == Rebot::Config.MpItemID)
{
if((time(NULL) - lastClickTime12 > 0.5)) {

CMsgStreamBuffer buf(0x704C);
buf << (byte)(pSlot->UniqueID()- 100 + 0xD);
buf << (UINT16)(pSlot->ItemInfo->GetItemData()->TID) ;
SendMsg(buf);
lastClickTime12 = time(NULL);
}
break;
}
}
}
}

}



this code make for macro crash when use mp bot any one can hellp ?
sasa5214 is offline  
Old 07/06/2025, 03:52   #2
 
ryaneichner's Avatar
 
elite*gold: 0
Join Date: Oct 2014
Posts: 175
Received Thanks: 47
Quote:
Originally Posted by sasa5214 View Post
if(Rebot::Config.AutoMP && Rebot::Config.AutoPotion && Rebot::Config.MpItemID != 0 && ((((float)g_pCICPlayer->m_mpCurrent/(float)g_pCICPlayer->m_mpMax) * 100) < Rebot::Config.MpPercent) && g_pCICPlayer && g_pCICPlayer->Status !=2)
{
CIFSlotWithHelp* pSlot;
CIFInventory* pInventory = g_pCGInterface->GetMainPopup()->GetInventory();
if(pInventory)
{
for (int i = 0; i < g_pCICPlayer->m_inventorySize; i++)
{
pSlot = *reinterpret_cast<CIFSlotWithHelp**>(pInventory->pSlots + (i * 4));
if(pSlot->ItemInfo && pSlot)
{
if ( pSlot->ItemInfo->GetItemData()->m_id == Rebot::Config.MpItemID)
{
if((time(NULL) - lastClickTime12 > 0.5)) {

CMsgStreamBuffer buf(0x704C);
buf << (byte)(pSlot->UniqueID()- 100 + 0xD);
buf << (UINT16)(pSlot->ItemInfo->GetItemData()->TID) ;
SendMsg(buf);
lastClickTime12 = time(NULL);
}
break;
}
}
}
}

}



this code make for macro crash when use mp bot any one can hellp ?

try it>

if (Rebot::Config.AutoMP && Rebot::Config.AutoPotion && Rebot::Config.MpItemID != 0 &&
g_pCICPlayer && g_pCICPlayer->Status != 2 &&
((float)g_pCICPlayer->m_mpCurrent / (float)g_pCICPlayer->m_mpMax) * 100 < Rebot::Config.MpPercent)
{
CIFInventory* pInventory = g_pCGInterface->GetMainPopup()->GetInventory();
if (pInventory && pInventory->pSlots)
{
for (int i = 0; i < g_pCICPlayer->m_inventorySize; i++)
{
CIFSlotWithHelp* pSlot = *reinterpret_cast<CIFSlotWithHelp**>(pInventory->pSlots + (i * 4));
if (pSlot && pSlot->ItemInfo)
{
if (pSlot->ItemInfo->GetItemData()->m_id == Rebot::Config.MpItemID)
{
clock_t now = clock();
if ((now - lastClickTime12) > (CLOCKS_PER_SEC / 2)) // 0.5 sec
{
CMsgStreamBuffer buf(0x704C);
buf << (byte)(pSlot->UniqueID() - 100 + 0xD);
buf << (UINT16)(pSlot->ItemInfo->GetItemData()->TID);
SendMsg(buf);
lastClickTime12 = now;
}
break;
}
}
}
}
}
ryaneichner is offline  
Reply


Similar Threads Similar Threads
[Selling] [CODE][/CODE][BATTLE]-✅ESP,GLOW,NO-RECOIL,FLY,TP,SILENT - AIM - IN TEST✅[CODE][/CODE]
07/21/2019 - Rainbow Six Siege Trading - 2 Replies
I'm passing here to tell you that the cheat -BattleByeR6- is the better cheat, 100% reliable. In this cheat -BatlleByeR6- there is no risk of getting banned, it will be added several other options in our cheat -BattleByeR6- ● Interested in adding contact at discord : BattleBye #9647 Or enter into our discord BattleBye : https://discord.gg/dbHUSmu Options of our cheat BattleyeR6
[Selling] [CODE][/CODE][BATTLEBYE-CHEATS]-✅ESP,GLOW,NO-RECOIL,FLY,TP,SILENT-AIM-✅ [CODE][/CODE]
07/20/2019 - Rainbow Six Siege Trading - 0 Replies
I'm passing here to tell you that the cheat -BattleByeR6- is the better cheat, 100% reliable. In this cheat -BatlleByeR6- there is no risk of getting banned, it will be added several other options in our cheat -BattleByeR6- ● Interested in adding contact at discord : BattleBye #9647 Or enter into our discord BattleBye : https://discord.gg/dbHUSmu
[Selling] [CODE][/CODE][BATTLEBYE]-✅ESP,GLOW,NO-RECOIL,FLY,TP,AIM.✅[CODE][/CODE]
07/19/2019 - Rainbow Six Siege Trading - 0 Replies
I'm passing here to tell you that the cheat -BattleByeR6- is the better cheat, 100% reliable. In this cheat -BatlleByeR6- there is no risk of getting banned, it will be added several other options in our cheat -BattleByeR6- ● Interested in adding contact at discord : BattleBye #9647 Or enter into our discord BattleBye : https://discord.gg/dbHUSmu
help help help help help help
06/28/2009 - Say Hello - 0 Replies
how i can dowmload Mangos 6385 ??????????????????????????????????? please give me the limk i can't see that i know it is in www.elitepvpers.com/.../153716-release-mangos-relea ses-blackscorpian-win32-2-4-3-a.html - but give me link sent it to my email plz



All times are GMT +1. The time now is 14:14.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.