Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Boa noite,

Gostaria de ajuda no seguinte script npc reborn 8.6 está dando erro na Lib na hora de rebornar...
olhei alguns foruns e tentei mudar de db.executequery para db.query e nao mudou.
 

function doReborn(cid, level, looktype, vocation)
setGlobalStorageValue(1000,getPlayerGUID(cid))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
return TRUE
end

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
      if focus == cid then
          selfSay('?????.')
          focus = 0
          talk_start = 0
      end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
      msg = string.lower(msg)

      if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
    
    if getPlayerLevel(cid) >= 2001 then
selfSay('You cannot reborn, levels 2000 more not is possible.')
return false
end
        
            selfSay('Hello. If you ready I can "Reborn" you.')
            focus = cid
            talk_start = os.clock()
        

      elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.')

      elseif focus == cid then
        talk_start = os.clock()

if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then
                selfSay('Sorry, but you are after reborn.')
            focus = 0
            talk_start = 0

            elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30023) ~= 4 then
                    selfSay('Hehe, I say If you READY. You do not have 250 lvl.')


            elseif msgcontains(msg, 'reborn') then
                    selfSay('Are you sure?')
                                 talk_state = 2
                                 
--Goku--
                       elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 1 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 10, 211)
talk_state = 0
--Vegeta--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 8 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 26, 221)    
talk_state = 0
--Piccolo--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 92 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 38, 231)    
talk_state = 0
--C17--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 20 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 46, 241)    
talk_state = 0
--Gohan--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 25 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 64, 251)    
talk_state = 0
--Mirai Trunks--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 32 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 74, 261)    
talk_state = 0
--Cell--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 38 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 81, 271)    
talk_state = 0
--Freeza--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 43 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 88, 281)    
talk_state = 0
--Buu--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 50 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 98, 291)    
talk_state = 0
--Broly--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 57 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 113, 301)    
talk_state = 0
--C18--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 62 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 46, 311)    
talk_state = 0
--Uub--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 67 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 128, 321)    
talk_state = 0
--Goten--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 72 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 142, 331)    
talk_state = 0
--Chibi Trunks--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 79 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 151, 597)    
talk_state = 0
--Cooler--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 86 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 153, 351)    
talk_state = 0
--Dende--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 92 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 169, 361)    
talk_state = 0
--Baby--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 97 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 580, 371)    
talk_state = 0
--Bardock--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 102 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 188, 381)    
talk_state = 0
--Kuririn--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 108 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 205, 391)    
talk_state = 0
--Pan--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 113 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 212, 401)    
talk_state = 0
--Videl--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 118 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 227, 411)    
talk_state = 0
--Janemba---
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 123 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 234, 421)    
talk_state = 0
--Tenshihan--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 128 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 246, 431)    
talk_state = 0
--Jenk--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 133 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 257, 441)    
talk_state = 0
--Raditz--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 138 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 267, 451)    
talk_state = 0
--C16--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 143 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 272, 461)    
talk_state = 0
--Turles--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 148 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 285, 471)    
talk_state = 0
--Bulma--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 153 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 296, 481)    
talk_state = 0
--Shenron--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 158 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 302, 491)    
talk_state = 0
--Vegetto--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 163 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 308, 501)    
talk_state = 0
--Tapion--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 168 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 321, 511)    
talk_state = 0
--Kame--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 173 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 331, 521)    
talk_state = 0
--Kagome--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 178 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 357, 531)    
talk_state = 0
--King Vegeta--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 183 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 347, 541)    
talk_state = 0
--Zaiko--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 188 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 368, 551)    
talk_state = 0
--Chilled---
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 193 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 375, 561)    
talk_state = 0
-C8--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 198 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 516, 571)    
talk_state = 0
--Bills--
    elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 203 then
setPlayerStorageValue(cid,30023,1)
            doReborn(cid, 1, 586, 581)    
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform.')


        elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
            selfSay('Good bye.')
            focus = 0
            talk_start = 0
        end
    end
end

function onThink()
    doNpcSetCreatureFocus(focus)
      if (os.clock() - talk_start) > 45 then
          if focus > 0 then
              selfSay('Next Please...')
          end
              focus = 0
      end
     if focus ~= 0 then
         if getDistanceToCreature(focus) > 5 then
             selfSay('Good bye then.')
             focus = 0
         end
     end
end

561d9e2a93bcf_Sem_ttulo.thumb.png.e7307c

Se puderem me ajudar agradeço.

 
Link para o post
Compartilhar em outros sites

Esse erro do SQLITE, esta me dando nervoso, remove o script do globalevents para checar o shop_history.

Poderia postar a linha 721 do 050-function.lua
E a line 50 do script data/npc/scripts/reborn.lua

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

Link para o post
Compartilhar em outros sites

Uma dúvida, você usa sqlite ou mysql?

Se for sqlite > database > Open SQL query editor:

DROP TABLE IF EXISTS z_shop_history_item;
CREATE TABLE z_shop_history_item ( 
    id           INT( 11 )       NOT NULL,
    to_name      VARCHAR( 255 )  NOT NULL
                                 DEFAULT '0',
    to_account   INT( 11 )       NOT NULL
                                 DEFAULT '0',
    from_nick    VARCHAR( 255 )  NOT NULL,
    from_account INT( 11 )       NOT NULL
                                 DEFAULT '0',
    price        INT( 11 )       NOT NULL
                                 DEFAULT '0',
    offer_id     VARCHAR( 255 )  NOT NULL
                                 DEFAULT '',
    trans_state  VARCHAR( 255 )  NOT NULL,
    trans_start  INT( 11 )       NOT NULL
                                 DEFAULT '0',
    trans_real   INT( 11 )       NOT NULL
                                 DEFAULT '0',
    PRIMARY KEY ( id ) 
);

Se for mysql:
DROP TABLE IF EXISTS `z_shop_history_item`;
CREATE TABLE IF NOT EXISTS `z_shop_history_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `to_name` varchar(255) NOT NULL DEFAULT '0',
  `to_account` int(11) NOT NULL DEFAULT '0',
  `from_nick` varchar(255) NOT NULL,
  `from_account` int(11) NOT NULL DEFAULT '0',
  `price` int(11) NOT NULL DEFAULT '0',
  `offer_id` varchar(255) NOT NULL DEFAULT '',
  `trans_state` varchar(255) NOT NULL,
  `trans_start` int(11) NOT NULL DEFAULT '0',
  `trans_real` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
___________________________________________________

SQLITE:
DROP TABLE IF EXISTS z_shop_history_pacc;
CREATE TABLE z_shop_history_pacc ( 
    id           INT( 11 )       NOT NULL,
    to_name      VARCHAR( 255 )  NOT NULL
                                 DEFAULT '0',
    to_account   INT( 11 )       NOT NULL
                                 DEFAULT '0',
    from_nick    VARCHAR( 255 )  NOT NULL,
    from_account INT( 11 )       NOT NULL
                                 DEFAULT '0',
    price        INT( 11 )       NOT NULL
                                 DEFAULT '0',
    pacc_days    INT( 11 )       NOT NULL
                                 DEFAULT '0',
    trans_state  VARCHAR( 255 )  NOT NULL,
    trans_start  INT( 11 )       NOT NULL
                                 DEFAULT '0',
    trans_real   INT( 11 )       NOT NULL
                                 DEFAULT '0',
    PRIMARY KEY ( id ) 
);
MYSQL:
DROP TABLE IF EXISTS `z_shop_history_pacc`;
CREATE TABLE IF NOT EXISTS `z_shop_history_pacc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `to_name` varchar(255) NOT NULL DEFAULT '0',
  `to_account` int(11) NOT NULL DEFAULT '0',
  `from_nick` varchar(255) NOT NULL,
  `from_account` int(11) NOT NULL DEFAULT '0',
  `price` int(11) NOT NULL DEFAULT '0',
  `pacc_days` int(11) NOT NULL DEFAULT '0',
  `trans_state` varchar(255) NOT NULL,
  `trans_start` int(11) NOT NULL DEFAULT '0',
  `trans_real` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Veja se saiu o erro.
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por ILex WilL
      Olá, Alguém poderia me ajudar com uns Scripts? nem que seja cobrando, dependendo eu pago para me ajudar...
    • Por xWhiteWolf
      Fala galera do TK, hoje vim trazer pra vocês um script de um server bem famoso, trata-se de nada mais e nada menos doque a Aegis of Immortal do Fox World. Quase nenhum OTserver consegue me deixar com vontade de jogar, mas se tem um que chegou bem próximo foi o Fox e o motivo é a criatividade dos caras. É muito fácil aprender lua e ser um ótimo scripter mas ter criatividade pra criar esse tipo de script é bem mais raro. Sem mais delongas vou apresentar a idéia do script e logo em seguida ensinar a instalar no seu servidor. 
        Aegis of the Immortal
      Descrição: É obtida 1 carga ao vencer o boss Aegis (aparece em invasões). Com esta técnica, o jogador ganha a aura do boss, e se morrer é teleportado para a Aegis Dimension, e após 3 segundos volta para o lugar que estava, com life e mana full como se não tivesse sido tocado. (limite de 1 carga) Tipo: (B.Skill) Vocações: All Vocations Elemento: n/a fonte: site do fox


      Well, o script é bem simpleszinho mas eu apanhei pra caramba pra fazer ele funcionar certinho (acredito que nem o script dos caras do Fox funcione da maneira correta, mas esse daqui vai funcionar)

      Antes de tudo você tem que criar uma área no seu map editor e colocar ela inteira como no-pvp e no-logout. Essa vai ser a área que você vai ser teleportado, será a sua "Aegis Dimension".




      Feito isso você vai precisar adicionar essa linha em creaturescripts.xml:
         <event type="statschange" name="reborn" script="reborn.lua"/> obs: eu levei muito tempo tentando fazer por onPrepareDeath mas aparentemente essa função não funciona tão bem quanto statschange e acabava chamando a si mesma repetidas vezes.

      agora crie um arquivo chamado reborn.lua na pasta creaturescripts\scripts e coloque isso dentro dele:




      Agora você só tem que adicionar essa linha no creaturescripts\scripts\login.lua (de preferencia antes do ultimo return true)
      --- BOSS SKILLS ---- registerCreatureEvent(cid, "reborn") if getPlayerStorageValue(cid, 19332) == -1 then         setPlayerStorageValue(cid, 19332, 0)      end Agora seu server possui a Aegis of Immortal e você pode configurar essa skill passiva de diferentes maneiras:
      1) Pode ser uma quest que dá como prêmio X quantidades dessa skill
      2) Um npc que vende X quantidades da skill
      3) Um item que ao ser equipado ativa a skill
      4) Um boss que vc mata e ganha quantidades dela
      5) Um bonus em algum evento
      6) Um item de shop
      etc.

      Tudo que vc precisa fazer é criar um script que dê o storage 19332, o valor do storage é o numero de vezes que vc vai utilizar a skill.

      aqui tem um exemplo de uma quest que ganha 5 charges da Aegis of Immortal:
      function onUse(cid, item) local storage = 19332 if getPlayerStorageValue(cid, storage) ~= 5 then doPlayerSetStorageValue(cid, storage, 5) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have habilited your [BOSS SKILL]") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your [BOSS SKILL] is already with "..getPlayerStorageValue(cid, storage).." charges.") end return true end e aqui tem algumas fotos de como fica no seu server:












       
      Espero que vcs tenham gostado.. 
      Vou dar 20% de Crédito pro Kilua porque sem o tutorial dele de addEvent isso daqui não seria possível e 30% pro pessoal do Fox por terem me dado a idéia do script.   

      EDIT: Fiz um monstro q dá essa skill ao morrer, só que eu inovei um pouquinho e fiz ele tendo a skill, ou seja, vc tem que matar ele um numero X de vezes pra valer de verdade kkk A graça é que esse numero de X é inerente ao player (fiz por storage), então se um grupo de 10 pessoas for fazer e cada hora uma matar, serão (X+1) vezes no mínimo auhauhauh Só que como ele não dá loot e o unico premio dele é a skill pra quem matar X vezes, então o pessoal dá KS mesmo. Enfim, aproveitem:

      creaturescripts\scripts\aegis.lua
      local config = { storagekill = 19500, --- storage q conta a quantidade de kills storageaegis = 19332, --- storage da skill tempo = 5, -- tempo até ele renascer times = 2, --- quantidade de vezes que tenho que matar charges = 1, --- cargas da skill q ganha ao matar definitivamente effect1 = 66, -- efeito ao morrer effect2 = 10 --- efeito ao renascer } function onKill(cid, target, lastHit) local killed = getPlayerStorageValue(cid,config.storagekill) local skill = getPlayerStorageValue(cid, config.storageaegis) if isMonster(target) and getCreatureName(target):lower() == 'aegis' then if killed < config.times then doCreatureSay(target, "I'll be back mortal...", 20) doSendMagicEffect(getThingPos(target), config.effect1) setPlayerStorageValue(cid, config.storagekill, killed+1) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2) addEvent(doCreateMonster, 1000*config.tempo, "Aegis", getCreaturePosition(target), true) end if killed >= config.times then setPlayerStorageValue(cid, config.storagekill, 0) if skill < config.charges then doPlayerSendTextMessage(cid,22,"Congratulations, you just killed "..getCreatureName(target).." and earned Aegis of Immortal skill!") setPlayerStorageValue(cid, config.storageaegis, config.charges) end end end return true end
      creaturescripts\scripts\login.lua registerCreatureEvent(cid, "aegis") if getPlayerStorageValue(cid, 19500) == -1 then         setPlayerStorageValue(cid, 19500, 0)      end creaturescripts.xml
      <event type="kill" name="aegis" script="aegis.lua"/> monster\aegis.xml
      <?xml version="1.0" encoding="UTF-8"?> <monster name="Aegis" nameDescription="Aegis, the immortal" race="blood" experience="0" speed="605" manacost="0"> <health now="100000" max="100000"/> <look type="287" head="0" body="0" legs="0" feet="0" corpse="0"/> <targetchange interval="2000" chance="15"/> <strategy attack="60" defense="5"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="210" attack="260"/> <attack name="lifedrain" interval="1000" chance="20" range="3" min="-550" max="-1050"/> <attack name="firecondition" interval="1000" chance="7" range="2" min="-800" max="-1200"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="yellowspark"/> </attack> <attack name="physical" interval="1000" chance="7" radius="6" target="0" min="-250" max="-750"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="50" radius="5" target="0" min="-200" max="-500"> <attribute key="areaEffect" value="mortarea"/> <attribute key="shootEffect" value="suddendeath"/> </attack> <attack name="firefield" interval="1000" chance="4" radius="5" target="0"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="fire" interval="1000" chance="34" range="7" radius="7" target="1" min="-350" max="-850"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="fire" interval="1000" chance="13" length="8" spread="0" min="-500" max="-1000"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="fire" interval="1000" chance="10" length="8" spread="3" min="-300" max="-1500"> <attribute key="areaEffect" value="firearea"/> </attack> </attacks> <defenses armor="165" defense="150"> <defense name="healing" interval="1000" chance="25" min="2000" max="3000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="1800" duration="4000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="1"/> <immunity fire="1"/> <immunity poison="0"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="50"> <voice sentence="Poor innocent, I CAN'T DIE HAHAHAHAAHA"/> <voice sentence="Your soul will be mine!"/> <voice sentence="MUAHAHAHAAHAHA, I TOLD YOU" yell="1"/> </voices> </monster> OBS: edite ele porque eu coloquei ele muito forte, com muita vida e com muita recuperação de vida.


      monster\monsters.xml
      <monster name="Aegis" file="aegis.xml"/>
    • Por Yan Liima
      #Introdução
      Bom hoje estarei trazendo aqui o sistema de Ping feito pelo Mock, com uma pequena adaptação feita por mim para funcionar em TFS 0.4(talvez podendo funcionar em outras)
      Pois o que ele disponibilizou foi apenas para TFS 0.3.6 e nem foi muito utilizado pela comunidade. Muitos servidores daqui para download tem script no talk mas a lib está totalmente errada e não tem o code nas sources.
      Esse sistema tem varias utilizades, podendo usar o comando !ping para verificar seu ms ou até mesmo por para kikar jogadores com ms muito alto...
      Se você não sabe o cliente já tem um sistema de ping, e getOtsystime é como os.time () + os.clock (), você tem ano, mês, dia, hora, minutos, segundos, milisegundos...
      Enfim chega de enrolação e vamos lá!
       
      Code para TFS 0.4 e OTX:
       
      Code para TFS 0.3.6
       
      LIB:
       
       
      Prontinho, agora seu servidor está pronto para utilizar as funções de Ping. Seja criativo!
      Ahh você é daqueles que quer tudo na mão né? Aqui vai um talkactions para ver o ping.
       
      Em talkactions/scripts crie um arquivo chamado playerping.lua, cole isto dentro:
      -- Script by Yan Liima(Night for tibiaking.com) function onSay(cid, words, param, channel) local ms = ping.CheckPing(cid) doPlayerSendTextMessage(cid,22,"Ping aproximado --> ["..ms.."].") return true end Em talkactions.xml
      <talkaction words="!ping" event="script" value="playerping.lua"/>  
    • Por Guilherme HP
      ola boa noite, alguem poderia ta me ajudando nesse erro que apareceu na minha vps quando vou abrir o meu game?

      [./tfs: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory]
    • Por RenanPhellip
      Eai galera!   
       
       
      Estou precisando de um npc que resete o player. Sendo mais específico preciso que tenha as seguintes funções se possível:
       
      Level minimo para resetar: 250.
      Level máximo: 600.
      Preço: 7 esferas do dragão.
      Manter skills, ml, life/mana e adicionar +25k de life/mana.
      Resete para o level 1.
      E por fim, troque a vocação do player (exemplo: se ele esta na vocação 2 , que vá para a 3).
      Aah, vale lembrar, que irei configurar várias vocações e não somente uma.
       
      Distro Utilizada: tfs 0.4 rev.3884
      Versão Do Servidor: 8.60
       
      Antes de mais nada vale lembrar que procurei em vários tópicos aqui no forum e os que encontrei não consegui modificá-los ao ponto que eu quero.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo