• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Amulet of Loss dont Work

Waller

gogo
Joined
Jun 19, 2008
Messages
770
Reaction score
14
Location
Sweden
Hi all OTlanders.

I use pvp-e on my server and the aol dont work. It's like it have 200000 charges. (Yes I changed it in items and no, I didn't do it with gamemaster.) But you loose items anyway.

How to fix so you DONT loose ANY items at all?

Rep+ for the helper.

Regards,
Waller!
 
Do you have it like that
Code:
	<item id="2173" article="an" name="amulet of loss">
		<attribute key="weight" value="420" />
		<attribute key="slotType" value="necklace" />
		<attribute key="charges" value="1" />
		<attribute key="preventDrop" value="1" />
	</item>
 
Creaturescripts.xml add
Code:
<event type="preparedeath" name="Aol" event="script" value="aol.lua"/>
login.lua add
Code:
registerCreatureEvent(cid, "Aol")
aol.lua
LUA:
function onPrepareDeath(cid)
if getPlayerSlotItem(cid, 2).itemid == 2173 then
                doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
				doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
                doPlayerRemoveItem(cid, 2173, 1)
else
                doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 100)
				doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)
end
return 1
end
 
Last edited:
So when you set loss percent to that , wont it be like that always after it was excuted for the first time?? I mean wont you need somthning to change it back if the player dont have aol.
 
So when you set loss percent to that , wont it be like that always?? I mean wont you need somthning to change it back if the player dont have aol.

Sorry wrong script, this was old one xD I'm on windows and this has my old sscripts, should be doCreatureSetDropLoot(cid, false) :)
 
nah the one you made is right as like that if he have red skull his items will fall , also if you made droploot false his dead body wont be created you just need to add check in the prepare death script

Code:
elseif(dont have aol)
  set loss percent to 100
end
 
Last edited:
nah the one you made is write as like that if he have red skull his items will fall , also if you made droploot false his dead body wont be created you just need to add check in the prepare death script

Code:
elseif(dont have aol)
  set loss percent to 100
end

I was using this script with my old server and it worked without problems :) (bit updated)
LUA:
function onPrepareDeath(cid)
if getPlayerSlotItem(cid, 2).itemid == 2173 then
                doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
				doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
                doPlayerRemoveItem(cid, 2173, 1)
else
                doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 100)
				doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)
end
return 1
end
Used 0.3.6 then.
 
Back
Top