Postado Junho 11, 2012 13 anos Estava aqui no pc sem nada pra fazer e achei esse antigo script então resolvi postar aqui, e apenas um script de blacksmith com skill Data/Actions/Crie um arquivo lua e adicione: local professions = { ["blacksmith"] = {storage = 1030, maxSkill = 10000}, } local recipes = { [2412] = {tool = 2422, skill = 0, loot = {{2383, 1}}, profession = "blacksmith"}, [2383] = {tool = 2422, skill = 50, loot = {{7385, 1}}, profession = "blacksmith"}, [7385] = {tool = 2422, skill = 80, loot = {{2392, 1}}, profession = "blacksmith"}, [2392] = {tool = 2422, skill = 100, loot = {{7384, 1}}, profession = "blacksmith"}, [7384] = {tool = 2422, skill = 120, loot = {{7390, 1}}, profession = "blacksmith"}, [7390] = {tool = 2422, skill = 160, loot = {{2400, 1}}, profession = "blacksmith"}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if recipes[itemEx.itemid] then if itemEx.actionid > 0 then doPlayerRemoveItem(cid, 2412, 1) doPlayerRemoveItem(cid, 2383, 1) doPlayerRemoveItem(cid, 7385, 1) doPlayerRemoveItem(cid, 2392, 1) doPlayerRemoveItem(cid, 7384, 1) doPlayerRemoveItem(cid, 7390, 1) doCreatureSay(cid, "You can not Do It.", TALKTYPE_ORANGE_1) local player = getPlayerPosition(cid) doSendMagicEffect(player, 31) return TRUE end lootTable = {} lootName = "You made the item " professionSkill = getPlayerStorageValue(cid, professions[recipes[itemEx.itemid].profession].storage) itemPos = getThingPos(itemEx.uid) if professionSkill < 1 then professionSkill = 0 end if item.itemid == recipes[itemEx.itemid].tool then if professionSkill >= recipes[itemEx.itemid].skill then if item.actionid ~= 5001 then if math.random(1, 5) < 2 then doRemoveItem(itemEx.uid, 1) if recipes[itemEx.itemid].profession ~= "blacksmith" then addEvent(doCreateItem, 12000, itemEx.itemid, 1, itemPos) local player = getPlayerPosition(cid) doSendMagicEffect(player, 34) end if math.random(1, 4) < 2 then if professionSkill < professions[recipes[itemEx.itemid].profession].maxSkill then setPlayerStorageValue(cid, professions[recipes[itemEx.itemid].profession].storage, professionSkill + 1) doCreatureSay(cid, "You advanced in "..recipes[itemEx.itemid].profession.." ("..professionSkill..").", TALKTYPE_ORANGE_1) local player = getPlayerPosition(cid) doSendMagicEffect(player, 31) end end repeat if #recipes[itemEx.itemid].loot == 0 then break end for i = 1, #recipes[itemEx.itemid].loot do if math.random(1, 2) < 2 then table.insert(lootTable, (recipes[itemEx.itemid].loot)) end end until lootTable ~= {} for i = 1, #lootTable do lootCount = math.random(1, lootTable[2]) doPlayerAddItem(cid, lootTable[1], lootCount) if i == #lootTable then lootName = lootName..""..lootCount.."x ".. getItemNameById(lootTable[1]) .."." else lootName = lootName..""..lootCount.."x ".. getItemNameById(lootTable[1]) ..", " end end if lootName == "You made the item " then lootName = "You missed!." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, lootName) else local player = getPlayerPosition(cid) doSendMagicEffect(player, 3) end else local player = getPlayerPosition(cid) doSendMagicEffect(player, 31) doPlayerSendTextMessage(cid, 22, "You do not have the required skill!") end else local player = getPlayerPosition(cid) doSendMagicEffect(player, 55) local player = getPlayerPosition(cid) doSendMagicEffect(player, 56) doPlayerSendTextMessage(cid, 22, "You do not have the required skill!") end else local player = getPlayerPosition(cid) doSendMagicEffect(player, 2) end end return true end Data/Actions/Actions.xml Adicione: <action itemid="Iddoitemqueusaranasarmas" event="script" value="Nome_do_arquivo.lua"/> Duvidas pergunte! flw.
Postado Junho 11, 2012 13 anos poderia dizer oq o script faz? Não se comprometa, com aquilo que não pode fazer.
Postado Junho 11, 2012 13 anos Autor E um blacksmith simples, Vamos supor você pega um dragon hammer e bate na spike sword ela tem chanse de qebrar ou de virar uma serpent e assim vai evoluindo
Postado Abril 10, 2014 11 anos descupa por pergunta so agora mas não entendi a parte da profession = "blacksmith"} ? ali é oq a voc do player
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.