Minimii
New Member
How can I make so that aol works even when its pvp enforced?=)
if(preventItem && getSkull() != SKULL_RED && g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED)
if(preventItem && getSkull() != SKULL_RED && g_game.getWorldType() == WORLD_TYPE_PVP_ENFORCED)
if(preventItem)
If you use thisyou should most likely not drop anything with red skull either. In LUA, not sure if there's any function to prevent the player dropping any items, might be.PHP:if(preventItem)
<attribute key="preventLoss" value="1"/>
I believe (but as I stated in an earlier post, I'm not a C++ programmer) that it will work as you want, because if you look inside your items.xml file you can find this at AOL.
which I believe is the preventItem we use inside the source code. I'm not entirely sure though. ; )Code:<attribute key="preventLoss" value="1"/>
<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
</item>
And you can change for the number you whantITEM_AMULETOFLOSS = 2173,
if(inventory[SLOT_NECKLACE] && inventory[SLOT_NECKLACE]->getID() == ITEM_AMULETOFLOSS &&
getSkull() != SKULL_RED)