Ir para conteúdo
  • Cadastre-se

[DÚVIDA] Script > Rust Remover <


Posts Recomendados

Estou meio sem paciência tentando arrumar esse script "facinho" do rust remover, mas já ta chato! O erro é o seguinte: quando coloco o item do rust remover (id 9930) no chão e dou use nele e no rust armor/legs o rust remover não desaparece! Fica infinito no chão.

 

Lembro que quando o rust remover está na Bp, o item desaparece normalmente. Segue o script:

 

 

function onUse(cid, item, frompos, item2, topos)
local effect_broke = 3
local effect_renew = 28
local developed = 0
local const = item2.itemid
local pos = getCreaturePosition(cid)
local item = 
{
[9808] = {
[1] = {id = 2464, name = "Chain Armor", opportunity = 33},
[2] = {id = 2483, name = "Scale Armor", opportunity = 25},
[3] = {id = 2465, name = "Brass Armor", opportunity = 10},
[4] = {id = 2463, name = "Plate Armor", opportunity = 2}
},
[9809] = {
[1] = {id = 2464, name = "Chain Armor", opportunity = 16},
[2] = {id = 2465, name = "Brass Armor", opportunity = 14},
[3] = {id = 2483, name = "Scale Armor", opportunity = 13},
[4] = {id = 2463, name = "Plate Armor", opportunity = 10},
[5] = {id = 2476, name = "Knight Armor", opportunity = 6},
[6] = {id = 8891, name = "Paladin Armor", opportunity = 3},
[7] = {id = 2487, name = "Crown Armor", opportunity = 1}
},
[9810] = {
[1] = {id = 2464, name = "Chain Armor", opportunity = 20},
[2] = {id = 2465, name = "Brass Armor", opportunity = 17},
[3] = {id = 2483, name = "Scale Armor", opportunity = 15},
[4] = {id = 2463, name = "Plate Armor", opportunity = 12},
[5] = {id = 2476, name = "Knight Armor", opportunity = 10},
[6] = {id = 8891, name = "Paladin Armor", opportunity = 5},
[7] = {id = 2487, name = "Crown Armor", opportunity = 4},
[8] = {id = 2466, name = "Golden Armor", opportunity = 2},
[9] = {id = 2472, name = "Magic Plate Armor", opportunity = 1}
},
[9811] = {
[1] = {id = 2468, name = "Studded Legs", opportunity = 33},
[2] = {id = 2648, name = "Chain Legs", opportunity = 25},
[3] = {id = 2478, name = "Brass Legs", opportunity = 10},
[4] = {id = 2647, name = "Plate Legs", opportunity = 2}
},
[9812] = {
[1] = {id = 2468, name = "Studded Legs", opportunity = 16},
[2] = {id = 2648, name = "Chain Legs", opportunity = 14},
[3] = {id = 2478, name = "Brass Legs", opportunity = 13},
[4] = {id = 2647, name = "Plate Legs", opportunity = 10},
[5] = {id = 2477, name = "Knight Legs", opportunity = 6},
[7] = {id = 2488, name = "Crown Legs", opportunity = 1}
},
[9813] = {
[2] = {id = 2478, name = "Brass Legs", opportunity = 17},
[4] = {id = 2647, name = "Plate Legs", opportunity = 12},
[5] = {id = 2477, name = "Knight Legs", opportunity = 10},
[7] = {id = 2488, name = "Crown Legs", opportunity = 4},
[8] = {id = 2470, name = "Golden Legs", opportunity = 2}
}
}
 
if item[const] then
local random_item = math.random(1, 100)
 
for i = 1, #item[const] do
if random_item <= item[const].opportunity then
developed = i
end
end
 
if developed > 0 then
doSendMagicEffect(topos, effect_renew)
doTransformItem(item2.uid, item[const][developed].id)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have renewed the ".. item[const][developed].name .." !")
doPlayerRemoveItem(cid, 9930, 1)
else
doSendMagicEffect(topos, effect_broke)
doRemoveItem(item2.uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Rusty Remover has broken.")
doPlayerRemoveItem(cid, 9930, 1)
return false
end
doRemoveItem(getTileItem(id, 9930).uid)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Use it on Rusty Items (Common, Semi-Rare or Rare: Armors, Legs, helmets, boots or shields).")
return false
end
 
 
return false
end

 

Te Ajudei? Rep+  (y)

Link para o post
Compartilhar em outros sites

Dei uma modificadinha ...  testa ai!

 

local item = {
	[9808] = {
		[1] = {id = 2464, name = "Chain Armor", opportunity = 33},
		[2] = {id = 2483, name = "Scale Armor", opportunity = 25},
		[3] = {id = 2465, name = "Brass Armor", opportunity = 10},
		[4] = {id = 2463, name = "Plate Armor", opportunity = 2}
	},
	[9809] = {
		[1] = {id = 2464, name = "Chain Armor", opportunity = 16},
		[2] = {id = 2465, name = "Brass Armor", opportunity = 14},
		[3] = {id = 2483, name = "Scale Armor", opportunity = 13},
		[4] = {id = 2463, name = "Plate Armor", opportunity = 10},
		[5] = {id = 2476, name = "Knight Armor", opportunity = 6},
		[6] = {id = 8891, name = "Paladin Armor", opportunity = 3},
		[7] = {id = 2487, name = "Crown Armor", opportunity = 1}
	},
	[9810] = {
		[1] = {id = 2464, name = "Chain Armor", opportunity = 20},
		[2] = {id = 2465, name = "Brass Armor", opportunity = 17},
		[3] = {id = 2483, name = "Scale Armor", opportunity = 15},
		[4] = {id = 2463, name = "Plate Armor", opportunity = 12},
		[5] = {id = 2476, name = "Knight Armor", opportunity = 10},
		[6] = {id = 8891, name = "Paladin Armor", opportunity = 5},
		[7] = {id = 2487, name = "Crown Armor", opportunity = 4},
		[8] = {id = 2466, name = "Golden Armor", opportunity = 2},
		[9] = {id = 2472, name = "Magic Plate Armor", opportunity = 1}
	},
	[9811] = {
		[1] = {id = 2468, name = "Studded Legs", opportunity = 33},
		[2] = {id = 2648, name = "Chain Legs", opportunity = 25},
		[3] = {id = 2478, name = "Brass Legs", opportunity = 10},
		[4] = {id = 2647, name = "Plate Legs", opportunity = 2}
	},
	[9812] = {
		[1] = {id = 2468, name = "Studded Legs", opportunity = 16},
		[2] = {id = 2648, name = "Chain Legs", opportunity = 14},
		[3] = {id = 2478, name = "Brass Legs", opportunity = 13},
		[4] = {id = 2647, name = "Plate Legs", opportunity = 10},
		[5] = {id = 2477, name = "Knight Legs", opportunity = 6},
		[7] = {id = 2488, name = "Crown Legs", opportunity = 1}
	},
	[9813] = {
		[2] = {id = 2478, name = "Brass Legs", opportunity = 17},
		[4] = {id = 2647, name = "Plate Legs", opportunity = 12},
		[5] = {id = 2477, name = "Knight Legs", opportunity = 10},
		[7] = {id = 2488, name = "Crown Legs", opportunity = 4},
		[8] = {id = 2470, name = "Golden Legs", opportunity = 2}
	}
}
 
local developed = 0
local const = item2.itemid

function onUse(cid, item, frompos, item2, topos)
	if item[const] then
		local random_item = math.random(1, 100)
 
		for i = 1, #item[const] do
			if random_item <= item[const][i].opportunity then
				developed = i
			end
		end
 
		if developed > 0 then
			doSendMagicEffect(topos, 28)
			doRemoveItem(item.uid,1)
			doTransformItem(item2.uid, item[const][developed].id)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have renewed the ".. item[const][developed].name .." !")
		else
			doSendMagicEffect(topos, 3)
			doRemoveItem(item.uid,1)
			doRemoveItem(item2.uid, 1)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Rusty Remover has broken.")
			return false
		end
		
		doRemoveItem(item.uid,1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Use it on Rusty Items (Common, Semi-Rare or Rare: Armors, Legs, helmets, boots or shields).")
		return false
	end
 
	return false
end

Aguardo resposta do teste .. 

Link para o post
Compartilhar em outros sites

PQ em sua script tá assim::    doPlayerRemoveItem  

Claro que essa função só vai remove o Item do Player quando estive com ele, no caso quando estiver no chão não vai remove.

Troque todos doPlayerRemoveItem    por   doRemoveItem  no caso desse aqui ele Vai remover o item mesmo no Chão! 

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

luanluciano93 tentei seu script aqui, mas deu o seguinte erro no servidor:

[4/5/2014 11:3:35] [Error - Test Interface]
[4/5/2014 11:3:35] data/actions/scripts/tools/rust remover.lua
[4/5/2014 11:3:35] Description:
[4/5/2014 11:3:35] data/actions/scripts/tools/rust remover.lua:131: attempt to index global 'item2' (a nil value)
[4/5/2014 11:3:36] [Error - Event::checkScript] Cannot load script (data/actions/scripts/tools/rust remover.lua)


Dei uma melhorada no script, mas ainda não continua removendo o item do chão. Dá uma olhada:

function onUse(cid, item, frompos, item2, topos)
local effect_broke = 3
local effect_renew = 28
local developed = 0
local const = item2.itemid
local pos = getCreaturePosition(cid)
local item =
{
[9808] = {
[1] = {id = 2464, name = "Chain Armor", opportunity = 33},
[2] = {id = 2483, name = "Scale Armor", opportunity = 25},
[3] = {id = 2465, name = "Brass Armor", opportunity = 10},
[4] = {id = 2463, name = "Plate Armor", opportunity = 2}
},
[9809] = {
[1] = {id = 2464, name = "Chain Armor", opportunity = 16},
[2] = {id = 2465, name = "Brass Armor", opportunity = 14},
[3] = {id = 2483, name = "Scale Armor", opportunity = 13},
[4] = {id = 2463, name = "Plate Armor", opportunity = 10},
[5] = {id = 2476, name = "Knight Armor", opportunity = 6},
[6] = {id = 8891, name = "Paladin Armor", opportunity = 3},
[7] = {id = 2487, name = "Crown Armor", opportunity = 1}
},
[9810] = {
[1] = {id = 2464, name = "Chain Armor", opportunity = 20},
[2] = {id = 2465, name = "Brass Armor", opportunity = 17},
[3] = {id = 2483, name = "Scale Armor", opportunity = 15},
[4] = {id = 2463, name = "Plate Armor", opportunity = 12},
[5] = {id = 2476, name = "Knight Armor", opportunity = 10},
[6] = {id = 8891, name = "Paladin Armor", opportunity = 5},
[7] = {id = 2487, name = "Crown Armor", opportunity = 4},
[8] = {id = 2466, name = "Golden Armor", opportunity = 2},
[9] = {id = 2472, name = "Magic Plate Armor", opportunity = 1}
},
[9811] = {
[1] = {id = 2468, name = "Studded Legs", opportunity = 33},
[2] = {id = 2648, name = "Chain Legs", opportunity = 25},
[3] = {id = 2478, name = "Brass Legs", opportunity = 10},
[4] = {id = 2647, name = "Plate Legs", opportunity = 2}
},
[9812] = {
[1] = {id = 2468, name = "Studded Legs", opportunity = 16},
[2] = {id = 2648, name = "Chain Legs", opportunity = 14},
[3] = {id = 2478, name = "Brass Legs", opportunity = 13},
[4] = {id = 2647, name = "Plate Legs", opportunity = 10},
[5] = {id = 2477, name = "Knight Legs", opportunity = 6},
[7] = {id = 2488, name = "Crown Legs", opportunity = 1}
},
[9813] = {
[2] = {id = 2478, name = "Brass Legs", opportunity = 17},
[4] = {id = 2647, name = "Plate Legs", opportunity = 12},
[5] = {id = 2477, name = "Knight Legs", opportunity = 10},
[7] = {id = 2488, name = "Crown Legs", opportunity = 4},
[8] = {id = 2470, name = "Golden Legs", opportunity = 2}
},
[9814] = {
[10] = {id = 2511, name = "Brass Shield", opportunity = 16},
[11] = {id = 2510, name = "Plate Shield", opportunity = 14},
[12] = {id = 2530, name = "Cooper Shield", opportunity = 13},
[13] = {id = 2509, name = "Steel Shield", opportunity = 10},
[14] = {id = 2513, name = "Battle Shield", opportunity = 6},
[15] = {id = 2515, name = "Guardian Shield", opportunity = 1}
},
[9815] = {
[10] = {id = 2511, name = "Brass Shield", opportunity = 20},
[11] = {id = 2510, name = "Plate Shield", opportunity = 17},
[12] = {id = 2530, name = "Cooper Shield", opportunity = 15},
[13] = {id = 2509, name = "Steel Shield", opportunity = 12},
[14] = {id = 2513, name = "Battle Shield", opportunity = 10},
[15] = {id = 2515, name = "Guardian Shield", opportunity = 5},
[16] = {id = 2516, name = "Dragon Shield", opportunity = 2},
[17] = {id = 2519, name = "Crown Shield", opportunity = 1}
},
[9816] = {
[10] = {id = 2511, name = "Brass Shield", opportunity = 20},
[11] = {id = 2510, name = "Plate Shield", opportunity = 17},
[12] = {id = 2530, name = "Cooper Shield", opportunity = 15},
[13] = {id = 2509, name = "Steel Shield", opportunity = 13},
[14] = {id = 2513, name = "Battle Shield", opportunity = 11},
[15] = {id = 2515, name = "Guardian Shield", opportunity = 8},
[16] = {id = 2516, name = "Dragon Shield", opportunity = 6},
[17] = {id = 2519, name = "Crown Shield", opportunity = 4},
[18] = {id = 2520, name = "Demon Shield", opportunity = 2},
[19] = {id = 2514, name = "Mastermind Shield", opportunity = 1}
},
[9817] = {
[20] = {id = 2643, name = "Leather Boots", opportunity = 33},
[21] = {id = 3982, name = "Crocodile Boots", opportunity = 25},
[22] = {id = 5462, name = "Pirate Boots", opportunity = 10},
[23] = {id = 7457, name = "Fur Boots", opportunity = 2}
},
[9818] = {
[20] = {id = 2643, name = "Leather Boots", opportunity = 17},
[21] = {id = 3982, name = "Crocodile Boots", opportunity = 12},
[22] = {id = 5462, name = "Pirate Boots", opportunity = 10},
[23] = {id = 7457, name = "Fur Boots", opportunity = 4},
[24] = {id = 2195, name = "Boots of Haste", opportunity = 2}
},
[9819] = {
[20] = {id = 2643, name = "Leather Boots", opportunity = 16},
[21] = {id = 3982, name = "Crocodile Boots", opportunity = 14},
[22] = {id = 5462, name = "Pirate Boots", opportunity = 13},
[23] = {id = 7457, name = "Fur Boots", opportunity = 10},
[24] = {id = 2195, name = "Boots of Haste", opportunity = 6},
[25] = {id = 2645, name = "Steel Boots", opportunity = 1}
},
[9820] = {
[26] = {id = 2458, name = "Chain Helmet", opportunity = 16},
[27] = {id = 2460, name = "Brass Helmet", opportunity = 14},
[28] = {id = 2480, name = "Legion Helmet", opportunity = 13},
[29] = {id = 2481, name = "Soldier Helmet", opportunity = 10},
[30] = {id = 2457, name = "Steel Helmet", opportunity = 6},
[31] = {id = 2491, name = "Crown Helmet", opportunity = 1}
},
[9821] = {
[26] = {id = 2458, name = "Chain Helmet", opportunity = 16},
[27] = {id = 2460, name = "Brass Helmet", opportunity = 14},
[28] = {id = 2480, name = "Legion Helmet", opportunity = 13},
[29] = {id = 2481, name = "Soldier Helmet", opportunity = 10},
[30] = {id = 2457, name = "Steel Helmet", opportunity = 6},
[31] = {id = 2491, name = "Crown Helmet", opportunity = 2},
[32] = {id = 2497, name = "Crusader Helmet", opportunity = 1}
},
[9822] = {
[26] = {id = 2458, name = "Chain Helmet", opportunity = 20},
[27] = {id = 2460, name = "Brass Helmet", opportunity = 15},
[28] = {id = 2480, name = "Legion Helmet", opportunity = 13},
[29] = {id = 2481, name = "Soldier Helmet", opportunity = 11},
[30] = {id = 2457, name = "Steel Helmet", opportunity = 8},
[31] = {id = 2491, name = "Crown Helmet", opportunity = 6},
[32] = {id = 2497, name = "Crusader Helmet", opportunity = 4},
[33] = {id = 2475, name = "Warrior Helmet", opportunity = 2},
[34] = {id = 2498, name = "Royal Helmet", opportunity = 1}
}
}

if item[const] then
local random_item = math.random(1, 100)

for i = 1, #item[const] do
if random_item <= item[const].opportunity then
developed = i
end
end

if developed > 0 then
doSendMagicEffect(topos, effect_renew)
doTransformItem(item2.uid, item[const][developed].id)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have renewed the ".. item[const][developed].name .." !")
doPlayerRemoveItem(cid, 9930, 1)
else
doSendMagicEffect(topos, effect_broke)
doRemoveItem(item2.uid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Rusty Remover has broken.")
doPlayerRemoveItem(cid, 9930, 1)
return false
end
doRemoveItem(cid, 9930, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Use it on Rusty Items (Common, Semi-Rare or Rare: Armors, Legs, helmets, boots or shields).")
return false
end


return true
end
 

 

 

E Wreymar, não acha que já tentei isso parceiro... é algo mais complexo e chato de resolver. Modificando doPlayerRemoveItem por doRemoveItem o item 9930 (rust remover) ainda fica infinito no chão e não é removido, além de dar erro no servidor (LuaInterface::luaDoRemoveItem) Item not found.

 

 

*Lembro que meu actions.xml está assim:

 

<action itemid="9930" event="script" value="tools/rust remover.lua"/>

 

 

*Não teríamos que colocar o item 9930 dentro do sctipt?

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

Te Ajudei? Rep+  (y)

Link para o post
Compartilhar em outros sites

Bom, colocando exatamente com o script que vc editou, dá essa mensagem na interface:

 

[4/5/2014 16:32:23] [Error - Test Interface] 
[4/5/2014 16:32:23] data/actions/scripts/tools/rust removers.lua
[4/5/2014 16:32:23] Description: 
[4/5/2014 16:32:23] data/actions/scripts/tools/rust removers.lua:52: attempt to index global 'item2' (a nil value)
[4/5/2014 16:32:23] [Error - Event::checkScript] Cannot load script (data/actions/scripts/tools/rust removers.lua)
 
A linha se refere a esta parte do script: local const = item2.itemid

Te Ajudei? Rep+  (y)

Link para o post
Compartilhar em outros sites
  • 3 years later...
local breakChance = 60
local rustyItems = {
    [9808] = {2464, 2465, 2483, 2463, 2476}, --common rusty armor
    [9809] = {2464, 2465, 2483, 2463, 2476, 8891, 2487}, --semi-rare rusty armor
    [9810] = {2465, 2463, 2476, 8891, 2487, 2466, 2492, 2472}, --rare rusty armor
    [9811] = {2468, 2648, 2478, 2647, 2477}, --common rusty legs
    [9812] = {2468, 2648, 2478, 2647, 2477, 2488}, --semi-rare rusty legs
    [9813] = {2468, 2648, 2478, 2647, 2477, 2488, 2470}, --rare rusty legs
    [9814] = {2511, 2510, 2530, 2509, 2513, 2515}, --common rusty shield
    [9815] = {2511, 2510, 2530, 2509, 2513, 2515, 2516, 2519}, --semi-rare rusty shield
    [9816] = {2511, 2510, 2530, 2509, 2513, 2515, 2516, 2519, 2520, 2514}, --rare rusty shield
    [9817] = {2643, 3982, 5462, 7457}, --common rusty boots
    [9818] = {2643, 3982, 5462, 7457, 2195}, --semi-rare rusty boots
    [9819] = {2643, 3982, 5462, 7457, 2195, 2645}, --rare rusty boots
    [9820] = {2458, 2460, 2480, 2481, 2457, 2491}, --common rusty helmet
    [9821] = {2458, 2460, 2480, 2481, 2457, 2491, 2497}, --semi rare rusty helmet
    [9822] = {2458, 2460, 2480, 2481, 2457, 2491, 2497, 2475, 2498} --rare rusty helmet
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if rustyItems[itemEx.itemid] ~= nil then
        if math.random(100) <= breakChance then
            doRemoveItem(itemEx.uid)
            doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You broke it.")
        else
            local newId = rustyItems[itemEx.itemid][math.random(#rustyItems[itemEx.itemid])]
            doTransformItem(itemEx.uid,newId)
            doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You removed the rust, revealing a "..getItemNameById(newId))
        end
        doRemoveItem(item.uid,1)
        return TRUE
    end
<action itemid="9930" event="script" value="rusty.lua"/>

Versão tfs 0.3.7

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.

  • Conteúdo Similar

    • Por amoxicilina
      Action: Remover skull
       
       
    • Por paranoiakiller
      Olá, estou criando um servidor custom tibia na versão 10.98 e gostaria de saber se é possivel remover as laterais. Por haver essas laterais no cliente, não é possivel utlizar imagens com resolução superior a 576x448 tirando muito da qualidade.

    • Por lordzetros
      Bom, como o título já informa, o script faz com que você remova um item do inventário de algum player online.
       
      Versão: 8.6 - TFS 0.4
      Em data\talkactions\scripts crie um arquivo chamado removerItem (lembrando que deve ser .lua, caso não saiba criar um, copie algum já existente e cole, após isso, mude o nome do arquivo e cole o código dentro)
       
      --[[ Script feito por Lordzetros para o fórum Tibia King ]] function onSay(cid, words, param) pos = getPlayerPosition(cid) if (param == '') then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O comando necessita de parametros (nomePlayer,idItem,quantidade). Ex.: /remover Bugador,2160,100") if (not isPlayerGhost(cid)) then doSendMagicEffect(pos, CONST_ME_POFF) end return true end local aux = string.explode(param, ",") local pid = getPlayerByNameWildcard(aux[1]) if (not pid) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player " .. aux[1] .. " nao encontrado.") elseif (getPlayerAccess(pid) > getPlayerAccess(cid)) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao pode remover itens de um superior seu.") doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "O membro da staff " ..getCreatureName(cid).. " tentou remover um item de voce!") return true end aux[1] = aux[1]:lower() local qntd = 1 if(aux[3]) then if (tonumber(aux[3]) <= 0) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao eh permitido valores nulos/negativos! Caso queira remover apenas 1x, use /remover Player,idItem") else qntd = aux[3] end end if (doPlayerRemoveItem(pid, tonumber(aux[2]), qntd) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Removido " ..qntd.. "x " ..getItemNameById(aux[2]).. " do player "..aux[1]) posPlayer = getCreaturePosition(pid) doSendMagicEffect(posPlayer, CONST_ME_PLANTATTACK) doCreatureSay(pid,"O membro da staff " ..getCreatureName(cid).. " removeu " ..qntd.. "x " ..getItemNameById(aux[2]).." de seu inventario!", TALKTYPE_ORANGE_1) return true else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O Player " ..aux[1].. " nao tem o item ou a quantidade do item informada em seu inventario.") end return true end Salve o arquivo no qual colocou o código, após isso navegue até data\talkactions\ e abra o arquivo talkactions.lua, e coloque este trecho de código onde quiser:
       
      <talkaction log="yes" access="3" words="/remover" event="script" value="removerItem.lua"/> Feito isso, salve o mesmo e já pode testar no seu servidor.

      Obs1.: Repare que o acesso está definido como 3, ou seja, GM para cima. (mude se quiser)

       
      Comando na prática: /remover nomePlayer,idItem,qntd

      Imagens:
      1

       
      2

       
      3


       
      4

       
      Enfim, é isso pessoal, script simples, porém, pode servir para algum tibiano interessado. 
    • Por 9k22
      Nome: Rust Remover



      Tipo de script: Action



      Versão: 8.6x


      Procurei, procurei e procurei mais não encontrei aqui no fórum nada parecido, intão resolvi postar!

      Pode ser usado para remover a ferrugem da Rusty Armor ou Rusty Legs.


      Em data/action/scripts crie um arquivo .lua com o nome rustremover e adicione:

      local breakChance = 60 local rustyItems = { [9808] = {2464, 2465, 2483, 2463, 2476}, --common rusty armor [9809] = {2464, 2465, 2483, 2463, 2476, 8891, 2487}, --semi-rare rusty armor [9810] = {2465, 2463, 2476, 8891, 2487, 2466, 2492, 2472}, --rare rusty armor [9811] = {2468, 2648, 2478, 2647, 2477}, --common rusty legs [9812] = {2468, 2648, 2478, 2647, 2477, 2488}, --semi-rare rusty legs [9813] = {2468, 2648, 2478, 2647, 2477, 2488, 2470}, --rare rusty legs [9814] = {2511, 2510, 2530, 2509, 2513, 2515}, --common rusty shield [9815] = {2511, 2510, 2530, 2509, 2513, 2515, 2516, 2519}, --semi-rare rusty shield [9816] = {2511, 2510, 2530, 2509, 2513, 2515, 2516, 2519, 2520, 2514}, --rare rusty shield [9817] = {2643, 3982, 5462, 7457}, --common rusty boots [9818] = {2643, 3982, 5462, 7457, 2195}, --semi-rare rusty boots [9819] = {2643, 3982, 5462, 7457, 2195, 2645}, --rare rusty boots [9820] = {2458, 2460, 2480, 2481, 2457, 2491}, --common rusty helmet [9821] = {2458, 2460, 2480, 2481, 2457, 2491, 2497}, --semi rare rusty helmet [9822] = {2458, 2460, 2480, 2481, 2457, 2491, 2497, 2475, 2498} --rare rusty helmet } function onUse(cid, item, fromPosition, itemEx, toPosition) if rustyItems[itemEx.itemid] ~= nil then if math.random(100) <= breakChance then doRemoveItem(itemEx.uid) doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You broke it.") doSendMagicEffect(getCreaturePosition(cid),34) else local newId = rustyItems[itemEx.itemid][math.random(#rustyItems[itemEx.itemid])] doTransformItem(itemEx.uid,newId) doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You removed the rust, revealing a "..getItemNameById(newId)) doSendMagicEffect(getCreaturePosition(cid),66) end doRemoveItem(item.uid,1) return TRUE end return FALSE end Agora em Action/action.xml e adicione: <action itemid="9930" script="tools/rustremover.lua"/>

      9930 = Id do rustremover (pode ser alterado)

      rustremover.rar

      Créditos: Otproject 100%
    • Por Danihcv
      Eae galera do TK,
      Gostaria de um script que removesse o Pz Locked do player ao passar por um tile.

      Desde ja, obrigado pela atenção.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo