Untitled
lua
a month ago
2.1 kB
3
Indexable
Never
local playerStorageRashid = 20005 local playerStorageRashid2 = 20006 local playerStorageRashid3 = 20007 local playerStorageRashid4 = 20008 local monsterName = "Rashid The Protector" local pos1 = {x=300, y=1530, z=9} local pos2 = {x=301, y=1530, z=9} local pos3 = {x=302, y=1530, z=9} local positem = {x=300, y=1532, z=9} local positem2 = {x=301, y=1532, z=9} local positem3 = {x=302, y=1532, z=9} local wall1 = 9486 function onPrepareDeath(cid, deathList) local killer = deathList[1].killer if isPlayer(cid) and isMonster(killer) then local killerName = getCreatureName(killer) if killerName == monsterName then doPlayerSetStorageValue(cid, playerStorageRashid, -1) -- Elimina el valor de almacenamiento específico doPlayerSetStorageValue(cid, playerStorageRashid2, -1) -- Elimina el valor de almacenamiento específico doPlayerSetStorageValue(cid, playerStorageRashid3, -1) -- Elimina el valor de almacenamiento específico doPlayerSetStorageValue(cid, playerStorageRashid4, -1) -- Elimina el valor de almacenamiento específico end end return true end function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamageUnjustified) if isPlayer(cid) then doRemoveItem(getTileItemById(positem, wall1).uid) -- Elimina la primera pared cuando el jugador muere doRemoveItem(getTileItemById(positem2, wall1).uid) -- Elimina la segunda pared cuando el jugador muere doRemoveItem(getTileItemById(positem3, wall1).uid) -- Elimina la tercera pared cuando el jugador muere doRemoveItem(getTileItemById(pos1, wall1).uid) -- Elimina la tercera pared cuando el jugador muere doRemoveItem(getTileItemById(pos2, wall1).uid) -- Elimina la tercera pared cuando el jugador muere doRemoveItem(getTileItemById(pos3, wall1).uid) -- Elimina la tercera pared cuando el jugador muere end local rashidNpc = getCreatureByName("Rashid The Protector") if rashidNpc then doRemoveCreature(rashidNpc) -- Elimina el NPC "Rashid The Protector" cuando return true end end