Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''conde2''.



Mais opções de pesquisa

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • A Cidade OTBR
    • OTServ Brasil
    • Atendimento
    • Taverna
  • Projetos Open Source
    • Canary
    • OTServBR-Global
    • Mehah OTClient
    • MyAAC
  • OpenTibia
    • Notícias e Discussões
    • Suporte - Dúvidas, Bugs, Erros
    • Downloads
    • Tutoriais
    • Show-Off
  • Outros
    • Design

Encontrado 2 registros

  1. Email System v1.3.9

    -- Name: E-mail System -- Version: 1.3.9 -- Credits: Conde2 -- Tested: TFS 0.3.4(5) Crying Damson _________________________ Sobre: Este é um simples sistema de e-mails, que te possibilita mandar mensagens para todos os players, ate os offiline. Necessário criar uma pasta chama "email" dentro da pasta DATA OBS: NECESSITA DA LIB EXHAUSTION DO TFS !! Comandos: Código: Agora vamos ao que interessa... Abra a pasta data/talkactions/script e adicione isso em um arquivo lua chamado email.lua. Dentro desse arquivo adicione esse Script: EMAIL_BLOCK = 6364 EMAIL_ANTI_SPAWN = 15 EMAIL_MIN_MENSSAGE = 10 EMAIL_MAX_MENSSAGE = 100 EMAIL_STORAGE_ANTI_SPAWN = 6365 function onSay(cid, words, param) if words == "!sendemail" then if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param. Please use: !sendemail name, menssage") return TRUE end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "No menssage specified.") return TRUE end if (getPlayerGUIDByName(t[1]) == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not exist.") return TRUE end if (string.len(t[2]) <= EMAIL_MIN_MENSSAGE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't send this menssage, because so short.") return TRUE end if (string.len(t[2]) > EMAIL_MAX_MENSSAGE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't send this menssage, because so long.") return TRUE end local id = getPlayerIdByName(""..t[1].."") if (getDataBaseStorage(id,EMAIL_BLOCK) == 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, the player: " .. t[1] .. " has been blocked yours menssages.") return TRUE end if exhaustion.check(cid, EMAIL_STORAGE_ANTI_SPAWN) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait a ".. exhaustion.get(cid, EMAIL_STORAGE_ANTI_SPAWN) .." secondes to send other email.") return TRUE end local directory = "data//email//".. t[1] ..".txt" if onFile("exist", directory) == FALSE then onFile("create", directory, "BY: ".. getCreatureName(cid) .." [" .. os.date("%d/%m/%Y %H:%M:%S") .. "] ".. t[2] .."\n") doPlayerSendTextMessage(cid, 22, "You have send to ".. t[1] .." this menssage: " .. t[2] .. ".") exhaustion.make(cid, EMAIL_STORAGE_ANTI_SPAWN, EMAIL_ANTI_SPAWN) else onFile("update", directory, "BY: ".. getCreatureName(cid) .." [" .. os.date("%d/%m/%Y %H:%M:%S") .. "] ".. t[2] .."") doPlayerSendTextMessage(cid, 22, "You have send to ".. t[1] .." this menssage: " .. t[2] .. "") exhaustion.make(cid, EMAIL_STORAGE_ANTI_SPAWN, EMAIL_ANTI_SPAWN) end local target = getPlayerByNameWildcard(""..t[1].."") if(target == 0) then target = getCreatureByName(""..t[1].."") if(target == 0) then return TRUE end end local tmp = getCreaturePosition(target) if (isOnline(""..t[1].."") == TRUE) then addEvent(doSendAnimatedText, 1, tmp, "Menssage!", TEXTCOLOR_PURPLE) addEvent(doSendAnimatedText, 1000, tmp, "Menssage!", TEXTCOLOR_PURPLE) addEvent(doSendAnimatedText, 2000, tmp, "Menssage!", TEXTCOLOR_PURPLE) doPlayerSendTextMessage(target, 19, " A new menssage arrived, look your email box. (!checkemail)!!") end elseif words == "!checkemail" then local name = getCreatureName(cid) local directory = "data//email//".. name ..".txt" if onFile("exist", directory) == FALSE or onFile("load", directory) == nil then doPlayerSendTextMessage(cid, 22, "Sorry you don't have any menssage.") else for line in io.lines(directory) do doShowTextDialog(cid,7528, "You have menssages: \n \n ".. line .." \n \n \n For look the next menssage click in the button: OK") end end elseif words == "!deleteemail" then local name = getCreatureName(cid) local directory = "data//email//".. name ..".txt" if onFile("exist", directory) == TRUE and onFile("load", directory) ~= nil then onFile("delete", directory) onFile("erase", directory) doPlayerSendTextMessage(cid, 22, "Sucessful!! You have deleted all yours menssages !!") else doPlayerSendTextMessage(cid, 22, "Sorry you don't have any menssage to delete.") end elseif words == "!blockemail" then setPlayerStorageValue(cid, EMAIL_BLOCK, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You has been bloked your e-mail. Please relog to make effect.") elseif words == "!unblockemail" then setPlayerStorageValue(cid, EMAIL_BLOCK, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You has been unbloked your e-mail. Please relog to make effect.") end end Agora vá em data/global.lua Ou em data/lib/data.lua e adicione isso na última linha: function isOnline(name) -- by mock local players = getOnlinePlayers() name = string.lower(name) for i, player in ipairs(players) do player = string.lower(player) if name == player then return TRUE end end return FALSE end function getDataBaseStorage(pid,value_id) -- by Conde2 local coisa = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = ".. pid .." AND `key` ="..value_id..";") if coisa:getID() == -1 then return -1 else return coisa:getDataInt("value") end end function onFile(type, directory, content) -- by Conde2 local master = 0 if type == "create" then local file = io.open(directory, "w") master = file:write(content) file:close() elseif type == "erase" then local file = io.open(directory, "w+") master = file:write("") file:close() elseif type == "load" then local file = io.open(directory,"r") master = file:read() file:close() elseif type == "update" then local file = io.open(directory, "a+") master = file:write(content.."\n") file:close() elseif type == "return" then local file = io.open(directory, "a+") master = file:write(" "..content) file:close() elseif type == "delete" then os.remove(directory) elseif type == "exist" then file = io.open(directory) if file == nil then master = FALSE else master = TRUE end end return master end Tags: E finalmente vá para data/talkactions/talkactions.xml Abra ele com um bloco de notas e adicione isso: <talkaction words="!sendemail" event="script" value="email.lua"/> <talkaction words="!deleteemail" event="script" value="email.lua"/> <talkaction words="!checkemail" event="script" value="email.lua"/> <talkaction words="!blockemail" event="script" value="email.lua"/> <talkaction words="!unblockemail" event="script" value="email.lua"/> Configurando: Para configurar basta ir em data/talkactions/email.lua e editar isso: EMAIL_BLOCK = 6364 EMAIL_ANTI_SPAWN = 15 EMAIL_MIN_MENSSAGE = 10 EMAIL_MAX_MENSSAGE = 100 EMAIL_STORAGE_ANTI_SPAWN = 6365 # Storage value para bloquear / desbloquear o email. # O tempo que o player terá que esperar para mandar outra mensagem (Em segundos) # Quantas letras no mínimo a mensagem tem que ter para poder ser enviada. # Quantas letras no máximo deverá ter a menssagem. # Storage para definir o exausted !! NÃO AUTORIZO A POSTAGEM DESSE SCRIPT EM QUALQUER OUTRO FÓRUM SEM MINHA AUTORIZAÇÃO
  2. Reward by Comand

    Reward by Comand Funcionamento: Esse script ele é bem simples, ele é apenas um comando que te possibilita editar qualquer item e adicionar diretamente ao outro player. Para fazer isso basta você falar o comando e por as coisas que você quer que ele tenha. Lembre-se que não tem uma ordem para adicionar os atributos assim você pode adicionar apenas o que precisa !! Nome*: Aqui você coloca o nome do jogar que vai receber o item .Id*: O id do item ou nome do item que o player vai receber. Quantidade: Aqui é a quantidade do item que o player vai receber. Atributos: O que o item vai ter de especial. * OBRIGATÓRIO Por exemplo: Tags: Script: Vá em data/talkaction/scripts e crie um arquivo chamado: additem.lua Após feito isso adicione o seguinte codigo nele: function onSay(cid, words, param, channel) local compater = { ['aid'] = 'aid', ['arm'] = 'armor', ['name'] = 'name', ['atk'] = 'attack', ['def'] = 'defense', ['eatk'] = 'extraattack', ['edef'] = 'extradefense', ['defense'] = 'defense', ['extradefense'] = 'extradefense', ['attack'] = 'attack', ['armor'] = 'armor', ['desc'] = 'description' } local sep = "=" if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") local k = {} local sta local o local target = getPlayerByNameWildcard(t[1]) if(not target) then target = getCreatureByName(t[1]) if(not target) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.") return true end end if(isPlayerGhost(target) and getPlayerGhostAccess(target) > getPlayerGhostAccess(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.") return true end local id = tonumber(t[2]) if(not id) then id = getItemIdByName(t[2], false) if(not id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local amount = 100 if (type(t[3]) == "number") then amount = t[3] sta = 3 else sta = 2 end for s = 1, #t-sta do o = string.explode(t[sta+s], sep) table.insert(k, o[1]) table.insert(k, o[2]) end local item = doPlayerAddItem(target, id, amount) for i = 1, #k do if compater[k[i]] then doItemSetAttribute(item,compater[k[i]],k[i+1]) end end return true end
×