testando aki!
EDIT
onde eu add msmo o create food? eu botei no data/lib/function mais nao pegou nao ta certo o lugar?
Por walefxavier, 22 de abr. de 2011 em Tutoriais de Websites
info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

testando aki!
EDIT
onde eu add msmo o create food? eu botei no data/lib/function mais nao pegou nao ta certo o lugar?
Editado Junho 1 por PiabetaMan01
testando aki!
EDIT
onde eu add msmo o create food? eu botei no data/lib/function mais nao pegou nao ta certo o lugar?
adcione o create food em data/spells/scripts/support/conjure food.lua
info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

vlw aew mscabelo +rep proce!
info
Grupo: Artesão
Registrado: 14/07/08
Posts: 148
Reputação: +17
Char no Tibia: [ADM] ShadoW

To precisando saber como usa esse TFS 0.4, ele vem em sha1 e vem sem o arquivo .mysql .
Alguem pode dar uma luz? Dou Rep+++
Msn: danielneto_96@hotmail.com
para usar o tfs 0.4 baixe a distros e as dlls disponibilizada no tópico, extraia-as na pasta de seu otserv, configure o ot e executeo normalmente.
-use o mysql do seu ot apenas executando isso na aba SQL:
CREATE TABLE IF NOT EXISTS `guild_wars` (
`id` INT NOT NULL AUTO_INCREMENT,
`guild_id` INT NOT NULL,
`enemy_id` INT NOT NULL,
`begin` BIGINT NOT NULL DEFAULT '0',
`end` BIGINT NOT NULL DEFAULT '0',
`frags` INT UNSIGNED NOT NULL DEFAULT '0',
`payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
`guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
`enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
`status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `guild_id` (`guild_id`),
KEY `enemy_id` (`enemy_id`)
) ENGINE=InnoDB;
ALTER TABLE `guild_wars`
ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`;
CREATE TABLE IF NOT EXISTS `guild_kills` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`guild_id` INT NOT NULL,
`war_id` INT NOT NULL,
`death_id` INT NOT NULL
) ENGINE = InnoDB;
ALTER TABLE `guild_kills`
ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0;
-para mudar o Sha1 vá no seu config.lua e procure por :
encryptionType = "sha1"
e o substitua por
encryptionType = "plain"
ou a criptogração que você usar.
p.s: caso o sql que eu lhe passei não funcione, me diga seu servidor que eu passo um arquivos .sql para o mysql completo.
Editado Junho 3 por MsCabelo
info
Grupo: Artesão
Registrado: 03/06/11
Posts: 143
Reputação: +102
Char no Tibia: [ADM] Sakyo

MsCabelo, esse comando SQL que você me passou não tem nada a ver, isso está se referindo as Wars.. e enquanto ao sha1... não posso mudá-lo, pois o TFS 0.4 necessita do sha1 pra funcionar.
E assim.. eu não sei o porque que eu não consigo logar a conta do god, logo apenas a acc manager e crio uma conta, mas a conta criada tbm não loga. Tanto no Sqlite como no MySQL.
Não sei se o problema é do sha1 ou é do arquivo .mysql.
Editado Junho 3 por RaizenUrameshi
info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

bem qndo instalei o tfs0.4 ja veio em "plain" e nao tive nenhum problema de abrir god ou qualquer outro char e qualquer outra acc, msmo q no console tenha pedido para troca o "sha1" , veio deve ser problema de conflito do distro e seu pc, pois aki rodou de boa vc usa q tipo de sistema operacional?
MsCabelo, esse comando SQL que você me passou não tem nada a ver, isso está se referindo as Wars.. e enquanto ao sha1... não posso mudá-lo, pois o TFS 0.4 necessita do sha1 pra funcionar.
E assim.. eu não sei o porque que eu não consigo logar a conta do god, logo apenas a acc manager e crio uma conta, mas a conta criada tbm não loga. Tanto no Sqlite como no MySQL.
Não sei se o problema é do sha1 ou é do arquivo .mysql.
quanto ao comando sql que eu lhe passei, você disse que não vinha com arquivo .mysql, eu disse para usar o .sql do seu ot e apenas adcionar aquilo.
e se você executar em plain, ele apenas lhe dará um aviso, em cerca de 1 minuto depois ele segue. Cheque no seu mysql se ele ja não criptografou as senhas em SHA1, se criptografou, resete o seu banco de dados, caso não, apenas rode seu sv e entre.
P.S: normalmente na primeira vez que você executa em SHA1 ele criptgrafa automaticamente dependendo de suas configurações.
P.S2: Se não estiverem criptografadas as senhas, e você botar em Plain e ele não funcionar, tente dar restart no ot, toda vez que mudo de SHA1 para plain aqui, ele não entra, só após dar restart.
info
Grupo: Artesão
Registrado: 03/06/11
Posts: 143
Reputação: +102
Char no Tibia: [ADM] Sakyo

@ PiabetaMan01
Uso Windows7 Ultimate.
@Mscabelo
Ainda não funcionou cara, no modo plain ele nem loga a acc Manager, e no modo sha1, ele ate loga a acc manager e cria a conta, porem quando vou logar a acc manager na conta logada, dá Invalid Password.
Editado Junho 4 por RaizenUrameshi
info
Grupo: Campones
Registrado: 08/05/11
Posts: 64
Reputação: 0
Char no Tibia: Revoltz

Dps ke Eu Instalar Esse Script Em meu WebSite gesior.. Eu preciso Faser algo Nele. ou Ele funciona Totalmente Altomaticamente ?
info
Grupo: Campones
Registrado: 16/05/09
Posts: 91
Reputação: +236
Char no Tibia: Dewolive

Se voce seguir todas etapas ditas no topico,é totalmente automatico !
info
Grupo: Visconde
Registrado: 24/01/11
Posts: 254
Reputação: +29
Char no Tibia: Zemekiz

Mano o meu nao deu add no msn pra noix conversar melhor plx??
info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

info
Grupo: Artesão
Registrado: 03/06/11
Posts: 143
Reputação: +102
Char no Tibia: [ADM] Sakyo

@PiabetaMan01
Windows 7 --- 32 Bits
info
Grupo: Campones
Registrado: 08/09/10
Posts: 16
Reputação: +1
Char no Tibia: Hidden
Na verdade, o TFS 0.4 (8.54 - 8.57) funciona normal aqui.
-A magia de food, não consegui arrumar, mas tente usar essa, aqui funcionou
local FOODS = {
2666, -- meat
2671, -- ham
2681, -- grape
2674, -- aple
2689, -- bread
2690, -- roll
2696 -- cheese
}
function onCastSpell(cid, var)
local size = table.maxn(FOODS)
if(not doPlayerAddItem(cid, FOODS[math.random(1, size)])) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF)
return false
end
if(math.random(1, 100) > 50) then
doPlayerAddItem(cid, FOODS[math.random(1, size)])
end
doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_GREEN)
return true
end
-O TFS 0.4 e todos outros utilizam os milisecundos, e não segundos como nos outros OTS. o tempo igual ao dos outros para the forgotten server é:
Save:900000
Clean:7200000
(modificar no globalevents.xml)
-Os monstros não dropam loot para player da Staff ( GOD,GM,CM ) tente com um player normal.
-Cara, não existe main.php no tfs, existe o .lua se for copie faça um com esse script:
-- Advanced NPC System (Created by Jiddo),
-- Modified by TheForgottenServer Team.
if(NpcSystem == nil) then
-- Loads the underlying classes of the npcsystem.
dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua')
dofile(getDataDir() .. 'npc/lib/npcsystem/queue.lua')
dofile(getDataDir() .. 'npc/lib/npcsystem/npchandler.lua')
dofile(getDataDir() .. 'npc/lib/npcsystem/modules.lua')
-- Global npc constants:
-- Keyword nestling behavior. For more information look at the top of keywordhandler.lua
KEYWORD_BEHAVIOR = BEHAVIOR_NORMAL_EXTENDED
-- Greeting and unGreeting keywords. For more information look at the top of modules.lua
FOCUS_GREETWORDS = {'hi', 'hello'}
FOCUS_FAREWELLWORDS = {'bye', 'farewell'}
-- The word for requesting trade window. For more information look at the top of modules.lua
SHOP_TRADEREQUEST = {'offer', 'trade'}
-- The word for accepting/declining an offer. CAN ONLY CONTAIN ONE FIELD! For more information look at the top of modules.lua
SHOP_YESWORD = {'yes'}
SHOP_NOWORD = {'no'}
-- Pattern used to get the amount of an item a player wants to buy/sell.
PATTERN_COUNT = '%d+'
-- Talkdelay behavior. For more information, look at the top of npchandler.lua.
NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK
-- Conversation behavior. For more information, look at the top of npchandler.lua.
NPCHANDLER_CONVBEHAVIOR = CONVERSATION_PRIVATE
-- Constant strings defining the keywords to replace in the default messages.
-- For more information, look at the top of npchandler.lua...
TAG_PLAYERNAME = '|PLAYERNAME|'
TAG_ITEMCOUNT = '|ITEMCOUNT|'
TAG_TOTALCOST = '|TOTALCOST|'
TAG_ITEMNAME = '|ITEMNAME|'
TAG_QUEUESIZE = '|QUEUESIZE|'
NpcSystem = {}
-- Gets an npcparameter with the specified key. Returns nil if no such parameter is found.
function NpcSystem.getParameter(key)
local ret = getNpcParameter(tostring(key))
if((type(ret) == 'number' and ret == 0) or ret == nil) then
return nil
else
return ret
end
end
-- Parses all known parameters for the npc. Also parses parseable modules.
function NpcSystem.parseParameters(npcHandler)
local ret = NpcSystem.getParameter('idletime')
if(ret ~= nil) then
npcHandler.idleTime = tonumber(ret)
end
local ret = NpcSystem.getParameter('talkradius')
if(ret ~= nil) then
npcHandler.talkRadius = tonumber(ret)
end
local ret = NpcSystem.getParameter('message_greet')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_GREET, ret)
end
local ret = NpcSystem.getParameter('message_farewell')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_FAREWELL, ret)
end
local ret = NpcSystem.getParameter('message_decline')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_DECLINE, ret)
end
local ret = NpcSystem.getParameter('message_needmorespace')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_NEEDMORESPACE, ret)
end
local ret = NpcSystem.getParameter('message_needspace')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_NEEDSPACE, ret)
end
local ret = NpcSystem.getParameter('message_sendtrade')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_SENDTRADE, ret)
end
local ret = NpcSystem.getParameter('message_noshop')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_NOSHOP, ret)
end
local ret = NpcSystem.getParameter('message_oncloseshop')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_ONCLOSESHOP, ret)
end
local ret = NpcSystem.getParameter('message_onbuy')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_ONBUY, ret)
end
local ret = NpcSystem.getParameter('message_onsell')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_ONSELL, ret)
end
local ret = NpcSystem.getParameter('message_missingmoney')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_MISSINGMONEY, ret)
end
local ret = NpcSystem.getParameter('message_needmoney')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_NEEDMONEY, ret)
end
local ret = NpcSystem.getParameter('message_missingitem')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_MISSINGITEM, ret)
end
local ret = NpcSystem.getParameter('message_needitem')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_NEEDITEM, ret)
end
local ret = NpcSystem.getParameter('message_idletimeout')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_IDLETIMEOUT, ret)
end
local ret = NpcSystem.getParameter('message_walkaway')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_WALKAWAY, ret)
end
local ret = NpcSystem.getParameter('message_alreadyfocused')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_ALREADYFOCUSED, ret)
end
local ret = NpcSystem.getParameter('message_placedinqueue')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_PLACEDINQUEUE, ret)
end
local ret = NpcSystem.getParameter('message_buy')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_BUY, ret)
end
local ret = NpcSystem.getParameter('message_sell')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_SELL, ret)
end
local ret = NpcSystem.getParameter('message_bought')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_BOUGHT, ret)
end
local ret = NpcSystem.getParameter('message_sold')
if(ret ~= nil) then
npcHandler:setMessage(MESSAGE_SOLD, ret)
end
-- Parse modules.
for parameter, module in pairs(Modules.parseableModules) do
local ret = NpcSystem.getParameter(parameter)
if(ret ~= nil) then
local number = tonumber(ret)
if(number ~= nil and number ~= 0) then
npcHandler:addModule(module:new())
end
end
end
end
end
-e sim é db.query.