• 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!

Good idea for new necklace.

breadmaker

New Member
Joined
Jul 16, 2010
Messages
160
Reaction score
3
Hello.
I have good idea for new necklace like Amulet of loss.
If you equip special amulet.
After dead the script checking if you have 5 crystal coins, than amulet remove this from your equip/backpack and preventloss your all items like AOL.
If you dont have 5 crystal coins, than amulet dont loss but you lost backpack and etc.

Are you interested in this idea ? Make your choice... :thumbup:
 
Creaturescripts.xml add
Code:
	<event type="login" name="Super" event="script" value="likeaol.lua"/>
	<event type="death" name="SuperDeath" event="script" value="likeaol2.lua"/>
login.lua add
LUA:
	registerCreatureEvent(cid, "Super")
	registerCreatureEvent(cid, "SuperDeath")
likeaol.lua
LUA:
--Script by Sonical
local itemi = 2160 --Item ID
local money = 50000 --How much money
local storage = 3131 --Storage value (do not change)
function onLogin(cid)
if getPlayerSlotItem(cid, 2).itemid == itemi then
	if getPlayerStorageValue(cid,storage) == -1 then
		if doPlayerRemoveMoney(cid, money) == TRUE then
				setPlayerStorageValue(cid,storage,1)
                doCreatureSetDropLoot(cid, false)
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid, "You are now protected from death by your ".. getItemNameById(itemi) .."!", TALKTYPE_ORANGE_1)
		else
		doCreatureSay(cid, "You need "..money.." gold coins to get that Mystical protection of ".. getItemNameById(itemi) ..".", TALKTYPE_ORANGE_1)
		end
	elseif getPlayerStorageValue(cid,storage) == 1 then
	    doCreatureSetDropLoot(cid, false)
	end
end
return 1
end
--Script by Sonical
likeaol2.lua
LUA:
--Script by Sonical
local storage = 3131 --Do not change
function onDeath(cid, corpse, deathList)
if getPlayerStorageValue(cid,storage) == 1 then
setPlayerStorageValue(cid,storage,-1)
end
return 1
end
--Script by Sonical
Rep++

Haven't tested but if it doesn't work post your errors :thumbup:
 
Back
Top