Ir para conteúdo

Featured Replies

Postado

Antes estava funcionando, quando eu usava a rev 3884, passei pra 3777 pq todo mundo fala que é mais estável em linux, então..

 

Acontece esse erro quando tento abrir o baú (e não vem mais o item)

 

<action actionid="8000-8100" script="quests.lua" />
function onUse(cid, item, fromPos, item2, toPos)
local _ = {
[1] = {aid = 8000, item = 2384}, -- rapier
[2] = {aid = 8001, item = 2485}, -- doublet
[3] = {aid = 8002, item = 2526}, -- studded shield
[4] = {aid = 8003, item = 2530}, -- copper shield
[5] = {aid = 8004, item = 2480}, -- legion helmet
[6] = {aid = 8005, item = 2412}, -- katana
[7] = {aid = 8006, item = 2460}, -- brass helmet
[8] = {aid = 8007, item = 2464}, -- chain armor
[9] = {aid = 8008, item = 2152}, -- 100gps no lugar da bag,arrow,40gps, bla bla bla chain armor
[10] = {aid = 8009, item = 1987}, -- bag (4 Poison Arrows, 10 Arrows)
[11] = {aid = 8010, item = 2580}, -- fishing rod
[12] = {aid = 8011, item = 2395}, -- carlin sword
[13] = {aid = 8012, item = 2668}, -- salmon
[14] = {aid = 8013, item = 2668}, -- botei 2 salmons pq n sei como vem a carta
[15] = {aid = 8014, item = 1990}, -- present
[16] = {aid = 8015, item = 2404}, -- combat knife
[17] = {aid = 8016, item = 2006}, -- vial, dps trocar pra vial of milk n sei o id
[18] = {aid = 8017, item = 2563}, -- pain
-- fim rookgaard lembrar de colocar essas quests no mapa de rook se pa fazer um novo
-- island of peace: mages
--[19] = {aid = 8018, item = 8820}, -- mage hat
--[20] = {aid = 8019, item = 8819}, -- magician robe
--[21] = {aid = 8020, item = 2175}, -- spellbook
--[22] = {aid = 8021, item = 2190}, -- wand of vortex
--[23] = {aid = 8022, item = 2182}, -- snakebit rod
-- pally
--[24] = {aid = 8023, item = 2389}, -- spear
--[25] = {aid = 8024, item = 2456}, -- bow
--[26] = {aid = 8025, item = 2544}, -- arrow
--[27] = {aid = 8026, item = 2660}, -- range's clorak
--[28] = {aid = 8027, item = 8923}, -- ranger legs
-- kina
--[29] = {aid = 8028, item = 2478}, -- brass legs
--[30] = {aid = 8029, item = 2465}, -- brass armor
[31] = {aid = 8030, item = 2439}, -- club
[32] = {aid = 8031, item = 8602}, -- sword
[33] = {aid = 8032, item = 8601}, -- axe
--[34] = {aid = 8033, item = 2509}, -- steel shield
--[35] = {aid = 8034, item = 2481}, -- soldier helmet
-- fim island of peace
[36] = {aid = 8038, item = 2497}, -- crusader helmet
[37] = {aid = 8036, item = 2518}, -- bonelord shield
[38] = {aid = 8037, item = 2490}, -- dark helmet
[39] = {aid = 8039, item = 2487}, -- crown armor
[40] = {aid = 8040, item = 2519}, -- crown shield
-- cyc thais quest
[41] = {aid = 8041, item = 2491}, -- crown helmet
[42] = {aid = 8042, item = 2486}, -- noble armor
-- im back
[43] = {aid = 8043, item = 2476}, -- karmor OF
[44] = {aid = 8044, item = 2430}, -- kaxe OF
[45] = {aid = 8045, item = 2392}, -- firesword OF
[46] = {aid = 8046, item = 2432}, -- fireaxe
[47] = {aid = 8047, item = 2491}, -- crown helmet - quest cyc sul
[48] = {aid = 8048, item = 2486}, -- noble armor - quest cyc sul
[49] = {aid = 8049, item = 2520}, -- demon shield - behequest
[50] = {aid = 8050, item = 2427}, -- demon shield - guardian halbert
[51] = {aid = 8051, item = 2466}, -- golde armor - behequest
[52] = {aid = 8052, item = 2171}, -- platinum amulet - behequest
[53] = {aid = 8053, item = 2493}, -- DH
[54] = {aid = 8054, item = 2520}, -- demon shield
[55] = {aid = 8055, item = 2645}, -- steel boots
[56] = {aid = 8056, item = 2407}, -- bright sword
[57] = {aid = 8057, item = 2435}, -- dwarvewn axe
[58] = {aid = 8058, item = 2407}, -- bright sword
-- Deeper Fibula Quest
[59] = {aid = 8059, item = 2475}, -- warrior helmet
[60] = {aid = 8060, item = 2528}, -- tower shield
[61] = {aid = 8061, item = 2430}, -- kina axe
[62] = {aid = 8062, item = 2198}, -- elven amulet
[63] = {aid = 8063, item = 2213}, -- dwarvewn ring
-- antes da inqui
[64] = {aid = 8064, item = 2414}, -- dragon lance
[65] = {aid = 8065, item = 2534}, -- vampire shield

[66] = {aid = 8066, item = 2476}, -- knight armor
[67] = {aid = 8067, item = 2409}, -- serpent sword

}

-- Reservando os storages a partir de 202049 até o 202049 + número de baús nessa action
    for i = 1, #_ do
        _[i].storage = 202049 + i
    end

    for i, valor in ipairs(_) do
        if item.actionid == valor.aid then
            if getPlayerFreeCap(cid) >= getItemWeightById(valor.item, 1) then
                if getPlayerStorageValue(cid, valor.storage) == -1 then
                    if doPlayerAddItem(cid, valor.item, 1, false) then
                        doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(valor.item)..'.')
                        setPlayerStorageValue(cid, valor.storage, 1)
                    else
                        doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(valor.item)..', but you need a free slot.')
                    end
                else
                    doPlayerSendTextMessage(cid, 22, 'It is empty.')
                end
            else
                doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(valor.item)..'. It weighs '..getItemWeightById(valor.item, 1)..'.00 and it is too heavy.')
            end
            break
        end
    end
    return true
end

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

Resolvido por luanluciano93

Ir para solução
Postado
  • Solução

Teste .. 

-- <action actionid="8000-8100" script="quests.lua" />

local quests = {
	[8000] = 2384, -- rapier	
	[8001] = 2485, -- doublet
	[8002] = 2526, -- studded shield
	[8003] = 2530, -- copper shield
	[8004] = 2480, -- legion helmet
	[8005] = 2412, -- katana
	[8006] = 2460, -- brass helmet
	[8007] = 2464, -- chain armor
	[8008] = 2152, -- 100gps no lugar da bag,arrow,40gps, bla bla bla chain armor
	[8009] = 1987, -- bag (4 Poison Arrows, 10 Arrows)
	[8010] = 2580, -- fishing rod
	[8011] = 2395, -- carlin sword
	[8012] = 2668, -- salmon
	[8013] = 2668, -- botei 2 salmons pq n sei como vem a carta
	[8014] = 1990, -- present
	[8015] = 2404, -- combat knife
	[8016] = 2006, -- vial, dps trocar pra vial of milk n sei o id
	[8017] = 2563, -- pain
	-- fim rookgaard lembrar de colocar essas quests no mapa de rook se pa fazer um novo
	-- island of peace: mages
	--[8018] = 8820, -- mage hat
	--[8019] = 8819, -- magician robe
	--[8020] = 2175, -- spellbook
	--[8021] = 2190, -- wand of vortex
	--[8022] = 2182, -- snakebit rod
	-- pally
	--[8023] = 2389, -- spear
	--[8024] = 2456, -- bow
	--[8025] = 2544, -- arrow
	--[8026] = 2660, -- range's clorak
	--[8027] = 8923, -- ranger legs
	-- kina
	--[8028] = 2478, -- brass legs
	--[8029] = 2465, -- brass armor
	[8030] = 2439, -- club
	[8031] = 8602, -- sword
	[8032] = 8601, -- axe
	--[8033] = 2509, -- steel shield
	--[8034] = 2481, -- soldier helmet
	-- fim island of peace
	[8036] = 2518, -- bonelord shield
	[8037] = 2490, -- dark helmet
	[8038] = 2497, -- crusader helmet
	[8039] = 2487, -- crown armor
	[8040] = 2519, -- crown shield
	-- cyc thais quest
	[8041] = 2491, -- crown helmet
	[8042] = 2486, -- noble armor
	-- im back
	[8043] = 2476, -- karmor OF
	[8044] = 2430, -- kaxe OF
	[8045] = 2392, -- firesword OF
	[8046] = 2432, -- fireaxe
	[8047] = 2491, -- crown helmet - quest cyc sul
	[8048] = 2486, -- noble armor - quest cyc sul
	[8049] = 2520, -- demon shield - behequest
	[8050] = 2427, -- demon shield - guardian halbert
	[8051] = 2466, -- golde armor - behequest
	[8052] = 2171, -- platinum amulet - behequest
	[8053] = 2493, -- DH
	[8054] = 2520, -- demon shield
	[8055] = 2645, -- steel boots
	[8056] = 2407, -- bright sword
	[8057] = 2435, -- dwarvewn axe
	[8058] = 2407, -- bright sword
	-- Deeper Fibula Quest
	[8059] = 2475, -- warrior helmet
	[8060] = 2528, -- tower shield
	[8061] = 2430, -- kina axe
	[8062] = 2198, -- elven amulet
	[8063] = 2213, -- dwarvewn ring
	-- antes da inqui
	[8064] = 2414, -- dragon lance
	[8065] = 2534, -- vampire shield
	[8066] = 2476, -- knight armor
	[8067] = 2409, -- serpent sword
}

function onUse(cid, item, fromPos, item2, toPos)

	local quest = quests[item.actionid]
	
	if quest then
		local storage = 200000 + item.actionid
		if getPlayerFreeCap(cid) >= getItemWeightById(quest, 1) then
			if getPlayerStorageValue(cid, storage) < 1 then
				doPlayerAddItem(cid, quest, 1)
                doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(quest)..'.')
                setPlayerStorageValue(cid, storage, 1)
			else
				doPlayerSendTextMessage(cid, 22, 'It is empty.')
			end
		else
			doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(quest)..'. It weighs '..getItemWeightById(quest, 1)..'.00 and it is too heavy.')
		end
	end
    
	return true
end

Postado
  • Autor

Teste .. 

-- <action actionid="8000-8100" script="quests.lua" />

local quests = {
	[8000] = 2384, -- rapier	
	[8001] = 2485, -- doublet
	[8002] = 2526, -- studded shield
	[8003] = 2530, -- copper shield
	[8004] = 2480, -- legion helmet
	[8005] = 2412, -- katana
	[8006] = 2460, -- brass helmet
	[8007] = 2464, -- chain armor
	[8008] = 2152, -- 100gps no lugar da bag,arrow,40gps, bla bla bla chain armor
	[8009] = 1987, -- bag (4 Poison Arrows, 10 Arrows)
	[8010] = 2580, -- fishing rod
	[8011] = 2395, -- carlin sword
	[8012] = 2668, -- salmon
	[8013] = 2668, -- botei 2 salmons pq n sei como vem a carta
	[8014] = 1990, -- present
	[8015] = 2404, -- combat knife
	[8016] = 2006, -- vial, dps trocar pra vial of milk n sei o id
	[8017] = 2563, -- pain
	-- fim rookgaard lembrar de colocar essas quests no mapa de rook se pa fazer um novo
	-- island of peace: mages
	--[8018] = 8820, -- mage hat
	--[8019] = 8819, -- magician robe
	--[8020] = 2175, -- spellbook
	--[8021] = 2190, -- wand of vortex
	--[8022] = 2182, -- snakebit rod
	-- pally
	--[8023] = 2389, -- spear
	--[8024] = 2456, -- bow
	--[8025] = 2544, -- arrow
	--[8026] = 2660, -- range's clorak
	--[8027] = 8923, -- ranger legs
	-- kina
	--[8028] = 2478, -- brass legs
	--[8029] = 2465, -- brass armor
	[8030] = 2439, -- club
	[8031] = 8602, -- sword
	[8032] = 8601, -- axe
	--[8033] = 2509, -- steel shield
	--[8034] = 2481, -- soldier helmet
	-- fim island of peace
	[8036] = 2518, -- bonelord shield
	[8037] = 2490, -- dark helmet
	[8038] = 2497, -- crusader helmet
	[8039] = 2487, -- crown armor
	[8040] = 2519, -- crown shield
	-- cyc thais quest
	[8041] = 2491, -- crown helmet
	[8042] = 2486, -- noble armor
	-- im back
	[8043] = 2476, -- karmor OF
	[8044] = 2430, -- kaxe OF
	[8045] = 2392, -- firesword OF
	[8046] = 2432, -- fireaxe
	[8047] = 2491, -- crown helmet - quest cyc sul
	[8048] = 2486, -- noble armor - quest cyc sul
	[8049] = 2520, -- demon shield - behequest
	[8050] = 2427, -- demon shield - guardian halbert
	[8051] = 2466, -- golde armor - behequest
	[8052] = 2171, -- platinum amulet - behequest
	[8053] = 2493, -- DH
	[8054] = 2520, -- demon shield
	[8055] = 2645, -- steel boots
	[8056] = 2407, -- bright sword
	[8057] = 2435, -- dwarvewn axe
	[8058] = 2407, -- bright sword
	-- Deeper Fibula Quest
	[8059] = 2475, -- warrior helmet
	[8060] = 2528, -- tower shield
	[8061] = 2430, -- kina axe
	[8062] = 2198, -- elven amulet
	[8063] = 2213, -- dwarvewn ring
	-- antes da inqui
	[8064] = 2414, -- dragon lance
	[8065] = 2534, -- vampire shield
	[8066] = 2476, -- knight armor
	[8067] = 2409, -- serpent sword
}

function onUse(cid, item, fromPos, item2, toPos)

	local quest = quests[item.actionid]
	
	if quest then
		local storage = 200000 + item.actionid
		if getPlayerFreeCap(cid) >= getItemWeightById(quest, 1) then
			if getPlayerStorageValue(cid, storage) < 1 then
				doPlayerAddItem(cid, quest, 1)
                doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(quest)..'.')
                setPlayerStorageValue(cid, storage, 1)
			else
				doPlayerSendTextMessage(cid, 22, 'It is empty.')
			end
		else
			doPlayerSendTextMessage(cid, 22, 'You have found a '..getItemNameById(quest)..'. It weighs '..getItemWeightById(quest, 1)..'.00 and it is too heavy.')
		end
	end
    
	return true
end

 

Aeee parece que ta funfando!!!

Luan arruma os BUGs da sua sources pelo amor!!

 

1- mata monstro ele vira obstaculo

2- http://www.tibiaking.com/forum/topic/61280-problema-fun%C3%A7%C3%A3o-channel-rev3777-luciano/

3- http://www.tibiaking.com/forum/topic/61279-problema-channels-cast-system-luciano/

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo