Solutions
-
luanluciano93's post in (Resolvido)Funções was marked as the answerScripting --> Biblioteca e Funções: http://www.tibiaking.com/forum/forum/199-bibliotecas-e-fun%C3%A7%C3%B5es/
Funções TFS 1.0 -- http://www.tibiaking.com/forum/topic/31368-lua-functions/
Funções de TFS mais antigos -- http://www.tibiaking.com/forum/topic/18826-funcoes-lua/
Espero ter ajudado, abraços!
-
luanluciano93's post in (Resolvido)[Pedido] Script Change Worldtype! was marked as the answerDá uma olhada nessa: http://www.tibiaking.com/forum/topic/33243-mudar-pvp-a-cada-x-tempo/
-
luanluciano93's post in (Resolvido)NPC de quest para Ot 8.60 was marked as the answerlocal keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function FUNCAO_NOME(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end local storage = 50001 if getPlayerStorageValue(cid, storage) ~= 1 then if getPlayerItemCount(cid,2516) >= 1 then -- SE TIVER 1 OU MAIS ITEM COM ID 2516 if doPlayerRemoveItem(cid,2516,1) then -- remove 1 ITEM DO ITEM COM ID 2516 npcHandler:say('Here is your item!', cid) -- MENSAGEM AO REMOVER O ITEM doPlayerAddItem(cid,5908,1) -- ADD 1 ITEM COM ID 5908 setPlayerStorageValue(cid, storage, 1) end else npcHandler:say('Você não tem o item!', cid) end else npcHandler:say('Você já fez a quest!', cid) end end local node2 = keywordHandler:addKeyword({'teste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'vocÊ quer testar a função desse script?'}) node2:addChildKeyword({'yes'}, FUNCAO_NOME, {npcHandler = npcHandler, onlyFocus = true, reset = true}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Até mais.', reset = true}) npcHandler:addModule(FocusModule:new())
-
luanluciano93's post in (Resolvido)Coordenadas em Teleport por SCRIPT was marked as the answerSe o do Victor não funcionar teste esse que fiz, mas não testei ...
local config = { day = "Friday", pos = {x=152, y=50, z=7}, -- Posição aonde sera criado o teleport topos = {x=1235, y=1197, z=7}, -- Posição pra onde o teleport ira levar o player time = 5, -- tempo que o teleport ira sumir em minutos msg_open = "Evento aberto!", -- mensagem ao abrir o teleport msg_close = "Evento VIP. Proximo evento em 1h." -- mensagem ao fechar o teleport } local function DelTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end function onTimer() if (os.date("%A") == config.day) then doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage(config.msg_open) addEvent(DelTp, config.time*60*1000) addEvent(doBroadcastMessage, config.time*60*1000, config.msg_close) end return true end Qualquer erro poste aqui!
edited ---
Dei uma pesquisada no fórum e achei esse tópico:
http://www.tibiaking.com/forum/topic/13650-globalevents-evento-tp-automatico/
Aconselho a quando tiver dúvidas procurar antes no fórum!
-
luanluciano93's post in (Resolvido)Erro SQL Login was marked as the answerSe a dúvida do tópico foi sanada clique em melhor resposta para o tópico ficar como resolvido!
Se tiver outros dúvidas use a barra de pesquisa, se não encontrar nada, crie um novo tópico com sua dúvida ...
Espero ter ajudado, abraços!
-
luanluciano93's post in (Resolvido)ShopSystem não entrega Items was marked as the answercrie outro tópico para outras dúvidas ..
A dúvida do tópico esta resolvido? Se sim clique em melhor resposta!
-
luanluciano93's post in (Resolvido)Adicionar !buypremium was marked as the answerPrimeiramente, vá em talkactions/scripts e crie um arquivo.lua, nomeia-o de buypremium.lua e coloque isto dentro:
function onSay(cid, words, param) if getPlayerPremiumDays(cid) <= 350 then if doPlayerRemoveMoney(cid, 10000) == TRUE then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você comprou 30 dias de ´premmium.") else doPlayerSendCancel(cid, "Você não tem dinheiro para comprar 30 dias de p.a que custa 10k.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Você não Pode comprar mais que 1 ano de p.a.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end Agora, volte para talkactions/talkaction.xml e coloca isso:
<talkaction words="!buypremium" script="buypremium.lua" /> Nessa linha você edita a quantidade de dias que irá add no player:
doPlayerAddPremiumDays(cid, 30)
E nessa você configura o valor em gps:
if doPlayerRemoveMoney(cid, 10000) == TRUE then
Espero ter ajudado.
-
luanluciano93's post in (Resolvido)erro na na hr que eu criei o site was marked as the answerExecuta no phpmyadmin na sua database ..
ALTER TABLE `z_forum` ADD `icon_id` int(10) NOT NULL default '0'; Aguardo resposta!
-
luanluciano93's post in (Resolvido)BUG No Parcel was marked as the answer
-
luanluciano93's post in (Resolvido)Ajuda no Latest News Layout was marked as the answerTenta esse comando no phpmyadmin:
INSERT INTO z_news_tickers (date, author, image_id, text, hide_ticker) VALUES ('.time().', 1, 1, "Desbugando Gesior AAC!", 0) Acho que resolve!
-
luanluciano93's post in (Resolvido)GESIOR ACC 0.3.8 - Shop System was marked as the answerAmigo, eu peguei para fazer, mas acho que não compensa, dá muito trabalho, tem que alterar algumas tabelas ... o máximo que a tabela suporte são 2 ids (no caso do container, como você disse), que é o ID do container, e o ID do item que irá dentro (apenas 1).
elseif ($data['offer_type'] == 'container') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['container_id'] = $data['itemid2']; $offer['container_count'] = $data['count2']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } Espero ter esclarecido sua dúvida!
-
luanluciano93's post in (Resolvido)Atualizando e compilando e executando em linux was marked as the answerFale sobre os erros ..
Normalmente quando se migra de windows para linux, aparece muitos erros de sensitive ..
Oque são erros de sensitives? São "erros" que aparecem por causa de letras maiúsculas e minusculas .. o windows não liga para essa diferença e o linux liga, se tu colocar, por exemplo, o nome de um monster "Assasin" no monsters.xml e lá na pasta monsters/outlaws/assassin.lua estiver assassin, sem o "A" maiúscula aparece erro de sensitive, e o monsters não carrega, e assim vai, é +/- isso!
-
luanluciano93's post in (Resolvido)PEDIDO} Item Com id Propria was marked as the answer2 opções:
1 - Tira esses itens dos monsters, assim eles não irão dropar!
2 - Cria seus itens dontes com base em algum item que não caia de monster e não podem ser obtidos em quests ...
É isso ai!
-
luanluciano93's post in (Resolvido)[AJUDA] Mount Doll / Addon Doll / Stamina Refiller , todas do TFS 1.0 was marked as the answertalkactions/scripts/addondoll.lua
talkactions/scripts/mountdoll.lua
Jaja tento o stamina refiller ...
-
luanluciano93's post in (Resolvido)[TFS 1.0] Shopsystem - Delivery! was marked as the answerTesta ai.
-- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 18 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.storeQuery("SELECT * FROM z_ots_comunication") if(result_plr ~= false) then repeat local id = tonumber(result.getDataInt(result_plr, "id")) local action = tostring(result.getDataString(result_plr, "action")) local delete = tonumber(result.getDataInt(result_plr, "delete_it")) local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name"))) if(cid) then local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1")) local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2")) local container_id = tonumber(result.getDataInt(result_plr, "param3")) local container_count = tonumber(result.getDataInt(result_plr, "param4")) local add_item_type = tostring(result.getDataString(result_plr, "param5")) local add_item_name = tostring(result.getDataString(result_plr, "param6")) local received_item = 0 local full_weight = 0 if(add_item_type == 'container') then container_weight = getItemWeight(container_id, 1) if(isItemRune(itemtogive_id)) then items_weight = container_count * getItemWeight(itemtogive_id, 1) else items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeight(itemtogive_id, itemtogive_count) if(isItemRune(itemtogive_id)) then full_weight = getItemWeight(itemtogive_id, 1) else full_weight = getItemWeight(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if(full_weight <= free_cap) then if(add_item_type == 'container') then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while(iter ~= container_count) do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end until not result.next(result_plr) result.free(result_plr) end return true end Créditos: Gesior.pl
-
luanluciano93's post in (Resolvido)[TFS 1.0] Gesior "Time" was marked as the answerAbra o arquivo system/load.init.php e procure pela linha:
session_start();
coloque isso na linha abaixo:
date_default_timezone_set("America/Sao_Paulo");
Acho que isso resolverá seu problema
-
luanluciano93's post in (Resolvido)[TFS 1.0] Gesior SHOP System e Lost Account System was marked as the answer# Emails Config $config['site']['send_emails'] = false; # ENVIAR EMAILS? SIM (TRUE) OU NÃO (FALSE) $config['site']['mail_address'] = "[email protected]"; # SEU EMAIL (TEM QUE SER GMAIL) $config['site']['smtp_enabled'] = true; # NÃO MUDAR $config['site']['smtp_host'] = "smtp.live.com"; # COLOCAR 'smtp.gmail.com' $config['site']['smtp_port'] = 25; # tenta a 25 mesmo, se não der tenta 465 $config['site']['smtp_auth'] = true; # não mudar $config['site']['smtp_user'] = "[email protected]"; # SEU EMAIL (TEM QUE SER GMAIL) $config['site']['smtp_pass'] = "senhadomeuemail"; # sua senha
-
luanluciano93's post in (Resolvido)Meu site está redirecionando para outro! was marked as the answerTa cheio de erro de sintaxe, pega outro latestnews de outro gesior!
-
luanluciano93's post in (Resolvido)Website De um jeito pra min e de outro para as pessoas was marked as the answerreinicia o apache!
-
luanluciano93's post in (Resolvido)[AJUDA] Erro timezone no site was marked as the answerBom pelo jeito tu usa gesior2012 .. vá em system/load.init.php
procure por session_start();
na linha debaixo coloque: date_default_timezone_set("America/Sao_Paulo");
Ficando assim:
$time_start = microtime(true); session_start(); date_default_timezone_set("America/Sao_Paulo"); Espero ter ajudado.
-
luanluciano93's post in (Resolvido)erro gesior was marked as the answerProvavelmente os dados para se conectar a database não estão certos ..
dê uma olhada no seu config.lua e verifique essa parte:
sqlType = "mysql" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "SENHA" sqlDatabase = "DATABASE" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "sha1" -
luanluciano93's post in (Resolvido)Erro mysql fast was marked as the answerO erro esta dizendo que a tabela "z_ot_comunication" não existe, basta adiciona-lá!
CREATE TABLE `z_ots_comunication` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -
luanluciano93's post in (Resolvido)Erro nas Quests was marked as the answerProvavelmente você pegou o mapa e scripts de um servidor para versão 0.4, como a sua é 0.3.6 houve esses bugs.
Tenta achar um real server aqui no fórum que seja 0.3.6 ...
-
luanluciano93's post in (Resolvido)[GESIOR] ERRO Alguem me ajudee was marked as the answerUse esse comando na database (pelo phpmyadmin)
CREATE TABLE `z_forum` ( `id` int(11) NOT NULL auto_increment, `first_post` int(11) NOT NULL default '0', `last_post` int(11) NOT NULL default '0', `section` int(3) NOT NULL default '0', `replies` int(20) NOT NULL default '0', `views` int(20) NOT NULL default '0', `closed` tinyint(1) NOT NULL default '0', `sticky` int(11) NOT NULL default '0', `author_aid` int(20) NOT NULL default '0', `author_guid` int(20) NOT NULL default '0', `post_text` text NOT NULL, `post_topic` varchar(255) NOT NULL, `post_smile` tinyint(1) NOT NULL default '0', `post_date` int(20) NOT NULL default '0', `last_edit_aid` int(20) NOT NULL default '0', `edit_date` int(20) NOT NULL default '0', `post_ip` varchar(15) NOT NULL default '0.0.0.0', PRIMARY KEY (`id`), KEY `section` (`section`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; Espero te ajudado!
-
luanluciano93's post in (Resolvido)[AJUDA]site instalado was marked as the answerAconselho esse http://www.tibiaking.com/forum/topic/27798-new-gesior-a-evolu%C3%A7%C3%A3o/
=)