Tudo que narazaky postou
-
(Pedido) Não poder deslogar estando em: Surf, Ride e Fly!
function onLogout(cid) local sto = {17000, 17001, 63215} for x = 1, #sto do if getPlayerStorageValue(cid, sto[x]) > 0 then doPlayerSendCancel(cid, 'You cannot logout when you are in special situations such as surf/ride/fly.') return true end end return false end só consertando
-
(Pedido) Não poder deslogar estando em: Surf, Ride e Fly!
Registre no creaturescript.xml ou coloca um return false na sript
- '-'
-
R.I.P Chaves :x
Morreu de novo D:
-
(Resolvido)[Pedido] Frag and Vip Look System
edit coloque isso na sua script na parte de cima 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 e depois colque isso no login registerCreatureEvent(cid, "LookPlayer") look completo (peguei do post acima)
-
[CAST SYSTEM] 10.41
Ei cara qnd copro algum item retorna um aviso dizendo que nao tenho cap, mesmo tendo sabe pq?
-
(Resolvido)Reset system geisor
Vamos lá... vai em lib 050-function.lua e adicione isso: function getPlayerResets(cid) local Info = db.getResult("SELECT `reset` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") if Info:getID() ~= LUA_ERROR then local Resets= Info:getDataInt("reset", getPlayerGUID(cid)) Info:free() return Resets end return LUA_ERROR end depois vá em creaturescript/scrpts e cria um arquivo lookreset.lua e coloca isso dentro: function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then local string = 'You see '..getCreatureName(thing.uid)..' (Level '.. getPlayerLevel(thing.uid)..') [Reset '..getPlayerResets(thing.uid)..'].' if getPlayerFlagValue(thing.uid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then if(getPlayerSex(thing.uid)== 1) then string = string..' He is '.. getPlayerGroupName(thing.uid) ..'.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She is '.. getPlayerGroupName(thing.uid) ..'.' end elseif getPlayerVocation(thing.uid) ~= 0 then if(getPlayerSex(thing.uid)== 1) then string = string..' He is '.. getPlayerVocationName(thing.uid) ..'.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She is '.. getPlayerVocationName(thing.uid) ..'.' end else if(getPlayerSex(thing.uid)== 1) then string = string..' He has no vocation.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She has no vocation.' end end -- if (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) ~= nil) or (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) == true) then -- if(getPlayerSex(thing.uid)== 1) then -- string = string..' He is '.. (getPlayerSex(thing.uid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(thing.uid)) ..'.' -- end -- if(getPlayerSex(thing.uid)== 0) then -- string = string..' She is '.. (getPlayerSex(thing.uid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(thing.uid)) ..'.' -- end -- else -- string = string -- end if getPlayerGuildId(thing.uid) > 0 then if(getPlayerSex(thing.uid)== 1) then string = string..' He is ' .. (getPlayerGuildRank(thing.uid) == '' and 'a member' or getPlayerGuildRank(thing.uid)) ..' of the '.. getPlayerGuildName(thing.uid) end if(getPlayerSex(thing.uid)== 0) then string = string..' She is ' .. (getPlayerGuildRank(thing.uid) == '' and 'a member' or getPlayerGuildRank(thing.uid)) ..' of the '.. getPlayerGuildName(thing.uid) end string = getPlayerGuildNick(thing.uid) ~= '' and string..' ('.. getPlayerGuildNick(thing.uid) ..').' or string..'.' end if (getPlayerGroupId(cid) >= 3) then if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(thing.uid) ..' / '.. getCreatureMaxHealth(thing.uid) ..'], Mana: ['.. getCreatureMana(thing.uid) ..' / '.. getCreatureMaxMana(thing.uid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(thing.uid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false ---------------------------------------------------------------------------------------------------------------------------------------- elseif thing.uid == cid then local string = 'You see yourself. (Level '.. getPlayerLevel(cid)..') [Reset '..getPlayerResets(cid)..'].' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end -- if (getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) or (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) == true) then -- string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' -- end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'' end if (getPlayerGroupId(cid) >= 3) then 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 getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end depois vá em login.lua e adicione isso antes do return true: registerCreatureEvent(cid, "lookreset") depois em creaturescript.xml adicione isso: <event type="look" name="lookreset" event="script" value="lookreset.lua"/> depois só aproveitar PS: estou fazendo um sistema de reset igual 100% ao do rad, depois eu posto aqui (pode ser por talk ou pelo site, configuravel)
-
erro ao ver uma conta banida
edit Alias, onde vejo iss?
-
erro ao ver uma conta banida
Isso: foreach($bans as $ban)
-
Ajuda -- Item.otb
ok, vou testar aqui
-
Ajuda -- Item.otb
Como faço para criar um? Posso faze-lo do tibia.data e spr? Se sim, como? Rep ++ para quem ajudar ou tentar ajudar
-
(Resolvido)Comando
ja ai eu nao sei :/ so tem um mes que uso site.
-
(Resolvido)Comando
Ve essa: é a que estou usando
-
(Resolvido)Comando
Consegui: coloca isso na sua pagina php $autor = $SQL->query('SELECT `name` FROM `players` WHERE `id` = ' . $ban['banned_by'] .' LIMIT 1')->fetch(); e para apresentar só colocar isso: <td> ' . $autor['name'] . ' </td><tr>';
-
(Resolvido)Comando
Ai também estou me matando :/
-
(Resolvido)Comando
Eu tenho por hora: coloca isso <td>' . date("j/m/Y, g:i a", $ban['expires_at']) . '<br /></td> no lugar de <td>' . $zodis . '<br /></td>
-
(Resolvido)Comando
Eu uso esse: http://www.tibiaking.com/forum/topic/44528-gesior2012-tfs-10-lista-de-jogadores-banidos/ funciona perfeitamente
-
(Resolvido)bug broadcast
Meu serve da debug qnd mando mesagem em /b aqui a script uso tfs 1.0 function onSay(cid, words, param) if not getPlayerFlagValue(cid, PlayerFlag_CanBroadcast) then return true end local player = Player(cid) print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".") for _, tmpPlayer in ipairs(Game.getPlayers()) do tmpPlayer:channelSay(player, TALKTYPE_BROADCAST, param, 0) end return false end Edit Resolvi: para quem querer também, aqui está: function onSay(cid, words, param) if not getPlayerFlagValue(cid, PlayerFlag_CanBroadcast) then return true end local player = Player(cid) print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".") for _, pid in ipairs(Game.getPlayers()) do pid:sendTextMessage(MESSAGE_STATUS_WARNING, getPlayerName(cid)..": \n"..param.."") end return false end
-
erro ao ver uma conta banida
aqu o erro
-
(Resolvido)Comando
Depois de tanto tempo consegui: como usar: /ban nome,coment,dias ou /ban nome, comentario ou ainda: /ban nome Pode usar tanto em jogadores off ou online Espero ter ajudado.
-
(Resolvido)Comando
isso que estou falando... coloquei o outro comando e funcionou, porem a db nao aceitava os caracteres que mandava por causa do espaço
-
(Resolvido)Comando
Aqui o que eu fiz: erro que retorna: colocando o que falei antes nao dava erro local split = param:split(",")
-
(Resolvido)Comando
Eu fiz isso, o tfs 1.0 nao reconhece o explode, para resolver isso coloquei "params = string:param(",")" ficando assim: db:query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. accountId .. ", "..params[2]..", " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") ele reconheceu, e ate vai, porem na hora de colocar na database ele nao aceita nenhum parametro depois do primeiro so se eu usar o comando assim: /ban nome se for assim /ban nome, comment nao vai. nem aparece erro na distro
-
(Resolvido)Comando
Pior que é mesmo, só esta reconhecendo o primeiro parametro, a partir do segundo ele nao reconhece D:
-
(Resolvido)Comando
So colocar para ler os parametros e acrescenta-los na posição que voce quer. e por para aparecer em broadcast