Tudo que luanluciano93 postou
-
Tfs 1.2 Delete items em player_items, player_depotitems
-- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") -- retorn string if test1 then local test = string.sub(test1, 25, 34) print(test) if tonumber(test) then print("number: ".. test) end end until not result.next(resultId) end return false end
-
Tfs 1.2 Delete items em player_items, player_depotitems
-- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") local test2 = result.getString(resultId, "attr") local test3 = tonumber(test1) local test4 = tonumber(test2) if test1 then print("stream: " .. test1 .." / ".. type(test1)) end if test2 then print("string: " .. test2 .." / ".. type(test2)) end if test3 then print("number1: " .. test3 .." / ".. type(test3)) end if test4 then print("number2: " .. test4 .." / ".. type(test4)) end until not result.next(resultId) end return false end
-
Tfs 1.2 Delete items em player_items, player_depotitems
-- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") local test2 = result.getString(resultId, "attr") local test3 = tonumber(test1) local test4 = tonumber(test2) if test1 then print(test1) end if test2 then print(test2) end if test3 then print(test3) end if test4 then print(test4) end until not result.next(resultId) end return false end
-
[PESQUISA] Proteções contra ataques DDOS
Olá pessoal, estou fazendo uma pesquisa com vários donos de OTS para ver qual os tipos de ataques que eles recebem e qual proteção eles usam ... Você usa métodos de proteções contra ataques? Se sim, quais? Explique. • Wallison (Aurera-global, 2300 online) Utilizo serviço externo para proteger o servidor (servecore). • Natanael (megatibia, 1521 online) Em primeiro lugar contrate uma empresa que tenha um bom filtro pois sem isso impossivelmente ter "uma certa paz" e o iptables não faz milagres (uso OVH). Em seguida contrate alguém que entenda de proteção tem varios Sys Admin de qualidade e confiaveis no mercado, aconselho Pedro Sodré (@Nightz). • Felipe (ImperialOT, 919 online, offine) - Uso a proteção da OVH + a da servecore (hardware), o ataque passa por umas 5 maquinas ate chegar em mim, tipo um proxy. Mas pelo que sei, se souber configurar o firewall da OVH, vc não leva ataque. Irei atualizando com o tempo ... • Mod_avasive (proteção) • cloudfire (proteção) • OVH (servidor)
-
[TFS 1.x] TK Vip System
Boa tarde @alls , então, não é desda forma que funciona. Existe uma contagem de computador, que é determinada desde uma certa época, que começou a contar por segundos e assim vai ... digamos que esse determinado segundo que eu estou escrevendo é o valor 100000, daqui a 1 minuto ele vai valer 100060 ... e é assim. Esse valor que esta salvo na sua database é o "time" de quando vai acabar sua vip. O script verifica se o "time" atual é maior que esse valor que voce tem salvo, se sim, sua vip acabou (isso é verificado toda vez que vocÊ LOGAR).
-
Melhorar Script
manda o script
-
Melhorar Script
Troque isso: if getPlayerStorageValue(cid,storage) < 1 then setPlayerStorageValue(cid,storage,tempo) else return doPlayerSendCancel(cid, "You need wait to use this power again.") end Por isso: local time = os.time() if getPlayerStorageValue(cid, storage) <= time then setPlayerStorageValue(cid, storage, time + (tempo * 60)) else local segundos = getPlayerStorageValue(cid, storage) - time local minutos = segundos if segundos > 60 then minutos = math.ceil(segundos / 60) segundos = segundos - (60 * minutos) end return doPlayerSendCancel(cid, "Ainda restam: " .. minutos .." minuto(s) "..(segundos > 0 and "e ".. segundos .." segundo(s)").." para voltar a sua vocation.") end
-
[sugestões] Criação de um novo Castle War TFS 1.X
ninguém mais? será gratuito!
-
War Anti-Entrosa
- Infinity Bless
ACTION: function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, storage) < 1 then for i = 1, 5 do if getPlayerBlessing(cid, i) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1) return true end end for i = 1, 5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) doSendAnimatedText(getCreaturePosition(cid), "INFINIT BLESSED!", TEXTCOLOR_RED) setPlayerStorageValue(cid, storage, 1) else doPlayerSendCancel(cid, "You have already been blessed."); end return true end CREATURESCRIPT: local storage = 9999 function onLogin(cid) if getPlayerStorageValue(cid, storage) == 1 then for i = 1, 5 do if getPlayerBlessing(cid, i) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1) return true end end for i = 1, 5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) doSendAnimatedText(getCreaturePosition(cid), "INFINIT BLESSED!", TEXTCOLOR_RED) setPlayerStorageValue(cid, storage, 1) end return true end- [8.60] Sistema de Recompensa Loot De Boss Compartilhado (reward chest)
- Tfs 1.2 Delete items em player_items, player_depotitems
-- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") local test2 = result.getString(resultId, "attr") local test3 = tonumber(test1) local test4 = tonumber(test2) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "test 1: " .. test1 .. " (stream), test 2:" .. test2 .. " (string), test 3: ".. test3 .." (number-stream) and test 4: ".. test4.." (numer-string).") until not result.next(resultId) end return false end Send me result ...- OTx New
Essa é a otx mais atual, 8.60. Não sei se funciona efeitos extendidos.- OTx New
https://github.com/mattyx14/otxserver/tree/otxserv3/path_8_6- [TFS 1.3 10.98] ALUNIA 2020 - Styller Custom
- Preciso de uma script urgente
SKULL_NONE = 0 SKULL_YELLOW = 1 SKULL_GREEN = 2 SKULL_WHITE = 3 SKULL_RED = 4 SKULL_BLACK = 5 SKULL_ORANGE = 6 if getCreatureSkull(target) >= 3 and getCreatureSkull(target) <= 5 then- Seu Último Trabalho
muto bom!- getSpecialAttribute on all items
Maybe if you use it like this ... item:setAttribute(ITEM_ATTRIBUTE_DATE, X) And then search by sql command: table player_depotitems: SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1 ) FROM `player_depotitems` WHERE CONVERT(`attributes` USING latin1 ) LIKE '%data%' table player_items: SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1 ) FROM `player_items` WHERE CONVERT(`attributes` USING latin1 ) LIKE '%data%'- getSpecialAttribute on all items
Sorry for the delay ... I'd like to know the purpose of your script, so I could help you better ... • To do this sort of fetch you I think you want, you would need to use sql commands in table 'player_items': CREATE TABLE IF NOT EXISTS `player_items` ( `player_id` int(11) NOT NULL DEFAULT '0', `pid` int(11) NOT NULL DEFAULT '0', `sid` int(11) NOT NULL DEFAULT '0', `itemtype` smallint(6) NOT NULL DEFAULT '0', `count` smallint(5) NOT NULL DEFAULT '0', `attributes` blob NOT NULL, FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE, KEY `sid` (`sid`) ) ENGINE=InnoDB; • I'll assume that you want to turn the item over after your time runs out ... this exists in items.xml, an example is soft boots, keys: durations e decayTo. ... <item id="2640" article="a" name="pair of soft boots (faster regeneration)"> <attribute key="weight" value="800" /> <attribute key="slotType" value="feet" /> <attribute key="decayTo" value="10021" /> <attribute key="transformDeEquipTo" value="6132" /> <attribute key="duration" value="14400" /> <attribute key="healthGain" value="1" /> <attribute key="healthTicks" value="2000" /> <attribute key="manaGain" value="2" /> <attribute key="manaTicks" value="1000" /> <attribute key="showduration" value="1" /> <attribute key="showattributes" value="1" /> </item> • Or you can also have the server do this automatically by putting a duration and a decayTo on the item you create ... use these functions and keys: functions: item:getAttribute(key) item:setAttribute(key, value) item:removeAttribute(key) item:hasAttribute(key) keys: ITEM_ATTRIBUTE_OWNER ITEM_ATTRIBUTE_DESCRIPTION ITEM_ATTRIBUTE_DURATION ITEM_ATTRIBUTE_DECAYSTATE I hope I have helped. Hugs!- getSpecialAttribute on all items
Please describe your question better ... what kind of attribute? What do you intend to do?- (Resolvido)montros nao ultrapassa sqm.
function onStepIn(cid, item, position, fromPosition) if isMonster(cid) then doSendMagicEffect(getThingPos(cid),CONST_ME_TELEPORT) return false end return true end- Problemas no CTF Event
Esta é uma parte da função que encerra o evento : for _, cid in pairs(CTF.getMembers()) do if getPlayerStorageValue(cid, 16700) == win then local xp = math.ceil(getPlayerExperience(cid) * (CTF.xp_percent / 100), 215) doPlayerSendTextMessage(cid, 22, "Parabéns! Você ganhou o evento e obteve ".. CTF.xp_percent .."% de sua experiência total(".. xp ..").") doSendAnimatedText(getThingPos(cid), xp, 215) doPlayerAddExperience(cid, xp) end if getPlayerStorageValue(cid, 16702) ~= -1 then CTF.returnFlag(cid) end CTF.removePlayer(cid) end E esta função faz TODOS os jogadores que estão no evento serem removidos! CTF.removePlayer(cid) Com certeza você esta fazendo algo errado ou anormal =/- Por Storage e exausted em spell [Script]
Eu coloquei o tempo que demora pra acabar o spell + 2 segundos ... setPlayerStorageValue(cid, config.storage, os.time() + (config.time + 2))- SCRIPT PARA CASTLE
-- <movevent type="StepIn" actionid="XXXX" event="script" value="teste.lua"/> local config = { time = 30 -- tempo para pode enviar novamente a mensagem. storage = 8586, msg = "BLÁ BLÁ BLÁ!" } function onStepIn(cid, item, position, fromPosition) if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then doBroadcastMessage(config.msg) setPlayerStorageValue(cid, config.storage, os.time() + config.time) end return true end- Por Storage e exausted em spell [Script]
local config = { time = 30 -- tempo para voltar em segundos storage = 8585, player_go = {x=1019, y=892, z=7}, -- onde o player sera teleportado target_go = {x=1019, y=889, z=7}, -- onde o player target teleportado pos = { {{x=1013, y=885, z=7},{x=1025, y=885, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1013, y=896, z=7},{x=1025, y=896, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1514, y=1262, z=7},{x=1504, y=1253, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1013, y=885, z=7},{x=1025, y=896, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=979, y=911, z=7},{x=994, y=918, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1156, y=1192, z=7},{x=1172, y=1172, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=664, y=1096, z=7},{x=685, y=1104, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1553, y=1254, z=7},{x=1562, y=1262, z=7}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1133, y=1039, z=12},{x=972, y=873, z=12}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1133, y=1039, z=11},{x=972, y=873, z=11}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado {{x=1133, y=1039, z=10},{x=972, y=873, z=10}}, -- ponto 1 ao ponto 2 da area em que ele sera teleportado } } local function teleport_all(cid, player_effect, player_pos, target, target_effect, target_pos) doTeleportThing(cid, player_pos) doTeleportThing(target, target_pos) doSendMagicEffect(player_effect, CONST_ME_TELEPORT) doSendMagicEffect(target_effect, CONST_ME_TELEPORT) end function onCastSpell(cid, var) local player_pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local target_pos = getCreaturePosition(target) if getPlayerStorageValue(cid, config.storage) - os.time() > 0 then doPlayerSendCancel(cid, "Colldown!") return false end for x = 1, #config.pos do if isInRange(player_pos, config.pos[x][1], config.pos[x][2]) then doPlayerSendCancel(cid, "Você nao pode usar a parada!") return false end end if isPlayer(target) then teleport_all(cid, player_pos, config.player_go, target, target_pos, config.target_go) addEvent(teleport_all, config.time * 1000, cid, getCreaturePosition(cid), player_pos, target, getCreaturePosition(target), target_pos) setPlayerStorageValue(cid, config.storage, os.time() + (config.time + 2)) doCreatureSay(cid, "Parada Magica", TALKTYPE_MONSTER) else doPlayerSendCancel(cid, "A Parada so funciona em players!") end end - Infinity Bless
Informação Importante
Confirmação de Termo