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

Mod.

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,571
Solutions
3
Reaction score
98
Location
Portugal
Could someone turn me this into a mod?:confused:
Ill rep++ :peace:

Code:
	<item id="2196" article="a" name="Forever Aol">
		<attribute key="description" value="This aol is infinite you never lose it even if you got redskull it protects you!" /> 
		<attribute key="weight" value="500" /> 
		<attribute key="slotType" value="necklace" /> 
		<attribute key="charges" value="999999" />
		<attribute key="preventDrop" value="999999" />
	</item>

Code:
<event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>

Code:
	registerCreatureEvent(cid, "onPrepareDeath")

LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if isPlayer(cid) == true then
        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                doCreatureSetDropLoot(cid, false)      
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        return true
        end
    end
    return true
end
 
ServerDirectory/mods/prepareDeath.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="prepareDeath" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
	
	<event type="login" name="prepareDeath" event="script"><![CDATA[
			registerCreatureEvent(cid, "onPrepareDeath")
		return TRUE
	]]></event>
	
	<event type="prepareDeath" name="onPrepareDeath" event="script"><![CDATA[

		if isPlayer(cid) then
			if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
				doCreatureSetDropLoot(cid, false)      
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			return true
			end
		end
		return true
	]]></event>
</mod>
Not possible to put items in mods i think
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Forever_AOL" version="1.0" author="Slaktaren" contact="his ass" enabled="yes">
	<event type="login" name="prepareDeath" event="buffer"><![CDATA[
		registerCreatureEvent(cid, "AOL_pdeath")
	]]></event>
	<event type="prepareDeath" name="AOL_pdeath" event="buffer"><![CDATA[
		if isPlayer(cid) then
			if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
				doCreatureSetDropLoot(cid, false)      
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			end
		end
	]]></event>
	<item id="2196" article="a" name="Forever Aol" override="yes">
		<attribute key="description" value="This aol is infinite you never lose it even if you got redskull it protects you!" /> 
		<attribute key="weight" value="500" /> 
		<attribute key="slotType" value="necklace" /> 
		<attribute key="charges" value="999999" />
		<attribute key="preventDrop" value="999999" />
	</item>
</mod>
http://otland.net/f139/handling-mods-lesson-1-a-75869/#post778283
 
Last edited:
Back
Top