Postado Abril 17, 2017 8 anos Olá, estou trabalhando no sistema de teste de vocação em dawnport porem estou com prolemas no script, estou editando esse: Spoiler function onStepIn(cid, item, position, fromPosition) local config = { lvl = 9, -- lvl máximo pra testar as vocs voc = 9, --ID da voc msgaovirar = "You have received the weapons of a sorcerer. As a sorcerer, you can use the following spells: Magic Patch, Buzz, Scorch", -- msg ao virar a voc msglvl = "You can't change your vocation anymore.", -- msg caso tiver ultrapassado o lvl máximo a = 054128072016, --storage dos itens, não troque para os scripts das outras vocs. Caso você troque o player vai receber o set inicial mais de 1x b = 054528072016} --storage dos pots, troqe ela para os scripts das outras vocs iteminicial = { 1988, --backpack 2461, --leather helmet 2651, --coat 2649, --leather legs 2643, --leather boots 2050, --torch 2120} --rope if getPlayerLevel(cid) < config.lvl then if getPlayerVocation(cid) ~= config.voc then doPlayerSetVocation(cid, config.voc) doSendMagicEffect(getThingPos(cid), 12) doPlayerSendCancel(cid, "você virou um sorcerer") if getPlayerStorageValue(cid, 085628072016) == -1 then doPlayerSendTextMessage(cid, 22, config.msgaovirar) setPlayerStorageValue(cid, 085628072016, 1) end if getPlayerStorageValue(cid, config.a) == -1 then for i = 1, #iteminicial, 1 do doPlayerAddItem(cid, iteminicial[i]) end setPlayerStorageValue(cid, config.a, 1) end if getPlayerStorageValue(cid, config.b) == -1 then doPlayerAddItem(cid, 7620, 10) --mana pot. Para mage modifique para 10 e para pala modifique para 5 (config do Tibia original) doPlayerAddItem(cid, 8704, 2) --small health potion. Para mage modifique para 2 e para pala modifique para 7 (config do Tibia original) setPlayerStorageValue(cid, config.b, 1) end end else doSendMagicEffect(getThingPos(cid), 2) doPlayerSendCancel(cid, "você não pode mais testar as vocaçôes") if getPlayerStorageValue(cid, 082228072016) == -1 then doPlayerSendTextMessage(cid, 22, config.msglvl) doPlayerSetStorageValue(cid, 082228072016, 1) end if getCreatureLookDirection(cid) == 0 then doMoveCreature(cid, 2) elseif getCreatureLookDirection(cid) == 1 then doMoveCreature(cid, 3) elseif getCreatureLookDirection(cid) == 2 then doMoveCreature(cid, 0) elseif getCreatureLookDirection(cid) == 3 then doMoveCreature(cid, 1) end end return true end local removeitem = 2379, 2512, 2456, 23721 -- item que ira ser removido local additem = 23719, 23771 -- item adicionar function onStepIn(cid, item, position) if not player then return false end if getPlayerItemCount(cid, removeitem) >= 1 then doPlayerRemoveItem(cid, removeitem, getPlayerItemCount(cid, removeitem)) return TRUE end if getPlayerItemCount(cid, additem) < 1 then doPlayerAddItem(cid, additem, getPlayerItemCount(cid, additem)) return TRUE end end Alguém poderia me ajudar? Pretendo disponibilizar tudo após terminar. OBS, o script no caso é um movements
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.