Ir para conteúdo

(Resolvido)Ao equipar um item X no meu slot serta vocartion mudara a outfit

Featured Replies

Postado

É, está certo. Só o slot que deveria ser body (já que isso é um manto), não?

<item id="2479" article="a" name="Hokage Tunic">
	<attribute key="weight" value="4600" />
	<attribute key="armor" value="6" />
	<attribute key="speed" value="50" />
	<attribute key="magiclevelpoints" value="50" />
	<attribute key="showattributes" value="1" />
	<attribute key="slotType" value="body" />
</item>




Substitua o script do itemoutfit.lua, por este:

local tab = {
	[1] = {outfit = 123}, -- [vocID] = {outfit = lookTypeNumber}
	[300] = {outfit = 456}
}

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 50)

function onEquip(cid, item, slot)
	doSetCreatureOutfit(cid, {lookType = tab[getPlayerVocation(cid)].outfit}, -1)
	doChangeSpeed(cid, getCreatureSpeed(cid) + 50)
	doAddCondition(cid, condition)
	return true
end

function onDeEquip(cid, item, slot)
	doChangeSpeed(cid, getCreatureSpeed(cid) - 50)
	doRemoveCondition(cid, CONDITION_ATTRIBUTES)
	return true
end

 

 

eu queria que não desse pra usar o comando !saga quando estiver o item no slot

Poste o script dessa talkaction.

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

The corrupt fear us.

The honest support us.

The heroic join us.

  • Respostas 20
  • Visualizações 1.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Desatenção minha, estou um tanto quanto ocupado: local tab = { [1] = {outfit = 123}, -- [vocID] = {outfit = lookTypeNumber} [300] = {outfit = 456} } local condition = createConditionObject(CONDIT

  • O aumento de velocidade e magic level, você pode editar em items.xml, aplicando as seguintes linhas no código referente ao item: <attribute key="speed" value="50" /> <attribute key="magicle

  • Relaxa, tô aqui pra contribuir apenas.

Postado
  • Autor

mano ta dando isso aki ta trocando outfit normal mais ainda não esta aumentando e aparece isso

 

[Warning - MoveEvents::addEvent] Duplicate move event found: 2479


[Warning - MoveEvents::addEvent] Duplicate move event found: 2479

 

toma o comando saga 

 

local saga = {


[641] = {[1] = 651, [2] = 652, [3] = 653, [4] = 654, [5] = 655, [6] = 656, [7] = 8, effect = 244},
[822] = {[1] = 464, [2] = 465, [3] = 466, [4] = 467, [5] = 468, [6] = 469, [7] = 470, [8] = 624, effect = 74},
[1] = {[1] = 66, [2] = 91, [3] = 18, [4] = 163, [5] = 683, [6] = 684, [7] = 692, [8] = 305, [9] = 49, [10] = 693, [11] = 604, [12] = 179, [13] = 605, [14] = 682, [15] = 25, [16] = 30, effect = 10},
[400] = {[1] = 476, [2] = 477, [3] = 478, [4] = 479, [5] = 481, [6] = 482, [7] = 483, [8] = 484, [9] = 486, [10] = 487, [11] = 681, [12] = 620, [13] = 621, effect = 10},
[805] = {[1] = 712, [2] = 713, [3] = 714, [4] = 715, [5] = 716, [6] = 717, [7] = 718, [8] = 719, [9] = 720, [10] = 721, [11] = 722, effect = 10},
[209] = {[1] = 452, [2] = 453, [3] = 454, [4] = 456, [5] = 457, [6] = 290, [7] = 649, [8] = 458, [9] = 555, effect = 202},
[300] = {[1] = 437, [2] = 438, [3] = 439, [4] = 440, [5] = 441, effect = 10},
[520] = {[1] = 490, [2] = 491, [3] = 493, [4] = 494, [5] = 495, effect = 10},
[25] = {[1] = 660, [2] = 661, [3] = 662, [4] = 663, [5] = 664, [6] = 330, [7] = 565, effect = 184},
}


local level = 25 -- Limite para liberar uma saga nova


function onSay(cid, words, param, channel)


if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.")
return true
end

if getPlayerStorageValue(cid, 89745) ~= -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode trocar de saga enquanto for da akatsuki.")
return true
end

if not saga[getPlayerVocation(cid)] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.")
return true
end


local t = string.explode(param, ",")


if(t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.")
return true
end


if not (tonumber(t[1])) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.")
return true
end


if tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.")
return true
end




if getPlayerLevel(cid) >= (tonumber(t[1])*level) then
doSetCreatureOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}, -1)
doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect)
doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!")
doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.")
end


return true
end

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

Ajudei Rep+ :D

Postado
ainda não esta aumentando e aparece isso

 

Ops, erro meu. Deixe apenas as duas tags dos scripts do arquivo itemoutfit.lua.

Substitua o movement script por este:

local tab = {
    [1] = {outfit = 123}, -- [vocID] = {outfit = lookTypeNumber}
    [300] = {outfit = 456}
}

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 50)

function onEquip(cid, item, slot)
    doSetCreatureOutfit(cid, {lookType = tab[getPlayerVocation(cid)].outfit}, -1)
    doChangeSpeed(cid, getCreatureSpeed(cid) + 50)
    doAddCondition(cid, condition)
    return true
end

function onDeEquip(cid, item, slot)
    doChangeSpeed(cid, getCreatureSpeed(cid) - 50)
    doRemoveCondition(cid, CONDITION_ATTRIBUTES)
    doRemoveCondition(cid, CONDITION_OUTFIT)
    return true
end

O script da sua talkaction:

local saga = {
	[641] = {[1] = 651, [2] = 652, [3] = 653, [4] = 654, [5] = 655, [6] = 656, [7] = 8, effect = 244},
	[822] = {[1] = 464, [2] = 465, [3] = 466, [4] = 467, [5] = 468, [6] = 469, [7] = 470, [8] = 624, effect = 74},
	[1] = {[1] = 66, [2] = 91, [3] = 18, [4] = 163, [5] = 683, [6] = 684, [7] = 692, [8] = 305, [9] = 49, [10] = 693, [11] = 604, [12] = 179, [13] = 605, [14] = 682, [15] = 25, [16] = 30, effect = 10},
	[400] = {[1] = 476, [2] = 477, [3] = 478, [4] = 479, [5] = 481, [6] = 482, [7] = 483, [8] = 484, [9] = 486, [10] = 487, [11] = 681, [12] = 620, [13] = 621, effect = 10},
	[805] = {[1] = 712, [2] = 713, [3] = 714, [4] = 715, [5] = 716, [6] = 717, [7] = 718, [8] = 719, [9] = 720, [10] = 721, [11] = 722, effect = 10},
	[209] = {[1] = 452, [2] = 453, [3] = 454, [4] = 456, [5] = 457, [6] = 290, [7] = 649, [8] = 458, [9] = 555, effect = 202},
	[300] = {[1] = 437, [2] = 438, [3] = 439, [4] = 440, [5] = 441, effect = 10},
	[520] = {[1] = 490, [2] = 491, [3] = 493, [4] = 494, [5] = 495, effect = 10},
	[25] = {[1] = 660, [2] = 661, [3] = 662, [4] = 663, [5] = 664, [6] = 330, [7] = 565, effect = 184}
}

local item = {2479, 4}-- {itemID, slotNumber}
local level = 25 -- Limite para liberar uma saga nova

function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.")
		return true
	end

		if getPlayerSlotItem(cid, item[2]).itemid == item[1] then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga enquanto estiver com uma "..getItemNameById(item[1]).." equipada.")
			return true
		end
		
			if getPlayerStorageValue(cid, 89745) ~= -1 then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode trocar de saga enquanto for da akatsuki.")
				return true
			end

				if not saga[getPlayerVocation(cid)] then
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.")
					return true
				end
			
			local t = string.explode(param, ",")
				if(t[2]) then
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.")
					return true
				end

			if not (tonumber(t[1])) then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.")
				return true
			end

		if tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.")
			return true
		end

	if getPlayerLevel(cid) >= (tonumber(t[1])*level) then
		doSetCreatureOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}, -1)
		doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect)
		doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!")
		doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.")
	end
	
	return true
end

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

The corrupt fear us.

The honest support us.

The heroic join us.

Postado
  • Solução

Desatenção minha, estou um tanto quanto ocupado:

local tab = {
	[1] = {outfit = 123}, -- [vocID] = {outfit = lookTypeNumber}
	[300] = {outfit = 456}
}

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 50)

function onEquip(cid, item, slot)
	doSetCreatureOutfit(cid, {lookType = tab[getPlayerVocation(cid)].outfit}, -1)
	doChangeSpeed(cid, getCreatureSpeed(cid) + 50)
	doAddCondition(cid, condition)
	return true
end

function onDeEquip(cid, item, slot)
	doChangeSpeed(cid, getCreatureSpeed(cid) - 50)
	doRemoveCondition(cid, CONDITION_ATTRIBUTES)
	doRemoveCondition(cid, CONDITION_OUTFIT)
	return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

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