Ir para conteúdo

Linus

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Linus recebeu reputação de lucianoribeiroacc em (Resolvido)[PEDIDO] Bau com Itens de cada Vocaçao   
    Pronto :
    local cfg = { kina= {2421, idsword}, pala = 2421, sorc = 2421, drui = 2421, } function onUse(cid, item) if getPlayerStorageValue(cid, 38493) ~= 1 then if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then doPlayerAddItem(cid, cfg.kina[1], 1) doPlayerAddItem(cid, cfg.kina[2], 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then doPlayerAddItem(cid, cfg.sorc, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then doPlayerAddItem(cid, cfg.drui, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then doPlayerAddItem(cid, cfg.pala, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) end else doPlayerSendCancel(cid, "It's empty.") end return true end
  2. Gostei
    Linus recebeu reputação de Beckertt em [TFS 1.X] Ninja Vocation Spells   
    Tag spells.XML(configure a gosto, use o mesmo para todos os scripts acima) :
    <instant name="NAME" words="NAME" lvl="1" mana="1" prem="0" aggressive="1" selftarget="0" exhaustion="1" group="attack" groupcooldown="1" needlearn="0" script="ARQUIVO.lua"> <vocation name="VOCATION NAME"/> </instant>  Para adicionar a spell, só ir em data/spells/scripts criar um arquivo .lua para o script e adicionálo e dps ir em spells.XML colocando a tag, configurada de acordo com a spell em questão.
     
     
     
     
    Créditos Printer.
     
     
     
  3. Gostei
    Linus recebeu reputação de Shadow.Styller em [TFS 1.X] Chuva de items   
    Ah duas versões do script, em globalevent ou talkaction use a que preferir.
     
     
    -- GLOBALEVENT --
     
     
    globalevents.xml :
    <globalevent type="startup" name="RainItems" script="rainitems.lua"/> rainitems.lua
    local config = { items = {{8306,1}, {2157,2}, {7735,1}, {8306,1}, {2184,1}, {9932,1}, {8306,1}, {9693,1}, {2148, 100}}, interval = 1000, -- time between checks areas = { [1] = { startHour = 19, startMin = 15, waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1021, y = 994, z = 7}, to = {x = 1024, y = 998, z = 7} }, [2] = { startHour = 18, startMin = 43, waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1026, y = 995, z = 7}, to = {x = 1028, y = 1001, z = 7} } } } local executed = {} function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Rain item event begins!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function checkRain() local hour = tonumber(os.date("%H")) local min = tonumber(os.date("%M")) if not executed[hour] then executed[hour] = {} end for i = 1, #config.areas do if hour == config.areas[i].startHour and min == config.areas[i].startMin then if not executed[hour][min] then startRain(i) addEvent(checkRain, config.interval) executed[hour][min] = true end end if tonumber(os.date("%H", os.time() + (30 * 60))) == config.areas[i].startHour and tonumber(os.date("%M", os.time() + (30 * 60))) == config.areas[i].startMin then if not executed[hour][min] then broadcastMessage("Rain items event will start in 30 minutes.") addEvent(checkRain, config.interval) executed[hour][min] = true end end if tonumber(os.date("%H", os.time() + (1 * 60))) == config.areas[i].startHour and tonumber(os.date("%M", os.time() + (1 * 60))) == config.areas[i].startMin then if not executed[hour][min] then broadcastMessage("Rain items event will start in 1 minute.") addEvent(checkRain, config.interval) executed[hour][min] = true end end end addEvent(checkRain, config.interval) end function onStartup() addEvent(checkRain, 100) end -- TALKACTION --
     
     
    talkactions.xml
    <talkaction words="/rainitems" separator=" " script="rainitems_command.lua"/> rainitems_command.lua
    local config = { items = {{8306,1}, {2157,2}, {7735,1}, {8306,1}, {2184,1}, {9932,1}, {8306,1}, {9693,1}, {2148, 100}}, interval = 1000, -- time between checks areas = { [1] = { waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1021, y = 994, z = 7}, to = {x = 1024, y = 998, z = 7} }, [2] = { waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1026, y = 995, z = 7}, to = {x = 1028, y = 1001, z = 7} } } } function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Rain item event begins!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function onSay(player, words, param) if not player:getGroup():getAccess() then return false end if tonumber(param) then startRain(tonumber(param)) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, words .. " eventid") end return false end Créditos zbisu.
  4. Gostei
    Linus recebeu reputação de luanluciano93 em [TFS 1.x] Sistema de reset   
    Você  pode configurar se quer que o preço aumente a cada reset, se quer que o level pra resetar aumente e se vc quer que a vida resete junto (e quanto % da vida atual será a vida após resetar).
     
     
    Testado em tfs 1.1, Versão 10.77
     
     
     
     
    Vá em data/npc/lib/ crie npc_resets.lua :
     



     
    Você pode editar mexendo aqui. no script acima :
    config = { minlevel = 150, --- Level inical para resetar price = 10000, --- Preço inicial para resetar newlevel = 20, --- Level após reset priceByReset = 0, --- Preço acrescentado por reset percent = 30, ---- Porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 50, ---- Maximo de resets levelbyreset = 0 --- Quanto de level vai precisar a mais no próximo reset } agora em data/npc/ crie reseter.XML :
     



     
     
     
    Agora em data/npc/scripts crie reseter.lua :
     



     
     
     
    Img : 
     

  5. Gostei
    Linus recebeu reputação de arthur122222 em (Resolvido)[PEDIDO] Comando de mute para tutor   
    mute.lua :
    function onSay(cid, words, param) local CHANNEL_HELP = 7 local player = Player(cid) local storage = 456112 if words == "/mute" then local mute = param:split(",") if mute[1] == nil or mute[1] == " " then player:sendCancelMessage("Invalid player specified.") return false end if mute[2] == nil or mute[2] == " " then player:sendCancelMessage("Invalid time specified.") return false end local target = Player(mute[1]) local time = tonumber(mute[2]) local condition = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) condition:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() >= ACCOUNT_TYPE_TUTOR then player:sendCancelMessage("Only player can be mutated") return false end target:addCondition(condition) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") target:setStorageValue(storage, 1) return false end if words == "/unmute" then local remove = Player(param) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if remove == nil then player:sendCancelMessage("A player with that name is not online.") return false end if remove:getAccountType() >= ACCOUNT_TYPE_TUTOR then return false end if remove:getStorageValue(storage) == 1 then remove:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, remove:getName() .. " has been unmuted by " .. player:getName() .. ".") remove:setStorageValue(storage, -1) else player:sendCancelMessage("A player " .. remove:getName() .. "is not mutated") end end return false end
  6. Gostei
    Linus recebeu reputação de ZwhiteDog em (Resolvido)AJuda Entende a Formula   
    Eu tb achei curioso a sua pergunta ai dei uma rápida pesquisada e encontre isso, eu entendi + ou - a lógica de como é calculada o dano.
     
    ________________________________________________________________________________________________________________________
     
     
     
    Quanto ao COMBAT_FORMULA, tem nas sources a formula dele, em combat.cpp
    Ai no script e mais ou menos assim:
     
    setCombatFormula(combat, COMBAT_FORMULA_XXX, mina, minb, maxa,maxb) Esses valores são aplicados na formula da source, a formula do que eu tenho aqui e assim:
     
    min = (int32_t)((player->getLevel() / minl + player->getMagicLevel() * minm) * 1. * mina + minb); max = (int32_t)((player->getLevel() / maxl + player->getMagicLevel() * maxm) * 1. * maxa + maxb); Provavelmente depois de ter os dois damages min e max definidos, deve ser feito um random entre eles pra gerar um final e pode ainda e provavelmente tem mais coisas que influenciam no damage.
     
     
    Obs.: Não me pergunte o que é minl,maxl,minm,maxm, não sei lhe dizer.
     
     
    créditos : dalvorsn
  7. Gostei
    Linus recebeu reputação de ZwhiteDog em (Resolvido)AJuda Entende a Formula   
    Eu tava fazendo umas contas meio louca aqui supondo alguma valores e por fim acabou bugando mais minha mente ainda HUAHSUAH :
    [Formula dano Minimo] minl = 75 / 50 = 1,5 minm = 30 * 50 = 1500 450 + 1,5 = 1501,5 minA = -0.0 minB = -10 (1501,5) * 1 * minA + minB = (1501,5) * 1 * -0.0 + -10 = [- 15015] -- Dano -- Dano Minimo 4515 [Formula dano Máximo] maxl = 75 / 70 = 1,05 -- Arredondei pra não ficar numero quebrado maxm = 30 * 70 = 2100 1,05 + 2100 = 2101,05 maxA = -0.0 maxB = -10 (2101,05) * 1 * maxA + maxB = (2101,05) * 1 * -0.0 + -10 = [- 21010,5] -- Dano -- Dano máximo 21010 Então o dano da primeira magia supondo alguns valores que não tem como saber iria varia de no min (15015) a no max (21010). _____________________________________________________________________________________ Agora o segundo : [Formula dano Minimo] minl = 100 / 50 = 2 minm = 30 * 50 = 1500 1500 + 2 = 1502 minA = -0.0 minB = -37 (1502) * 1 * minA + minB = (1502) * 1 * -0.0 + -37 = [-55574] -- Dano what
  8. Negativo
    Linus recebeu reputação de luanluciano93 em Procura-se Scripter Avançado!   
    Nome : Messi
     
    Idade : 8 anos
     
    Contato : [email protected]
     
    Honorários : não conheço essa pessoa
     
    A quantos anos meche com otservs ? a 5 minutos atras.
  9. Negativo
    Linus recebeu reputação de Snowsz em Procura-se Scripter Avançado!   
    Nome : Messi
     
    Idade : 8 anos
     
    Contato : [email protected]
     
    Honorários : não conheço essa pessoa
     
    A quantos anos meche com otservs ? a 5 minutos atras.
  10. Gostei
    Linus recebeu reputação de 1027929 em Procura-se Scripter Avançado!   
    Nome : Messi
     
    Idade : 8 anos
     
    Contato : [email protected]
     
    Honorários : não conheço essa pessoa
     
    A quantos anos meche com otservs ? a 5 minutos atras.
  11. Gostei
    Linus deu reputação a Fir3element em (Resolvido)[PEDIDO] Hp / Mp por porcentagem %%   
    Troca toda a função AddPlayerStats por essa:

    void ProtocolGame::AddPlayerStats(NetworkMessage_ptr msg) {     msg->AddByte(0xA0);     if (player->getPlayerInfo(PLAYERINFO_MAXHEALTH) > 0)     {         msg->AddU16(uint16_t(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH)));         msg->AddU16(100);     }     else     {         msg->AddU16(0);         msg->AddU16(0);       }     msg->AddU32(uint32_t(player->getFreeCapacity() * 100));     uint64_t experience = player->getExperience();     if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp         msg->AddU32(0x7FFFFFFF);     else         msg->AddU32(experience);     msg->AddU16(player->getPlayerInfo(PLAYERINFO_LEVEL));     msg->AddByte(player->getPlayerInfo(PLAYERINFO_LEVELPERCENT));     if (player->getPlayerInfo(PLAYERINFO_MAXMANA) > 0)     {         msg->AddU16(player->getPlayerInfo(PLAYERINFO_MANA) * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA));         msg->AddU16(100);     }     else     {         msg->AddU16(0);         msg->AddU16(0);     }     msg->AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVEL));     msg->AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT));     msg->AddByte(player->getPlayerInfo(PLAYERINFO_SOUL));     msg->AddU16(player->getStaminaMinutes()); }
  12. Gostei
    Linus deu reputação a Fir3element em [TFS 1.0] !buyaddon "addon   
    Corrige a tag:

    <talkaction words="!buyaddon" separator=" " script="buyaddon.lua"/>
  13. Gostei
    Linus recebeu reputação de luanluciano93 em [TFS 1.1] Skill Point System   
    O sistema é simples ao upar cada level você ganha x pontos de habilidade, onde é possível com esse pontos, comprar mana, hp, skill, etc ...
     
     
    /creaturescripts/scripts/skillpoints.lua
     



    /creaturescripts/scripts/login.lua
    player:registerEvent("SkillPointSystem") /talkactions/scripts/skillpoints.lua
    <event type="modalwindow" name="PointWindow" script="skillpoints.lua"/> <event type="advance" name="SkillPointSystem" script="skillpoints.lua"/> /talkactions/scripts/skillpoints.lua
    function onSay(player, words, param) local SKILL_POINTS = 45200 local Point = ModalWindow(1, "Skill Points", "You have skill " ..player:getStorageValue(SKILL_POINTS).. " points make your choice:\n\n Skill Required Points Increase Amount") Point:addChoice(1, "1. Health 1 2") Point:addChoice(2, "2. Mana") Point:addChoice(3, "3. Magic Level") Point:addChoice(4, "4. Sword") Point:addChoice(5, "5. Axe") Point:addChoice(6, "6. Club") Point:addChoice(7, "7. Shielding") Point:addChoice(8, "8. Distance") Point:addButton(1, 'Gain 1') Point:addButton(2, 'Gain 2') Point:addButton(3, 'Gain 5') Point:addButton(4, 'Cancel') player:registerEvent("PointWindow") Point:sendToPlayer(player) return false end /talkactions/talkactions.xml
    <talkaction words="!points" separator=" " script="skillpoints.lua"/> Créditos : zbisu, codinabacl, ninja, MadMook
  14. Gostei
    Linus recebeu reputação de Snowsz em [TFS 1.1] Skill Point System   
    O sistema é simples ao upar cada level você ganha x pontos de habilidade, onde é possível com esse pontos, comprar mana, hp, skill, etc ...
     
     
    /creaturescripts/scripts/skillpoints.lua
     



    /creaturescripts/scripts/login.lua
    player:registerEvent("SkillPointSystem") /talkactions/scripts/skillpoints.lua
    <event type="modalwindow" name="PointWindow" script="skillpoints.lua"/> <event type="advance" name="SkillPointSystem" script="skillpoints.lua"/> /talkactions/scripts/skillpoints.lua
    function onSay(player, words, param) local SKILL_POINTS = 45200 local Point = ModalWindow(1, "Skill Points", "You have skill " ..player:getStorageValue(SKILL_POINTS).. " points make your choice:\n\n Skill Required Points Increase Amount") Point:addChoice(1, "1. Health 1 2") Point:addChoice(2, "2. Mana") Point:addChoice(3, "3. Magic Level") Point:addChoice(4, "4. Sword") Point:addChoice(5, "5. Axe") Point:addChoice(6, "6. Club") Point:addChoice(7, "7. Shielding") Point:addChoice(8, "8. Distance") Point:addButton(1, 'Gain 1') Point:addButton(2, 'Gain 2') Point:addButton(3, 'Gain 5') Point:addButton(4, 'Cancel') player:registerEvent("PointWindow") Point:sendToPlayer(player) return false end /talkactions/talkactions.xml
    <talkaction words="!points" separator=" " script="skillpoints.lua"/> Créditos : zbisu, codinabacl, ninja, MadMook
  15. Gostei
    Linus recebeu reputação de Fir3element em /commands para TFS 1.1   
    function onSay(cid, words, param) Não precisa colocar cid na callback, e dps definir player como cid, pode ir direto colocando na callback player e chamar sem definir. (TFS 1.1)
    function onSay(player, words, param) abrçs
  16. Gostei
    Linus deu reputação a Snowsz em /commands para TFS 1.1   
    Bom, eu estou começando a usar o TFS 1.1 e percebi que, ele não contém o comando /commands, que me ajuda bastante, então, resolvi criá-lo, como no TFS 1.1, não é definido "tutor, gm, god" pelo talkactions.xml e sim em todos os arquivos Lua, esse comando vai mostrar tudo para qualquer grupo de acesso:

    Em talkactions.xml adicione:

     
    <talkaction words="/commands" script="commands.lua" /> Em talkactions/scripts crie um arquivo chamado commands.lua e adicione:

     
    function onSay(cid, words, param) local p = Player(cid) local file = io.open("data/talkactions/talkactions.xml", "r+") local str = "" local text = "" for line in (file:lines()) do str = str.."\n"..line end file:close() for a in string.gmatch(str, '<talkaction words="(.-)"') do text = text..'\n'..a end p:showTextDialog(2160, text) return true end Agora é só usar
     
    Print: ↓↓↓

  17. Gostei
    Linus recebeu reputação de zicsoft em (Resolvido)[PEDIDO] Comando de mute para tutor   
    function onSay(cid, words, param) local player = Player(cid) local m = string.explode(param, ",") local target = Player(m[1]) local time = tonumber(m[2]) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if time == nil then player:sendCancelMessage("Invalid param specified.") return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You can only mutate a normal player.") return false end if time == 0 and time >= 360 then player:sendCancelMessage("you can only mute for a maximum of 360 minutes") return false end local condition = Condition(CONDITION_MUTED) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) target:doaddCondition(condition) target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been muted by " .. player:getName() .. " , to "..time.. " minutes.") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You muted " .. target:getName() .." to "..time.." minutes.") end <talkaction words="/mute" separator=" " script="ARQUIVO.lua" />
  18. Gostei
    Linus deu reputação a leoepccc em Limitar Items iguais na BAG.   
    Cara me passa o Brasilisot Custom ADoro aqulee ot Ou POem Online ai!
  19. Gostei
    Linus deu reputação a Bruno Minervino em Multisites com XAMPP   
    1. Abra o arquivo 'httpd.conf' em 'C:\xampp\apache\conf' em
    Altere:
    # Virtual hosts #Include "conf/extra/httpd-vhosts.conf" Para:
    # Virtual hosts Include "conf/extra/httpd-vhosts.conf" apenas remova o '#' do começo da linha
     
    2. Agora abra o arquivo 'httpd-vhosts.conf' em 'C:\xampp\apache\conf\extra' e adicione as seguintes linhas:
    <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs" ServerName localhost ServerAlias www.localhost ErrorLog "logs/host.localhost-error.log" CustomLog "logs/host.localhost-access.log" combined </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/drupal" ServerName siteum.localhost ServerAlias www.siteum.localhost ErrorLog "logs/siteum.localhost-error.log" CustomLog "logs/siteum.localhost-access.log" combined </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/drupal" ServerName sitedois.localhost ServerAlias www.sitedois.localhost ErrorLog "logs/sitedois.localhost-error.log" CustomLog "logs/sitedois.localhost-access.log" combined </VirtualHost> 3. Reinicie todos os serviços
     
    4. Agora em 'WINDOWS\system32\drivers\etc\hosts' adicione as seguintes linhas:
    127.0.0.1 siteum.localhost 127.0.0.1 sitedois.localhost 127.0.0.1 www.sitedois.localhost 127.0.0.1 www.sitedois.localhost 5. Agora faça o download do 'Drupal 7 (recomendado)' e crie um diretório chamado 'drupal' em 'C:\xampp\htdocs\' e coloque todo o conteúdo do download do Drupal 7 (incluindo a estrutura da pasta e seu conteúdo) neste novo diretório.
    Você pode encontrar, por exemplo, o arquivo 'C:\xampp\htdocs\drupal\sites\default\default.settings.php', que é o site 'default' criado pelo drupal.

    6. Crie os diretórios de seus sites:
    a.) siteum.localhost
    e
    b.) sitedois.localhost
    em 'C:\xampp\htdocs\drupal\sites\'

    7. Crie duas databases para seus dois sites do Drupal (com os nomes siteum e sitedois por exemplo)
    usando http://127.0.0.1/phpmyadmin/

    8. Abra as Urls
    a.) http://siteum.localhost/
    e
    b.) http://sitedois.localhost/
    e siga com o processo de instalação do Drupal.

    9. Agora a instalação está feita, seus sites são:
    a.) http://siteum.localhost/
    e
    b.) http://sitedois.localhost/

    Espero que gostem!
  20. Gostei
    Linus recebeu reputação de JonatasLucasf em [TFS 1.1] Monster Arena   
    Descrição : Você precisa de 2 pessoas para este mini-game. Você se posiciona sobre os azulejos e puxa a alavanca. Dentro da arena cada jogador irá receber um montro invocado, que irá, em seguida, atacar o inimigo e o monstro. O jogador mata o outro monstro ganha e será recompensada.
     
    Map:
    Mediafire: http://www.mediafire.com/download/qnnqj1rmilmrd5a/monsterarena.otbm

     
     
    actions.xml
    <action actionid="1500" script="monsterarena.lua"/> actions/scripts/monsterarena.lua
    MonsterArena = { fromPosition = { Position(1022, 1030, 7), Position(1024, 1030, 7) }, toPosition = { Position(1020, 1021, 7), Position(1022, 1021, 7) }, spawnPosition = { Position(1020, 1022, 7), Position(1022, 1020, 7) }, area = { from = Position(1015, 1016, 7), to = Position(1027, 1026, 7) }, exitPosition = Position(1022, 1028, 7), reward = {itemId = 2160, count = 10}, blockItemId = 3402, -- Only convincable / summonable monsters -- You can create custom monsters which are stronger and convincable monsters = {'Troll', 'Rat', 'Tortoise', 'Orc Berserker', 'Minotaur'}, event = 'MonsterArenaDeath', players = {} } function MonsterArena.hasPlayer(player) local position = player:getPosition() return position.x >= MonsterArena.area.from.x and position.y >= MonsterArena.area.from.y and position.x <= MonsterArena.area.to.x and position.y <= MonsterArena.area.to.y and position.z == MonsterArena.area.from.z end function MonsterArena.isOccupied() for _, pid in ipairs(MonsterArena.players) do local player = Player(pid) if player and MonsterArena.hasPlayer(player) then return true end end return false end function MonsterArena.clean() for i = 1, #MonsterArena.players do MonsterArena.players[i] = nil end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid ~= 1945 then item:transform(1946) return true end if MonsterArena.isOccupied() then player:sendCancelMessage('The monster arena is currently occupied.') return true end local players = {} for _, fromPosition in ipairs(MonsterArena.fromPosition) do local creature = Tile(fromPosition):getTopCreature() if not creature or not creature:isPlayer() then player:sendCancelMessage('You need another player for the monster arena.') return true end table.insert(players, creature) end MonsterArena.clean() local summons = {} for i, player in ipairs(players) do player:teleportTo(MonsterArena.toPosition[i]) MonsterArena.fromPosition[i]:sendMagicEffect(CONST_ME_POFF) MonsterArena.toPosition[i]:sendMagicEffect(CONST_ME_TELEPORT) local monsterName = MonsterArena.monsters[math.random(#MonsterArena.monsters)] local monster = Game.createMonster(monsterName, MonsterArena.spawnPosition[i], true) monster:setMaster(player) monster:registerEvent(MonsterArena.event) table.insert(summons, monster) Game.createItem(MonsterArena.blockItemId, 1, MonsterArena.spawnPosition[i]) player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('A %s is fighting for you this round!', monsterName)) table.insert(MonsterArena.players, player.uid) end players[1]:setTarget(summons[2]) players[2]:setTarget(summons[1]) item:transform(1945) return true end creaturescripts.xml
    <event type="death" name="MonsterArenaDeath" script="monsterarenadeath.lua"/> creaturescripts/scripts/monsterarenadeath.lua
    function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) local winnerPlayer = killer:getMaster() local loserPlayer = monster:getMaster() local reward = MonsterArena.reward if reward then winnerPlayer:sendTextMessage(MESSAGE_INFO_DESCR, 'Your monster won the fight and earned a reward for you!') winnerPlayer:addItem(reward.itemId, reward.count) else winnerPlayer:sendTextMessage(MESSAGE_INFO_DESCR, 'Your monster won the fight!') end loserPlayer:sendTextMessage(MESSAGE_INFO_DESCR, 'Your monster lost the fight!') winnerPlayer:teleportTo(MonsterArena.exitPosition) loserPlayer:teleportTo(MonsterArena.exitPosition) MonsterArena.exitPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) for _, position in ipairs(MonsterArena.spawnPosition) do local item = Tile(position):getItemById(MonsterArena.blockItemId) if item then item:remove() end end killer:remove() return true end Créditos : Summ
  21. Gostei
    Linus recebeu reputação de gahgah em (Resolvido)[PEDIDO] Bau com Itens de cada Vocaçao   
    Pronto :
    local cfg = { kina= {2421, idsword}, pala = 2421, sorc = 2421, drui = 2421, } function onUse(cid, item) if getPlayerStorageValue(cid, 38493) ~= 1 then if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then doPlayerAddItem(cid, cfg.kina[1], 1) doPlayerAddItem(cid, cfg.kina[2], 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then doPlayerAddItem(cid, cfg.sorc, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then doPlayerAddItem(cid, cfg.drui, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) elseif getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then doPlayerAddItem(cid, cfg.pala, 1) doPlayerSendTextMessage(cid, 25, "Congratulations!!") doPlayerSetStorageValue(cid, 38493, 1) end else doPlayerSendCancel(cid, "It's empty.") end return true end
  22. Gostei
    Linus recebeu reputação de Wakon em [TFS 1.1] Monster Arena   
    Descrição : Você precisa de 2 pessoas para este mini-game. Você se posiciona sobre os azulejos e puxa a alavanca. Dentro da arena cada jogador irá receber um montro invocado, que irá, em seguida, atacar o inimigo e o monstro. O jogador mata o outro monstro ganha e será recompensada.
     
    Map:
    Mediafire: http://www.mediafire.com/download/qnnqj1rmilmrd5a/monsterarena.otbm

     
     
    actions.xml
    <action actionid="1500" script="monsterarena.lua"/> actions/scripts/monsterarena.lua
    MonsterArena = { fromPosition = { Position(1022, 1030, 7), Position(1024, 1030, 7) }, toPosition = { Position(1020, 1021, 7), Position(1022, 1021, 7) }, spawnPosition = { Position(1020, 1022, 7), Position(1022, 1020, 7) }, area = { from = Position(1015, 1016, 7), to = Position(1027, 1026, 7) }, exitPosition = Position(1022, 1028, 7), reward = {itemId = 2160, count = 10}, blockItemId = 3402, -- Only convincable / summonable monsters -- You can create custom monsters which are stronger and convincable monsters = {'Troll', 'Rat', 'Tortoise', 'Orc Berserker', 'Minotaur'}, event = 'MonsterArenaDeath', players = {} } function MonsterArena.hasPlayer(player) local position = player:getPosition() return position.x >= MonsterArena.area.from.x and position.y >= MonsterArena.area.from.y and position.x <= MonsterArena.area.to.x and position.y <= MonsterArena.area.to.y and position.z == MonsterArena.area.from.z end function MonsterArena.isOccupied() for _, pid in ipairs(MonsterArena.players) do local player = Player(pid) if player and MonsterArena.hasPlayer(player) then return true end end return false end function MonsterArena.clean() for i = 1, #MonsterArena.players do MonsterArena.players[i] = nil end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid ~= 1945 then item:transform(1946) return true end if MonsterArena.isOccupied() then player:sendCancelMessage('The monster arena is currently occupied.') return true end local players = {} for _, fromPosition in ipairs(MonsterArena.fromPosition) do local creature = Tile(fromPosition):getTopCreature() if not creature or not creature:isPlayer() then player:sendCancelMessage('You need another player for the monster arena.') return true end table.insert(players, creature) end MonsterArena.clean() local summons = {} for i, player in ipairs(players) do player:teleportTo(MonsterArena.toPosition[i]) MonsterArena.fromPosition[i]:sendMagicEffect(CONST_ME_POFF) MonsterArena.toPosition[i]:sendMagicEffect(CONST_ME_TELEPORT) local monsterName = MonsterArena.monsters[math.random(#MonsterArena.monsters)] local monster = Game.createMonster(monsterName, MonsterArena.spawnPosition[i], true) monster:setMaster(player) monster:registerEvent(MonsterArena.event) table.insert(summons, monster) Game.createItem(MonsterArena.blockItemId, 1, MonsterArena.spawnPosition[i]) player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('A %s is fighting for you this round!', monsterName)) table.insert(MonsterArena.players, player.uid) end players[1]:setTarget(summons[2]) players[2]:setTarget(summons[1]) item:transform(1945) return true end creaturescripts.xml
    <event type="death" name="MonsterArenaDeath" script="monsterarenadeath.lua"/> creaturescripts/scripts/monsterarenadeath.lua
    function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) local winnerPlayer = killer:getMaster() local loserPlayer = monster:getMaster() local reward = MonsterArena.reward if reward then winnerPlayer:sendTextMessage(MESSAGE_INFO_DESCR, 'Your monster won the fight and earned a reward for you!') winnerPlayer:addItem(reward.itemId, reward.count) else winnerPlayer:sendTextMessage(MESSAGE_INFO_DESCR, 'Your monster won the fight!') end loserPlayer:sendTextMessage(MESSAGE_INFO_DESCR, 'Your monster lost the fight!') winnerPlayer:teleportTo(MonsterArena.exitPosition) loserPlayer:teleportTo(MonsterArena.exitPosition) MonsterArena.exitPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) for _, position in ipairs(MonsterArena.spawnPosition) do local item = Tile(position):getItemById(MonsterArena.blockItemId) if item then item:remove() end end killer:remove() return true end Créditos : Summ
  23. Gostei
    Linus recebeu reputação de Ceos em [TFS 1.X] Chuva de items   
    Ah duas versões do script, em globalevent ou talkaction use a que preferir.
     
     
    -- GLOBALEVENT --
     
     
    globalevents.xml :
    <globalevent type="startup" name="RainItems" script="rainitems.lua"/> rainitems.lua
    local config = { items = {{8306,1}, {2157,2}, {7735,1}, {8306,1}, {2184,1}, {9932,1}, {8306,1}, {9693,1}, {2148, 100}}, interval = 1000, -- time between checks areas = { [1] = { startHour = 19, startMin = 15, waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1021, y = 994, z = 7}, to = {x = 1024, y = 998, z = 7} }, [2] = { startHour = 18, startMin = 43, waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1026, y = 995, z = 7}, to = {x = 1028, y = 1001, z = 7} } } } local executed = {} function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Rain item event begins!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function checkRain() local hour = tonumber(os.date("%H")) local min = tonumber(os.date("%M")) if not executed[hour] then executed[hour] = {} end for i = 1, #config.areas do if hour == config.areas[i].startHour and min == config.areas[i].startMin then if not executed[hour][min] then startRain(i) addEvent(checkRain, config.interval) executed[hour][min] = true end end if tonumber(os.date("%H", os.time() + (30 * 60))) == config.areas[i].startHour and tonumber(os.date("%M", os.time() + (30 * 60))) == config.areas[i].startMin then if not executed[hour][min] then broadcastMessage("Rain items event will start in 30 minutes.") addEvent(checkRain, config.interval) executed[hour][min] = true end end if tonumber(os.date("%H", os.time() + (1 * 60))) == config.areas[i].startHour and tonumber(os.date("%M", os.time() + (1 * 60))) == config.areas[i].startMin then if not executed[hour][min] then broadcastMessage("Rain items event will start in 1 minute.") addEvent(checkRain, config.interval) executed[hour][min] = true end end end addEvent(checkRain, config.interval) end function onStartup() addEvent(checkRain, 100) end -- TALKACTION --
     
     
    talkactions.xml
    <talkaction words="/rainitems" separator=" " script="rainitems_command.lua"/> rainitems_command.lua
    local config = { items = {{8306,1}, {2157,2}, {7735,1}, {8306,1}, {2184,1}, {9932,1}, {8306,1}, {9693,1}, {2148, 100}}, interval = 1000, -- time between checks areas = { [1] = { waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1021, y = 994, z = 7}, to = {x = 1024, y = 998, z = 7} }, [2] = { waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1026, y = 995, z = 7}, to = {x = 1028, y = 1001, z = 7} } } } function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Rain item event begins!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function onSay(player, words, param) if not player:getGroup():getAccess() then return false end if tonumber(param) then startRain(tonumber(param)) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, words .. " eventid") end return false end Créditos zbisu.
  24. Gostei
    Linus recebeu reputação de Wakon em [TFS 1.X] Chuva de items   
    Ah duas versões do script, em globalevent ou talkaction use a que preferir.
     
     
    -- GLOBALEVENT --
     
     
    globalevents.xml :
    <globalevent type="startup" name="RainItems" script="rainitems.lua"/> rainitems.lua
    local config = { items = {{8306,1}, {2157,2}, {7735,1}, {8306,1}, {2184,1}, {9932,1}, {8306,1}, {9693,1}, {2148, 100}}, interval = 1000, -- time between checks areas = { [1] = { startHour = 19, startMin = 15, waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1021, y = 994, z = 7}, to = {x = 1024, y = 998, z = 7} }, [2] = { startHour = 18, startMin = 43, waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1026, y = 995, z = 7}, to = {x = 1028, y = 1001, z = 7} } } } local executed = {} function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Rain item event begins!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function checkRain() local hour = tonumber(os.date("%H")) local min = tonumber(os.date("%M")) if not executed[hour] then executed[hour] = {} end for i = 1, #config.areas do if hour == config.areas[i].startHour and min == config.areas[i].startMin then if not executed[hour][min] then startRain(i) addEvent(checkRain, config.interval) executed[hour][min] = true end end if tonumber(os.date("%H", os.time() + (30 * 60))) == config.areas[i].startHour and tonumber(os.date("%M", os.time() + (30 * 60))) == config.areas[i].startMin then if not executed[hour][min] then broadcastMessage("Rain items event will start in 30 minutes.") addEvent(checkRain, config.interval) executed[hour][min] = true end end if tonumber(os.date("%H", os.time() + (1 * 60))) == config.areas[i].startHour and tonumber(os.date("%M", os.time() + (1 * 60))) == config.areas[i].startMin then if not executed[hour][min] then broadcastMessage("Rain items event will start in 1 minute.") addEvent(checkRain, config.interval) executed[hour][min] = true end end end addEvent(checkRain, config.interval) end function onStartup() addEvent(checkRain, 100) end -- TALKACTION --
     
     
    talkactions.xml
    <talkaction words="/rainitems" separator=" " script="rainitems_command.lua"/> rainitems_command.lua
    local config = { items = {{8306,1}, {2157,2}, {7735,1}, {8306,1}, {2184,1}, {9932,1}, {8306,1}, {9693,1}, {2148, 100}}, interval = 1000, -- time between checks areas = { [1] = { waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1021, y = 994, z = 7}, to = {x = 1024, y = 998, z = 7} }, [2] = { waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1026, y = 995, z = 7}, to = {x = 1028, y = 1001, z = 7} } } } function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Rain item event begins!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function onSay(player, words, param) if not player:getGroup():getAccess() then return false end if tonumber(param) then startRain(tonumber(param)) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, words .. " eventid") end return false end Créditos zbisu.
  25. Gostei
    Linus recebeu reputação de Drazyn1291 em [TFS 1.X] Ninja Vocation Spells   
    Tag spells.XML(configure a gosto, use o mesmo para todos os scripts acima) :
    <instant name="NAME" words="NAME" lvl="1" mana="1" prem="0" aggressive="1" selftarget="0" exhaustion="1" group="attack" groupcooldown="1" needlearn="0" script="ARQUIVO.lua"> <vocation name="VOCATION NAME"/> </instant>  Para adicionar a spell, só ir em data/spells/scripts criar um arquivo .lua para o script e adicionálo e dps ir em spells.XML colocando a tag, configurada de acordo com a spell em questão.
     
     
     
     
    Créditos Printer.
     
     
     

Informação Importante

Confirmação de Termo