Ir para conteúdo

Gnius

Membro
  • Registro em

  • Última visita

Tudo que Gnius postou

  1. Eu uso Mysql(Site),tem algum problema? Também acho estranho.
  2. tava dando um erro [31/12/2017 06:53:31] [Error - MoveEvents Interface] [31/12/2017 06:53:31] datapack/movements/scripts/tileLevelLoss.lua:onStepIn[31/12/2017 06:53:31] Description: [31/12/2017 06:53:31] datapack/movements/scripts/tileLevelLoss.lua:12: attempt to call field 'query' (a nil value)[31/12/2017 06:53:31] stack traceback:[31/12/2017 06:53:32] datapack/movements/scripts/tileLevelLoss.lua:12: in function <datapack/movements/scripts/tileLevelLoss.lua:6> então eu editei a linha db.query por db.executeQuery o erro sumiu,o player é teleportado porem ele não perde o level. Script ficou assim local config = { posi = {x = 1215, y = 1858, z = 7}, -- Onde sera teleportado levelLoss = 50 -- Level que ira perder } function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end db.executeQuery("UPDATE `players` SET `level` = `level` - '"..config.levelLoss.."' WHERE `name` = '".. getPlayerName(cid).."';") doTeleportThing(cid, config.posi) return true end
  3. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Não entendi muito bem,qual seria a função sobre essa script que você postou? E oque você realmente quer? Porfavor poste o npc a script.lua do npc que vende a vocation
  4. Olá galera do TK,gostaria de uma script pode ser action ou movements,que quando o player utilize essa script,ele perderá x level Por exemplo Vou em um bau,clico no bau e assim o player perde 300 level Mesma coisa com movements Pisou no no tile,automaticamente perde 300 level (de preferencia podia por pra pisar e se teleportado pra x área
  5. Já testei ele OFFLINE e ONLINE e o problema ainda continua.
  6. Olá galera,gostaria de saber como faço para adicionar o sistema de criar guild pelo site. Sempre que vou criar guild pelo site aparece a a seguinte mensagem All your characters are already in guild or they don't have required level. (50) Porém o player ja está level 50 e não tem guild(a apenas 1 char na conta)
  7. Olá galera do TK,gostaria de implantar um anti teleport nessa script,no caso o player ao usar essa script,ele não poderia dar teleport com os pokemons(essa script é movements) Script do teleport
  8. Funcionou perfeitamente,obg man
  9. Galera,estou com um problema no meu servidor,o spell healarea não funciona no pvp,sem ser no pvp ele funciona normal,cura os players,pokemons tu do certinho porém no pvp ele só cura o pokemon menos os players. Quebrei a cabeça e não consegui resolver,então vi m pedir ajuda de vocês Spell do healarea em lib/pokemon moves elseif spell == "Healarea" then local min = (getCreatureMaxHealth(cid) * 50) / 100 local max = (getCreatureMaxHealth(cid) * 60) / 100 local function doHealArea(cid, min, max) local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end local pos = getPosfromArea(cid, heal) local n = 0 doHealArea(cid, min, max) while n < #pos do n = n+1 thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} local pid = getThingFromPosWithProtect(thing) doSendMagicEffect(pos[n], 12) if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then if canAttackOther(cid, pid) == "Cant" then doHealArea(pid, min, max) end elseif ehMonstro(cid) and ehMonstro(pid) then doHealArea(pid, min, max) end end end
  10. Agora funcionou,brigadão garden,sempre ajudando quem precisa
  11. Não funcionou,e também não deu erro na distro
  12. Olá galera do tk,gostaria de uma script que faz com que o player não possa usar 2 pokemons iguais. Por exemplo: Player tem 2 alakazam na bag,ai vai usar um porém aparece uma mensagem impedindo que ele use esse pokemon Você não pode usar 2 pokemons repetidos
  13. Funcionou direitinho,obrigadoo
  14. Olá galera do tk,gostaria de saber como eu coloco level nesse comando,e se possivel aparecer a mensagem de quando o player não tiver o level Script do comando function onSay(cid, words, param) if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then doPlayerSendCancel(cid,'Voce ja esta protegido!') else if doPlayerRemoveMoney(cid, 200000) == TRUE then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 28) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Parabens voce agora esta protegido,perdera menos level o morrer mais lembre de comprar toda vez q morrer!') else doPlayerSendCancel(cid, "Voce nao tem 20hds!") end end return TRUE end
  15. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Por favor poste o seu config.lua
  16. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    https://www.facebook.com/emerson.marinho Eita...Mandei link errado kkk Link certo https://www.facebook.com/emerson.marinho.3158
  17. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Ter eu até tenho +meu pc ta no concerto,estou usando um pc reserva e n da pra baixa skype agora Mais Adc ae GniusPlay
  18. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Ja adicionou os items do shop no seu site?
  19. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Amigao faz o seguinte Vai no seu localhost/phpmyadmin Após isso vai no seu banco de dados Feito isso vai na parte de cima onde tá escrito SQL e coloca isso lá INSERT INTO `shop_history`(`id`, `product`, `session`, `player`, `date`, `processed`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6]) da ok Depois coloca o script novamente function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma >> "..productn.." << do Shop System") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end Creio que o SQL não vai ir VocÊ vai ter q baixar esse shop.rar Extrair dentro do htdocs do seu site Depois disso vai no localhost/phpmyadmin Vai na seu banco de dados vai em importart procura em htdocs/shop/config/ importa o arquivo Shop.sql E usa a script acima que mandei pra vocÊ Crei oque não haverá mais erros shop.rar
  20. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta function onThink(interval, lastExecution, thinkInterval) if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma >> "..productn.." << do Shop System") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end
  21. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta essa script,é o mesmo sistema function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma >> "..productn.." << do Shop System") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end
  22. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Desculpa,erro meu vê se vai local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 function onThink(interval, lastExecution, thinkInterval) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(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) doItemSetAttribute(new_item, "description", "Este item foi comprado pelo shop e entregue para o jogador ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if 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 if not(result_plr:next()) then break end end result_plr:free() end return true end
  23. Gnius postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 function onThink(interval, lastExecution, thinkInterval) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(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) doItemSetAttribute(new_item, "description", "Este item foi comprado pelo shop e entregue para o jogador ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if 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 if not(result_plr:next()) then break end end result_plr:free() end return true end
  24. Galera estou com erro no meu servidor Toda hora da esse erro,porém não sei como resolver. Algumas vezes os numeros 332 e 59 mudam,não sei oque é exatamente VocÊs poderiam me ajudar? E também me falar o porque ocorre esse erro e como arruma-lo? erro abaixo: [29/11/2017 16:11:48] [Error - CreatureScript Interface] [29/11/2017 16:11:48] datapack/creaturescripts/scripts/exp2.0.lua:onStatsChange [29/11/2017 16:11:48] Description: [29/11/2017 16:11:48] datapack/creaturescripts/scripts/exp2.0.lua:332: attempt to index field '?' (a nil value) [29/11/2017 16:11:48] stack traceback: [29/11/2017 16:11:48] datapack/creaturescripts/scripts/exp2.0.lua:332: in function <datapack/creaturescripts/scripts/exp2.0.lua:59> data/creaturescripts/Script/exp2.0.lua

Informação Importante

Confirmação de Termo