Postado Novembro 23, 2014 10 anos É, 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 Novembro 23, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
Postado Novembro 23, 2014 10 anos 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 Novembro 23, 2014 10 anos por avalax (veja o histórico de edições) Ajudei Rep+
Postado Novembro 23, 2014 10 anos 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 Novembro 23, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
Postado Novembro 23, 2014 10 anos Autor ta lek ta aumentando normal mais quando eu tiro o item do slot a outfit não sai arruma ai pfv Editado Novembro 23, 2014 10 anos por avalax (veja o histórico de edições) Ajudei Rep+
Postado Novembro 23, 2014 10 anos 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.