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

How i can do it ? Corpses ? Bug

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello,
I have made script for absorbing corpses but still dont working...

LUA:
local config = {
deads = {6068}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not isInArray(config.deads, itemEx.itemid)) then
return false
else
end

if getPlayerVocation(cid) == 55 or getPlayerStorageValue(cid,55) < 1 then
doPlayerSendTextMessage(cid,22,"You have absorbed 1 of 5 corpses.")
setPlayerStorageValue(cid,55)
doSendMagicEffect(toPosition,70)
else
end

if getPlayerStorageValue(cid,55) == 1 then
setPlayerStorageValue(cid,56)
doPlayerSendTextMessage(cid,22,"You have absorbed 2 of 5 corpses.")
doSendMagicEffect(toPosition,70)
else
end

if getPlayerStorageValue(cid,56) == 2 then
setPlayerStorageValue(cid,57)
doSendMagicEffect(toPosition,70)
doPlayerSendTextMessage(cid,22,"You have absorbed 3 of 5 corpses.")
else
end

if getPlayerStorageValue(cid,57) == 3 then
setPlayerStorageValue(cid,58)
doSendMagicEffect(toPosition,70)
doPlayerSendTextMessage(cid,22,"You have absorbed 4 of 5 corpse.")
else
end

if getPlayerStorageValue(cid,58) == 4 then
setPlayerStorageValue(cid,59)
doSendMagicEffect(toPosition,70)
doPlayerSendTextMessage(cid,22,"You have absorbed last 5 corpse. Now you can do transform.")
else
end

end

If you click on corpse with rune, the corpse will dissapear and msg: You have absorbed 1 of 5 corpses , You have absorbed 2 of 5 corpses ... etc.

If i using my version the corpse dont disappear and all time msg me: You have absorbed 1 of 5 corpses




REP ++++++++
Hail !
 
Code:
local corpses = {6068}
local config = {
	corpses = {6080},
	limit = 5,
	storage = 55
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(config.corpses, itemEx.itemid) then
		return false
	end

	if getPlayerStorageValue(cid, config.storage) < config.limit then
		local n = math.max(1, getPlayerStorageValue(cid, config.storage) + 1)
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have absorbed " .. n .." of " .. config.limit .. " corpses. " .. (n == config.limit and " Now you can do transform." or ""))
		setPlayerStorageValue(cid, config.storage, n)
		doRemoveItem(item.uid)
		doSendMagicEffect(toPosition, 70)
	end
	return true
end
 
How i can add new limit ?
I need: if storage is 60, we must absorb 15 corpses, if storage is 75, you must absorb 35 corpses, if storage is 110 you must absorb 100 corpses etc.

REFRESH THREAD !
 
Back
Top