Tudo que Movie postou
-
(Resolvido)[Pedido] Escolhendo Spells
https://pastebin.com/wbS1EMzs
-
(Resolvido)[Pedido] Escolhendo Spells
Só fazer via storage, igual tem aqui if getPlayerStorageValue(cid, 64854) >= 10 then
-
(Resolvido)Fechar script
Creio que o look no piso deve ser feito via source, não podendo ser alterado via lua ?
-
(Resolvido)Fechar script
Tenta assim function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid, "Position: [X:".. position.x.."] [Y:".. position.y.."] [Z:".. position.z.."]\n[Frags: "..getPlayerFrags(thing.uid).."], [Critical: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0)).."] \n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." is ") elseif thing.uid == cid then doPlayerSetSpecialDescription(cid, " [Frags: "..getPlayerFrags(cid).."], [Critical: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0)).."]") local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'. [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0))..'].' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the guild '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
-
(Resolvido)Fechar script
function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid, " [Frags: "..getPlayerFrags(thing.uid).."], [Critical: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0)).."] \n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." is ") elseif thing.uid == cid then doPlayerSetSpecialDescription(cid, " [Frags: "..getPlayerFrags(cid).."], [Critical: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0)).."]") local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'. [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0))..'].' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the guild '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
-
(Resolvido)Fechar script
Tenta function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid, " [Frags: "..getPlayerFrags(thing.uid).."], [Critical: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0)).."] \n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." is ") elseif thing.uid == cid then doPlayerSetSpecialDescription(cid, " [Frags: "..getPlayerFrags(cid).."], [Critical: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0)).."]") local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'. [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,98798644)) or 0))..'].' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the guild '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if isPlayer(thing.uid) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
-
(Resolvido)Fechar script
Me fala o que esse sistema de army faz, não sei onde posso alterar no code ou não.
-
(Resolvido)Fechar script
Me manda o script inteiro e o que você quer remover.
-
Tenho Café, alguém tem açúcar???
Toma sem açúcar
-
(Resolvido)[PEDIDO] Ganhar recompensa ao matar jogador
Só alterei uma coisinha, tenta esse. Obs: code dessa pessoa aí que citei, se for resolvido, REP+ pra ela e não pra mim!
-
ERRO GESIOR AO PROCURAR UM CHAR - Could not load items!
Esse erro acho que pode ser resolvido da mesma maneira que esse aqui
-
[CreatureScript] Mandar mensagem nos canais ao logar
É necessário que as função doPlayerOpenChannel esteja adicionada à sua source para funcionar, já conferiu isso?
-
Peça seu script
Estou estudando o melhor jeito para fazê-lo, logo volto com o script para você testar. @amarelax serão premium points ou dias de premium?
-
Peça seu script
Pelo que eu entendi, o player vai vender os seus dias de premium para outro player? É isso?
-
Peça seu script
Infelizmente esse script seria complexo demais. Não posso fazê-lo
-
Peça seu script
Não testei, esse é o primeiro, jaja atualizo e posto o do NPC -- ChangeSex para TFS 1.3 -- Feito por Movie local custo = 10000 local cor = 94 -- Cor da calça local splash = 2016 -- ID do splash function onSay(player, words, param) if player:removeMoney(custo) then if player:getSex() == 0 then player:setSex(PLAYERSEX_MALE) Game.createItem(splash, 1, player:getPosition()) player:setOutfit({lookHead = 0, lookBody = 0, lookLegs = cor, lookFeet = 0}) player:say("AAAAAA", TALKTYPE_MONSTER_SAY) player:save() else player:setSex(PLAYERSEX_FEMALE) Game.createItem(splash, 1, player:getPosition()) player:setOutfit({lookHead = 0, lookBody = 0, lookLegs = cor, lookFeet = 0}) player:say("AAAAAA", TALKTYPE_MONSTER_SAY) player:save() return true end else player:say("Você não tem dinheiro suficiente.", TALKTYPE_MONSTER_SAY) return true end end
-
Peça seu script
Posso ter colocado na categoria errada, caso tenha acontecido, favor realocar pro local correto. Fala pessoal, então.. Nessa quarentena estou no tédio e resolvi fazer alguns scripts que vocês irão pedir... Já aviso que pode haver scripts que não conseguirei fazer e irei te avisar caso isso ocorra. Obs: tenho maior familiaridade com TFS 1.3, porém me arrisco no 0.x. Como pedir o seu script? - Lembrando que, o prazo de entrega das script varia de script para script. - Sempre que for postar foto, erro ou coisas do tipo, poste como SPOILER ou como CODE. - Não irei fazer pedidos complexos demais, não abusem. - Não faço script de tibia derivado. (Eu realmente não entendo nada dessa área) - Detalhe o seu pedido, quanto mais detalhe, melhor ficará seu código. - Caso eu tenha te ajudado, deixa um REP+ e caso queira fazer uma doação, o botão está na minha assinatura <3
-
Script de fazer a SpellWand Virar um item que vende o loot igual NPC Mad
local items = { -- {id = id do item, price = valor da venda}, {id = 2487, price = 100000}, -- crown armor {id = 2488, price = 110000}, -- crown legs {id = 2514, price = 110000}, -- mastermind shield } function onUse(cid, item,fromPosition, itemEx, toPosition) local a = items[itemEx.itemid] local b = items[].id if a ~= b then doPlayerSendTextMessage(cid, 25,"Não foi possivel vender esse item.") return true end for _, i in pairs(items) do if itemEx.itemid == i.id then doRemoveItem(itemEx.uid) doPlayerAddMoney(cid, i.price) end end return true end Posso estar errando em relação à lógica, mas não custa tentar.
-
ERRO WAR SYSTEM
Troca o db.executeQuery por db.query
-
(Resolvido)Ajuda alguem porfavor
Tenta assim local function warnTp(cid, x) if x <= 0 then return end doPlayerSendTextMessage(cid, 22, "Você será teleportado em ".. x .. " segundos.") local playerName = getCreatureName(cid) addEvent(function() if playerName then warnTp(x - 1) end end, 1000) end function onUse(cid, item, fromPosition, item2, toPosition) local teleport = {x = 433, y = 992, z = 15} doTeleportThing(cid, teleport) doSendMagicEffect(getPlayerPosition(cid), 10) warnTp(cid, 5) end
-
Annihilator com andares
To pensando na melhor lógica pra ele, desculpa a demora, ando meio ocupado..
-
Annihilator com andares
E se por exemplo, tivermos o que puxou a alavanca level 10, e os outros estiverem nível 3. Ao tentar pegar a recompensa todos pegarão a recompensa do level 10, mesmo estando nível 3?
-
Annihilator com andares
Você poderia me detalhar como funciona a quest? Eu sei apenas o básico dela...
-
Annihilator com andares
Qual a versão do seu TFS?
-
Firestorm Event TFS 1.X
Na pasta lib, procure a pasta compat. Dentro dela abra o compat.lua e adicione essa função function getStringTimeEnglish(tempo) local result = {} result.hours = math.floor(tempo / 3600) tempo = math.max(0, tempo - (result.hours * 3600)) result.minutes = math.floor(tempo / 60) tempo = math.max(0, tempo - (result.minutes * 60)) result.seconds = tempo return result end