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

Lua Drop items on death

dunnish

New Member
Joined
Jun 18, 2009
Messages
268
Solutions
1
Reaction score
3
hello where to change so ppl wont drop any items when they die
 
lol :p
So what is this
in CreatureScripts make File name it ForeverAol.lua

Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
 if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 10134) then
 doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
 doCreatureSay(cid, "Forever Amulet!", TALKTYPE_ORANGE_1)
 elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2131) and (getCreatureSkullType(cid) < 4) then
 doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
 doCreatureSay(cid, "Skull Amulet!", TALKTYPE_ORANGE_1)
 end
 return true
 end

and register it in CreatureScript.xml

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

this protect anything from drop even if u have (no-Skull / White-Skull / Red-Skull / Black-Skull)

and register it in Login.lua

Code:
registerCreatureEvent(cid, "forever amulet")
 
hmm becuse im makeing a war ot im tierd that all war ots is just lagging and suxs. i find so they dont drop items only backpack left :/ its not at same place in website (players) i changed loss_items to 0 instad of 100 then its wont drop any eq but backpack i changed container. but when i create a new char its still drop backpack
 
Probably because it's using the default value, which AAC are you using?
 
add blessing on login
or change the loss items and loss containers values to 0 in your database

Code:
UPDATE `DATABASENAME`.`players` SET `loss_items` = '0';


UPDATE `DATABASENAME`.`players` SET `loss_containers` = '0';

DATABASENAME = your server database name
 
Or reely easy and always work, add
Code:
    doCreatureSetDropLoot(cid, false)
in your login.lua
 
im prutty noobie at this xD but shud i only add
doCreatureSetDropLoot(cid, false) in config? i tryed then i get cant load config.lua
 
I'll do this reely easy for you xD
Look for:
Code:
 for i = 1, 5 do
        if(not getPlayerBlessing(cid, i)) then
            doPlayerAddBlessing(cid, i)
        end
    end

and under the LAST end paste:
Code:
doCreatureSetDropLoot(cid, false)

This is just an example for where you can put it to make it easier for you, it doesnt need to be right there
 
Back
Top