Tudo que Thenebrozo postou
-
[8.6] Task System 4.0! (Task system + Daily Task System)
- Ajuda com sistema de reset
Cara de certo aqui muito obrigado rap+ para vc obrigado msm @Vodkart Ja foi resolvido obrigado- Sistema de pesca
- Ajuda com sistema de reset
eu n tenho esse script no meu creaturescripts/scripts tenho so o fraglook e tentei colocar so que n ouve nada 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)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') local string = 'You see yourself.' 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 string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil 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 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 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end agora do jeito que me pediu 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)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') local string = 'You see yourself.' 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 string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil 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 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 resets = getPlayerStorageValue(thing.uid, 500)+1 doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. resets .."]") end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) 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- Ajuda com sistema de reset
Alguém poderia me ajuda com esse script??? queria que ao dar look no player aparecer quantos resets ele tem ! to precisando muito, pra quem ajudar rep+ desde ja obrigado Script local config = { backToLevel = 100, redskull = false, -- need to be without redskull to reset? battle = false, -- need to be without battle to reset? pz = false, -- need to be in protect zone to reset? stages = { {resets = 1, level = 400, premium = 330}, {resets = 2, level = 820, premium = 340}, {resets = 3, level = 1200, premium = 355}, {resets = 4, level = 1550, premium = 360}, {resets = 5, level = 1900, premium = 370}, {resets = 6, level = 2300, premium = 380}, {resets = 2^1024, level = 2700, premium = 990} } } function onSay(cid, words, param) local function getPlayerResets(cid) local resets = getPlayerStorageValue(cid, 500) return resets < 0 and 0 or resets end local function doPlayerAddResets(cid, count) setPlayerStorageValue(cid, 500, getPlayerResets(cid) + count) end if config.redskull and getCreatureSkullType(cid) == 4 then return doPlayerSendCancel(cid, "You need to be without red skull to reset.") elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "You need to be in protection zone to reset.") elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "You need to be without battle to reset.") end local resetLevel = 0 for x, y in ipairs(config.stages) do if getPlayerResets(cid) <= y.resets then resetLevel = isPremium(cid) and y.premium or y.level break end end if getPlayerLevel(cid) < resetLevel then return doPlayerSendCancel(cid, "Você precisa de nível " .. resetLevel .. " ou mais para resetar.") end doPlayerAddResets(cid, 1) local healthMax, manaMax = getCreatureMaxHealth(cid), getCreatureMaxMana(cid) doPlayerAddLevel(cid, -(getPlayerLevel(cid) - config.backToLevel)) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Agora você tem " .. getPlayerResets(cid) .. " " .. (getPlayerResets(cid) == 1 and "reset" or "resets") .. ".") return true end- Sistema de pesca
- Sistema de pesca
- Sistema de pesca
- Sistema de pesca
(PEDIDO) Sistema de Pesca! Gostaria que alguém pudesse me ajudar com um script, ele funcionaria da seguinte forma, você iria pescar normal e iria aumentar seu fishing quando você chegasse a 100 de fishing você poderia pesca monstro, para isso você teria que usar um comando como por ex: !fishing on depois disso você já poderia começa pescar monstros, você precisaria ter no minimo fishing 100 e lvl 100 por exemplo para pegar determinado monstro, com fishing 120 e lvl 500 você poderia pegar o mesmo monstro de quando tava com fishing 100 e mais outro tipo de monstro que só poderá pegar apartir do fishing 120 , e eu gostaria que tivesse uma dificuldade para não ser muito rapido Porfavor me ajudem gostaria muito desse script para poder colocar no meu otserver talvez esse aqui possa ajudar você a terem uma base -- config by uotl£ local config = { ["Young Sea Serpent"] = {skill = 100,diffi = 1000}, -- ["nome do monstro"] = e skill necessário e difficult ["Quara Predator Scout"] = {skill = 100,diffi = 1000}, ["Quara Constrictor Scout"] = {skill = 100,diffi= 1000}, ["Quara Mantassin Scout"] = {skill = 100,diffi = 1000}, ["Quara Hydromancer"] = {skill = 120,diffi = 1200}, ["Quara Mantassint"] = {skill = 120,diffi= 1200}, ["Sea Serpent"] = {skill = 150,diffi = 1500}, ["Quara Predator"] = {skill = 150,diffi = 1500}, } -- config by uotl£ local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} -- nao mexe if isInArray(waterIds, itemEx.itemid) == true then if itemEx.itemid ~= 493 then for a, b in pairs (config) do if getPlayerSkillLevel(cid, 6) >= b.skill then table.insert(check,a) end end if type(check[1]) == "string" then xxx = math.random(1, #check) else xxx = 1 table.insert(check,xxx,"Young Sea Serpent") end if math.random(1, (config[check[xxx]].diffi + (getPlayerSkill(cid, SKILL_config) / 10))) <= getPlayerSkill(cid,6) then doPlayerAddSkillTry(cid,6, 1) doSummonCreature(check[xxx], getThingPos(cid)) end doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY) end return true end return false end ou -- config by uotl£ local difi = {1000,1200,1500} -- dificuldade coforme o skill local config = { ["Young Sea Serpent"] = {skill = 100}, -- ["nome do monstro"] = e skill necessario ["Quara Predator Scout"] = {skill = 100}, ["Quara Constrictor Scout"] = {skill = 100}, ["Quara Mantassin Scout"] = {skill = 100}, ["Quara Hydromancer"] = {skill = 120}, ["Quara Mantassint"] = {skill = 120}, ["Sea Serpent"] = {skill = 150}, ["Quara Predator"] = {skill = 150}, } -- config by uotl£ local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} -- nao mexe if isInArray(waterIds, itemEx.itemid) == true then if itemEx.itemid ~= 493 then for a, b in pairs (config) do if getPlayerSkillLevel(cid, 6) >= b.skill then table.insert(check,a) end end if type(check[1]) == "string" then xxx = math.random(1, #check) else xxx = 1 end if xxx <= 4 then if math.random(1, (difi[1] + (getPlayerSkill(cid, SKILL_config) / 10))) <= getPlayerSkill(cid,6) then doPlayerAddSkillTry(cid,6, 1) doSummonCreature(check[xxx], getThingPos(cid)) end end if xxx >= 5 and xxx <= 6 then if math.random(1, (difi[2] + (getPlayerSkill(cid, SKILL_config) / 10))) <= getPlayerSkill(cid,6) then doPlayerAddSkillTry(cid,6, 1) doSummonCreature(check[xxx], getThingPos(cid)) end end if xxx >= 7 then if math.random(1, (difi[3] + (getPlayerSkill(cid, SKILL_config) / 10))) <= getPlayerSkill(cid,6) then doPlayerAddSkillTry(cid,6, 1) doSummonCreature(check[xxx], getThingPos(cid)) end end doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY) end return true end return false end- ERRO NO CREATURESCRIPT
- ERRO NO CREATURESCRIPT
- ERRO NO CREATURESCRIPT
- ERRO NO CREATURESCRIPT
alguem poderia me ajuda com esse erro?? local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type {account} to manage your account and if you want to start over then type {cancel}.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type {account} to create an account or type {recover} to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "DeathBroadcast") registerCreatureEvent(cid, "addons") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "magebomb") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "SkullAmulet") registerCreatureEvent(cid, "killitem") registerCreatureEvent(cid, "zombieevent") registerCreatureEvent(cid, "huntdeath") registerCreatureEvent(cid, "loguthunt") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "Reward") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, VipReceive) registerCreatureEvent(cid, "PlayerKill") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena return true end registerCreatureEvent(cid, "critical") if getPlayerStorageValue(cid, 48913) == -1 then setPlayerStorageValue(cid, 48913, 0) end- Erro com sistema de guild do ot!
- [pedido] nascer com outra addon
@UP- [pedido] nascer com outra addon
Eai galera venho pedir a vocês não sei se é um script bom mas vamos la ! É assim você cria a account normal, mas quando você logar o char não irar ter a addon citizen como tem em todo os ots, você ira nascer sem corpo com uma addon de um bicho por exemplo e para receber seu corpo você tem que conversa com um npc, quando você conversa com ele, ele te teleportara para outro lugar e te dará um corpo com a ddon citizen. Vi esse sistema em um ot achei muito legal mais não consegui fazer com que quando o player loga, tenha outra addon. REP+ desde já para quem conseguir me ajuda obrigado!- Erro com sistema de guild do ot!
- Erro com sistema de guild do ot!
como fasso isso ? todos os meus ot eu uso em sqlite, e também em mysql não é pra quem tem site por exemplo eu teria que colocar senha e editar o config.lua ? -- Database -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database. -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value. sqlType = "sqlite" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "theforgottenserver" sqlFile = "bodyserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "sha1" no caso minha database ta assim- Erro com sistema de guild do ot!
Ola pessoal, bom gostaria de uma ajudinha de vocês !! Peguei um ot aqui do TK, um bem simples, peguei para mim editar o baiak classick. Já adicionei muitas coisas nesse ot, mas estou com um problema. Quando vou criar uma guild com qualquer conta no ot não da certo. Não sei oq é, o ot esta ficando muito bom mas se não conseguir arrumar esse erro, acabara com meus planos. Agradeço desde já a todos obrigado!! Os seguintes erros são esses, quando crio a guild aparece esta mensagem: You Have formed guild "Homens De Preto"! E no TheforgottenServer sqlite3_step(): SQLITE ERROR: guilds.checkdata may not be NULL @UP- [8.60]Baiak Barao Editado DeathRocks
- Ajuda com sistema de reset
Informação Importante
Confirmação de Termo