Ir para conteúdo
  • Cadastre-se

Posts Recomendados

bom galera , apos usar a enchanted ruby ou qualquer outro acontece este bug

HBXrcmY.png

 

alguem ?

Editado por PepeHanc (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

local config = {

manaCost = 300,
soulCost = 2,
}
 
local spheres = {
[7759] = 7,
[7760] = 5,
[7761] = 6,
[7762] = 8
}
 
local enchantableGems = {2147, 2146, 2149, 2150}
local enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905}
 
local enchantingAltars = {
{7504, 7505, 7506, 7507},
{7508, 7509, 7510, 7511},
{7516, 7517, 7518, 7519},
{7512, 7513, 7514, 7515}
}
 
local enchantedGems = {7760, 7759, 7761, 7762}
local enchantedItems = {
[2383] = {7744, 7763, 7854, 7869},
[7383] = {7745, 7764, 7855, 7870},
[7384] = {7746, 7765, 7856, 7871},
[7406] = {7747, 7766, 7857, 7872},
[7402] = {7748, 7767, 7858, 7873},
[2429] = {7749, 7768, 7859, 7874},
[2430] = {7750, 7769, 7860, 7875},
[7389] = {7751, 7770, 7861, 7876},
[7380] = {7752, 7771, 7862, 7877},
[2454] = {7753, 7772, 7863, 7878},
[2423] = {7754, 7773, 7864, 7879},
[2445] = {7755, 7774, 7865, 7880},
[7415] = {7756, 7775, 7866, 7881},
[7392] = {7757, 7776, 7867, 7882},
[2391] = {7758, 7777, 7868, 7883},
[2544] = {7840, 7839, 7850, 7838},
[8905] = {8906, 8907, 8909, 8908}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
 
-- The Elemental Spheres by MaXwEllDeN
if itemEx.actionid == 4119 and isInArray({7759, 7760, 7761, 7762}, item.itemid) then
if spheres[item.itemid] ~= p:getVocation():getId() then
return false
end
 
if isInArray({8894, 8895}, itemEx.itemid) then -- Mudar ID Ligado
doCreatureSay(cid, "Turn off the machine first.", TALKTYPE_MONSTER_SAY)
return false
end
 
local sto = p:getStorageValue(60026) == -1 and 1 or p:getStorageValue(60026) + 1
 
if sto == 21 then
return false
end
 
toPosition:sendMagicEffect(12)
p:setStorageValue(60026, sto)
iuid:remove(1)
return true
end
-- ######
 
if item.itemid == 2147 and itemEx.itemid == 2342 then
local targetItem = Item(itemEx.uid)
targetItem:transform(2343)
targetItem:decay()
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
 
if item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid) then
Item(itemEx.uid):transform(9933)
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
 
if isInArray(enchantableGems, item.itemid) then
local subtype = item.type
if subtype == 0 then
subtype = 1
end
 
local mana = config.manaCost * subtype
if player:getMana() < mana then
player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA)
return false
end
 
local soul = config.soulCost * subtype
if player:getSoul() < soul then
player:sendCancelMessage(RETURNVALUE_NOTENOUGHSOUL)
return false
end
 
local targetId = table.find(enchantableGems, item.itemid)
if targetId == nil or not isInArray(enchantingAltars[targetId], itemEx.itemid) then
return false
end
 
player:addMana(-mana)
player:addSoul(-soul)
Item(item.uid):transform(enchantedGems[targetId])
player:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC))
player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE)
return true
end
 
if item.itemid == 7761 and isInArray({9949, 9954}, itemEx.itemid) then
local targetItem = Item(itemEx.uid)
targetItem:transform(itemEx.itemid - 1)
targetItem:decay()
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
return true
end
 
if isInArray(enchantedGems, item.itemid) then
if not isInArray(enchantableItems, itemEx.itemid) then
fromPosition:sendMagicEffect(CONST_ME_POFF)
return false
end
 
local targetId = table.find(enchantedGems, item.itemid)
if targetId == nil then
return false
end
 
local subtype = itemEx.type
if not isInArray({2544, 8905}, itemEx.itemid) then
subtype = 1000
end
 
local targetItem = Item(itemEx.uid)
targetItem:transform(enchantedItems[itemEx.itemid][targetId], subtype)
targetItem:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
Item(item.uid):remove(1)
return true
end
return false
end

Link para o post
Compartilhar em outros sites
  • Moderador

Tente esse:

 

 

local config = {

manaCost = 300,
soulCost = 2,
}
 
local spheres = {
[7759] = 7,
[7760] = 5,
[7761] = 6,
[7762] = 8
}
 
local enchantableGems = {2147, 2146, 2149, 2150}
local enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905}
 
local enchantingAltars = {
{7504, 7505, 7506, 7507},
{7508, 7509, 7510, 7511},
{7516, 7517, 7518, 7519},
{7512, 7513, 7514, 7515}
}
 
local enchantedGems = {7760, 7759, 7761, 7762}
local enchantedItems = {
[2383] = {7744, 7763, 7854, 7869},
[7383] = {7745, 7764, 7855, 7870},
[7384] = {7746, 7765, 7856, 7871},
[7406] = {7747, 7766, 7857, 7872},
[7402] = {7748, 7767, 7858, 7873},
[2429] = {7749, 7768, 7859, 7874},
[2430] = {7750, 7769, 7860, 7875},
[7389] = {7751, 7770, 7861, 7876},
[7380] = {7752, 7771, 7862, 7877},
[2454] = {7753, 7772, 7863, 7878},
[2423] = {7754, 7773, 7864, 7879},
[2445] = {7755, 7774, 7865, 7880},
[7415] = {7756, 7775, 7866, 7881},
[7392] = {7757, 7776, 7867, 7882},
[2391] = {7758, 7777, 7868, 7883},
[2544] = {7840, 7839, 7850, 7838},
[8905] = {8906, 8907, 8909, 8908}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
 
-- The Elemental Spheres by MaXwEllDeN
if itemEx.actionid == 4119 and isInArray({7759, 7760, 7761, 7762}, item.itemid) then
if spheres[item.itemid] ~= player:getVocation():getId() then
return false
end
 
if isInArray({8894, 8895}, itemEx.itemid) then -- Mudar ID Ligado
doCreatureSay(cid, "Turn off the machine first.", TALKTYPE_MONSTER_SAY)
return false
end
 
local sto = p:getStorageValue(60026) == -1 and 1 or p:getStorageValue(60026) + 1
 
if sto == 21 then
return false
end
 
toPosition:sendMagicEffect(12)
p:setStorageValue(60026, sto)
iuid:remove(1)
return true
end
-- ######
 
if item.itemid == 2147 and itemEx.itemid == 2342 then
local targetItem = Item(itemEx.uid)
targetItem:transform(2343)
targetItem:decay()
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
 
if item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid) then
Item(itemEx.uid):transform(9933)
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
 
if isInArray(enchantableGems, item.itemid) then
local subtype = item.type
if subtype == 0 then
subtype = 1
end
 
local mana = config.manaCost * subtype
if player:getMana() < mana then
player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA)
return false
end
 
local soul = config.soulCost * subtype
if player:getSoul() < soul then
player:sendCancelMessage(RETURNVALUE_NOTENOUGHSOUL)
return false
end
 
local targetId = table.find(enchantableGems, item.itemid)
if targetId == nil or not isInArray(enchantingAltars[targetId], itemEx.itemid) then
return false
end
 
player:addMana(-mana)
player:addSoul(-soul)
Item(item.uid):transform(enchantedGems[targetId])
player:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC))
player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE)
return true
end
 
if item.itemid == 7761 and isInArray({9949, 9954}, itemEx.itemid) then
local targetItem = Item(itemEx.uid)
targetItem:transform(itemEx.itemid - 1)
targetItem:decay()
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
return true
end
 
if isInArray(enchantedGems, item.itemid) then
if not isInArray(enchantableItems, itemEx.itemid) then
fromPosition:sendMagicEffect(CONST_ME_POFF)
return false
end
 
local targetId = table.find(enchantedGems, item.itemid)
if targetId == nil then
return false
end
 
local subtype = itemEx.type
if not isInArray({2544, 8905}, itemEx.itemid) then
subtype = 1000
end
 
local targetItem = Item(itemEx.uid)
targetItem:transform(enchantedItems[itemEx.itemid][targetId], subtype)
targetItem:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
Item(item.uid):remove(1)
return true
end
return false
end
Link para o post
Compartilhar em outros sites
  • Moderador

 

local config = {

manaCost = 300,
soulCost = 2,
}
 
local spheres = {
[7759] = 7,
[7760] = 5,
[7761] = 6,
[7762] = 8
}
 
local enchantableGems = {2147, 2146, 2149, 2150}
local enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905}
 
local enchantingAltars = {
{7504, 7505, 7506, 7507},
{7508, 7509, 7510, 7511},
{7516, 7517, 7518, 7519},
{7512, 7513, 7514, 7515}
}
 
local enchantedGems = {7760, 7759, 7761, 7762}
local enchantedItems = {
[2383] = {7744, 7763, 7854, 7869},
[7383] = {7745, 7764, 7855, 7870},
[7384] = {7746, 7765, 7856, 7871},
[7406] = {7747, 7766, 7857, 7872},
[7402] = {7748, 7767, 7858, 7873},
[2429] = {7749, 7768, 7859, 7874},
[2430] = {7750, 7769, 7860, 7875},
[7389] = {7751, 7770, 7861, 7876},
[7380] = {7752, 7771, 7862, 7877},
[2454] = {7753, 7772, 7863, 7878},
[2423] = {7754, 7773, 7864, 7879},
[2445] = {7755, 7774, 7865, 7880},
[7415] = {7756, 7775, 7866, 7881},
[7392] = {7757, 7776, 7867, 7882},
[2391] = {7758, 7777, 7868, 7883},
[2544] = {7840, 7839, 7850, 7838},
[8905] = {8906, 8907, 8909, 8908}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
local p = Player(cid)
 
-- The Elemental Spheres by MaXwEllDeN
if itemEx.actionid == 4119 and isInArray({7759, 7760, 7761, 7762}, item.itemid) then
if spheres[item.itemid] ~= p:getVocation():getId() then
return false
end
 
if isInArray({8894, 8895}, itemEx.itemid) then -- Mudar ID Ligado
doCreatureSay(cid, "Turn off the machine first.", TALKTYPE_MONSTER_SAY)
return false
end
 
local sto = p:getStorageValue(60026) == -1 and 1 or p:getStorageValue(60026) + 1
 
if sto == 21 then
return false
end
 
toPosition:sendMagicEffect(12)
p:setStorageValue(60026, sto)
iuid:remove(1)
return true
end
-- ######
 
if item.itemid == 2147 and itemEx.itemid == 2342 then
local targetItem = Item(itemEx.uid)
targetItem:transform(2343)
targetItem:decay()
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
 
if item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid) then
Item(itemEx.uid):transform(9933)
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
return true
end
 
if isInArray(enchantableGems, item.itemid) then
local subtype = item.type
if subtype == 0 then
subtype = 1
end
 
local mana = config.manaCost * subtype
if player:getMana() < mana then
player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA)
return false
end
 
local soul = config.soulCost * subtype
if player:getSoul() < soul then
player:sendCancelMessage(RETURNVALUE_NOTENOUGHSOUL)
return false
end
 
local targetId = table.find(enchantableGems, item.itemid)
if targetId == nil or not isInArray(enchantingAltars[targetId], itemEx.itemid) then
return false
end
 
player:addMana(-mana)
player:addSoul(-soul)
Item(item.uid):transform(enchantedGems[targetId])
player:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC))
player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE)
return true
end
 
if item.itemid == 7761 and isInArray({9949, 9954}, itemEx.itemid) then
local targetItem = Item(itemEx.uid)
targetItem:transform(itemEx.itemid - 1)
targetItem:decay()
Item(item.uid):remove(1)
toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
return true
end
 
if isInArray(enchantedGems, item.itemid) then
if not isInArray(enchantableItems, itemEx.itemid) then
fromPosition:sendMagicEffect(CONST_ME_POFF)
return false
end
 
local targetId = table.find(enchantedGems, item.itemid)
if targetId == nil then
return false
end
 
local subtype = itemEx.type
if not isInArray({2544, 8905}, itemEx.itemid) then
subtype = 1000
end
 
local targetItem = Item(itemEx.uid)
targetItem:transform(enchantedItems[itemEx.itemid][targetId], subtype)
targetItem:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
Item(item.uid):remove(1)
return true
end
return false
end
Link para o post
Compartilhar em outros sites

 

 

EfwCQSq.png

 

agr ele esta aceitando o item na machine , mas n ta removendo da bp e esta dando este erro no tfs

up :P

Link para o post
Compartilhar em outros sites

Tente assim:

local config = {
	manaCost = 300,
	soulCost = 2,
}

local spheres = {
	[7759] = 7,
	[7760] = 5,
	[7761] = 6,
	[7762] = 8
}

local enchantableGems = {2147, 2146, 2149, 2150}
local enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905}

local enchantingAltars = {
	{7504, 7505, 7506, 7507},
	{7508, 7509, 7510, 7511},
	{7516, 7517, 7518, 7519},
	{7512, 7513, 7514, 7515}
}

local enchantedGems = {7760, 7759, 7761, 7762}
local enchantedItems = {
	[2383] = {7744, 7763, 7854, 7869},
	[7383] = {7745, 7764, 7855, 7870},
	[7384] = {7746, 7765, 7856, 7871},
	[7406] = {7747, 7766, 7857, 7872},
	[7402] = {7748, 7767, 7858, 7873},
	[2429] = {7749, 7768, 7859, 7874},
	[2430] = {7750, 7769, 7860, 7875},
	[7389] = {7751, 7770, 7861, 7876},
	[7380] = {7752, 7771, 7862, 7877},
	[2454] = {7753, 7772, 7863, 7878},
	[2423] = {7754, 7773, 7864, 7879},
	[2445] = {7755, 7774, 7865, 7880},
	[7415] = {7756, 7775, 7866, 7881},
	[7392] = {7757, 7776, 7867, 7882},
	[2391] = {7758, 7777, 7868, 7883},
	[2544] = {7840, 7839, 7850, 7838},
	[8905] = {8906, 8907, 8909, 8908}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local player = Player(cid)
	
	-- The Elemental Spheres by MaXwEllDeN
	if itemEx.actionid == 4119 and isInArray({7759, 7760, 7761, 7762}, item.itemid) then
		if spheres[item.itemid] ~= player:getVocation():getId() then
			return false
		end

		if isInArray({8894, 8895}, itemEx.itemid) then -- Mudar ID Ligado
			doCreatureSay(cid, "Turn off the machine first.", TALKTYPE_MONSTER_SAY)
			return false
		end

		local sto = player:getStorageValue(60026) == -1 and 1 or player:getStorageValue(60026) + 1

		if sto == 21 then
			return false
		end

		toPosition:sendMagicEffect(12)
		player:setStorageValue(60026, sto)
		Item(item.uid):remove(1)
		return true
	end
	-- ######

	if item.itemid == 2147 and itemEx.itemid == 2342 then
		local targetItem = Item(itemEx.uid)
		targetItem:transform(2343)
		targetItem:decay()
		Item(item.uid):remove(1)
		toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
		return true
	end

	if item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid) then
		Item(itemEx.uid):transform(9933)
		Item(item.uid):remove(1)
		toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
		return true
	end

	if isInArray(enchantableGems, item.itemid) then
		local subtype = item.type
		if subtype == 0 then
			subtype = 1
		end

		local mana = config.manaCost * subtype
		if player:getMana() < mana then
			player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA)
			return false
		end

		local soul = config.soulCost * subtype
		if player:getSoul() < soul then
			player:sendCancelMessage(RETURNVALUE_NOTENOUGHSOUL)
			return false
		end

		local targetId = table.find(enchantableGems, item.itemid)
		if targetId == nil or not isInArray(enchantingAltars[targetId], itemEx.itemid) then
			return false
		end

		player:addMana(-mana)
		player:addSoul(-soul)
		Item(item.uid):transform(enchantedGems[targetId])
		player:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC))
		player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE)
		return true
	end

	if item.itemid == 7761 and isInArray({9949, 9954}, itemEx.itemid) then
		local targetItem = Item(itemEx.uid)
		targetItem:transform(itemEx.itemid - 1)
		targetItem:decay()
		Item(item.uid):remove(1)
		toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
		return true
	end

	if isInArray(enchantedGems, item.itemid) then
		if not isInArray(enchantableItems, itemEx.itemid) then
			fromPosition:sendMagicEffect(CONST_ME_POFF)
			return false
		end

		local targetId = table.find(enchantedGems, item.itemid)
		if targetId == nil then
			return false
		end

		local subtype = itemEx.type
		if not isInArray({2544, 8905}, itemEx.itemid) then
			subtype = 1000
		end

		local targetItem = Item(itemEx.uid)
		targetItem:transform(enchantedItems[itemEx.itemid][targetId], subtype)
		targetItem:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
		Item(item.uid):remove(1)
		return true
	end
	return false
end
Link para o post
Compartilhar em outros sites

 

Tente assim:

local config = {
	manaCost = 300,
	soulCost = 2,
}

local spheres = {
	[7759] = 7,
	[7760] = 5,
	[7761] = 6,
	[7762] = 8
}

local enchantableGems = {2147, 2146, 2149, 2150}
local enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905}

local enchantingAltars = {
	{7504, 7505, 7506, 7507},
	{7508, 7509, 7510, 7511},
	{7516, 7517, 7518, 7519},
	{7512, 7513, 7514, 7515}
}

local enchantedGems = {7760, 7759, 7761, 7762}
local enchantedItems = {
	[2383] = {7744, 7763, 7854, 7869},
	[7383] = {7745, 7764, 7855, 7870},
	[7384] = {7746, 7765, 7856, 7871},
	[7406] = {7747, 7766, 7857, 7872},
	[7402] = {7748, 7767, 7858, 7873},
	[2429] = {7749, 7768, 7859, 7874},
	[2430] = {7750, 7769, 7860, 7875},
	[7389] = {7751, 7770, 7861, 7876},
	[7380] = {7752, 7771, 7862, 7877},
	[2454] = {7753, 7772, 7863, 7878},
	[2423] = {7754, 7773, 7864, 7879},
	[2445] = {7755, 7774, 7865, 7880},
	[7415] = {7756, 7775, 7866, 7881},
	[7392] = {7757, 7776, 7867, 7882},
	[2391] = {7758, 7777, 7868, 7883},
	[2544] = {7840, 7839, 7850, 7838},
	[8905] = {8906, 8907, 8909, 8908}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local player = Player(cid)
	
	-- The Elemental Spheres by MaXwEllDeN
	if itemEx.actionid == 4119 and isInArray({7759, 7760, 7761, 7762}, item.itemid) then
		if spheres[item.itemid] ~= player:getVocation():getId() then
			return false
		end

		if isInArray({8894, 8895}, itemEx.itemid) then -- Mudar ID Ligado
			doCreatureSay(cid, "Turn off the machine first.", TALKTYPE_MONSTER_SAY)
			return false
		end

		local sto = player:getStorageValue(60026) == -1 and 1 or player:getStorageValue(60026) + 1

		if sto == 21 then
			return false
		end

		toPosition:sendMagicEffect(12)
		player:setStorageValue(60026, sto)
		iuid:remove(1)
		return true
	end
	-- ######

	if item.itemid == 2147 and itemEx.itemid == 2342 then
		local targetItem = Item(itemEx.uid)
		targetItem:transform(2343)
		targetItem:decay()
		Item(item.uid):remove(1)
		toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
		return true
	end

	if item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid) then
		Item(itemEx.uid):transform(9933)
		Item(item.uid):remove(1)
		toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
		return true
	end

	if isInArray(enchantableGems, item.itemid) then
		local subtype = item.type
		if subtype == 0 then
			subtype = 1
		end

		local mana = config.manaCost * subtype
		if player:getMana() < mana then
			player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA)
			return false
		end

		local soul = config.soulCost * subtype
		if player:getSoul() < soul then
			player:sendCancelMessage(RETURNVALUE_NOTENOUGHSOUL)
			return false
		end

		local targetId = table.find(enchantableGems, item.itemid)
		if targetId == nil or not isInArray(enchantingAltars[targetId], itemEx.itemid) then
			return false
		end

		player:addMana(-mana)
		player:addSoul(-soul)
		Item(item.uid):transform(enchantedGems[targetId])
		player:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC))
		player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE)
		return true
	end

	if item.itemid == 7761 and isInArray({9949, 9954}, itemEx.itemid) then
		local targetItem = Item(itemEx.uid)
		targetItem:transform(itemEx.itemid - 1)
		targetItem:decay()
		Item(item.uid):remove(1)
		toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
		return true
	end

	if isInArray(enchantedGems, item.itemid) then
		if not isInArray(enchantableItems, itemEx.itemid) then
			fromPosition:sendMagicEffect(CONST_ME_POFF)
			return false
		end

		local targetId = table.find(enchantedGems, item.itemid)
		if targetId == nil then
			return false
		end

		local subtype = itemEx.type
		if not isInArray({2544, 8905}, itemEx.itemid) then
			subtype = 1000
		end

		local targetItem = Item(itemEx.uid)
		targetItem:transform(enchantedItems[itemEx.itemid][targetId], subtype)
		targetItem:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
		Item(item.uid):remove(1)
		return true
	end
	return false
end

line 66 : iuid:remove(1)

Link para o post
Compartilhar em outros sites

Editei o script acima, tente agora.

até entrar nos soil ta td certo , agr na hora de usar o soil n ta certo hahaha

 

C0U1ArO.png

 

desculpa o encomodo 

-- AJEITAR 8575 ANTES NO FIRE

 
local aids = {
[4120] = {used_id = 8299, target_id = 8573, effect = 3, transform_id = 8575, create_id = 0, sto = 40064}, -- Sorcerer
[4121] = {used_id = 8303, target_id = 8567, effect = 29, transform_id = 0, create_id = 1491, sto = 40065}, -- Knight
[4122] = {used_id = 8302, target_id = 8571, effect = 29, transform_id = 8574, create_id = 0, sto = 40066}, -- Paladin
[4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067}, -- Druids
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local soil = aids[itemEx.actionid]
if soil and item.itemid == soil.used_id  and itemEx.itemid == soil.target_id then
 
if soil.create_id ~= 0 then
Game.createItem(soil.create_id, 1, toPosition)
addEvent(function()
Tile(toPosition):getItemById(soil.create_id):remove(1)
--doRemoveItem(getTileItemById(toPosition, create_id).uid, 1)
end, 30000)
else
addEvent(function(aid)
Tile(toPosition):getItemById(soil.transform_id):transform(aid)
--doTransformItem(getTileItemById(toPosition, soil.transform_id).uid, aid)
end, 30000, itemEx.itemid)
 
Item(itemEx.uid):transform(soil.transform_id)
--doTransformItem(itemEx.uid, soil.transform_id)
 
Item(item.uid):remove(1)
--doRemoveItem(item.uid, 1)
end
 
fromPosition:sendDistanceEffect(toPosition, soil.effect)
--doSendDistanceShoot(fromPosition, toPosition, soil.effect)
Item(item.uid):remove(1)
return true
end
 
return false
end

Link para o post
Compartilhar em outros sites

Tenta assim:

local aids = {
	[4120] = {used_id = 8299, target_id = 8573, effect = 3, transform_id = 8575, create_id = 0, sto = 40064}, -- Sorcerer
	[4121] = {used_id = 8303, target_id = 8567, effect = 29, transform_id = 0, create_id = 1491, sto = 40065}, -- Knight
	[4122] = {used_id = 8302, target_id = 8571, effect = 29, transform_id = 8574, create_id = 0, sto = 40066}, -- Paladin
	[4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067}, -- Druids
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local soil = aids[itemEx.actionid]
	if soil and item.itemid == soil.used_id  and itemEx.itemid == soil.target_id then

		if soil.create_id ~= 0 then
			Game.createItem(soil.create_id, 1, toPosition)
			addEvent(function()
				Tile(toPosition):getItemById(soil.create_id):remove(1)
				--doRemoveItem(getTileItemById(toPosition, create_id).uid, 1)
			end, 30000)
		else
			addEvent(function(aid)
				Tile(toPosition):getItemById(soil.transform_id):transform(aid)
				--doTransformItem(getTileItemById(toPosition, soil.transform_id).uid, aid)
			end, 30000, itemEx.itemid)

			Item(itemEx.uid):transform(soil.transform_id)
			--doTransformItem(itemEx.uid, soil.transform_id)

			Item(item.uid):remove(1)
			--doRemoveItem(item.uid, 1)
		end

		fromPosition:sendDistanceEffect(toPosition, soil.effect)
		--doSendDistanceShoot(fromPosition, toPosition, soil.effect)
		return true
	end

	return false
end
Link para o post
Compartilhar em outros sites

Você copiou parte errada ai. Se eu não tiver enganado, copia o script que ele te mandou novamente e tenta de novo.

Opa, se funcionar não da a melhor resposta pra mim não, eu não fiz nada.

 

#edit

 

E essa linha:

 

[4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067}, -- Druids

 

Não tenho certeza, mas é sem virgula:

 

[4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067} -- Druids

Editado por rogaforyn2 (veja o histórico de edições)

Life is so meaningless, there is nothing worth a smile
So goodbye, I'll miss you

 

 

sugestões?

 

 

Link para o post
Compartilhar em outros sites

Você copiou parte errada ai. Se eu não tiver enganado, copia o script que ele te mandou novamente e tenta de novo.

Opa, se funcionar não da a melhor resposta pra mim não, eu não fiz nada.

 

#edit

 

E essa linha:

 

[4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067}, -- Druids

 

Não tenho certeza, mas é sem virgula:

 

[4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067} -- Druids

Sim, mas não afeta em nada, funciona com ou sem vírgula :).

u3UzdKz.png

Como o amigo acima disse, você provavelmente copiou errado, testei aqui e está normal.

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo