Ir para conteúdo

Nazo

Banido
  • Registro em

  • Última visita

Tudo que Nazo postou

  1. Tente utilizar estes dois, só renomeie pro mesmo nome: class.smtp.php class.phpmailer.php
  2. Nazo postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Buenas, TK! Um usuário pediu ajuda em um script, onde queria limitar para a quest ser feita apenas uma vez por IP, mesmo que ainda seja possível mudá-lo, resolvi postar aqui xd Execute esse código SQL no seu banco de dados MySQL, para a criação da tabela onde ficarão as storages e o IP armazenado do player: CREATE TABLE player_ip_storage( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, player_id INT NOT NULL, ip CHAR(15) NOT NULL, storage INT NOT NULL ); ALTER TABLE player_ip_storage ADD CONSTRAINT FK_PLAYER_ID FOREIGN KEY (player_id) REFERENCES players(id); Ou caso seja SQLITE, utilize esse código: CREATE TABLE player_ip_storage( player_id INT NOT NULL, ip CHAR(15) NOT NULL, storage INT NOT NULL ); ALTER TABLE player_ip_storage ADD CONSTRAINT FK_PLAYER_ID FOREIGN KEY (player_id) REFERENCES players(id); Crie um arquivo chamado nazo-functions.lua em data/lib e adicione o seguinte conteúdo: -- by Nazo (tibiaking.com) -- IP Storage System function getIpQuestStatus(cid, storage) storages = db.getResult("SELECT * FROM `player_ip_storage` WHERE `ip` = \"" .. doConvertIntegerToIp(getPlayerIp(cid)) .. "\" and `storage` = "..storage..";") if(storages:getID() ~= -1) then return false end return true end function setIpQuestStatus(cid, storage) db.executeQuery("INSERT INTO player_ip_storage(player_id, ip, storage) VALUES("..getPlayerGUID(cid)..",\""..doConvertIntegerToIp(getPlayerIp(cid)).."\","..storage..")") return true end Agora, quando você tiver uma quest, adicione na verificação a função getIpQuestStatus na checagem junto, e quando finalizar a quest utilize o setIpQuestStatus, com os parâmetros cid e número da storage, porém a função só armazena que essa storage tem algo no banco de dados, ou seja, a quest já foi feita, você não armazena o valor da storage junto (como a função normal que geralmente adiciona "1" na storage). Exemplo de quest abaixo: -- by Nazo (tibiaking.com) config = { storage = 123123, -- storage da quest premio = {2160, 1} -- {itemid, quantia} } function onUse(cid, item, frompos, item2, toPosition) queststatus = getPlayerStorageValue(cid,config.storage) if(queststatus == -1 and getIpQuestStatus(cid, config.storage)) then -- note que eu só adicionei a função, nenhuma comparação, explicarei abaixo do código doPlayerSendTextMessage(cid,22,"Tome seu prêmio.") doPlayerAddItem(cid,config.premio[1],config.premio[2]) setPlayerStorageValue(cid,config.storage,1) setIpQuestStatus(cid,config.storage) -- função que adiciona a storage no banco de dados else doPlayerSendTextMessage(cid,22,"Você já fez esta quest.") end end Explicação básica do motivo da função não possuir comparação na verificação e ficar como a seguir: if(getIpQuestStatus(cid, config.storage)) then Quando você faz um if, com uma função dentro sem comparações, ela continuará o bloco de comando apenas se o retorno da mesma for verdadeiro, assim quando você fizer a quest, e tentar novamente, o get retorna falso, e isso cancela a condição e vai para o bloco de comando do "else".
  3. Mostra o classes/phpmailer.php e classes/smtp.php
  4. @joaotmed, tente deixar assim primeiro: # Emails Config $config['site']['lost_acc'] = true; $config['site']['send_emails'] = true; $config['site']['mail_address'] = "meuemail@gmail"; $config['site']['mail_senderName'] = "Meu nome"; $config['site']['smtp_enabled'] = true; $config['site']['smtp_host'] = "smtp.gmail.com"; // não coloque ssl aqui $config['site']['smtp_port'] = 465; $config['site']['smtp_auth'] = true; $config['site']['smtp_user'] = "[email protected]"; $config['site']['smtp_pass'] = "minha senha"; $config['site']['smtp_secure'] = true; De resto, as configurações estão corretas, diga se continuar sem funcionar.
  5. Mostre seu config.lua, config.php, e diga a posição em que o player vai nascer.
  6. @joaotmed, você precisa configurar o servidor de e-mails do seu site, para que ao criar a conta seja enviado, e assim a conta possa ser criada, abra outro tópico com a dúvida =) Se minha resposta acima foi a melhor, por favor selecione como melhor resposta para facilitar o entendimento dos tópicos resolvidos no botão superior esquerdo do post:
  7. Você colocou isso no seu login.lua? registerCreatureEvent(cid, "BootsSpeed")
  8. Me mostre a tag xml do script, e me diga se você registrou no login.lua @Danxi
  9. @victor0707, testa aí meu chapa: local fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}} }, [3976] = { segs = 5, pokes = {{"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}} }, -- pega no client da pxg [12855] = { segs = 5, pokes = {{"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2} } }, [12854] = { segs = 5, pokes = {{"Seel", 2}, {"squirtle", 2} } }, [12858] = { segs = 5, pokes = {{"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}} }, [12857] = { segs = 5, pokes = {{"Starmie", 2}, {"Kingler", 2}, {"Wartortle", 2}, {"Slowbro", 2}} }, -- pega no client da pxg [12860] = { segs = 5, pokes = {{"Starmie", 3}, {"Dewgong", 3}}}, [12859] = { segs = 5, pokes = {{"Cloyster", 2}, {"Poliwrath", 2}, {"Dewgong", 4}, {"Golduck", 1}} }, [12856] = { segs = 5, pokes = {{"Dratini", 3}, {"Dragonair", 2} }}, [12853] = { segs = 5, pokes = {{"Gyarados", 1}, {"Blastoise", 1}, {"Tentacruel", 1}, {"Lapras", 1}} }, } local storageP = 154585 local sto_iscas = 5648454 --muda aki pra sto q ta no script da isca local bonus = 30 local limite = 100 local function doFish(cid, pos, ppos, interval) if not isCreature(cid) then return false end if(getCreatureSummons(cid)[1]) then if getCreatureSummons(cid)[1].x ~= getCreatureSummons(cid)[1].x or getCreatureSummons(cid)[1].y ~= getCreatureSummons(cid)[1].y then return false end else if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end end if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end if getPlayerSkillLevel(cid, 6) < 10 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 15 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 20 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Seel", 2}, {"squirtle", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 25 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Seel", 2}, {"squirtle", 2}, {"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 30 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Seel", 2}, {"squirtle", 2}, {"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}, {"Starmie", 2}, {"Kingler", 2}, {"Wartortle", 2}, {"Slowbro", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 35 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Seel", 2}, {"squirtle", 2}, {"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}, {"Starmie", 2}, {"Kingler", 2}, {"Wartortle", 2}, {"Slowbro", 2}, {"Starmie", 3}, {"Dewgong", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 40 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Seel", 2}, {"squirtle", 2}, {"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}, {"Starmie", 2}, {"Kingler", 2}, {"Wartortle", 2}, {"Slowbro", 2}, {"Starmie", 3}, {"Dewgong", 3}, {"Cloyster", 2}, {"Poliwrath", 2}, {"Dewgong", 4}, {"Golduck", 1}} }, } elseif getPlayerSkillLevel(cid, 6) < 45 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 3}, {"Poliwag", 2}, {"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Seel", 2}, {"squirtle", 2}, {"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}, {"Starmie", 2}, {"Kingler", 2}, {"Wartortle", 2}, {"Slowbro", 2}, {"Starmie", 3}, {"Dewgong", 3}, {"Cloyster", 2}, {"Poliwrath", 2}, {"Dewgong", 4}, {"Golduck", 1}, {"Dratini", 3}, {"Dragonair", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 50 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Starmie", 3}, {"Dewgong", 3}, {"Cloyster", 3}, {"Poliwrath", 3}, {"Dewgong", 4}, {"Golduck", 3}, {"Dratini", 3}, {"Dragonair", 3}, {"Gyarados", 2}, {"Blastoise", 2}, {"Tentacruel", 2}, {"Lapras", 2}} }, } elseif getPlayerSkillLevel(cid, 6) < 55 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}} }, } elseif getPlayerSkillLevel(cid, 6) < 60 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 3}, {"Totodile", 3}, {"Chinchou", 3}, {"Marill", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 65 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 3}, {"Totodile", 3}, {"Chinchou", 3}, {"Marill", 3}, {"Qwilfish", 3}, {"Croconaw", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 70 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 3}, {"Totodile", 3}, {"Chinchou", 3}, {"Marill", 3}, {"Qwilfish", 3}, {"Croconaw", 3}, {"wooper", 5}, {"Azumarill", 3}, {"Corsola", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 75 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 3}, {"Totodile", 3}, {"Chinchou", 3}, {"Marill", 3}, {"Qwilfish", 3}, {"Croconaw", 3}, {"wooper", 5}, {"Azumarill", 3}, {"Corsola", 3}, {"Octillery", 3}, {"Politoed", 3}, {"Quagsire", 3}, {"Lanturn", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 80 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 3}, {"Totodile", 3}, {"Chinchou", 3}, {"Marill", 3}, {"Qwilfish", 3}, {"Croconaw", 3}, {"wooper", 5}, {"Azumarill", 3}, {"Corsola", 3}, {"Octillery", 3}, {"Politoed", 3}, {"Quagsire", 3}, {"Lanturn", 3}, {"Feraligatr", 3}, {"Vaporeon", 3}, {"Kingdra", 3}, {"Mantine", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 85 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 5}, {"Totodile", 5}, {"Chinchou", 5}, {"Marill", 5}, {"Qwilfish", 5}, {"Croconaw", 5}, {"wooper", 5}, {"Azumarill", 3}, {"Corsola", 3}, {"Octillery", 3}, {"Politoed", 3}, {"Quagsire", 3}, {"Lanturn", 3}, {"Feraligatr", 3}, {"Vaporeon", 3}, {"Kingdra", 3}, {"Mantine", 3}, {"Slowking", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 90 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 5}, {"Totodile", 5}, {"Chinchou", 5}, {"Marill", 5}, {"Qwilfish", 5}, {"Croconaw", 5}, {"wooper", 5}, {"Azumarill", 5}, {"Corsola", 5}, {"Octillery", 5}, {"Politoed", 5}, {"Quagsire", 5}, {"Lanturn", 5}, {"Feraligatr", 5}, {"Vaporeon", 5}, {"Kingdra", 3}, {"Mantine", 3}, {"Slowking", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 95 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 5}, {"Totodile", 5}, {"Chinchou", 5}, {"Marill", 5}, {"Qwilfish", 5}, {"Croconaw", 5}, {"wooper", 5}, {"Azumarill", 5}, {"Corsola", 5}, {"Octillery", 5}, {"Politoed", 5}, {"Quagsire", 5}, {"Lanturn", 5}, {"Feraligatr", 5}, {"Vaporeon", 5}, {"Kingdra", 5}, {"Mantine", 5}, {"Slowking", 5}} }, } elseif getPlayerSkillLevel(cid, 6) < 100 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 5}, {"Totodile", 5}, {"Chinchou", 5}, {"Marill", 5}, {"Qwilfish", 5}, {"Croconaw", 5}, {"wooper", 5}, {"Azumarill", 5}, {"Corsola", 5}, {"Octillery", 5}, {"Politoed", 5}, {"Quagsire", 5}, {"Lanturn", 5}, {"Feraligatr", 5}, {"Vaporeon", 5}, {"Kingdra", 5}, {"Mantine", 5}, {"Slowking", 5}, {"Carvanha", 3}, {"Barboach", 3}, {"Clamperl", 3}, {"Spheal", 3}, {"Corphish", 3}} }, } elseif getPlayerSkillLevel(cid, 6) < 105 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 5}, {"Totodile", 5}, {"Chinchou", 5}, {"Marill", 5}, {"Qwilfish", 5}, {"Croconaw", 5}, {"wooper", 5}, {"Azumarill", 5}, {"Corsola", 5}, {"Octillery", 5}, {"Politoed", 5}, {"Quagsire", 5}, {"Lanturn", 5}, {"Feraligatr", 5}, {"Vaporeon", 5}, {"Kingdra", 5}, {"Mantine", 5}, {"Slowking", 5}, {"Carvanha", 3}, {"Barboach", 3}, {"Clamperl", 3}, {"Spheal", 3}, {"Corphish", 3}, {"Sharpedo", 2}, {"Whiscash", 2}, {"Huntail", 2}, {"Gorebyss", 2}, {"Huntail", 2}} }, } elseif getPlayerSkillLevel(cid) >= 110 then fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}, {"Horsea", 5}, {"Goldeen", 5}, {"Poliwag", 5}, {"Tentacool", 5}, {"Staryu", 5}, {"Krabby", 5}, {"Shellder", 5}, {"Seel", 5}, {"squirtle", 5}, {"Seaking", 5}, {"Seadra", 5}, {"Poliwhirl", 5}, {"Starmie", 5}, {"Kingler", 5}, {"Wartortle", 5}, {"Slowbro", 5}, {"Dewgong", 5}, {"Cloyster", 5}, {"Poliwrath", 5}, {"Golduck", 5}, {"Dratini", 5}, {"Dragonair", 5}, {"Gyarados", 5}, {"Blastoise", 5}, {"Tentacruel", 5}, {"Lapras", 5}, {"Remoraid", 5}, {"Totodile", 5}, {"Chinchou", 5}, {"Marill", 5}, {"Qwilfish", 5}, {"Croconaw", 5}, {"wooper", 5}, {"Azumarill", 5}, {"Corsola", 5}, {"Octillery", 5}, {"Politoed", 5}, {"Quagsire", 5}, {"Lanturn", 5}, {"Feraligatr", 5}, {"Vaporeon", 5}, {"Kingdra", 5}, {"Mantine", 5}, {"Slowking", 5}, {"Carvanha", 5}, {"Barboach", 5}, {"Clamperl", 5}, {"Spheal", 5}, {"Corphish", 5}, {"Sharpedo", 5}, {"Whiscash", 5}, {"Huntail", 5}, {"Gorebyss", 5}, {"Huntail", 5}} }, } end doSendMagicEffect(pos, CONST_ME_LOSEENERGY) if interval > 0 then addEvent(doFish, 1000, cid, pos, ppos, interval-1) return true end local peixe = 0 local playerpos = getClosestFreeTile(cid, getThingPos(cid)) local pokepos = getClosestFreeTile(getCreatureSummons(cid)[1], getThingPos(getCreatureSummons(cid)[1])) local fishes = fishing[getPlayerStorageValue(cid, sto_iscas)] local random = {} if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus * 5) end --[[if math.random(1, 100) <= chance then if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus * 5) end]] random = fishes.pokes[math.random(#fishes.pokes)] for i = 1, math.random(random[2]) do if(getCreatureSummons(cid)[1]) then peixe = doSummonCreature(random[1], playerpos) else peixe = doSummonCreature(random[1], pokepos) end if not isCreature(peixe) then setPlayerStorageValue(cid, storageP, -1) return true end setPokemonPassive(peixe, true) doSetPokemonAgressiveToPlayer(peixe, cid) setPlayerStorageValue(peixe, storageP, 1) if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 0) doChallengeCreature(getCreatureSummons(cid)[1], peixe) else doSendMagicEffect(getThingPos(cid), 0) doChallengeCreature(cid, peixe) end end setPlayerStorageValue(cid, storageP, -1) doCreatureSetNoMove(cid, false) return true end local waters = {11756, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4820, 4821, 4822, 4823, 4824, 4825} function onUse(cid, item, fromPos, itemEx, toPos) if isWatchingTv(cid) then return true end local checkPos = toPos checkPos.stackpos = 0 if getTileThingByPos(checkPos).itemid <= 0 then return true end if not isInArray(waters, getTileInfo(toPos).itemid) then return true end if getPlayerStorageValue(cid, storageP) == 1 then doSendMsg(cid, "Aguarde! Você já está pescando.") return true end if isRiderOrFlyOrSurf(cid) and not canFishWhileSurfingOrFlying then doPlayerSendCancel(cid, "You can't fish while surfing/flying.") return true end if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then doPlayerSendCancel(cid, "You can't fish pokémons if you or your pokémon is in protection zone.") return true end local delay = fishing[getPlayerStorageValue(cid, sto_iscas)].segs if getPlayerStorageValue(cid, sto_iscas) ~= -1 then if getPlayerItemCount(cid, getPlayerStorageValue(cid, sto_iscas)) >= 1 then doPlayerRemoveItem(cid, getPlayerStorageValue(cid, sto_iscas), 1) else setPlayerStorageValue(cid, sto_iscas, -1) end end setPlayerStorageValue(cid, storageP, 1) --alterei looktype doCreatureSetNoMove(cid, true) local pos2 = getThingPos(itemEx.uid) doCreatureSetLookDir(cid, getLookToFish(getThingPos(cid), pos2)) --alterado ver depois doFish(cid, toPos, getThingPos(cid), math.random(5, delay)) return true end function getLookToFish(pos, pos2) local x1, y1 = pos.x, pos.y local x2, y2 = pos2.x, pos2.y if x1-x2 <= 0 and y1-y2 > 0 then return NORTH elseif x1-x2 < 0 and y1-y2 == 0 then return EAST elseif x1-x2 < 0 and y1-y2 < 0 then return EAST elseif x1-x2 > 0 and y1-y2 < 0 then return SOUTH elseif x1-x2 > 0 and y1-y2 <= 0 then return WEST elseif x1-x2 > 0 and y1-y2 >= 0 then return WEST elseif x1-x2 < 0 and y1-y2 < 0 then return EAST elseif x1-x2 == 0 and y1-y2 < 0 then return SOUTH end return WEST end
  10. Caso você queira entender o que eu te disse, pode me chamar, mas não para pedir scripts, isso pode ser feito criando um tópico, =)
  11. Qual a versão do seu TFS? @mateusmoretti Execute esse código SQL no seu banco de dados: CREATE TABLE player_ip_storage( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, player_id INT NOT NULL, ip CHAR(15) NOT NULL, storage INT NOT NULL ); ALTER TABLE player_ip_storage ADD CONSTRAINT FK_PLAYER_ID FOREIGN KEY (player_id) REFERENCES players(id); Crie um arquivo chamado nazo-functions.lua em data/lib e adicione o seguinte conteúdo: -- by Nazo (tibiaking.com) -- IP Storage System function getIpQuestStatus(cid, storage) storages = db.getResult("SELECT * FROM `player_ip_storage` WHERE `ip` = \"" .. doConvertIntegerToIp(getPlayerIp(cid)) .. "\" and `storage` = "..storage..";") if(storages:getID() ~= -1) then return false end return true end function setIpQuestStatus(cid, storage) db.executeQuery("INSERT INTO player_ip_storage(player_id, ip, storage) VALUES("..getPlayerGUID(cid)..",\""..doConvertIntegerToIp(getPlayerIp(cid)).."\","..storage..")") return true end Agora, quando você tiver uma quest, adicione na verificação a função getIpQuestStatus na checagem junto, e quando finalizar a quest utilize o setIpQuestStatus, com os parâmetros cid e número da storage, porém a função só armazena que essa storage tem algo no banco de dados, ou seja, a quest já foi feita, você não armazena o valor da storage junto (como a função normal que geralmente adiciona "1" na storage). Exemplo de quest abaixo: -- by Nazo (tibiaking.com) config = { storage = 123123, -- storage da quest premio = {2160, 1} -- {itemid, quantia} } function onUse(cid, item, frompos, item2, toPosition) queststatus = getPlayerStorageValue(cid,config.storage) if(queststatus == -1 and getIpQuestStatus(cid, config.storage)) then -- note que eu só adicionei a função, nenhuma comparação, explicarei abaixo do código doPlayerSendTextMessage(cid,22,"Tome seu prêmio.") doPlayerAddItem(cid,config.premio[1],config.premio[2]) setPlayerStorageValue(cid,config.storage,1) setIpQuestStatus(cid,config.storage) -- função que adiciona a storage no banco de dados else doPlayerSendTextMessage(cid,22,"Você já fez esta quest.") end end Explicação básica do motivo da função não possuir comparação na verificação e ficar como a seguir: if(getIpQuestStatus(cid, config.storage)) then Quando você faz um if, com uma função dentro sem comparações, ela continuará o bloco de comando apenas se o retorno da mesma for verdadeiro, assim quando você faz a quest, e usa o get, o get retorna falso, e isso cancela a condição e vai para o "else".
  12. Esse erro é simples meu chapa, abra o config.php localizado na pasta config do seu htdocs, procure por "$config['site']['serverPath']" no CTRL + F, e deixe com o caminho até a pasta do seu servidor, como no exemplo abaixo: $config['site']['serverPath'] = "C:/Users/Nazo/Desktop/OTServer/"; (use a barra "/" para indicar o diretório, e não a contra-barra "\")
  13. Boa pesquisa, tem muita gente que não entende sobre e nem ao menos sabe o significado real de DDoS, talvez isso os ajude e influencie a estudar mais sobre. nosa cuidado galera ele quer usar tais informações pra segundas intenções
  14. Mostre o script do npc e me responda: O servidor será apenas em rook? Se sim, você quer que o player continue em rook? Se não, você quer que ele vá direto para main?
  15. Nazo postou uma resposta no tópico em Suporte Tibia OTServer
    Mostre o script completo.
  16. Mostre todo script do fishing, por favor.
  17. Bom demais, vai ajudar muita gente, até de base pra caso alguém queira adicionar algo semelhante, parabéns xD
  18. Ahhh, agora ficou mais prático de entender xd Vê se funciona, se seu tfs for 1.x é provável que sim. TAG XML em creaturescripts: <event type="kill" name="resetStages" event="script" value="resetstages.lua"/> No creaturescripts/scripts/login.lua: player:registerEvent("resetStages") Em creaturescripts/scripts/ crie o resetstages.lua e coloque o seguinte conteúdo: -- by Nazo (tibiaking.com) config = { storage = 12129 -- storage dos resets } function onKill(cid, target, lastHit) if(getPlayerStorageValue(cid,config.storage) >= 1)then local monster = Monster(target) if not monster then return true end for id, damage in pairs(monster:getDamageMap()) do local player = Player(id) if(player)then local experience = damage.total / monster:getType():getHealth() * monster:getType():getExperience() local expFormula = -((experience * Game.getExperienceStage(player:getLevel())) / 100) if(getPlayerStorageValue(cid, config.storage) < 10) then expFormula = expFormula * getPlayerStorageValue(cid, config.storage)*10 else expFormula = expFormula * 90 end player:addExperience(math.floor(expFormula), true) end end end return true end O que acontece aqui, é que o script pega o número de resets do players, multiplica por 10 e tira de porcentagem no monstro morto, exemplo: Tenho 5 resets, matei um monstro que dá 100 de xp, o script multiplica meus resets por 10 (que dá 50) e tira de porcentagem da xp, assim eu ganharia 50 de xp, invés de 100. Caso eu tenha 10 ou mais resets, eu ganho 10% da xp real do monstro apenas.
  19. Eu não consegui entender o que você está pedindo, pq segundo o script que você mostrou, o player sempre fica com 2254834200 de xp (xp do level 8), como está na linha a seguir, então não faria sentido ele perder mais xp level_multiply = 2254834200, -- Exp para o Level 8 (Consulte na Tabela a Quantidade para Level Desejado)
  20. Me faça uma tabela exemplo, com 3 linhas, xp atual, numero do reset e level do player, entende? Para eu entender melhor como você quer o stage.
  21. Me explique uma coisa, se o player tem 100 de xp e reseta, quer que ele perca de 20% em 20% a cada reset? Se sim, me explique uma coisa: O player tem 100 de xp e reseta 3x (alcançando o tal level 3x), quanto de xp ele fica no primeiro reset, segundo e terceiro?
  22. Perdão, mas não irei te ajudar considerando isso: Estamos em um fórum, uma comunidade, e tudo postado aqui deve ser aberto ao público, mesmo que você não queira que divulguem por aí até com seus créditos, não farei um script "privado" em algo público, sorry.
  23. Não dou suporte por PM, sorry, mas você pode postar que eu verei.
  24. Não, só o mesmo script, a action diferente, pois cada baú tem seu prêmio, entende?
  25. Coloque o mesmo script em todos baús: -- by Nazo (tibiaking.com) config = { storage = 123123, -- você usará essa storage em todos baús premio = {2160, 1}, -- {id do item, quantia} maxPremios = 2 -- máximo de baús que podem ser pegos } function onUse(cid, item, frompos, item2, toPosition) queststatus = getPlayerStorageValue(cid,config.storage) if(queststatus < config.maxPremios) then doPlayerSendTextMessage(cid,22,"Tome seu item.") doPlayerAddItem(cid,config.premio[1],config.premio[2]) setPlayerStorageValue(cid,config.storage,queststatus+1) else doPlayerSendTextMessage(cid,22,"Você já pegou dois baús.") end end

Informação Importante

Confirmação de Termo