Ir para conteúdo

narazaky

Membro
  • Registro em

  • Última visita

Solutions

  1. narazaky's post in (Resolvido)Funçao doPlayerSendChannelMessage was marked as the answer   
    Aqui só para explicar essa função:
    doPlayerSendChannelMessage(cid, author, message, MessageClasses, channel) O cid -- creature ID
    author -- que fez a mensagem
    message - a mensagem
    MessageClasses - o tipo de mensagem*
    channel -- o canal q vai ir
     
    *Os tipos você pode ver na lib\000-constant.lua
  2. narazaky's post in (Resolvido)[AJUDA] Sistema de checar a life do personagem !life was marked as the answer   
    enttao so usar esse:
    o de cima editado
    function onSay(cid, words, param, channel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Life ["..getCreatureHealth(cid).."] - ["..getCreatureMaxHealth(cid).."]") return true end
  3. narazaky's post in (Resolvido)[PROBLEMA] FUNÇÕES DO SISTEMA DE NOTIFICAÇÃO -- TFS 1.0 was marked as the answer   
    valeu, mas tinha feito essa aqui:

     
    function getNots(name) local accountId = getAccountNumberByPlayerName(name) local resultId = db.storeQuery("SELECT `qntnot` FROM `accounts` WHERE `id` = " .. accountId .." LIMIT 1") if resultId ~= false then local nots = result.getDataInt(resultId, "qntnot") result.free(resultId) return nots end return 0 end
  4. narazaky's post in (Resolvido)[Pedido] Frag and Vip Look System was marked as the answer   
    edit
    coloque isso na sua script na parte de cima
    function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end e depois colque isso no login
    registerCreatureEvent(cid, "LookPlayer") look completo (peguei do post acima)



  5. narazaky's post in (Resolvido)Reset system geisor was marked as the answer   
    Vamos lá...
    vai em lib 050-function.lua e adicione isso:
    function getPlayerResets(cid) local Info = db.getResult("SELECT `reset` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") if Info:getID() ~= LUA_ERROR then local Resets= Info:getDataInt("reset", getPlayerGUID(cid)) Info:free() return Resets end return LUA_ERROR end depois vá em creaturescript/scrpts e cria um arquivo lookreset.lua e coloca isso dentro:
    function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then local string = 'You see '..getCreatureName(thing.uid)..' (Level '.. getPlayerLevel(thing.uid)..') [Reset '..getPlayerResets(thing.uid)..'].' if getPlayerFlagValue(thing.uid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then if(getPlayerSex(thing.uid)== 1) then string = string..' He is '.. getPlayerGroupName(thing.uid) ..'.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She is '.. getPlayerGroupName(thing.uid) ..'.' end elseif getPlayerVocation(thing.uid) ~= 0 then if(getPlayerSex(thing.uid)== 1) then string = string..' He is '.. getPlayerVocationName(thing.uid) ..'.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She is '.. getPlayerVocationName(thing.uid) ..'.' end else if(getPlayerSex(thing.uid)== 1) then string = string..' He has no vocation.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She has no vocation.' end end -- if (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) ~= nil) or (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) == true) then -- if(getPlayerSex(thing.uid)== 1) then -- string = string..' He is '.. (getPlayerSex(thing.uid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(thing.uid)) ..'.' -- end -- if(getPlayerSex(thing.uid)== 0) then -- string = string..' She is '.. (getPlayerSex(thing.uid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(thing.uid)) ..'.' -- end -- else -- string = string -- end if getPlayerGuildId(thing.uid) > 0 then if(getPlayerSex(thing.uid)== 1) then string = string..' He is ' .. (getPlayerGuildRank(thing.uid) == '' and 'a member' or getPlayerGuildRank(thing.uid)) ..' of the '.. getPlayerGuildName(thing.uid) end if(getPlayerSex(thing.uid)== 0) then string = string..' She is ' .. (getPlayerGuildRank(thing.uid) == '' and 'a member' or getPlayerGuildRank(thing.uid)) ..' of the '.. getPlayerGuildName(thing.uid) end string = getPlayerGuildNick(thing.uid) ~= '' and string..' ('.. getPlayerGuildNick(thing.uid) ..').' or string..'.' end if (getPlayerGroupId(cid) >= 3) then if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(thing.uid) ..' / '.. getCreatureMaxHealth(thing.uid) ..'], Mana: ['.. getCreatureMana(thing.uid) ..' / '.. getCreatureMaxMana(thing.uid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(thing.uid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false ---------------------------------------------------------------------------------------------------------------------------------------- elseif thing.uid == cid then local string = 'You see yourself. (Level '.. getPlayerLevel(cid)..') [Reset '..getPlayerResets(cid)..'].' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end -- if (getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) or (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) == true) then -- string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' -- end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'' end if (getPlayerGroupId(cid) >= 3) then if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end depois vá em login.lua e adicione isso antes do return true:
    registerCreatureEvent(cid, "lookreset") depois em creaturescript.xml adicione isso:
    <event type="look" name="lookreset" event="script" value="lookreset.lua"/> depois só aproveitar
     
     
    PS: estou fazendo um sistema de reset igual 100% ao do rad, depois eu posto aqui (pode ser por talk ou pelo site, configuravel)
  6. narazaky's post in (Resolvido)Comando was marked as the answer   
    Ve essa:
    é a que estou usando
     



  7. narazaky's post in (Resolvido)[AJUDA] Sistema de Ban was marked as the answer   
    Nessa parte você deve ir ao banco de dados do seu servidor, se for sqlita, clica na caneta que fca em cima cole isso e aperte F9, mas se for mysql vai na db clia em SQL cola isso e aperte executar. 
  8. narazaky's post in (Resolvido)Problema no site "You must install AAC." was marked as the answer   
    Resolvido!!
    Basta substituir a sua database e por um novo arquivo .sql
  9. narazaky's post in (Resolvido)[suporte] canal was marked as the answer   
    Resolvido
    tópico
    http://www.tibiaking.com/forum/topic/40848-tutorial-toda-vez-que-logar-o-canal-abre-help-trade-etc/
  10. narazaky's post in (Resolvido)[pedido] Mensagem ao logar was marked as the answer   
    Resolvi aqui para quem quiser o tópico:
    http://www.tibiaking.com/forum/topic/40848-tutorial-toda-vez-que-logar-o-canal-abre-help-trade-etc/
  11. narazaky's post in (Resolvido)[PEDIDO]Morreu sumona Monstro. A Morte... was marked as the answer   
    Desculpe a demora, mas aqui está:
    Em creaturescript crie um arquivo chamado DeathSystem.lua e coloque isso dentro:



     
    no login.lua cole isso antes do ultimo return true:
     



     
    e no creaturescript.xml coloca isso:



     
     
    agora vamos criar um monstro chamado "a morte"
     
    vai na pasta monster e crie um arquivo assim "a morte.xml" com isso dentro:



    e por fim...
    cole essa tag no monster.xml:



     
     
     
    OBS: a morte só irá aparecer caso um jogador morrer por um outro jogador.
     
    créditos: Outro fórum, quem souber o nome só me falar.
     
     
    Espero ter ajudado
  12. narazaky's post in (Resolvido)[Pedido] Spell que Regenera Mana was marked as the answer   
    eu uso essa aqui:



  13. narazaky's post in (Resolvido)ajuda vip tile was marked as the answer   
    coloque isso na pasta movements: em arquivo lua
    function onStepIn(cid, item, pos, frompos) if getPlayerPremiumDays(cid) < 1 then doTeleportThing(cid, frompos) doPlayerSendCancel(cid, 'Você não é vip.') doSendMagicEffect(frompos, CONST_ME_POFF) end return true end e no movements.xml cooloque isso:
    <movevent event="StepIn" actionid="numero" script="Nome o arquivo.lua"/> --o numero é o id da action que você colocar no piso do seu mapa
  14. narazaky's post in (Resolvido)pedido adicionar mais um comando was marked as the answer   
    Pronto já consegui, podem fechar o tópico
     
    Obrigado luan REP+, mas fiz um aqui
    para quem querer:


Informação Importante

Confirmação de Termo