president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
This is not the first script type but is even more useful. This script checks a storage if it is greater than one when a player dies the storage goes to oo -1 total amount (if 5 goes to 4 ...) and the player does not lose anything when you die (exessão of red skull).:thumbup:
Well go and creaturescripts.xml adcione this tag:
Now go to the scripts folder and create a script called nodyed.lua and in the same place so:
After this go to login.lua utimo and before the end and before the return TRUE adcione this:
ready, now you can make any script that adcione storage values, you can take advantage of your system's quest server, change the StorageID to 6500, and create a quest that gives a demoniac escesse (id 6500) when the player will automatically open that he bau will be protecting them from death not lost loot or exp or skills.
Repp ++
Well go and creaturescripts.xml adcione this tag:
Code:
<event type="death" name="nodyed" script="nodyed.lua"/>
Now go to the scripts folder and create a script called nodyed.lua and in the same place so:
Code:
local storageid = 4550
----
function onDeath(cid, corpse, lastHitKiller)
local pos = getCreaturePosition(cid)
if getPlayerStorageValue(cid, storageid) == -1 then
setPlayerStorageValue(cid, storageid, 0)
end
if getPlayerStorageValue(cid, storageid) > 0 then
setPlayerStorageValue(cid, storageid, getPlayerStorageValue(cid, storageid)-1)
pos.stackpos = 255
local corpos = {3065,3058}
doPlayerPopupFYI(cid,"You died and was a protected!")
doCreateItem(2016,2,pos)
local ae = doCreateItem(corpos[getPlayerSex(cid)+1], 1,pos)
doSetItemSpecialDescription(ae,"You recognize ".. getCreatureName(cid)..". He was killed by something!")
doTeleportThing(cid,getTownTemplePosition(getPlaye rTown(cid)))
doCreatureAddHealth(cid,9000000)
doSendMagicEffect(getCreaturePosition(cid),65)
doSendMagicEffect(pos,65)
doRemoveCreature(cid)
doRemoveItem(corpse.uid,1)
return FALSE
end
return TRUE
end
After this go to login.lua utimo and before the end and before the return TRUE adcione this:
Code:
registerCreatureEvent(cid, "nodyed")
ready, now you can make any script that adcione storage values, you can take advantage of your system's quest server, change the StorageID to 6500, and create a quest that gives a demoniac escesse (id 6500) when the player will automatically open that he bau will be protecting them from death not lost loot or exp or skills.
Repp ++