• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fix/Patch Anti-clon NPC with Elfbot

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
Made by Gpedro

In npc.cpp find:

[cpp]if(NpcState* npcState = getState(player, true))
{
npcState->amount = amount;
npcState->subType = count;
npcState->itemId = itemId;
npcState->buyPrice = getListItemPrice(itemId, SHOPEVENT_BUY);
npcState->ignoreCap = ignoreCap;
npcState->inBackpacks = inBackpacks;

const NpcResponse* response = getResponse(player, npcState, EVENT_PLAYER_SHOPBUY);
executeResponse(player, npcState, response);
}[/cpp]

and replace with:

[cpp]if(NpcState* npcState = getState(player, true))
{
if(amount <= 0){
amount = 1;
}
npcState->amount = amount;
npcState->subType = count;
npcState->itemId = itemId;
npcState->buyPrice = getListItemPrice(itemId, SHOPEVENT_BUY);
npcState->ignoreCap = ignoreCap;
npcState->inBackpacks = inBackpacks;

const NpcResponse* response = getResponse(player, npcState, EVENT_PLAYER_SHOPBUY);
executeResponse(player, npcState, response);
}[/cpp]
 
Back
Top