
luannhrj
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
luannhrj deu reputação a DukeeH em AJUDA RESET SYSTEM MOD--Script By Theax "" 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 getResets(cid) resets = getCreatureStorage(cid, 54676) if resets < 0 then resets = 0 end return resets 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)..']\n[Resets: '..getResets(thing.uid)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']\n[Resets: '..getResets(thing.uid)..']') 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 Testa esse look e me fala.
Sobre a porta, ele não ta achando o script, porque essa mensagem nem tem no mod, tenta usar outro id de porta, as vezes a que você pegou é aquelas que não da pra passar.
-
luannhrj deu reputação a DukeeH em AJUDA RESET SYSTEM MODRetirei o reset no look, me manda o script que mostra o frags no look, vou colocar os dois juntos, se não ele vai mostrar ou um ou outro.
<?xml version="1.0" encoding="UTF-8"?> <mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes"> <!-- Configuracao --> <config name="reset_config"><![CDATA[ config = { level = 700, premium = false, storage = 54676, } function getResets(cid) resets = getCreatureStorage(cid, config.storage) if resets < 0 then resets = 0 end return resets end function reset(cid) if (config.premium and not(isPremium(cid)) ) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.") end if (getPlayerLevel(cid) < config.level) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".") end if not(getTilePzInfo(getCreaturePosition(cid))) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.") end doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8)) doCreatureSetStorage(cid, config.storage, getResets(cid)+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `health`= "..resethp..",`healthmax`= "..resethp.." WHERE `players`.`id`= ".. playerid .."") db.query("UPDATE `players` SET `mana`= "..resetmana..",`manamax`= "..resetmana.." WHERE `players`.`id`= ".. playerid .."") return true end ]]></config> <!-- Talkaction para resetar --> <talkaction words="!reset" event="buffer"><![CDATA[ domodlib('reset_config') if isInArray({1,2}, getPlayerVocation(cid)) then resethp = (getResets(cid)+1)*300 resetmana = (getResets(cid)+1)*1000 elseif getPlayerVocation(cid) == 3 then resethp = (getResets(cid)+1)*800 resetmana = (getResets(cid)+1)*500 elseif getPlayerVocation(cid) == 4 then resethp = (getResets(cid)+1)*1000 resetmana = (getResets(cid)+1)*300 end playerid = getPlayerGUID(cid) reset(cid) ]]></talkaction> <!-- Talkaction para ver quantos resets tem --> <talkaction words="!myresets" event="buffer"><![CDATA[ domodlib('reset_config') return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.") ]]></talkaction> <!-- Tile --> <movevent type="StepIn" actionid="9911" event="script"><![CDATA[ domodlib('reset_config') function onStepIn(cid, item, position, fromPosition) local minResets = 1 if (not(getResets(cid) >= minResets)) then doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui") return doTeleportThing(cid, fromPosition) end doPlayerSendCancel(cid, "Bem Vindo") end ]]></movevent> <!-- Porta --> <action actionid="9910" event="script"><![CDATA[ domodlib('reset_config') function onUse(cid, item, position, fromPosition) local minResets = 5 if not(getResets(cid) >= minResets) then return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui") end doPlayerSendCancel(cid, "Bem Vindo") end ]]></action> </mod>
-
luannhrj deu reputação a DukeeH em AJUDA RESET SYSTEM MOD<?xml version="1.0" encoding="UTF-8"?> <mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes"> <!-- Configuracao --> <config name="reset_config"><![CDATA[ config = { level = 700, premium = false, storage = 54676, } function reset(cid) if (config.premium and not(isPremium(cid)) ) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.") end if (getPlayerLevel(cid) < config.level) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".") end if not(getTilePzInfo(getCreaturePosition(cid))) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.") end if isInArray({1,2}, getPlayerVocation(cid)) then local hp = (getResets(cid)*300)+185 local mana = (getResets(cid)*1000)+35 elseif getPlayerVocation(cid) == 3 then local hp = (getResets(cid)*800)+185 local mana = (getResets(cid)*500)+35 elseif getPlayerVocation(cid) == 4 then local hp = (getResets(cid)*1000)+185 local mana = (getResets(cid)*300)+35 end local difhp = hp-getCreatureMaxHealth(cid) local difmana = mana-getCreatureMaxMana(cid) setCreatureMaxHealth(cid, hp) doCreatureAddHealth(cid, difhp) setCreatureMaxMana(cid, mana) doCreatureAddMana(cid, difmana) doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8)) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) doCreatureSetStorage(cid, config.storage, getResets(cid)+1) return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.") end function getResets(cid) resets = getCreatureStorage(cid, config.storage) if resets < 0 then resets = 0 end return resets end ]]></config> <!-- Talkaction para resetar --> <talkaction words="!reset" event="buffer"><![CDATA[ domodlib('reset_config') reset(cid) ]]></talkaction> <!-- Talkaction para ver quantos resets tem --> <talkaction words="!myresets" event="buffer"><![CDATA[ domodlib('reset_config') return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.") ]]></talkaction> <!-- Tile --> <movevent type="StepIn" actionid="9911" event="script"><![CDATA[ domodlib('reset_config') function onStepIn(cid, item, position, fromPosition) local minResets = 1 if (not(getResets(cid) >= minResets)) then doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui") return doTeleportThing(cid, fromPosition) end doPlayerSendCancel(cid, "Bem Vindo") end ]]></movevent> <!-- Porta --> <action actionid="9910" event="script"><![CDATA[ domodlib('reset_config') function onUse(cid, item, position, fromPosition) local minResets = 5 if not(getResets(cid) >= minResets) then return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui") end doPlayerSendCancel(cid, "Bem Vindo") end ]]></action> </mod> Pode testar? Fiz a parte da HP/MANA, vamos ver se funcionou e depois partimos pro look.
Estou saindo do trabalho e indo pra casa, lá fica melhor para te ajudar.
Vai testando e me fala o que aconteceu. Abraço.
-
luannhrj deu reputação a DukeeH em AJUDA DODGE SYSTEMlocal storagedodge = 98798644 -- storage do dodge local cor = 35 -- cor do texto local effect = 30 -- id do magic effect local msg = "DODGE!" -- msg local dodge = { {min = 1, max = 10, chance = 10}, -- se o dodge tiver entre 1 e 2 tem 10% de chance de da dodge. {min = 11, max = 20, chance = 20}, -- podem ser configurada portanto que não passe do limite {min = 21, max = 40, chance = 25}, -- vocês pode adicionar mas se quiserem {min = 41, max = 60, chance = 30}, {min = 61, max = 90, chance = 35}, {min = 91, max = math.huge, chance = 40} } function onStatsChange(cid, attacker, type, combat, value) if not isCreature(cid) then return false end for _, tudo in pairs(dodge) do if getPlayerStorageValue(cid, storagedodge) >= tudo.min and getPlayerStorageValue(cid, storagedodge) <= tudo.max then local chancex = math.random(1, 100) if chancex <= tudo.chance then if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS then doSendMagicEffect(getCreaturePosition(cid), effect) doSendAnimatedText(getCreaturePosition(cid), msg, cor) return false end end end end return true end
-
luannhrj deu reputação a Noob II em AJUDA VIPSISTEMEntra no sqlite studio abre a tabela account ai vai em edit table, clica em add column digita o nome da coluna vip_time em data type deixa VARCHAR na frente bota 255 em column constraints seleciona not null depois clica em add e pronto.
ou deleta a tabela accounts e executa essa no sql query
CREATE TABLE accounts ( id INTEGER PRIMARY KEY NOT NULL, name VARCHAR( 255 ) NOT NULL, password VARCHAR( 255 ) NOT NULL, premdays INTEGER NOT NULL DEFAULT ( 0 ), lastday INTEGER NOT NULL DEFAULT ( 0 ), email VARCHAR( 255 ) NOT NULL DEFAULT ( '' ), [key] VARCHAR( 32 ) NOT NULL DEFAULT ( 0 ), blocked BOOLEAN NOT NULL DEFAULT ( 0 ), warnings INTEGER NOT NULL DEFAULT ( 0 ), group_id INTEGER NOT NULL DEFAULT ( 1 ), salt VARCHAR( 40 ) NOT NULL DEFAULT ( '' ), vip_time VARCHAR( 255 ) NOT NULL );