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

Item Remove Corpse

Saper1995

Technologic
Joined
Jul 11, 2009
Messages
104
Reaction score
3
Location
Poland
Hello!

I have a problem with this script.Item that I use on the body does not eliminate it and not turning into another object. Can someone explain to me what is wrong and correct it for me? I would like to object to the use of the body and remove body disappeared giving us a new item.

Code:
<action itemid="7532" script="tools/deadly.lua"/>

Code:
function onUse(cid, item, frompos, item2, topos)
local los = math.random(1, 1000)
if item.itemid == 2848 and item.itemid == 7532 and (los >500) then
doPlayerAddItem(cid,7533,1) --new item
doRemoveItem(item.uid,7532) -- corpse remover
doRemoveItem(item.uid,2848) -- corpse id
else 
doPlayerSendTextMessage(cid, 22, "Maybe next time...")
end
return true
end
 
Why not make a new rune, like desintegrate but for corpses only? Just edit the desintegrate.
Don't ask me for help, this was just a suggestion.
 
Hello!

I have a problem with this script.Item that I use on the body does not eliminate it and not turning into another object. Can someone explain to me what is wrong and correct it for me? I would like to object to the use of the body and remove body disappeared giving us a new item.

Code:
<action itemid="7532" script="tools/deadly.lua"/>

Code:
function onUse(cid, item, frompos, item2, topos)
local los = math.random(1, 1000)
if item.itemid == 2848 and item.itemid == 7532 and (los >500) then
doPlayerAddItem(cid,7533,1) --new item
doRemoveItem(item.uid,7532) -- corpse remover
doRemoveItem(item.uid,2848) -- corpse id
else 
doPlayerSendTextMessage(cid, 22, "Maybe next time...")
end
return true
end

if item.itemid and item.itemid....
How can an item has 2 different ids ?

You code is wrong because on of those items id is the corpse, and you need to change that to item2

I dunno which is the useable item and which is the corpse...

Tell me, what is the id of the corpse, and I might be able to help =p
 
Hi. I'm sorry I could not previously be. (ID:2848) it's id of the corpse (monster dead).
(ID:7532) it's item who destroy that corpse and turns into a new item with (ID:7532)
 
Hi. I'm sorry I could not previously be. (ID:2848) it's id of the corpse (monster dead).
(ID:7532) it's item who destroy that corpse and turns into a new item with (ID:7532)

Try this:
Lua:
function onUse(cid, item, frompos, item2, topos)
local los = math.random(1, 1000)
if item2.itemid == 2848 and item.itemid == 7532 and (los >500) then
doPlayerAddItem(cid,7533,1) --new item
doRemoveItem(item.uid,1) -- item remover
doRemoveItem(item2.uid,1) -- corpse remover
else 
doPlayerSendTextMessage(cid, 22, "Maybe next time...")
end
return true
end

Hope it helps = )
 
Back
Top