Ir para conteúdo

Soaresdk

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    Soaresdk deu reputação a L3K0T em AUMENTANDO TELA DE VISÃO OTCLIENTE EM REV3884 8.60 0.4   
    REV3884 TFS 0.4 OTC 0.6.6

     
    OBSERVAÇÃO:
    Bom galera hoje vim trazer um código de expansão de visão para o otclient alterado por mim,  usado somente para rev3884 e então se você usa um tfs 0.3.6 ou tfs 1.0 não vai dar certo,
    *Esse código foi alterado por mim para ser usado apenas para rev3884, procolo 8.60 e TFS 0.4 que no caso não achei e resolvi compartilhar essas alterações.
     
     
     
    1° TUTORIAL 1 SOURCE DO SEU SERVIDOR.
     
    Abra Protocollgame.cpp 
     
    1 Ache
    ((x >= myPos.x - 8 + offsetz) && (x <= myPos.x + 9 + offsetz) && //(y >= myPos.y - 6 + offsetz) && (y <= myPos.y + 7 + offsetz)); ALTERE PARA:
     
    ((x >= myPos.x - Map::maxClientViewportX + offsetz) && (x <= myPos.x + (Map::maxClientViewportX+1) + offsetz) && (y >= myPos.y - Map::maxClientViewportY + offsetz) && (y <= myPos.y + (Map::maxClientViewportY+1) + offsetz));  
     
    2 Ache:
     
    GetMapDescription(pos.x - 8, pos.y - 6, pos.z, 18, 14, msg);  
    ALTERE PARA:
     
    GetMapDescription(pos.x - Map::maxClientViewportX, pos.y - Map::maxClientViewportY, pos.z, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, msg);  
     
    3 Ache:
     
    if(oldPos.y > newPos.y) // north, for old x { msg->put<char>(0x65); GetMapDescription(oldPos.x - 8, newPos.y - 6, newPos.z, 18, 1, msg); } else if(oldPos.y < newPos.y) // south, for old x { msg->put<char>(0x67); GetMapDescription(oldPos.x - 8, newPos.y + 7, newPos.z, 18, 1, msg); } if(oldPos.x < newPos.x) // east, [with new y] { msg->put<char>(0x66); GetMapDescription(newPos.x + 9, newPos.y - 6, newPos.z, 1, 14, msg); } else if(oldPos.x > newPos.x) // west, [with new y] { msg->put<char>(0x68); GetMapDescription(newPos.x - 8, newPos.y - 6, newPos.z, 1, 14, msg); } ALTERE PARA:
     
    if (oldPos.y > newPos.y) { // north, for old x msg->put<char>(0x65); GetMapDescription(oldPos.x - Map::maxClientViewportX, newPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, 1, msg); } else if (oldPos.y < newPos.y) { // south, for old x msg->put<char>(0x67); GetMapDescription(oldPos.x - Map::maxClientViewportX, newPos.y + (Map::maxClientViewportY+1), newPos.z, (Map::maxClientViewportX+1)*2, 1, msg); } if (oldPos.x < newPos.x) { // east, [with new y] msg->put<char>(0x66); GetMapDescription(newPos.x + (Map::maxClientViewportX+1), newPos.y - Map::maxClientViewportY, newPos.z, 1, (Map::maxClientViewportY+1)*2, msg); } else if (oldPos.x > newPos.x) { // west, [with new y] msg->put<char>(0x68); GetMapDescription(newPos.x - Map::maxClientViewportX, newPos.y - Map::maxClientViewportY, newPos.z, 1, (Map::maxClientViewportY+1)*2, msg); }  
     
    4 ache
     
    GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, 5, 18, 14, 3, skip); //(floor 7 and 6 already set) GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, 4, 18, 14, 4, skip); GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, 3, 18, 14, 5, skip); GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, 2, 18, 14, 6, skip); GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, 1, 18, 14, 7, skip); GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, 0, 18, 14, 8, skip);  
    Altere para
     
    GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, 5, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 3, skip); //(floor 7 and 6 already set) GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, 4, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 4, skip); GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, 3, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 5, skip); GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, 2, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 6, skip); GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, 1, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 7, skip); GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, 0, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 8, skip);  
     
    5 ache
     
    GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, oldPos.z - 3, 18, 14, 3, skip);  
    ALTERE PARA
     
    GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, oldPos.z - 3, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, 3, skip);  
     
    6 ACHE
     
    GetMapDescription(oldPos.x - 8, oldPos.y + 1 - 6, newPos.z, 1, 14, msg);  
    ALTERE PARA
     
    GetMapDescription(oldPos.x - Map::maxClientViewportX, oldPos.y - (Map::maxClientViewportY-1), newPos.z, 1, (Map::maxClientViewportY+1)*2, msg);  
     
    7 ACHE
     
    GetMapDescription(oldPos.x - 8, oldPos.y - 6, newPos.z, 18, 1, msg); ALTERE PARA
     
    GetMapDescription(oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, 1, msg);  
     
    8 Ache
     
    GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, newPos.z, 18, 14, -1, skip); GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, newPos.z + 1, 18, 14, -2, skip); GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, newPos.z + 2, 18, 14, -3, skip);  
    Altere para
     
    GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, -1, skip); GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z + 1, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, -2, skip); GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z + 2, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, -3, skip);  
     
    9 ache
     
    GetFloorDescription(msg, oldPos.x - 8, oldPos.y - 6, newPos.z + 2, 18, 14, -3, skip);  
    Altere para
     
    GetFloorDescription(msg, oldPos.x - Map::maxClientViewportX, oldPos.y - Map::maxClientViewportY, newPos.z + 2, (Map::maxClientViewportX+1)*2, (Map::maxClientViewportY+1)*2, -3, skip);  
     
    10 ache
     
    GetMapDescription(oldPos.x + 9, oldPos.y - 1 - 6, newPos.z, 1, 14, msg);  
    Altere para
     
    GetMapDescription(oldPos.x + Map::maxClientViewportX+1, oldPos.y - (Map::maxClientViewportY+1), newPos.z, 1, ((Map::maxClientViewportY+1)*2), msg);  
     
    AGORA EM MAP.H
     
     
    ache
     
    static const int32_t maxViewportX = 11; //min value: maxClientViewportX + 1 static const int32_t maxViewportY = 11; //min value: maxClientViewportY + 1 static const int32_t maxClientViewportX = 8; static const int32_t maxClientViewportY = 6; altere para:
     
    static const int32_t maxViewportX = 18; //min value: maxClientViewportX + 1 static const int32_t maxViewportY = 18; //min value: maxClientViewportY + 1 static const int32_t maxClientViewportX = 14; static const int32_t maxClientViewportY = 12;  
    Pronto agora é só compilar a source do seu servidor 8.60 rev3884
     
     
    PARTE 2 OTCLIENT 0.6.6
     
    abra o map.cpp da source do otclient 
     
    ache
     
    void Map::resetAwareRange() { AwareRange range; range.left = 8; range.top = 6; range.bottom = 7; range.right = 9; setAwareRange(range); } ALTERE PARA
     
    void Map::resetAwareRange() { AwareRange range; range.left = 14; //Change this to = maxClientViewportX range.top = 12; //Change this to = maxClientViewportY range.bottom = range.top+1; range.right = range.left+1; setAwareRange(range); } COMPILE A SOURCE DO OTCLIENT E PRONTO!!! ESPERO TER SANADO VÁRIAS DÚVIDAS DE AUMENTAR TELA DO OTCLIENT EM REV3884.
    CRÉDITOS: Pra mim pela alterações funcionais. e pelo Flatlander por disponibilizar para tfs 0.3.6 e 1.0 pois esse está alterado pra tfs 0.4
     
     
     
  2. Gostei
    Soaresdk deu reputação a Darcio Antonio em Criando um Botão OT CLIENT   
    game_topslot.zi
    Bom o scan do arquivo está ai.
    https://www.virustotal.com/#/file/5a0b17722b93fd4c9117086b80ad24442c305a05723680cad34ec50138ef30bc/detection
  3. Gostei
    Soaresdk deu reputação a Designer Walox em água transparente ( Walox Edit )   
    Olá!
    Bom venho trazer para vocês sprites com animações que eu editei para o meu servidor!
    Vi que muitas pessoas tem dificuldade para mexer no PHOTOSHOP e como para mim é o contrario pretendo ajudar no que puder
    Bom vamos parar de frescura e ir para o conteudo haha, Espero que gostem e colaborem com o UP ❤️    

     
    Baixe e use com moderação haha qualquer coisa só chamar no chat
    Baixar Conteudo
     
     
  4. Gostei
    Soaresdk deu reputação a Ments em OTClient Última Versão - Compilado para Linux   
    Oque é OTClient?  
    O Otclient é um cliente Tibia alternativo para uso com o otserv. Ele tem como objetivo ser completo e flexível, pois usa o script LUA para todos os arquivos de configurações e funcionalidade da interface do jogo com uma sintaxe semelhante ao CSS para o design da interface do cliente. O Otclient trabalha com um sistema modular, isto significa que cada funcionalidade é um módulo separado, dando a possibilidade aos usuários modificarem e personalizarem qualquer coisa facilmente. Os usuários também podem criar novos mods e estender a interface do jogo para seus próprios propósitos. Otclient é escrito em C ++ 11 e fortemente roteirizado em lua.

    Para um servidor se conectar, você pode construir o seu próprio com o servidor forgottenserver ou conectar-se a um listado no otservlist.
     
    Oque eu fiz?  
    Eu não entendo muito sobre Linux, e realmente, se eu pudesse resumir o Linux em uma frase seria algo como: "Quando você arruma algo, certamente outra coisa vai bugar.". É isso que eu penso sobre o Linux, mas eu estou ainda utilizando-o, pois eu sou masoquista e estou disposto a quebrar a cabeça até aprender algo. O que eu fiz foi simplesmente compilar o cliente para ser utilizado em Linux, isso foi algo que eu não encontrei em NENHUM fórum, ao menos não um OTClient atualizado que pegue todas as versões novas, agora eu estou disponibilizando o OTClient já compilado aqui no TibiaKing e estou disposto a tirar toda e qualquer dúvida referente a compilação dessa maravilha.
     
     Download  
    Download: Aqui
     
    Para descompactar o arquivo basta digitar a senha que é tibiaking, infelizmente acabei de tentar fazer o scan e o tamanho máximo de arquivo permitido pelo virustotal é 128MB, se alguém tiver a bondade de fazer o scan e postar aqui ficarei imensamente grato, um abraço e até qualquer dia.
  5. Gostei
    Soaresdk recebeu reputação de FiNub em Alguém deixa esse script free account?   
    @Emanueldk
     
    Uso TFS 0.4 8.6
     
    qual Quer vocação pode usa estatuas 
     
    Em Data\lib
    103-offline-training.lua
     
    -- config, in percent of normal training with 2 trainers and player vocation mana regeneration [by food] OfflineTraining_rates = { [SKILL_CLUB] = 100, [SKILL_SWORD] = 100, [SKILL_AXE] = 100, [SKILL_DISTANCE] = 100, [SKILL_SHIELD] = 100, [SKILL__MAGLEVEL] = 100 } -- function that you should edit to make it add other skill etc. function OfflineTraining_canStartTraining(cid) -- return bool return getCreatureStorage(cid, 62669) > 0 end function OfflineTraining_onStartTraining(cid) -- maybe someone will need -- to save your time, this: doPlayerPopupFYI(cid, "You started offline training.") -- NOT WORK :( end function OfflineTraining_onEndTraining(cid) doCreatureSetStorage(cid, 62669, 0) end function OfflineTraining_addTrainedSkills(cid, trainTime) -- time in minutes! local timeInSeconds = trainTime * 60 local vocInfo = getVocationInfo(getPlayerVocation(cid)) if(getCreatureStorage(cid, 62669) == SKILL_SWORD) then doPlayerAddSkillTry(cid, SKILL_SWORD, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_SWORD] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_AXE) then doPlayerAddSkillTry(cid, SKILL_AXE, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_AXE] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL__MAGLEVEL) then doPlayerAddSpentMana(cid, ((timeInSeconds / vocInfo["manaGainTicks"]) * vocInfo["manaGain"]) * OfflineTraining_rates[SKILL__MAGLEVEL] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_CLUB) then doPlayerAddSkillTry(cid, SKILL_CLUB, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_CLUB] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_DISTANCE) then doPlayerAddSkillTry(cid, SKILL_DISTANCE, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_DISTANCE] / 100, true) end doPlayerAddSkillTry(cid, SKILL_SHIELD, timeInSeconds * OfflineTraining_rates[SKILL_SHIELD] / 100, true) end -- 4 functions to show right values on 'bar' in Tibia 9.6 function OfflineTraining_getTime(cid) return getCreatureStorage(cid, 62666) end function OfflineTraining_setTime(cid, newTime) -- set values only between 0 - 720 [12 hours] doCreatureSetStorage(cid, 62666, math.max(0, math.min(newTime, 720))) -- now code to force server to send 'PlayerStats' (including Offline Time) -- we must change any stat: hp,mana,stamina,cap,soul,exp,level doPlayerAddSoul(cid, 1) doPlayerAddSoul(cid, -1) end function OfflineTraining_addTime(cid, addTime) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + addTime) end function OfflineTraining_removeTime(cid, removeTime) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) - removeTime) end -- functions for library to add skills/mlvl function OfflineTraining_initialize(cid) if(OfflineTraining_getTime(cid) == -1) then OfflineTraining_setTime(cid, 720) OfflineTraining_setLogoutTime(cid) -- block problem with first login 'add time' end end function OfflineTraining_isTraining(cid) return (getCreatureStorage(cid, 62667) > 0) end function OfflineTraining_turnOnTraining(cid) doCreatureSetStorage(cid, 62667, 1) end function OfflineTraining_turnOffTraining(cid) doCreatureSetStorage(cid, 62667, 0) end function OfflineTraining_getOfflineTime(cid) return math.floor((os.time() - getCreatureStorage(cid, 62668)) / 60) end function OfflineTraining_setLogoutTime(cid) return doCreatureSetStorage(cid, 62668, os.time()) end  
    Em
    Data/actions
    abre actions.xml e add isso
     
    <!-- Offline Training --> <action itemid="8834" event="script" value="other/offlinetraining.lua"/> <action itemid="10353" event="script" value="other/offlinetraining.lua"/> <action itemid="8626" event="script" value="other/offlinetraining.lua"/> <action itemid="1444" event="script" value="other/offlinetraining.lua"/> <action itemid="10349" event="script" value="other/offlinetraining.lua"/> em 
    data\actions\scripts\other
    coloca isso
     
    offlinetraining.lua
     
    function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 1444) then -- sword doCreatureSetStorage(cid, 62669, SKILL_SWORD) elseif(item.itemid == 10349) then -- axe doCreatureSetStorage(cid, 62669, SKILL_AXE) elseif(item.itemid == 8834) then -- mlvl doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL) elseif(item.itemid == 8626) then -- club doCreatureSetStorage(cid, 62669, SKILL_CLUB) elseif(item.itemid == 10353) then -- distannce doCreatureSetStorage(cid, 62669, SKILL_DISTANCE) end if item.actionid == 1000 then doRemoveCreature(cid) end return true end Todas Estatuas
    tem que ter Action ID > 1000
    para coloca esse id usa mapa editor
     
    ID Das Estatuas
    1444 > Sword
    10349> Axe
    8834> ML
    8626> Club
    10353> Distannce
     
    em data\creaturescripts
    creaturescripts.xml coloca isso
     
    <!-- Offline Training --> <event type="login" name="offtrain_PlayerLogin" event="script" value="offtrain_login.lua"/> <event type="logout" name="offtrain_PlayerLogout" event="script" value="offtrain_logout.lua"/>  
    em data\creaturescripts\scripts
    coloca esses dois
     
    offtrain_login.lua
    -- 0.4 - offline training - login.lua function onLogin(cid) OfflineTraining_initialize(cid) if(OfflineTraining_isTraining(cid)) then OfflineTraining_turnOffTraining(cid) -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6] OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid))) -- we remove offline training time [bar in game - 9.6], -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia] -- got '3 hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time' OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid))) OfflineTraining_onEndTraining(cid) else -- offline training time also regenerate when you are offline, but NOT train OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid)) end return true end  
    offtrain_logout.lua
     
    -- 0.4 - offline training - logout.lua function onLogout(cid) if(OfflineTraining_canStartTraining(cid)) then OfflineTraining_turnOnTraining(cid) OfflineTraining_onStartTraining(cid) end OfflineTraining_setLogoutTime(cid) return true end  
     
  6. Obrigado
    Soaresdk deu reputação a Vodkart em (Resolvido)(Ajuda) [8.60] Sistema de Recompensa   
    msg = msg .. " ".. (tabela_reward[x][2] > 1 and tabela_reward[x][2] > 1 or "") .." "..getItemNameById(tabela_reward[x][1])..","  
  7. Gostei
    Soaresdk deu reputação a Crypter em (Resolvido)(Ajuda) [8.60] Sistema de Recompensa   
  8. Gostei
    Soaresdk deu reputação a Darcio Antonio em Comando que adiciona pontos no site pelo game   
    OTX e TFS 0.4 Tibia 8.60
    Bom esse comando funciona para quem usa o site ZnoteAcc.
    Primeiro vá em
    data/libs/050-function.lua E adicione isso na ultima  linha.
    -- [ Sistema de Pontos ZnoteAcc in Game ] function getPointsp(cid) local res = db.getResult('select `points` from znote_accounts where account_id = \''..getPlayerAccountId(cid)..'\'') if(res:getID() == -1) then return false end local ret = res:getDataInt("points") res:free() return tonumber(ret) end function doPlayerAddPointsp(cid, quant) return db.query("UPDATE `znote_accounts` SET `points` = '".. getPointsp(cid) + quant .."' WHERE `account_id` ='"..getPlayerAccountId(cid).."'") end function doPlayerRemovePointsp(cid, quant) return db.query("UPDATE `znote_accounts` SET `points` = '".. getPointsp(cid) - quant .."' WHERE `account_id` ='"..getPlayerAccountId(cid).."'") end -- [ Sistema de Pontos ZnoteAcc in Game ] Use essas função para adicionar pontos para o jogador.
    doPlayerAddPointsp(cid, 1)  Use essas função para remover pontos do jogador.
    doPlayerRemovePointsp(cid, 1) Use essa função para checar os pontos do jogador caso queira fazer uma Quest ou algo do gênero.
    if getPointsp(cid) < 1 then doPlayerSendTextMessage(cid, 22,"Você não tem pontos no site") end Se você quiser criar um item que quando player use de 1 ponto no site para ele use esse script.
    Crie um arquivo LUA em  data/actions/scripts  com o nome de PontoSite.lua e adicione isso dentro.
    function onUse(cid, item, frompos, item2, topos) doSendMagicEffect(getCreaturePosition(cid), 30) doPlayerAddPointsp(cid, 1) doPlayerSendTextMessage(cid, 22,"Você recebeu 1 ponto no site") doRemoveItem(item.uid) return true end Agora adicione a tag abaixo em data/action/actions.xml
    <action itemid="ID DO ITEM" script="PontoSite.lua"/> Pronto, quando o player usar o item o item sera removido e ele ganhara 1 ponto no site.
    Vlw espero ajudar aguem com isso.
     
  9. Gostei
    Soaresdk deu reputação a Darcio Antonio em Remover a XP que o summon ganha. tfs 0.4   
    Bom vi em vários tutoriais ai da vida, que se colocar isso no config.lua já removia a xp que o summon ganha.
    NoShareExpSummonMonster = true MAS NÃO FUNCIONA
    O correto é ir na sua source e em criature.cpp e editar essa parte aqui.
    void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints) { if(damagePoints < 0) return; uint32_t attackerId = 0; if(attacker) attackerId = attacker->getID(); CountMap::iterator it = damageMap.find(attackerId); if(it != damageMap.end()) { it->second.ticks = OTSYS_TIME(); if(damagePoints > 0) it->second.total += damagePoints; } else damageMap[attackerId] = CountBlock_t(damagePoints); if(damagePoints > 0) lastHitCreature = attackerId; } por essa aqui.
    void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints) { uint32_t attackerId = 0; if(attacker) { if(Creature* master = attacker->getMaster()) attacker = master; attackerId = attacker->getID(); } if(attacker->getPlayer()) { CountMap::iterator it = damageMap.find(attackerId); if(it != damageMap.end()) { it->second.ticks = OTSYS_TIME(); if(damagePoints > 0) it->second.total += damagePoints; } else damageMap[attackerId] = CountBlock_t(damagePoints); } if(damagePoints > 0) lastHitCreature = attackerId; } Compila e pronto quando o summon matar a xp vai toda pra você.
  10. Obrigado
    Soaresdk recebeu reputação de Darcio Antonio em Erro   
    Qual quer Coisa só pegunta la no Discod irmão xD
  11. Curtir
    Soaresdk deu reputação a Darcio Antonio em Erro   
    Vlw vou olhar aqui
    Resolvi Usando isso

     
    Resolved \/

    in mysql delet  'killers'  and add new
      DROP TABLE IF EXISTS `killers`; CREATE TABLE `killers` (     `id` INT NOT NULL AUTO_INCREMENT,     `death_id` INT NOT NULL,     `final_hit` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,     `unjustified` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,     `war` INT NOT NULL DEFAULT 0,     PRIMARY KEY (`id`),     FOREIGN KEY (`death_id`) REFERENCES `player_deaths`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB;     in mysql delet  'player_deaths'  and add new   DROP TABLE IF EXISTS `player_deaths`; CREATE TABLE `player_deaths` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `player_id` int(11) NOT NULL,   `date` bigint(20) unsigned NOT NULL,   `level` int(10) unsigned NOT NULL,   PRIMARY KEY (`id`),   KEY `date` (`date`),   KEY `player_deaths_ibfk_1` (`player_id`) ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ;
  12. Gostei
    Soaresdk deu reputação a Natanael Beckman em DEV C++ Compilando TFS no Windows   
    DEV C++,  aprenda a compila uma source TFS!
     
    Downloads(Baixe de acordo as configurações do seu windows):
    DEV C++ CONFIGURADO PARA 32BITS
    DEV C++ CONFIGURADO PARA 64BITS
    REV 3884 TFS 0.4
     
    Certo, feitos os downloads, extrai DEV C++ no Disco C e REV 3884 em Documentos.
    ======================================
    Abra o DEV C++:
    ======================================

    ======================================
    Abra a Source:
    ======================================

    ======================================
    Localize a pasta da Source e abra o arquivo TheForgottenServer.dev, Documentos> trunk.r3884> dev-cpp> TheForgottenServer.dev:
    ======================================

    =============================================================

    ======================================
    Aguarde carregar todos os arquivos:
    ======================================

    ======================================
    Vamos adicionar o parâmetro -D__CONSOLE__ no teclado digita ALT + P, clique em parameters e adicione o parâmetro... Feito? clique em OK:
    ======================================

    ======================================
    Vamos compilar Source, no teclado digite CTRL+F9 e aguarde finalizar o processo:
    ======================================

    ======================================
    Se der tudo certo em Log vai estar como mostra a imagem abaixo:
    ======================================

    ======================================
    Verifique na pasta Documentos> trunk.r3884> dev-cpp você vai encontrar o arquivo TheForgottenServer.exe e pronto meu parabéns você compilou!
    ======================================

    ===========================================
    Só isso galera tutorial rápido resumido e útil!
    Créditos Natanael Beckman!    
    ===========================================     
     
    Caso você adquira uma source com apenas os arquivos .cpp e .h e não sabe como compilar o projeto, abaixo vamos explicar:
    Na pasta onde está localizado os arquivos .cpp e .h crie uma pasta chamada dev-cpp, e dentro dela adicione uma imagem icone.
     

     
    Abra o DEV-C++, clique em  File> New> Project:
     

     
    Logo em seguida selecione Empty Project, em name terá o nome Project1 altere utilize o nome quer quiser, após isso clique em OK e em seguida selecione a pasta dev-cpp que criamos:
     

     
    Agora selecione a opção Win32GUI caso use source OTX ou TFS selecione Win32Console ao lado << Browse selecione a imagem do icone que está na pasta Dev-Cpp.
     

     
    No mesmo menu na aba Parameters em C++ compiler adicione os seguintes parâmetros:
    -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D__GROUND_CACHE__ -D__USE_SQLITE__ -D__USE_MYSQL__ -D__CONSOLE__ -D__WAR_SYSTEM__ E em Linker adicione as seguintes libs:
    -lboost_filesystem -lboost_thread -lboost_system -lboost_regex -lsqlite3 -lwsock32 -llua5.1 -lws2_32 -leay32 -lmysql -lxml2 -lgmp -lz -s   No mesmo Menu na aba Build Option escreva na segunda coluna horizontal escreva Obj e dê OK.     Na lateral terá o nome do seu projeto o meu no caso é The Forgotten Server, clique com o botão direito do mouse em cima do nome e clique na opção Add Project:      Selecione na pasta da sua source todos os arquivos .cpp e .h após isso salva o projeto e já pode compilar CTRL+F9:         OpenSSL 0.9.8   1º baixe http://devpaks.org/details.php?devpak=73 2° abra Dev-Cpp > Tools > Packager Manager > Install > Seleciona o arquivo baixado e instala, fecha abre e testa!
      Clica aqui \/
  13. Curtir
    Soaresdk deu reputação a Crypter em [RESOLVIDO] [Ajuda] jogador passa no pisso mas nao Ganho itens   
    local itemid = 12670 --(Nome Do Itens Que vai Ganha) local itemcount = 1 --(quantos itens jogado vai ganha) local msg_ongain = "Você Ganhou 1 Picareta." local msg_fail = "Desculpe, mas voce ja pegou a picareta" function onStepIn(cid, item, position, fromPosition)     if getPlayerStorageValue(cid, 97864) < 1 then -- Se a storage 97864 for menor que 1 ganha o item         doPlayerAddItem(cid, itemid, itemcount) -- Aqui enviamos o item ao player         doPlayerSendTextMessage(cid,25,msg_ongain) --Mensagem         setPlayerStorageValue(cid, 97864, 1) -- aqui damos a storage 1 para ele nao ganha mais o item     else     doPlayerSendTextMessage(cid,25,msg_fail) --Mensagem     doTeleportThing(cid, fromPosition)     doSendMagicEffect(getCreaturePos(cid), 1)     end end
  14. Curtir
    Soaresdk deu reputação a Wakon em [RESOLVIDO] [Ajuda] jogador passa no pisso mas nao Ganho itens   
    @Soaresdk, eu refiz pra você, mas o único problema do seu script é na storage:
    A condição para entregar o item é:
    if getPlayerStorageValue(cid, 97864) < 1 then -- se o valor da storage for menor que 1 então E sua linha de alterar storage, está alterando ela para 0, então sempre vai estar na condição de ganhar o item:
    setPlayerStorageValue(cid, 97864, 0) --CORRETO> setPlayerStorageValue(cid, 97864, 1) Script:
    local item = {12670, 1} function onStepIn(cid, item, position, fromPosition) if getPlayerStorageValue(cid, 97864) < 1 then doPlayerAddItem(cid, item[1], item[2]) doPlayerSendTextMessage(cid, 25, "Você encontrou ".. item[2] .." ".. getItemNameById(item[1]) ..".") setPlayerStorageValue(cid, 97864, 1) else doPlayerSendTextMessage(cid, 25, "Você já pegou esse item.") end return true end  
  15. Curtir
    Soaresdk deu reputação a Garou em Forge System   
    ADVANCED FORGE SYSTEM
    O SISTEMA DE CRIAÇÃO DE ITENS PARA SEU SERVIDOR
     
    Creio que muitos já conhecem o sistema de forja criado por mim, acontece que o código já estava um pouco obsoleto, então resolvi reescrever ele do 0.
    Simplesmente consiste em um sistema de criação de itens avançado que ressuscita um pouco do RPG perdido nos servidores de hoje em dia. O jogador poderá criar itens através de forja, agindo como um verdadeiro ferreiro medieval. Adiciona itens em cima de uma bigorna previamente colocada no mapa e com um martelo cria um item totalmente novo.
    CARACTERÍSTICAS DA VERSÃO FINAL:
    - Configuração intuitiva e fácil de compreender;
    - Mini-tutorial auxiliando criação de novas receitas;
    - Receitas podem conter até 250 itens diferentes com suas respectivas quantidades;
    - Sistema inteligente que identifica uma receita em qualquer ordem;
    - Código totalmente orientado a objetos;
    - Possibilidade de configurar diferentes requerimentos, diferentes skills, magic level e level
     
    Há dois modos de instalar o Advanced Forge System, o primeiro é seguir os passos deste tópico e o segundo e baixar pasta data/ anexada no tópico com os arquivos em seus respectivos diretórios, precisando apenas o registro das chaves nos arquivos XML.
    Escolha o modo que mais convém a você.
     
    Crie um arquivo em data/lib chamado forgesystem.lua e cole o conteúdo abaixo:
      --[[ ADVANCED FORGE SYSTEM FINAL Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- RecipeHandler = { itemtype = 0, items = {}, level = 1, maglevel = 0, skills = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0} } Forge = { type = nil, position = nil, magicEffect = CONST_ME_MAGIC_GREEN, messages = { class = MESSAGE_STATUS_DEFAULT, success = "You have successfully forged a %s.", needskill = "You don't have enough %s to create a %s.", needlevel = "You need level %s to create a %s.", needmaglevel = "You need magic level %s to create a %s." } } function RecipeHandler:new(itemtype, items, level, maglevel, skills) local obj = { itemtype = (itemtype or 0), items = (items or {}), level = (level or 1), maglevel = (maglevel or 0), skills = (skills or {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0}) } table.insert(Recipes, obj) return setmetatable(obj, {__index = self}) end function RecipeHandler:setItem(itemtype) self.itemtype = (itemtype or 0) end function RecipeHandler:setRecipe(...) self.items = {...} end function RecipeHandler:setRecipeItem(itemid, amount) table.insert(self.items, {itemid, amount}) end function RecipeHandler:setSkill(skillid, value) self.skills[skillid] = value end function RecipeHandler:setLevel(value) self.level = value end function RecipeHandler:setMagLevel(value) self.maglevel = value end function RecipeHandler:check(position) local match = false for n, item in ipairs(self.items) do local thing = getTileItemById(position, item[1]) if thing.uid > 0 and math.max(1, thing.type) >= item[2] then if n == #self.items then match = true end else break end end return match end function RecipeHandler:get(position) if self:check(position) == true then return setmetatable({type = self, position = position}, {__index = Forge}) end return false end function Forge:create(cid) if self.type.itemid == 0 then print("[FORGE SYSTEM - ERROR] ATTEMPT TO CREATE A RECIPE ITEMID 0") return end local status = true if(cid) then if getPlayerLevel(cid) < self.type.level then doPlayerSendTextMessage(cid, self.messages.class, self.messages.needlevel:format(self.type.level, getItemNameById(self.type.itemtype))) return end if getPlayerMagLevel(cid) < self.type.maglevel then doPlayerSendTextMessage(cid, self.messages.class, self.messages.needmaglevel:format(self.type.maglevel, getItemNameById(self.type.itemtype))) return end for skillid, value in pairs(self.type.skills) do if getPlayerSkillLevel(cid, skillid) < value then status = false doPlayerSendTextMessage(cid, self.messages.class, self.messages.needskill:format(SKILL_NAMES[skillid], getItemNameById(self.type.itemtype))) break end end end if status == true then for _, item in ipairs(self.type.items) do local thing = getTileItemById(self.position, item[1]) doRemoveItem(thing.uid, item[2]) end doSendMagicEffect(self.position, self.magicEffect) doPlayerSendTextMessage(cid, self.messages.class, self.messages.success:format(getItemNameById(self.type.itemtype))) doCreateItem(self.type.itemtype, self.position) end end dofile(getDataDir() .."/lib/recipes.lua") Crie um arquivo em data/lib chamado recipes.lua e adicione o conteúdo abaixo:
      ---------------------------------------- -----** TUTORIAL DE CONFIGURAÇÃO **----- ---------------------------------------- --[[ O 'ADVANCED FORGE SYSTEM' é muito fácil e intuitivo de configurar, você só precisa chamar a função RecipeHandler:new(...), sendo que você já configurar os atributos da receita nela ou usar outras funções para isso. Por exemplo, quero criar uma Magic Sword que precise de 100 Gold Nuggets. RecipeHandler:new(2400, {{2157, 100}}) Ou então Magic_Sword = RecipeHandler:new() Magic_Sword:setItem(2400) Magic_Sword:setRecipe({2157, 100}) Funções do Sistema: RecipeHandler:new(itemtype, items, level, maglevel, skills) --> Cria uma nova instância de forja. RecipeHandler:setItem(itemtype) --> Atribui um certo itemid como resultado da receita. RecipeHandler:setRecipe(recipe) --> Atribui uma receita. RecipeHandler:setRecipeItem(itemid, amount) --> Adiciona um itemid e sua quantidade a receita. RecipeHandler:setSkill(skillid, value) --> Atribui um valor necessário de uma certa skill para poder criar a receita. RecipeHandler:setLevel(value) --> Atribui o level necessário para criar uma receita. RecipeHandler:setMagLevel(value) --> Atribui o magic level necessário para criar uma receita. ]]-- --[[ Este é um exemplo de receita usando algumas funções. É uma Magic Sword (ITEMID: 2400) que precisa de 100 Gold Nuggets (ITEMID: 2157), além disso, o personagem que tentar forjar, precisa ter Level 100 e Sword Fighting 50. ]]-- Recipes = {} magicsword = RecipeHandler:new() magicsword:setItem(2400) magicsword:setRecipeItem(2157, 100) magicsword:setLevel(100) magicsword:setSkill(2, 50) Agora em data/actions/scripts, crie um arquivo chamado iron_hammer.lua e adicione o conteúdo abaixo:
      function onUse(cid, item, fromPosition, itemEx, toPosition) local recipe = nil for _, v in ipairs(Recipes) do recipe = v:get(toPosition) if(recipe ~= false) then break end end if(recipe) then recipe:create(cid) else doPlayerSendCancel(cid, "This is not a valid recipe.") end return true end E por fim em actions.xml, adicione a seguinte linha:
      <action itemid="4846" event="script" value="iron_hammer.lua"/> OPCIONAL - TALKACTION A talkaction abaixo mostra ao jogadoras receitas configuradas no servidor que ele pode fazer. Em data/talkactions/scripts, crie um arquivo chamado recipes.lua e adicione o conteúdo abaixo:
      function onSay(cid, words, param, channel) local ret = {} local msg = " ADVANCED FORGE SYSTEM\n" for _, recipe in ipairs(Recipes) do local skills = true for skillid, value in pairs(recipe.skills) do if getPlayerSkillLevel(cid, skillid) < value then skills = false break end end if skills == true then if getPlayerLevel(cid) >= recipe.level and getPlayerMagLevel(cid) >= recipe.maglevel then table.insert(ret, {recipe, true}) else table.insert(ret, {recipe, false}) end else table.insert(ret, {recipe, false}) end end for _, recipe in ipairs(ret) do msg = msg .."\nRecipe for ".. getItemNameById(recipe[1].itemtype) ..":\n\n" if recipe[2] == true then for _, item in ipairs(recipe[1].items) do msg = msg .."* ".. getItemNameById(item[1]) .." [".. math.min(item[2], math.max(0, getPlayerItemCount(cid, item[1]))) .."/".. item[2] .."]\n" end else msg = msg .."[LOCKED]\n" end end doShowTextDialog(cid, 2555, msg) return true end Em data/talkactions/talkactions.xml, adicione a linha:
      <talkaction words="/recipes" event="script" value="recipes.lua"/> Siga as instruções para configuração de novas receitas.
    Em breve vídeo de funcionamento
    Advanced Forge System.rar
  16. Curtir
    Soaresdk deu reputação a Garou em Perfect Upgrade System   
    Nome: Perfect Upgrade System
    Tipo: Biblioteca, Action, Sistema
    Autor: Oneshot
    Essa é a versão final do Perfect Refine System ou Perfect Upgrade System criado por mim.
    É um sistema construído em cima de funções em POO (orientação a objetos), o que o torna muito versátil, possibilitando a outros programadores/scripters criarem seus próprios sistemas com base na biblioteca.
    A função do sistema é simples. Não passa de um sistema de refino, presente em todos os servidores, onde você usa um item em um equipamento e este fica mais forte e ganha um nome caracterizando o nível de força - bem clichê - mas muito interessante.
    Meu sistema é um pouco diferente dos outros, pois possui algumas características exclusivas, listadas abaixo:
    O nível máximo configurável é praticamente ilimitado O sistema funciona com armas de combate corpo-a-corpo, bows e crossbows. O refino pode falhar, não acontecendo nada, regredindo o nível ou resetando ele. Há um sistema nativo de broadcasts, que são enviados quando um jogador consegue refinar um equipamento até um certo nível ou maior. As chances são configuradas manualmente e sua randomização é muito precisa. Há dois modos de instalar o sistema em seu servidor, o primeiro é baixar a pasta com os scripts necessários e apenas copiar as chaves nos arquivos XMLs ou então seguir o curto tutorial de instalação.
    Crie um arquivo chamado upgradesystem.lua na pasta data/lib e copie o conteúdo abaixo:
      --[[ PERFECT UPGRADE SYSTEM 2.0 Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- UpgradeHandler = { levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true}, [11] = {10, true, true}, [12] = {5, true, true} }, broadcast = 7, attributes = { ["attack"] = 2, ["defense"] = 1, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, {__index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end})) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() self.item.level = (tonumber(self:getItemName():match("%+(%d+)")) or 0) end function UpgradeHandler:refine(uid, item) if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end self:setItemName((self.item.level > 0 and self:getItemName():gsub("%+(%d+)", "+".. (self.item.level + 1)) or (self:getItemName() .." +1"))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if(self.levels[self.item.level][3] == true and (self:chance().erase * 100) > math.random(1, 10000)) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.erase:format(self.item.name)) self:setItemName(self.item.name) for key, value in pairs(self.attributes) do if self.item[key] > 0 then doItemSetAttribute(self.item.uid, key, self.item[key]) end end elseif(self.levels[self.item.level][2] == true and (self:chance().downgrade * 100) > math.random(1, 10000)) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.downgrade:format(self.item.name, (self.item.level - 1))) self:setItemName((self.item.level == 1 and self.item.name or self:getItemName():gsub("%+(%d+)", "+".. (self.item.level - 1)))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item[key] + value * (self.item.level - 1))) end end else doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.fail:format(self.item.name, (self.item.level + 1))) end return "fail" end end Crie um arquivo chamado upgrade.lua em data/actions/scripts e cole o conteúdo abaixo:
      function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(itemEx.uid) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end local obj = UpgradeHandler:new(itemEx) if(obj == false) then return doPlayerSendCancel(cid, UpgradeHandler.message.notupgradeable) end local status = obj:refine(cid, item) if status == "success" then --doSendAnimatedText(toPosition, "Success!", COLOR_GREEN) doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN) elseif status == "fail" then --doSendAnimatedText(toPosition, "Fail!", COLOR_RED) doSendMagicEffect(toPosition, CONST_ME_POFF) else doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end No arquivo actions.xml, cole a seguinte linha:
      <action itemid="8306" event="script" value="upgrade.lua"/> Para adicionar mais níveis de refino no sistema, edite a seguinte tabela:
      levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true} }, Por padrão, ela já está configurado como na maioria dos MMORPGs, 10 níveis de refino, com chances de sucesso, regressão e "quebra". Mas se você quiser, por exemplo, adicionar mais dois níveis, siga o modelo, sempre colocando uma vírgula no final com exceção da última linha da tabela:
      levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true}, [11] = {10, true, true}, [12] = {5, true, true} }, O primeiro valor é chance de sucesso, o segundo se o item pode regredir na tentativa e o terceiro é se o item para "quebrar" (perder todo o nível de refino). Para criar novas ferramentas (itens) de refinar, configure a tabela abaixo:
      tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, Seguindo o mesmo esquema da tabela anterior, vírgulas em todas as linhas com exceção da última, seguindo o modelo abaixo. Por exemplo, uma ferramenta de ID 8303 que refine do level +6 ao +10, que dê 10% de chance bônus e que seja finita, eu faço assim:
      tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8310] = {range = {6, 10}, info = {chance = 10, removeable = true}} }, Em breve vídeo de demonstração com sistema em funcionamento.
    Perfect Upgrade System.rar
  17. Gostei
    Soaresdk deu reputação a Darcio Antonio em Sistema de mineração   
    Explicação

    1293 -- ID do item que é muito facil de ser minerado

    5944 -- ID do item que é facil de ser minerado

    6536 -- ID do item que é mais ou menos facil de ser minerado

    2145 -- ID do item que é dificil de ser minerado

    2154 -- ID do item que é muito dificil de ser minerado

    10 -- Chance que a pick irá quebrar

    200 -- Aqui é a chance de não minerar nada (coloque um numero, quanoo maior o numero, mais chance de não minerar nada, coloque apenas numeros acima de 103, por exemplo: 104,105,...115,...230,... etc)

    Agora vá até data/action/ e abra o arquivo actions.xml e adicione isso:



    1356 -- Aqui é o ID da pedra que será minerada (Aonde você dara use para minerar)

    mineracao.lua -- aqui é o nome do arquivo que nós criamos


    ~~º Bonus º~


    Você não tem aonde guardar a sua Pick? Seus problemas acabaram, chego a Magic Bag, basta apenas falar okos e sua pick vai para um compartimento magico, agora você quer tira ela de lá, simples fale dokos e pronto ela ja esta com você, simples não? Só tem uma coisa, você presisa ter no minimo 300 de mana e quando você guarda você gasta metade da mana que você tem, e quando você tira você gasta toda a sua mana... Vamos lá

    Abra apasta do seu OT e va até data/talckactions/scripts, copie qualquer arquivo de la e renomei para minera.lua, abra o arquivo e apague tudo que estiver la dentro e cole isso:




    300 -- Aqui é a quantidade de mana que ele tera que ter

    Agora va até data/talkactions/, abra o arquivo talkactions.xml e adicione isso:




    minera.lua -- nome do arquivo que nós criamos


    O tutorial fica por aqui, espero que tenham gostado, postem duvidas sugestões ou criticas construtivas.

    Creditos: D@rK

    Espero que gostem...

    Atenciosamente,
     
     

Informação Importante

Confirmação de Termo