Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 02/12/21 em todas áreas

  1. 1 ponto
    Olá @Cat, desculpe incomodá-lo, mas vejo que você está fazendo algum script, talvez você pudesse me explicar, para este revscript, como adicionar para que ao usar os 2 objetos, eu possa colocá-los em 3 sqm, 1 sqm 1 objeto, 2sqm 2 objeto, 3sqm o objeto obtido, para torná-lo mais realista? Eu tentei a posição da função, mas não funciona, é novo o revscript novamente para mim, Em qualquer caso, o seu sistema de mineração é enorme para o RPG, especialmente porque seu script permite que você crie 6 trabalhos diferentes que estou construindo, como alfaiate, sapateiro e muito mais ..! Agradeço antecipadamente local forge = Action() local craft = { level = 1, items = { [1] = {item = 2800, count = 100}, [2] = {item = 2159, count = 200}, }, craftedItem = {2472, 1}, } function forge.onUse(player, item, fromPosition, itemEx, toPosition) if player:getLevel() < craft.level then player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "You do not have level, you will need level 200.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return true end for k, v in pairs(craft.items) do if player:getItemCount(v.item) < v.count then player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "You do not have necessary items, items necessary x100 Star Herb + x200 Scarab Coins.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return true end end for k, v in pairs(craft.items) do player:removeItem(v.item, v.count) end player:addItem(craft.craftedItem[1], craft.craftedItem[2]) player:removeItem(item.itemid, 1) player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "You have Crafted: "..craft.craftedItem[2].."x "..ItemType(craft.craftedItem[1]):getName()..".") player:getPosition():sendMagicEffect(50) return true end forge:id(2800, 2159) forge:register()
  2. (Resolvido)Problema NPC DAILY

    knepperzik reagiu a MatteusDeli por uma resposta no tópico

    1 ponto
    @knepperzik Boa tarde, vá até a pasta data/creaturescripts/scripts abra o arquivo login.lua e embaixo aonde está function onLogin(cid) coloque este trecho de código: if getPlayerStorageValue(cid, task_start) > 0 then ClearAllStoragePlayer(cid) setPlayerStorageValue(cid, task_start, -1) end if getPlayerStorageValue(cid, task_finish) > 0 then setPlayerStorageValue(cid, task_finish , -1) end if getPlayerStorageValue(cid, task_start_opcao1) > 0 then setPlayerStorageValue(cid, task_start_opcao1, -1) end if getPlayerStorageValue(cid, task_start_opcao2) > 0 then setPlayerStorageValue(cid, task_start_opcao2, -1) end
  3. 1 ponto
    @Cat Hello, very good script, Aqui eu transformei em REVSCRIPT, para tfs 1.3 versões 12x, é o mesmo, apenas algumas linhas alteradas, IMPORTANTE DELETE PICK.LUA OU VOCÊ OBTERÁ ERRO AÇÃO DUPLICADA ID 2553 NO CONSOLE! APROVEITAR ! local mining = Action() local config = { maxmininglevel = 120, storagemining = 100000, expperlevel = 1500, experiencemining = 125 } local stone = { blue = {8637, 8633, 9798, 1354}, green = {8640, 8636, 9791, 1353}, lightblue = {8638, 8634, 9790, 12344}, red = {8639, 8635, 9788, 1355}, } local stones = { crystal = {stone.blue[1], stone.green[1], stone.lightblue[1], stone.red[1]}, lcrystal = {stone.blue[2], stone.green[2], stone.lightblue[2], stone.red[2]}, pcrystal = {stone.blue[3], stone.green[3], stone.lightblue[3], stone.red[3]}, scrystal = {stone.blue[4], stone.green[4], stone.lightblue[4], stone.red[4]}, } local ore = { blue = {2146, 7759, 5905, 8302}, green = {2149, 7761, 12396 ,8298}, lightblue = {2150, 7762, 12575, 8303}, red = {2147, 7760, 5906, 8299}, } local ores = { ore.blue[1], ore.blue[2], ore.blue[3], ore.blue[4], ore.green[1], ore.green[2], ore.green[3], ore.green[4], ore.lightblue[1], ore.lightblue[2], ore.lightblue[3], ore.lightblue[4], ore.red[1], ore.red[2], ore.red[3], ore.red[4]} local levels = { { level = {0,19}, stone = {stones.crystal[1], stones.crystal[2], stones.crystal[3], stones.crystal[4]}, items = {ores[1],ores[5], ores[9], ores[13]}, iselect = 0, bstart = 1, gstart = 2, lbstart = 3, rstart = 4, chance = 10, -- 30 qtdmax = 1, expgainmin = 15, --15 expgainmax = 50 --50 }, { level = {20,49}, stone = {stones.crystal[1], stones.crystal[2], stones.crystal[3], stones.crystal[4], stones.lcrystal[1], stones.lcrystal[2], stones.lcrystal[3], stones.lcrystal[4]}, items = {ores[1],ores[2], ores[5], ores[6], ores[9],ores[10], ores[13], ores[14]}, iselect = 1, bstart = 1, gstart = 3, lbstart = 5, rstart = 7, chance = 10, qtdmax = 1, expgainmin = 25, expgainmax = 75 }, { level = {50,69}, stone = {stones.crystal[1], stones.crystal[2], stones.crystal[3], stones.crystal[4], stones.lcrystal[1], stones.lcrystal[2], stones.lcrystal[3], stones.lcrystal[4], stones.pcrystal[1], stones.pcrystal[2], stones.pcrystal[3], stones.pcrystal[4]}, items = {ores[1],ores[2], ores[3], ores[5], ores[6], ores[7], ores[9],ores[10], ores[11], ores[13], ores[14], ores[15]}, iselect = 2, bstart = 1, gstart = 4, lbstart = 7, rstart = 10, chance = 10, qtdmax = 1, expgainmin = 35, expgainmax = 95 }, { level = {70,89}, stone = {stones.crystal[1], stones.crystal[2], stones.crystal[3], stones.crystal[4], stones.lcrystal[1], stones.lcrystal[2], stones.lcrystal[3], stones.lcrystal[4], stones.pcrystal[1], stones.pcrystal[2], stones.pcrystal[3], stones.pcrystal[4], stones.scrystal[1], stones.scrystal[2], stones.scrystal[3], stones.scrystal[4]}, items = {ores[1],ores[2], ores[3], ores[4], ores[5], ores[6], ores[7], ores[8], ores[9],ores[10], ores[11], ores[12], ores[13], ores[14], ores[15], ores[16]}, iselect = 3, bstart = 1, gstart = 5, lbstart = 9, rstart = 13, chance = 10, qtdmax = 1, expgainmin = 55, expgainmax = 125 }, { level = {90,100}, stone = {stones.crystal[1], stones.crystal[2], stones.crystal[3], stones.crystal[4], stones.lcrystal[1], stones.lcrystal[2], stones.lcrystal[3], stones.lcrystal[4], stones.pcrystal[1], stones.pcrystal[2], stones.pcrystal[3], stones.pcrystal[4], stones.scrystal[1], stones.scrystal[2], stones.scrystal[3], stones.scrystal[4]}, items = {ores[1],ores[2], ores[3], ores[4], ores[5], ores[6], ores[7], ores[8], ores[9],ores[10], ores[11], ores[12], ores[13], ores[14], ores[15], ores[16]}, iselect = 3, bstart = 1, gstart = 5, lbstart = 9, rstart = 13, chance = 10, qtdmax = 1, expgainmin = 125, expgainmax = 180 } } function mining.onUse(cid, item, fromPosition, itemEx, toPosition) local getMiningLevel = getPlayerStorageValue(cid, config.storagemining) local getMiningExp = getPlayerStorageValue(cid, config.experiencemining) if getMiningLevel == -1 then setPlayerStorageValue(cid, config.storagemining, 0) end if getMiningExp < 0 then setPlayerStorageValue(cid, config.experiencemining, 0) end if (isInArray(stones.crystal, itemEx.itemid) or isInArray(stones.lcrystal, itemEx.itemid) or isInArray(stones.pcrystal, itemEx.itemid) or isInArray(stones.scrystal, itemEx.itemid)) then for a = 1, #levels do min = levels[a].level[1]; max = levels[a].level[2] if (getMiningLevel >= min and getMiningLevel <= max) then if isInArray(levels[a].stone, itemEx.itemid) then if (math.random(1, 100) <= levels[a].chance) then quantity = math.random(1, levels[a].qtdmax) experience = math.random(levels[a].expgainmin, levels[a].expgainmax) if isInArray(stone.blue, itemEx.itemid) then iselection = math.random(levels[a].bstart, levels[a].bstart + levels[a].iselect) collect = levels[a].items[iselection] end if isInArray(stone.green, itemEx.itemid) then iselection = math.random(levels[a].gstart, levels[a].gstart + levels[a].iselect) collect = levels[a].items[iselection] end if isInArray(stone.lightblue, itemEx.itemid) then iselection = math.random(levels[a].lbstart, levels[a].lbstart + levels[a].iselect) collect = levels[a].items[iselection] end if isInArray(stone.red, itemEx.itemid) then iselection = math.random(levels[a].rstart, levels[a].rstart + levels[a].iselect) collect = levels[a].items[iselection] end if getMiningLevel == 100 then doSendMagicEffect(toPosition, 9) doPlayerSendTextMessage(cid, 22, text) doPlayerAddItem(cid, collect, quantity) elseif getMiningLevel <= 99 then if getMiningExp >= config.expperlevel then doSendMagicEffect(getCreaturePosition(cid), 49) setPlayerStorageValue(cid, config.storagemining, getMiningLevel + 1) setPlayerStorageValue(cid, config.experiencemining, getMiningExp - config.expperlevel) text = "You collected " ..quantity.. " matter" ..(quantity > 1 and "s" or "").. ". \n You have gained " ..experience.. " experience points in Mining. \n You advanced from mining skill level " ..getMiningLevel.. " to mining skill level " ..(getMiningLevel + 1).. "." else setPlayerStorageValue(cid, config.experiencemining, getMiningExp + experience) text = "You collected " ..quantity.. " matter" ..(quantity > 1 and "s" or "").. ". \n You have gained " ..experience.. " experience points in Mining. \n" ..(config.expperlevel - getMiningExp - experience).. " experience points left to next level. \nCurrent Mining Skill: " ..getMiningLevel.. "." end doSendMagicEffect(toPosition, 9) doPlayerSendTextMessage(cid, 22, text) doPlayerAddItem(cid, collect, quantity) end else doPlayerSendTextMessage(cid, 22, "Working.") end else doPlayerSendTextMessage(cid, 22, "You need to get better in Mining to mining this.") end end end else doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendTextMessage(cid, 22, "You can't mining this.") end end mining:id(2553) mining:register()
  4. EMOTE SPELLS DINÂMICO!

    stauro reagiu a Lyu por uma resposta no tópico

    1 ponto
    Fala clã, tudo bom? Então, vi esse tal emote spells em um servidor e decidi fazer, e também, compartilhá-lo com vocês ? O que é? É um código simpleszinho que possibilita players escolherem a cor da mensagem das spells por meio de comando, LARANJA ou AMARELO, como nas imagens abaixo: Vamos aos códigos.. abra game.cpp, na função playerSaySpell, procure por: if (result == TALKACTION_BREAK) { if (!g_config.getBoolean(ConfigManager::EMOTE_SPELLS)) { return internalCreatureSay(player, TALKTYPE_SAY, words, false); } else { return internalCreatureSay(player, TALKTYPE_MONSTER_SAY, words, false); } } else if (result == TALKACTION_FAILED) { return true; } e substitua por: if (result == TALKACTION_BREAK) { int32_t value; player->getStorageValue(203500, value); return internalCreatureSay(player, value == 1 ? TALKTYPE_MONSTER_SAY : TALKTYPE_SAY, words, false); } else if (result == TALKACTION_FAILED) { return true; } Beleza, agora precisamos de uma talkaction para fazer a alteração de storage, vamos lá.. data/talkactions/scripts/emotespells.lua: function onSay(player) local switch = player:getStorageValue(203500) == -1 and 1 or -1 player:sendTextMessage(MESSAGE_INFO_DESCR, 'emote spells: (' .. (switch == 1 and 'monster_say' or 'say') .. ')') player:setStorageValue(203500, switch) end data/talkactions/talkactions.xml: <talkaction words="!emotespells" script="emotespells.lua"/> Agora só compilar as sources e pronto? Versão do TFS: 1.3 Créditos: Lyu (isme)
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo