• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Feature [0.4] Skull amulet + Forever AOL

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,752
Solutions
5
Reaction score
756
Hello,
I looked around but couldn't find anything relevant. The majority of released scripts are creaturescripts, and none of them function as intended.
This was the only approach that worked properly for me without any problems, so I thought I'd share it with others.

What is this?
Amulet ID = 2131 --> Skull amulet, has infinity charges and protects all your items from being dropped even if you have WS, RS or BS
Amulet ID = 2198 --> Just like normal AOL, but has infinite charges

Go to player.cpp
Find:
Lua:
uint32_t itemLoss = (uint32_t)std::floor((5. + loss) * lossPercent[LOSS_ITEMS] / 1000.);
Add this above it:
Code:
    Item* item = getInventoryItem(SLOT_NECKLACE);
    if (item && item->getID() == 2131)
    return;

Again in player.cpp , replace
Code:
if(preventDrop && preventDrop != preventLoss)
with
Code:
if(preventDrop && preventDrop != preventLoss && (preventDrop->getID() != 2131 && preventDrop->getID() != 2198))

Compile and you are good to go

Shoutout to Roddet for helping out
 
Top