
FiNub
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
FiNub deu reputação a Yan Liima em Script de recuperar stamina em zona protegidaUtilizei o script que eu ja tinha feito, apenas editei.
Bom não entendi aquele 0.5, mas vamos la...
em movements/scripts/ crie um arquivo.lua e cole isso dentro:
local config = { addStamina = 1, -- quantos de stamina irá adicionar delay = 1, -- tempo para adicionar a stamina em minutos msg = 0.5, -- Só pra exibição de valor mesmo... } stamina = {} local function staminadd(cid) if not isPlayer(cid) then stamina[cid] = nil return true end doPlayerSetStamina(cid, getPlayerStamina(cid) + config.addStamina) stamina[cid] = addEvent(staminadd, config.delay*60*1000, cid) end function onStepIn(cid) if isPlayer(cid) then if getTileInfo(getThingPos(cid)).protection then if getPlayerStorageValue(cid, sta) < os.time() then doPlayerSendTextMessage(cid, 20, "{Stamina Recovery} Sua stamina começou a se recuperar, o fator de recuperação é de "..config.msg.." em relação as condições normais.") setPlayerStorageValue(cid, sta, os.time() + 300) end stamina[cid] = addEvent(staminadd, config.delay*60*1000, cid) end end return true end function onStepOut(cid) if isPlayer(cid) then stopEvent(stamina[cid]) stamina[cid] = nil end return true end No seu movements.xml coloque isso:
<movevent type="StepIn" itemid="7351" event="script" value="arquivo.lua"/> <movevent type="StepOut" itemid="7351" event="script" value="arquivo.lua"/> Troque: 7351 pelo ID do seu tile(piso). Caso em outras zonas protegida o piso seja diferente só por assim, Ex: 7351-7352...
O delay da mensagem está setado para 5 minutos.
-
FiNub recebeu reputação de Vodkart em Informações do jogadorAlguem poderia me ajudar aqui? eu estava querendo fazer um com essas informações mais eu nao sei pode onde começar
Premium Points: Seria os pontos que você possui no site para gastar no shop.
Dias Premmy: Seria os dias de premium account que ainda restam.
Nas informações das skills do jogador onde tem {número%} seria os % que o player tem pra upar tal skill. Faltando número pontos seria quantos % falta pra upar o level.
Eu uso o sistema de labia do @Vodkart
Aqui estar o script
function onSay(cid, words, param) local level = getPlayerLevel(cid) local vocation = getPlayerVocationName(cid) local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid) local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid) local balance, pdays = getPlayerBalance(cid), getPlayerPremiumDays(cid) local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3) local distance, shield, fishing, magic = getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid) local lvldodge, lvlcrit = getPlayerStorageValue(cid, 48902),getPlayerStorageValue(cid, 48903) local cap = getPlayerFreeCap(cid) local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nCapacity: ".. cap .."\nBalance: "..balance.."\nPremium Days: "..pdays.."\nDodge Level: ".. lvldodge .."\nCritical Level: ".. lvlcrit .."\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing .."" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, text) return true end
-
FiNub deu reputação a FlavioHulk em Gesior Natanael Dando Premium PointsCara, isso é alguma brecha em seu sistema de venda e compra de char... Vi em outro tópico que você pedia ajuda quanto a esse sistema, esse sistema precisa ser bem feito pra não houver falhas, vários servers já sofreram invasões por conta desse sistema...
-
FiNub deu reputação a FlavioHulk em Gesior Natanael Dando Premium PointsMinha simples opinião: Cara, se você está sendo ajudado, antes de tudo seja educado, e amigável. Outra, ninguém, absolutamente ninguém fará algo inteiramente pra você gratuitamente, tempo e aprendizado é dinheiro. E ele não tem obrigação em atualizar o Gesior que ele disponibilizou, o código pode ter ficado ultrapassado, e você como OT-ADMIN deve saber o básico disso...
Em resumo, vocês tem o olho grande (não generalizando), com intuito de abrir um server ganhar grana, e pedir ajudas em fóruns em troco de nada, e ainda achar que temos obrigação e direito em entregar um script de mão beijada...
Não tô falando em recebermos pra fazer, mas suporte é mostrar um caminho e vocês tentarem...
Por favor, se você quer um investimento lucrativo, deve haver um custo por trás disso... Um server seguro e bem atualizado precisa de um profissional, ou você mesmo aprenda entre raça e dentes...
Abraços, e reflita...
-
FiNub deu reputação a Ackerzin em Characters.php (Outfit, Skills & EQ+info)Salve galera hoje vou postar pra vocês esse characters.php que esta na image a baixo.
"FUNCIONA EM GESIOR 2012"
1º Coloque as imagens de "Itens,Skills,Addons" dentro da pasta
\images\equipment
2º Baixe o arquivo basic.css <Clique aqui para baixar, e coloque dentro de
\layouts\tibiacom
3º Você baixa o characters.php <Clique aqui para baixar, jogue na pasta principal do seu Site.
Creditos:
@Fabio Leandro
@Rusherzin
-
FiNub deu reputação a Ackerzin em Characters.php (Outfit, Skills & EQ+info)Respondi la no topico
-
FiNub deu reputação a FlavioHulk em [PEDIDO] SCRIPT PORTAL COM EFEITOlocal config = { [1] = { text = "Bem-Vindo(a)", position = {x = 160, y = 54, z = 7}, effect = 30, colorText = 125 }, [2] = { text = "Bem-Vindo", position = {x = 158, y = 51, z = 4}, effect = 30, colorText = 125 } } function onThink(cid, interval, lastExecution) for i = 1, #config do local tmpConfig = config[i] doSendAnimatedText(tmpConfig.position, tmpConfig.text, tmpConfig.colorText) addEvent(doSendMagicEffect, 150, tmpConfig.position, tmpConfig.effect) end return true end
-
FiNub deu reputação a FlavioHulk em [PEDIDO] SCRIPT PORTAL COM EFEITOlocal positions = { ["Bem-Vindo(a)"] = {{ x = 160, y = 54, z = 7 }, 30, 9}, ["Bem-Vindo"] = {{ x = 158, y = 51, z = 4 }, 30, 9}, } function onThink(cid, interval, lastExecution) for text, v in pairs(positions) do local pos = v[1] doSendAnimatedText(pos, text, NUMERODACOR) addEvent(doSendMagicEffect, 150, pos, v[2]) end return true end
-
FiNub deu reputação a Soaresdk em Alguém deixa esse script free account?@Emanueldk
Uso TFS 0.4 8.6
qual Quer vocação pode usa estatuas
Em Data\lib
103-offline-training.lua
-- config, in percent of normal training with 2 trainers and player vocation mana regeneration [by food] OfflineTraining_rates = { [SKILL_CLUB] = 100, [SKILL_SWORD] = 100, [SKILL_AXE] = 100, [SKILL_DISTANCE] = 100, [SKILL_SHIELD] = 100, [SKILL__MAGLEVEL] = 100 } -- function that you should edit to make it add other skill etc. function OfflineTraining_canStartTraining(cid) -- return bool return getCreatureStorage(cid, 62669) > 0 end function OfflineTraining_onStartTraining(cid) -- maybe someone will need -- to save your time, this: doPlayerPopupFYI(cid, "You started offline training.") -- NOT WORK :( end function OfflineTraining_onEndTraining(cid) doCreatureSetStorage(cid, 62669, 0) end function OfflineTraining_addTrainedSkills(cid, trainTime) -- time in minutes! local timeInSeconds = trainTime * 60 local vocInfo = getVocationInfo(getPlayerVocation(cid)) if(getCreatureStorage(cid, 62669) == SKILL_SWORD) then doPlayerAddSkillTry(cid, SKILL_SWORD, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_SWORD] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_AXE) then doPlayerAddSkillTry(cid, SKILL_AXE, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_AXE] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL__MAGLEVEL) then doPlayerAddSpentMana(cid, ((timeInSeconds / vocInfo["manaGainTicks"]) * vocInfo["manaGain"]) * OfflineTraining_rates[SKILL__MAGLEVEL] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_CLUB) then doPlayerAddSkillTry(cid, SKILL_CLUB, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_CLUB] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_DISTANCE) then doPlayerAddSkillTry(cid, SKILL_DISTANCE, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_DISTANCE] / 100, true) end doPlayerAddSkillTry(cid, SKILL_SHIELD, timeInSeconds * OfflineTraining_rates[SKILL_SHIELD] / 100, true) end -- 4 functions to show right values on 'bar' in Tibia 9.6 function OfflineTraining_getTime(cid) return getCreatureStorage(cid, 62666) end function OfflineTraining_setTime(cid, newTime) -- set values only between 0 - 720 [12 hours] doCreatureSetStorage(cid, 62666, math.max(0, math.min(newTime, 720))) -- now code to force server to send 'PlayerStats' (including Offline Time) -- we must change any stat: hp,mana,stamina,cap,soul,exp,level doPlayerAddSoul(cid, 1) doPlayerAddSoul(cid, -1) end function OfflineTraining_addTime(cid, addTime) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + addTime) end function OfflineTraining_removeTime(cid, removeTime) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) - removeTime) end -- functions for library to add skills/mlvl function OfflineTraining_initialize(cid) if(OfflineTraining_getTime(cid) == -1) then OfflineTraining_setTime(cid, 720) OfflineTraining_setLogoutTime(cid) -- block problem with first login 'add time' end end function OfflineTraining_isTraining(cid) return (getCreatureStorage(cid, 62667) > 0) end function OfflineTraining_turnOnTraining(cid) doCreatureSetStorage(cid, 62667, 1) end function OfflineTraining_turnOffTraining(cid) doCreatureSetStorage(cid, 62667, 0) end function OfflineTraining_getOfflineTime(cid) return math.floor((os.time() - getCreatureStorage(cid, 62668)) / 60) end function OfflineTraining_setLogoutTime(cid) return doCreatureSetStorage(cid, 62668, os.time()) end
Em
Data/actions
abre actions.xml e add isso
<!-- Offline Training --> <action itemid="8834" event="script" value="other/offlinetraining.lua"/> <action itemid="10353" event="script" value="other/offlinetraining.lua"/> <action itemid="8626" event="script" value="other/offlinetraining.lua"/> <action itemid="1444" event="script" value="other/offlinetraining.lua"/> <action itemid="10349" event="script" value="other/offlinetraining.lua"/> em
data\actions\scripts\other
coloca isso
offlinetraining.lua
function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 1444) then -- sword doCreatureSetStorage(cid, 62669, SKILL_SWORD) elseif(item.itemid == 10349) then -- axe doCreatureSetStorage(cid, 62669, SKILL_AXE) elseif(item.itemid == 8834) then -- mlvl doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL) elseif(item.itemid == 8626) then -- club doCreatureSetStorage(cid, 62669, SKILL_CLUB) elseif(item.itemid == 10353) then -- distannce doCreatureSetStorage(cid, 62669, SKILL_DISTANCE) end if item.actionid == 1000 then doRemoveCreature(cid) end return true end Todas Estatuas
tem que ter Action ID > 1000
para coloca esse id usa mapa editor
ID Das Estatuas
1444 > Sword
10349> Axe
8834> ML
8626> Club
10353> Distannce
em data\creaturescripts
creaturescripts.xml coloca isso
<!-- Offline Training --> <event type="login" name="offtrain_PlayerLogin" event="script" value="offtrain_login.lua"/> <event type="logout" name="offtrain_PlayerLogout" event="script" value="offtrain_logout.lua"/>
em data\creaturescripts\scripts
coloca esses dois
offtrain_login.lua
-- 0.4 - offline training - login.lua function onLogin(cid) OfflineTraining_initialize(cid) if(OfflineTraining_isTraining(cid)) then OfflineTraining_turnOffTraining(cid) -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6] OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid))) -- we remove offline training time [bar in game - 9.6], -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia] -- got '3 hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time' OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid))) OfflineTraining_onEndTraining(cid) else -- offline training time also regenerate when you are offline, but NOT train OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid)) end return true end
offtrain_logout.lua
-- 0.4 - offline training - logout.lua function onLogout(cid) if(OfflineTraining_canStartTraining(cid)) then OfflineTraining_turnOnTraining(cid) OfflineTraining_onStartTraining(cid) end OfflineTraining_setLogoutTime(cid) return true end
-
FiNub deu reputação a Vodkart em [ACTIONS] Alavanca de invasãofunction isWalkable(pos) -- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end local positions = { [1] = {x=164,y=57,z=7}, [2] = {x=176,y=39,z=7}, [3] = {x=169,y=40,z=7}, [4] = {x=156,y=57,z=7}, [5] = {x=139,y=41,z=7}, [6] = {x=173,y=57,z=7}, [7] = {x=161,y=32,z=7}, [8] = {x=138,y=60,z=7}, [9] = {x=179,y=59,z=7}, [10] = {x=132,y=23,z=7}, [11] = {x=173,y=33,z=7}, [12] = {x=178,y=27,z=7}, [13] = {x=181,y=22,z=7}, [14] = {x=197,y=39,z=7}, [15] = {x=208,y=40,z=7}, [16] = {x=208,y=50,z=7}, [17] = {x=204,y=62,z=7}, [18] = {x=194,y=57,z=7}, [19] = {x=178,y=67,z=7}, [20] = {x=104,y=61,z=7}, [21] = {x=102,y=54,z=7}, [22] = {x=103,y=46,z=7}, [23] = {x=153,y=61,z=7}, [24] = {x=96,y=41,z=7}, [25] = {x=83,y=39,z=7}, [26] = {x=110,y=34,z=7}, [27] = {x=132,y=47,z=7}, [28] = {x=138,y=54,z=7} } function onUse(cid, item, frompos, item2, topos) print("itemUID:" .. item.uid) doBroadcastMessage("[AVISO] A cidade foi invadida por Monstros, venha proteger a cidade!") local monsterName if item.uid == 19000 then monsterName = 'Pha?ntom Lord' elseif item.uid == 19001 then monsterName = 'Finger Killer' elseif item.uid == 19002 then monsterName = 'Brimstone Bug' elseif item.uid == 19003 then monsterName = 'Green Phantom' end print("creature Name:" .. monsterName) for i = 1, #positions do if isWalkable(positions[i]) then doCreateMonster(monsterName, positions[i]) end end return true end
-
FiNub deu reputação a KotZletY em (Resolvido)Ban System@Emanueldk cara, o script que mostrei anteriormente contém a opção ban IP, basta você ler a descrição do script, ao informar, player, razão, você informar também o tipo de banimento, um deles é o IP, basta dar uma olhada na descrição do script!
-
FiNub recebeu reputação de KotZletY em (Resolvido)Ban System100000000000000000000000000000000000000000000000000000000 rep++ pra você pena que não tem como kkk TE AMO CARA
@KotZletY onde você achou esse script? estou precisando de um ban ip também '-'
-
FiNub deu reputação a KotZletY em (Resolvido)Ban System@Emanueldk sugiro utilizar o sistema de banimento do próprio servidor, ele utiliza funções próprias do sistema, além de que seu char não aparece e gera a window, a window é gerada assim que você tenta logar no char, como sempre foi: https://github.com/mattyx14/otxserver/blob/otxserv2/path_10_x/data/talkactions/scripts/banishment.lua
-
FiNub deu reputação a LeoTK em (Resolvido)Adaptando script@Emanueldk
tenta assim
Tile donate
function onStepIn(cid, item, position, fromPosition) local tileConfig = { kickPos = fromPosition, kickEffect = CONST_ME_POFF, kickMsg = "Você não e um player donate para virar acesse: http://144.217.170.205/", enterMsg = "Bem Vindo a area donate, agradecemos a sua doação!", enterEffect = CONST_ME_MAGIC_RED, } if isPlayer(cid) == true then if isPremium(cid) == FALSE then doTeleportThing(cid, tileConfig.kickPos) doSendMagicEffect(tileConfig.kickPos, tileConfig.kickEffect) doPlayerSendCancel(cid, tileConfig.kickMsg) return end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, tileConfig.enterMsg) doSendMagicEffect(position, tileConfig.enterEffect) return true end end Script Efeito
local rnd = {"VIP"} function onLogin(cid) if not isPlayer(cid) then return true end sendEffect(cid) registerCreatureEvent(cid, "AdvEffect") return true end function sendEffect(cid) if isCreature(cid) then if isPremium(cid) == true then pos = getThingPos(cid) doSendAnimatedText(pos, rnd[math.random(#rnd)], 251) addEvent(sendEffect, 5200,cid) end end end
-
FiNub deu reputação a Vodkart em [8.6] Labia SystemUPDATE 05/02/2019: - Colocado exhauted na venda de items para não bugar a venda de itens com elf bot!
Descrição do Arquivo
*Sobre o Sistema*
Labia System é um sistema que proporciona ao jogador a capacidade de aprimorar sua habilidade de venda, aumentando assim sua Labia Skill e obtendo maiores lucros em futuras vendas de itens.
O Skill de Labia, pode ser upado enquanto Free ou Premmy Account em qualquer level que você queira!
Basta vender itens no NPC Soya Master.
Lembrando que sendo free, sua lábia pode ser upada apenas até skill 90. Já sendo premmium até a lábia 120.
Se o player for premmy account, de repente ficar free... sua lábia cai para 90, e todos os itens serão vendidos com preços avaliados dentro dessa lábia!
Quanto mais caro for, o item vendido, maior será a porcentagem de lábia upada.
*Exclusividade*
O Sistema também conta com uma configuração exclusiva, tendo a possibilidade de jogadores Premmy account possam upar mais rapído a sua Skill de Labia!
Sem falar no comando inovador:
!labia info -- Ensinando ao jogador como usar o sistema
!labia level -- Mostrando ao jogador quanto de skill Try falta para o próximo level!!
*Benefícios da Lábia*
Quanto maior for sua Labia Skill, maior será o valor pago pelas NPC Soya Master em troca do seu item ! Lembrando que, este é um benefício apenas, para premiuns!, Desta maneira, jogadores premiuns com labia skill alta, conseguem maiores lucros ao vender seus itens!
O valor do item varia de acordo com a Labia upada! Quanto mais skill, mais lucro na venda!
A maior Labia alcançada é você que decide nas suas configurações! por exemplo no RPG Brasil a é Skill 120.
*exemplo da fórmula para cálculos do valor do item de acordo com uma Lábia desejada*
P = PI + PI * 0,025 * (L / 2)
Onde:
P ~ Preço que o item será vendido na lábia L.
PI ~ Preço Inicial do item, preço do item para um lábia 0.
L ~ Labia em que o item será vendido! Vale lembrar que se L for um nº ímpar, deve-se reduzir uma unidade deste número, ou seja, 13 vira 12, 27 vira 26, 91 vira 90, nesse esquema, apenas se L for ímpar!
Exemplo:
Preço de uma Golden Legs na lábia 95:
P = PI + PI * 0,025 * (L / 2)
Como L é ímpar (95), reduzimos uma unidade, 95 vira 94:
P = 48000 + 48000 * 0,025 * (94 / 2)
P = 48000 + 48000 * 0,025 * 47
P = 48000 + 56400
P = 104400 GP's ou 104,4 k
Sistema Labia.rar
-
FiNub deu reputação a .HuRRiKaNe em Como esconder os samples do 1/1Basta transferir os samples para outra conta, não da problema nenhum.
-
FiNub recebeu reputação de Cat em Duvida sobre depositoseu entendi, mais eu acho que posso adiar a abertura do servidor para tentar arrumar o sistema. Obrigado Daniel mais uma vez.
1 - vai ficar 24h online
2 - a level máximo é 750, eu não pretendo resetar assim que um player alcançar esse nível, mais quando tiver vários player nesse level eu posso resetar sim
3 - teremos uma equipe/staff bem atenta aos player, faremos de tudo para satisfazer nossos player
4 - bom, por mim o jogo está ótimo, mais isso vai de cada pessoa, sempre tem uma pessoa que não está satisfeita com nada então....
5 - infelizmente eu não tenho essa fama toda por que esse é meu primeiro projeto/servidor, mais posso garantir que vai ser o melhor servidor baiak de todos, só preciso da colaboração dos player e a confiança, creio que com um pouco de amizade podemos crescer bastante
-
FiNub deu reputação a Cat em Duvida sobre depositosOpa, te respondi no discord, vou falar o mesmo aqui caso alguém queira discordar/complementar.
Eu já conheci ot-admins que ferravam mesmo com os players. Depois de um tempo notei que os jogadores decidem ou não donatar através desses fatores:
1 - tempo do ot on
2 - quanto e qt tempo reseta
3 - staff presente
4 - qualidade do jogo (se vale a pena donatar)
5 - reputação do projeto
acredito que se voce for transparente, apresentar no ot o que a galera quer, for pontual e presente não tem erro
-
FiNub deu reputação a Danyel Varejao em Auto Loot PerfectTroca a lib para esta e veja se corrige.
--[[ Auto Loot System by Danyel Varejão ]] AutoLoot = { Min_Level = 100, -- Level minimo pra utilizar o auto loot. Max_Slots = 5, -- Máximo de slots permitidos. Boost_Actived = true, -- Nao mexa daqui pra baixo caso nao entenda -- Storage_Boost = 45000, Storage_On_Items = 45001, Storage_On_Gold = 45002, Storages = { Count_Gold = 45003, Count_Items = 45004, Count_Table = 45005, Slots = {45006, 45007, 45008, 45009, 45010} -- Storage pra cada slot. } } AutoLoot_Boost = { -- [ID do item] = Valor, [2406] = 36, [2537] = 4800, [2377] = 480, [2663] = 600, [2472] = 240000, [2398] = 36, [2475] = 7200, [2519] = 6000, [2497] = 10800, [2523] = 180000, [2494] = 108000, [2400] = 144000, [2491] = 6000, [2421] = 108000, [2646] = 240000, [2477] = 7200, [2413] = 84, [2656] = 18000, [2498] = 48000, [2647] = 600, [2534] = 30000, [7402] = 24000, [2466] = 36000, [2465] = 240, [2408] = 120000, [2518] = 1800, [2500] = 3000, [2376] = 30, [2470] = 96000, [2388] = 24, [2645] = 48000, [2434] = 2400, [2463] = 480, [2536] = 9600, [2387] = 240, [2396] = 4800, [2381] = 240, [2528] = 4800, [2409] = 1800, [2414] = 12000, [2427] = 9000, [2407] = 7200, [2458] = 42, [2383] = 960, [2392] = 3600, [2488] = 18000, [2525] = 120, [2423] = 240, [2462] = 4800, [2520] = 48000, [2390] = 180000, [2417] = 72, [2436] = 1200, [5741] = 42000, [2378] = 120, [2487] = 24000, [2476] = 6000, [8891] = 36000, [2459] = 36, [2195] = 48000, [2391] = 7200, [2464] = 120, [8889] = 72000, [2432] = 12000, [2431] = 108000, [2492] = 72000, [2515] = 240, [2430] = 2400, [2393] = 12000, [7419] = 36000, [2522] = 120000, [2514] = 180000 } function AutoLoot.CountTable(table) local Count = 0 if type(table) == "table" then for index in pairs(table) do Count = Count + 1 end return Count end return false end function AutoLoot.getContainerItemsInfo(ContainerUID) local Table = {} if ContainerUID and ContainerUID > 0 then local Index = 0 for i = 0, getContainerSize(ContainerUID) - 1 do local item = getContainerItem(ContainerUID, i) Index = Index + 1 Table[Index] = {UID = item.uid, ItemID = item.itemid, Count = item.type} end return Table end return false end function AutoLoot.String(String) local Table = {} local x, old, last = 0, 0, 0 local first, second, final = 0, 0, 0 if type(String) ~= "string" then return Table end for i = 2, #String - 1 do if string.byte(String:sub(i,i)) == string.byte(':') then x, second, last = x + 1, i - 1, i + 2 for t = last, #String - 1 do if string.byte(String:sub(t,t)) == string.byte(',') then first = x == 1 and 2 or old old, final = t + 2, t - 1 local Index = String:sub(first, second) local Var = String:sub(last, final) Table[tonumber(Index) or tostring(Index)] = tonumber(Var) or tostring(Var) break end end end end return Table end function AutoLoot.TranslateString(Table) local String = "" if type(Table) ~= "table" then return String end for i, last in pairs(Table) do String = String..i..": ".. last ..", " end String = "a"..String.."a" return tostring(String) end function AutoLoot.getPlayerStorageZero(cid, key) return getPlayerStorageValue(cid, key) > 0 and getPlayerStorageValue(cid, key) or 0 end function AutoLoot.getStorageZero(key) return getGlobalStorageValue(key) > 0 and getGlobalStorageValue(key) or 0 end function AutoLoot.setPlayerTableStorage(cid, key, value) return doPlayerSetStorageValue(cid, key, AutoLoot.TranslateString(value)) end function AutoLoot.setGlobalTableStorage(key, value) return setGlobalStorageValue(key, AutoLoot.TranslateString(value)) end function AutoLoot.getPlayerTableStorage(cid, key) return AutoLoot.String(getPlayerStorageValue(cid, key)) end function AutoLoot.getGlobalTableStorage(key) return AutoLoot.String(getGlobalStorageValue(key)) end function AutoLoot.getPlayerList(cid) local Table = {} for i = 1, #AutoLoot.Storages.Slots do if getPlayerStorageValue(cid, AutoLoot.Storages.Slots[i]) ~= -1 then table.insert(Table, getPlayerStorageValue(cid, AutoLoot.Storages.Slots[i])) end end return Table end function AutoLoot.ExistItemByName(name) local Items = io.open("data/items/items.xml", "r"):read("*all") local GetITEM = Items:match('name="' .. name ..'"') if GetITEM == nil or GetITEM == "" then return false end return true end function AutoLoot.addToList(cid, name) local ItemID = getItemIdByName(name) if AutoLoot.getPlayerList(cid) and isInArray(AutoLoot.getPlayerList(cid), ItemID) then return false end for i = 1, #AutoLoot.Storages.Slots do if getPlayerStorageValue(cid, AutoLoot.Storages.Slots[i]) == -1 then doPlayerSetStorageValue(cid, AutoLoot.Storages.Slots[i], ItemID) return true end end end function AutoLoot.removeFromList(cid, name) local ItemID = getItemIdByName(name) for i = 1, #AutoLoot.Storages.Slots do if getPlayerStorageValue(cid, AutoLoot.Storages.Slots[i]) == ItemID then doPlayerSetStorageValue(cid, AutoLoot.Storages.Slots[i], -1) return true end end return false end function AutoLoot.Boost(cid) return tonumber(getPlayerStorageValue(cid, AutoLoot.Storage_Boost)) >= os.time() end function AutoLoot.Items(cid, position) if not isPlayer(cid) then return true end local Check, String, Position = false, "", {} for i = 1, 255 do position.stackpos = i if getThingFromPos(position).uid and getThingFromPos(position).uid > 0 and isContainer(getThingFromPos(position).uid) then Position = position Check = true break end end if Check then local CorpseUID = AutoLoot.getContainerItemsInfo(getThingFromPos(Position).uid) if CorpseUID then for Index, Item in pairs(CorpseUID) do if Index < AutoLoot.CountTable(CorpseUID) then if Item.UID and Item.ItemID then if isContainer(Item.UID) then local Bag = AutoLoot.getContainerItemsInfo(Item.UID) for i = 1, AutoLoot.CountTable(Bag) do if isInArray(AutoLoot.getPlayerList(cid), Bag[i].ItemID) then if Bag[i].Count > 1 then if Bag[i].uid and Bag[i].uid > 0 then doRemoveItem(Bag[i].uid, Bag[i].Count) end doPlayerAddItem(cid, Bag[i].ItemID, Bag[i].Count) String = String.." ".. Bag[i].Count .." ".. getItemNameById(Bag[i].ItemID) .." +" else if Bag[i].uid and Bag[i].uid > 0 then doRemoveItem(Bag[i].uid) end if AutoLoot.Boost_Actived and AutoLoot.Boost(cid) then if AutoLoot_Boost[Bag[i].ItemID] then doPlayerSetBalance(cid, getPlayerBalance(cid) + AutoLoot_Boost[Bag[i].ItemID]) String = String.." 1 ".. getItemNameById(Bag[i].ItemID) .." (".. AutoLoot_Boost[Bag[i].ItemID] .."gp no banco) +" else doPlayerAddItem(cid, Bag[i].ItemID, 1) String = String.." 1 ".. getItemNameById(Bag[i].ItemID) .." +" end else doPlayerAddItem(cid, Bag[i].ItemID, 1) String = String.." 1 ".. getItemNameById(Bag[i].ItemID) .." +" end end end end end end end if isInArray(AutoLoot.getPlayerList(cid), Item.ItemID) then if Item.Count > 1 then if Item.UID and Item.UID > 0 then doRemoveItem(Item.UID, Item.Count) end doPlayerAddItem(cid, Item.ItemID, Item.Count) String = String.." ".. Item.Count .." ".. getItemNameById(Item.ItemID) .." +" else if Item.UID and Item.UID > 0 then doRemoveItem(Item.UID) end if AutoLoot.Boost_Actived and AutoLoot.Boost(cid) then if AutoLoot_Boost[Item.ItemID] then doPlayerSetBalance(cid,getPlayerBalance(cid) + AutoLoot_Boost[Item.ItemID]) String = String.." 1 "..getItemNameById(Item.ItemID).." ("..AutoLoot_Boost[Item.ItemID].."gps no banco) +" else doPlayerAddItem(cid, Item.ItemID, 1) String = String.." 1 "..getItemNameById(Item.ItemID).." +" end else doPlayerAddItem(cid, Item.ItemID, 1) String = String.." 1 "..getItemNameById(Item.ItemID).." +" end end end end end end AutoLoot.setPlayerTableStorage(cid, AutoLoot.Storages.Count_Table, {[1] = String, [2] = 0}) end function AutoLoot.Gold(cid, position) if not isPlayer(cid) then return true end local Check = false local Total_Gold = 0 local Position = {} for i = 1, 255 do position.stackpos = i if getThingFromPos(position).uid and getThingFromPos(position).uid > 0 and isContainer(getThingFromPos(position).uid) then Position = position Check = true break end end if Check then local CorpseUID = AutoLoot.getContainerItemsInfo(getThingFromPos(Position).uid) if CorpseUID then for Index, Item in pairs(CorpseUID) do if Item.UID and Item.ItemID then if Index < AutoLoot.CountTable(CorpseUID) then if isContainer(Item.UID) then local Bag = AutoLoot.getContainerItemsInfo(Item.UID) for i = 1, AutoLoot.CountTable(Bag) do if isInArray({2148, 2152, 2160}, Bag[i].ItemID) then local Multiplier = 1 if Bag[i].ItemID == 2148 then Multiplier = 1 elseif Bag[i].ItemID == 2152 then Multiplier = 100 elseif Bag[i].ItemID == 2160 then Multiplier = 10000 end if Bag[i].uid and Bag[i].uid > 0 then doRemoveItem(Bag[i].uid, Bag[i].Count) end doPlayerSetBalance(cid, getPlayerBalance(cid) + tonumber(Bag[i].Count) * Multiplier) Total_Gold = Total_Gold + Bag[i].Count * Multiplier doPlayerSetStorageValue(cid, AutoLoot.Storages.Count_Gold, tonumber(AutoLoot.getPlayerStorageZero(cid, AutoLoot.Storages.Count_Gold)) + tonumber(Item.Count) * tonumber(Multiplier)) end end end end if isInArray({2148, 2152, 2160}, Item.ItemID) then local Multiplier = 1 if Item.ItemID == 2148 then Multiplier = 1 elseif Item.ItemID == 2152 then Multiplier = 100 elseif Item.ItemID == 2160 then Multiplier = 10000 end if Item.UID and Item.UID > 0 then doRemoveItem(Item.UID, Item.Count) end doPlayerSetBalance(cid, getPlayerBalance(cid) + Item.Count * Multiplier) doPlayerSetStorageValue(cid, AutoLoot.Storages.Count_Gold, tonumber(AutoLoot.getPlayerStorageZero(cid, AutoLoot.Storages.Count_Gold)) + tonumber(Item.Count) * tonumber(Multiplier)) Total_Gold = Total_Gold + Item.Count * Multiplier end end end end end if Total_Gold > 0 then Total_Gold = Total_Gold - (Total_Gold * 0.2) Total_Gold = math.ceil(Total_Gold) doPlayerSetBalance(cid, getPlayerBalance(cid) + Total_Gold) local Table = AutoLoot.getPlayerTableStorage(cid, AutoLoot.Storages.Count_Table) Table[2] = Total_Gold AutoLoot.setPlayerTableStorage(cid, AutoLoot.Storages.Count_Table, Table) end end function AutoLoot.Message(cid) if not isPlayer(cid) then return true end local Table = AutoLoot.getPlayerTableStorage(cid, AutoLoot.Storages.Count_Table) if AutoLoot.CountTable(Table) >= 1 then if Table[1] then if Table[2] and Table[2] > 0 then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "[Auto Loot System] Coletados: ".. Table[1] .." ".. Table[2] .." gold coins.") else if type(Table[1]) == "string" and string.len(Table[1]) > 1 then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "[Auto Loot System] Coletados: "..Table[1]) end end elseif not Table[1] then if Table[2] then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "[Auto Loot System] Coletados: "..Table[2].." gold coins.") end end end doPlayerSetStorageValue(cid, AutoLoot.Storages.Count_Table, -1) end
-
FiNub deu reputação a Vodkart em (Resolvido)Dota System By VodkartObrigado!! vou fazer um tópíco assim que eu tiver tempo com o novo mapa convertido para 8.6!!
Valeu fera, você é o cara!
---------------
atualizei o arquivo no 4shared!!
obrigado @victor4312
-
FiNub recebeu reputação de Vodkart em (Resolvido)Dota System By Vodkartalguém aqui que já baixou e conseguiu abrir o mapa do evento Dota System do @Vodkart poderia me ajudar aqui? eu não estou conseguindo abrir ele, sempre que eu abro da erro no Tibia.dat e Spr
eu baixei 3 tibia de site diferentes versão 8.6 e deu o mesmo erro, dai ele me falou que tinha importado para versão 8.7 eu baixei o cliente 8.7 mais continua com o mesmo erro....
-
FiNub recebeu reputação de KotZletY em (Resolvido)SQL Não salvacertifique-se de que seu personagem que você está editando esteja deslogado
-
FiNub deu reputação a Vodkart em NPC Falanteacho que não precisa criar vários!
usa o xml do npc do amigo @Zanrix
e o arquivo lua do npc deixe assim:
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler)
--------------------------
creaturescripts
npc_falante.lua
local YELL = { "OLA jogadores tenho novidades interessantes", "A lua é linda, sabia?" } local npc = "Towncryer" local exaust = 10 function onThink(cid, interval) local pos = getPlayerPosition(cid) local t = getSpectators(pos, 7, 5, false) if t then for _, cid in ipairs(t) do if isNpc(cid) and getCreatureName(cid) == npc then if getGlobalStorageValue(cid) - os.time() <= 0 then doCreatureSay(cid, YELL[math.random(#YELL)], 1) setGlobalStorageValue(cid, os.time()+exaust) end end end end return true end
TAG
<event type="think" name="NpcShout" event="script" value="npc_falante.lua"/>
regristre no player pelo onLogin
registerCreatureEvent(cid, "NpcShout")
-
FiNub deu reputação a Zanrix em NPC FalanteSe for uma opção válida pra você, crie um script desse pra cada NPC, deve funcionar.
-
FiNub deu reputação a Zanrix em NPC Falante<?xml version="1.0" encoding="UTF-8"?> <npc name="Towncryer" script="Towncryer.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="131" head="95" body="86" legs="10" feet="114" addons="1"/> </npc>
local YELL = { "Fala 1", "Fala 2" } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) yell_delay = 20 frequency = 25 function onThink() if ((os.time() - yell_delay) >= frequency) then yell_delay = os.time() doCreatureSay(getNpcCid(), YELL[math.random(#YELL)], 1) end npcHandler:onThink() end