WA

[Gesior Acc] Guild War System Com Escudos

Por walefxavier, 22 de abr. de 2011 em Tutoriais de Websites

otserv
tibia
script
236
108.9k
MsCabeloM
01 de junho de 2011 às 12:40

Cara, isso talvez pode ser a memória do seu PC, ou a compilação ...

 

Pois e bom usar a compilação do 64bit no win 32 BIT ;x

 

No mínimo para rodar o TFS 0.4 são 4 GB

Na verdade, o TFS 0.4 (8.54 - 8.57) funciona normal aqui.

 

veio se merece um beijo na bunda, aleluia alguem postou isso e olha q ja tem tempo, veio te amo muito!

++++++++++++++++++++++++REP pra vc!

 

 

EDIT

 

TEstei aki funfou 100% tudo do system o problema que muitas coisa no meu ot deu pau:

- magia de fazer food!

- minhas talk actions como save, clean e lotery nao estao contando tempo executam de 1 em 1 segundo! ou seja save sem parar e etc!

- monstros nao dropam mais loot!

- e ele pede um arkivo na pasta npc/ lib / npcsystem/main.php sendo q isso nunca existiu no meu ot !

 

se puder me dar uma luz agradeço!

 

OBS: eu modifiquei todos as linhas dentro do global events que tinha isso -> "dbExecute.query" eu botei isso "db.query" se tiver errado me avisem! preciso muito de arrumar isso!

-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.

Piabeta KunP
01 de junho de 2011 às 12:54

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

MsCabeloM
01 de junho de 2011 às 13:27

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

Piabeta KunP
02 de junho de 2011 às 17:41

vlw aew mscabelo +rep proce!

haiguriH
02 de junho de 2011 às 21:25

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

MsCabeloM
03 de junho de 2011 às 13:24

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

ultimate1996U
03 de junho de 2011 às 15:06

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

Piabeta KunP
04 de junho de 2011 às 00:49

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?

MsCabeloM
04 de junho de 2011 às 15:37

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.

ultimate1996U
04 de junho de 2011 às 16:59

@ 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

PonintatuP
04 de junho de 2011 às 20:34

Dps ke Eu Instalar Esse Script Em meu WebSite gesior.. Eu preciso Faser algo Nele. ou Ele funciona Totalmente Altomaticamente ?

walefxavierW
05 de junho de 2011 às 08:48

Se voce seguir todas etapas ditas no topico,é totalmente automatico !

joao33J
05 de junho de 2011 às 09:26

Mano o meu nao deu add no msn pra noix conversar melhor plx??

Piabeta KunP
05 de junho de 2011 às 15:10

 

@RaizenUrameshi

seu win 7 e em 64 bits?

ultimate1996U
05 de junho de 2011 às 15:11

@PiabetaMan01

Windows 7 --- 32 Bits