Ir para conteúdo
  • Cadastre-se

worthdavi

Membro
  • Total de itens

    12
  • Registro em

  • Última visita

Sobre worthdavi

  • Rank
    developer
  • Data de Nascimento 07/22/1999

Informação de Perfil

  • Localização
    Ceará
  • Eu sou
    Programmer
  • Meu personagem
    David
  • OTServ favorito
    Skelot

Últimos Visitantes

582 visualizações
  1. function onSay(player, words, param) if param == "" then player:sendCancelMessage("Invalid parameter.") return false elseif not tonumber(param) then player:sendCancelMessage("Invalid parameter. Parameter must be a number.") return false end local id = param local item = ItemType(id) if item then for _, c in pairs(Game.getPlayers()) do if c then c:addItem(id, 1) c:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You received a " .. ItemType(id):getName() .. ".") end end else player:sendCancelMessage("Item w
  2. Em talkactions.xml <talkaction words="/giveitem" separator=" " script="giveitem.lua" /> Em giveitem.lua function onSay(player, words, param) if not player:getGroup():getAccess() or player:getGroup():getId() < 6 then return true end if param == "" then player:sendCancelMessage("Invalid parameter.") return false elseif not tonumber(param) then player:sendCancelMessage("Invalid parameter. Parameter must be a number.") return false end local id = param local item = ItemType(id) if item then for _, c in pairs(Game.getPlayers(
  3. Qual script tu tá usando? E como tá o talkactions.xml? Acabei não entendo nada que vocês falaram. Me responde isso que resolvo seu problema.
  4. No seu storages.lua, na lib, é só adicionar: (vírgula no anterior), SvargrondArena = { Pit = 62728, },
  5. Em creaturescripts.xml: <event type="kill" name="killingPercht" script="nomedoarquivo.lua"/> Em data/creaturescripts/scripts/others/login.lua, na tabela local events, adicionar: 'killingPercht',
  6. local config = { addon_name = "Percht Raider", addon_male = 1162, addon_female = 1161 } function onKill(creature, target) local player = creature:getPlayer() if not player then return true end local targetMonster = target:getMonster() if not targetMonster then return true end if targetMonster:getName():lower() == 'the percht queen' then for pid, _ in pairs(targetMonster:getDamageMap()) do local attackerPlayer = Player(pid) if attackerPlayer:hasOutfit(config.addon_male) or attackerPlayer:hasOutfit(config.addon_female) then at
  7. Como você registra o script no próprio XML do monstro, então acho que não é preciso usar o nome dos mesmos no script. function onDeath(monster, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) Game.broadcastMessage("O jogador " .. killer:getName() .. " matou o monstro " .. monster:getName() .. "!") return true end Essa função simplesmente já faz o trabalho, já que os monstros vão ser inseridos no script por meio do XML.
  8. O evento é feito por mim e usado em diversos servidores por aí afora. Consiste em uma guerra automática que divide todos os participantes em quatro times, sendo todos contra. Espero que gostem. Para bloquear a troca de outfit dentro do evento, em player.cpp, depois de: C++: if (outfit->premium && !isPremium()) { return false; } ... cole isso: C++: int32_t value; if (getStorageValue(81723, value)){ sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot change your outfit ins
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo