Tudo que Linus postou
-
[TFS 1.x] Sistema de reset
Sim a versão tfs 1.1 foi. as versões antigas foram esses que estão escrito no começo do script da lib : --[[Script made 100% by Nogard, Night Wolf and Linus. You can feel free to edit anything you want, but don't remove the credits]]
-
[TFS 1.x] Sistema de reset
Você pode configurar se quer que o preço aumente a cada reset, se quer que o level pra resetar aumente e se vc quer que a vida resete junto (e quanto % da vida atual será a vida após resetar). Testado em tfs 1.1, Versão 10.77 Vá em data/npc/lib/ crie npc_resets.lua : Você pode editar mexendo aqui. no script acima : config = { minlevel = 150, --- Level inical para resetar price = 10000, --- Preço inicial para resetar newlevel = 20, --- Level após reset priceByReset = 0, --- Preço acrescentado por reset percent = 30, ---- Porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 50, ---- Maximo de resets levelbyreset = 0 --- Quanto de level vai precisar a mais no próximo reset } agora em data/npc/ crie reseter.XML : Agora em data/npc/scripts crie reseter.lua : Img :
-
(Resolvido)[PEDIDO] Comando de mute para tutor
mute.lua : function onSay(cid, words, param) local CHANNEL_HELP = 7 local player = Player(cid) local storage = 456112 if words == "/mute" then local mute = param:split(",") if mute[1] == nil or mute[1] == " " then player:sendCancelMessage("Invalid player specified.") return false end if mute[2] == nil or mute[2] == " " then player:sendCancelMessage("Invalid time specified.") return false end local target = Player(mute[1]) local time = tonumber(mute[2]) local condition = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) condition:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() >= ACCOUNT_TYPE_TUTOR then player:sendCancelMessage("Only player can be mutated") return false end target:addCondition(condition) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") target:setStorageValue(storage, 1) return false end if words == "/unmute" then local remove = Player(param) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if remove == nil then player:sendCancelMessage("A player with that name is not online.") return false end if remove:getAccountType() >= ACCOUNT_TYPE_TUTOR then return false end if remove:getStorageValue(storage) == 1 then remove:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, remove:getName() .. " has been unmuted by " .. player:getName() .. ".") remove:setStorageValue(storage, -1) else player:sendCancelMessage("A player " .. remove:getName() .. "is not mutated") end end return false end
-
[TFS 1.X] /mute, /unmute
Dei uma pequena fuçada no tfs e encontrei alguma funções pra fazer isso : só trocar o mute.lua por esse : function onSay(cid, words, param) local CHANNEL_HELP = 7 local player = Player(cid) local storage = 456112 if words == "/mute" then local mute = param:split(",") if mute[1] == nil or mute[1] == " " then player:sendCancelMessage("Invalid player specified.") return false end if mute[2] == nil or mute[2] == " " then player:sendCancelMessage("Invalid time specified.") return false end local target = Player(mute[1]) local time = tonumber(mute[2]) local condition = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) condition:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() >= ACCOUNT_TYPE_TUTOR then player:sendCancelMessage("Only player can be mutated") return false end target:addCondition(condition) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") target:setStorageValue(storage, 1) return false end if words == "/unmute" then local remove = Player(param) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if remove == nil then player:sendCancelMessage("A player with that name is not online.") return false end if remove:getAccountType() >= ACCOUNT_TYPE_TUTOR then return false end if remove:getStorageValue(storage) == 1 then remove:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, remove:getName() .. " has been unmuted by " .. player:getName() .. ".") remove:setStorageValue(storage, -1) else player:sendCancelMessage("A player " .. remove:getName() .. "is not mutated") end end return false end
-
[TFS 1.X] /mute, /unmute
Estou baixando o tfs 1.0, pra ver quais são os erros e arrumar de acordo com as funções corretas. 1 - Poketibia eu acho que usa tfs 0.4 ou menor. 2 - Sim ele da muted em all chats.
-
(Resolvido)[PEDIDO] Comando de mute para tutor
arthur \/ : http://www.tibiaking.com/forum/topic/55518-tfs-1x-mute-unmute/
-
Poderia Adaptar Para Min?
Erro meu, tente agora : function onSay(cid, words, param) local player = Player(cid) local t = param:split(",") if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then return false end doCreatureSay(getCreatureName(t[1]), t[2], 1) return true end
-
Procura-se Scripter Avançado!
Nome : Messi Idade : 8 anos Contato : messi@orkut.com Honorários : não conheço essa pessoa A quantos anos meche com otservs ? a 5 minutos atras.
-
[TFS 1.1] Addon NPC (Varkhal)
@ Snowsz Xml adicionado.
-
[TFS 1.0] !buyaddon "addon
Thanks bem lembrado, estou estudando .lua vendo alguns scripts em um outro fórum e andei vendo que tem bastante conteúdo que aqui não possui, e estou postando aqui pra pessoas que não sabem muito inglês ir aprendendo com os codes tb , a maioria dos codes aqui do fórum estão tudo na versão 0.4 -, vou começar fazer uns script de minha própria autoria mesmo e trazer aqui pro fórum (tfs 1.x +), pra contribuir com a comunidade tb .
-
[TFS 1.1] Skill Point System
O sistema é simples ao upar cada level você ganha x pontos de habilidade, onde é possível com esse pontos, comprar mana, hp, skill, etc ... /creaturescripts/scripts/skillpoints.lua /creaturescripts/scripts/login.lua player:registerEvent("SkillPointSystem") /talkactions/scripts/skillpoints.lua <event type="modalwindow" name="PointWindow" script="skillpoints.lua"/> <event type="advance" name="SkillPointSystem" script="skillpoints.lua"/> /talkactions/scripts/skillpoints.lua function onSay(player, words, param) local SKILL_POINTS = 45200 local Point = ModalWindow(1, "Skill Points", "You have skill " ..player:getStorageValue(SKILL_POINTS).. " points make your choice:\n\n Skill Required Points Increase Amount") Point:addChoice(1, "1. Health 1 2") Point:addChoice(2, "2. Mana") Point:addChoice(3, "3. Magic Level") Point:addChoice(4, "4. Sword") Point:addChoice(5, "5. Axe") Point:addChoice(6, "6. Club") Point:addChoice(7, "7. Shielding") Point:addChoice(8, "8. Distance") Point:addButton(1, 'Gain 1') Point:addButton(2, 'Gain 2') Point:addButton(3, 'Gain 5') Point:addButton(4, 'Cancel') player:registerEvent("PointWindow") Point:sendToPlayer(player) return false end /talkactions/talkactions.xml <talkaction words="!points" separator=" " script="skillpoints.lua"/> Créditos : zbisu, codinabacl, ninja, MadMook
-
/commands para TFS 1.1
function onSay(cid, words, param) Não precisa colocar cid na callback, e dps definir player como cid, pode ir direto colocando na callback player e chamar sem definir. (TFS 1.1) function onSay(player, words, param) abrçs
-
(Resolvido)[PEDIDO] Comando de mute para tutor
/\ Ele usa tfs 1.0 ... e vocês estão usando funções 0.4 não vai funcionar é claro function onSay(cid, words, param) local player = Player(cid) local m = string.explode(param, ",") local target = Player(m[1]) local time = tonumber(m[2]) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if time == nil then player:sendCancelMessage("Invalid param specified.") return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You can only mutate a normal player.") return false end if time == 0 or time >= 360 then player:sendCancelMessage("you can only mute for a maximum of 360 minutes") return false end local condition = Condition(CONDITION_MUTED) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) target:doaddCondition(condition) target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been muted by " .. player:getName() .. " , to "..time.. " minutes.") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You muted " .. target:getName() .." to "..time.." minutes.") return true end <talkaction words="/mute" separator=" " script="ARQUIVO.lua" /> /mute Linus, 10 @topic : mas tarde eu faço, to com preguiça de fazer o sistema tudo certinho aqui.
-
[TFS 1.1] Healer/blessings NPC
É um npc, que heala hp do player, remove conditions e que vende bless todas juntas, ou separadas.
-
Poderia Adaptar Para Min?
Ficaria assim só pra GM + usar : function onSay(cid, words, param) local t = param:split(",") if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then return false end doCreatureSay(getCreatureName(t[1]), t[2], 1) return true end só adicionar : if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then return false end ACCOUNT_TYPE_NORMAL = 1 ACCOUNT_TYPE_TUTOR = 2 ACCOUNT_TYPE_SENIORTUTOR = 3 ACCOUNT_TYPE_GAMEMASTER = 4 ACCOUNT_TYPE_GOD = 5
-
(Resolvido)[PEDIDO] Comando de mute para tutor
Cara sempre que não funcionar poste o erro que dá, tu tinha postado falando que não funcionou e não falou o erro que dava, tu acha que eu tenho bola de cristal pra saber o que se passa no seu server ? Segundo, esse erro foi porque tu copiou errado, esqueceu de copiar o ultimo end... function onSay(cid, words, param) local player = Player(cid) local m = string.explode(param, ",") local target = Player(m[1]) local time = tonumber(m[2]) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if time == nil then player:sendCancelMessage("Invalid param specified.") return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You can only mutate a normal player.") return false end if time == 0 and time >= 360 then player:sendCancelMessage("you can only mute for a maximum of 360 minutes") return false end local condition = Condition(CONDITION_MUTED) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) target:doaddCondition(condition) target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been muted by " .. player:getName() .. " , to "..time.. " minutes.") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You muted " .. target:getName() .." to "..time.." minutes.") return true end
-
(Resolvido)[PEDIDO] Comando de mute para tutor
/mute nomedoplayer, tempo(máximo 360 minutos.) /mute Linus, 10 -- Mutado por de 10 minutos.
-
Addon Bonus Diferente
Pra quem se interessar fazer vai uma dica, faz por manipulação de arquivo, onde se tiver X storage, ele adiciona tal tag no arquivo de atributos, é algo meio complicado, mas da pra fazer sem maiores complicações, eu até faria, mas creio que é algo que não vale o tempo pra disponibilizar free, mas fica a ideia, se alguém se interessar no seu pedido, ou se tiver outra forma menos "trabalhosa" digam aqui, que eu faço sem maiores problemas.
-
(Resolvido)[PEDIDO] Comando de mute para tutor
function onSay(cid, words, param) local player = Player(cid) local m = string.explode(param, ",") local target = Player(m[1]) local time = tonumber(m[2]) if player:getAccountType() < ACCOUNT_TYPE_TUTOR then return false end if time == nil then player:sendCancelMessage("Invalid param specified.") return false end if target == nil then player:sendCancelMessage("A player with that name is not online.") return false end if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You can only mutate a normal player.") return false end if time == 0 and time >= 360 then player:sendCancelMessage("you can only mute for a maximum of 360 minutes") return false end local condition = Condition(CONDITION_MUTED) condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000) target:doaddCondition(condition) target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been muted by " .. player:getName() .. " , to "..time.. " minutes.") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You muted " .. target:getName() .." to "..time.." minutes.") end <talkaction words="/mute" separator=" " script="ARQUIVO.lua" />
-
(Resolvido)[AJUDA] Fury Gate só em carlin
function onStartup(interval) math.randomseed(os.time()) local chance = math.random(1, 6) if (chance == 1) then -- venore setGlobalStorageValue(9710, 1) doCreateItem(7853, {x = 32833, y = 32081, z = 7}) doCreateItem(7851, {x = 32834, y = 32081, z = 7}) doCreateItem(5066, {x = 32834, y = 32081, z = 7}) doCreateItem(5066, {x = 32833, y = 32081, z = 7}) gate1 = doCreateItem(6116, {x = 32834, y = 32081, z = 7}) doSetItemActionId(gate1, 9710) print('>> Fury Gate hoje esta em venore.') elseif (chance == 2) then -- ab'dendriel setGlobalStorageValue(9711, 1) doCreateItem(7853, {x = 32679, y = 31719, z = 7}) doCreateItem(7851, {x = 32680, y = 31719, z = 7}) doCreateItem(5066, {x = 32680, y = 31719, z = 7}) doCreateItem(5066, {x = 32679, y = 31719, z = 7}) gate2 = doCreateItem(6116, {x = 32680, y = 31719, z = 7}) doSetItemActionId(gate2, 9711) print('>> Fury Gate hoje esta em ab dendriel.') elseif (chance == 3) then -- thais setGlobalStorageValue(9712, 1) doCreateItem(5064, {x = 32264, y = 32163, z = 7}) doCreateItem(5064, {x = 32264, y = 32164, z = 7}) doCreateItem(7852, {x = 32264, y = 32164, z = 7}) doCreateItem(7853, {x = 32264, y = 32163, z = 7}) doCreateItem(5064, {x = 32265, y = 32163, z = 7}) doCreateItem(5064, {x = 32265, y = 32164, z = 7}) gate3 = doCreateItem(6117, {x = 32264, y = 32164, z = 7}) doSetItemActionId(gate3, 9712) print('>> Fury Gate hoje esta em thais.') elseif (chance == 4) then -- carlin setGlobalStorageValue(9713, 1) doCreateItem(5066, {x = 32262, y = 31848, z = 7}) doCreateItem(5066, {x = 32263, y = 31848, z = 7}) doCreateItem(7853, {x = 32262, y = 31848, z = 7}) doCreateItem(7851, {x = 32263, y = 31848, z = 7}) gate4 = doCreateItem(6116, {x = 32263, y = 31848, z = 7}) doSetItemActionId(gate4, 9713) print('>> Fury Gate hoje esta em carlin.') elseif (chance == 5) then -- edron setGlobalStorageValue(9714, 1) doCreateItem(5066, {x = 33220, y = 31922, z = 7}) doCreateItem(5066, {x = 33221, y = 31922, z = 7}) doCreateItem(7853, {x = 33220, y = 31922, z = 7}) doCreateItem(7851, {x = 33221, y = 31922, z = 7}) doCreateItem(5066, {x = 33220, y = 31923, z = 7}) doCreateItem(5066, {x = 33221, y = 31923, z = 7}) gate5 = doCreateItem(6116, {x = 33221, y = 31922, z = 7}) doSetItemActionId(gate5, 9714) print('>> Fury Gate hoje esta em edron.') elseif (chance == 6) then -- kazordoon setGlobalStorageValue(9716, 1) doCreateItem(5066, {x = 32573, y = 31982, z = 7}) doCreateItem(5066, {x = 32574, y = 31982, z = 7}) doCreateItem(7853, {x = 32573, y = 31982, z = 7}) doCreateItem(7851, {x = 32574, y = 31982, z = 7}) gate6 = doCreateItem(6116, {x = 32574, y = 31982, z = 7}) doSetItemActionId(gate6, 9716) print('>> Fury Gate hoje esta em kazordoon.') end return true end
-
(Resolvido)(Pedido) teleporte
level = 500 function onStepIn(cid, item, position, fromPosition, toPosition) if getPlayerLevel(cid) < level then doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente players level " .. level .. " ou mais podem passar.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Seja bem vindo!") end return true end <movevent type="StepIn" actionid="XXXX" event="script" value="ARQUIVO.lua"/>
-
(Resolvido)AJuda Entende a Formula
Eu tava fazendo umas contas meio louca aqui supondo alguma valores e por fim acabou bugando mais minha mente ainda HUAHSUAH : [Formula dano Minimo] minl = 75 / 50 = 1,5 minm = 30 * 50 = 1500 450 + 1,5 = 1501,5 minA = -0.0 minB = -10 (1501,5) * 1 * minA + minB = (1501,5) * 1 * -0.0 + -10 = [- 15015] -- Dano -- Dano Minimo 4515 [Formula dano Máximo] maxl = 75 / 70 = 1,05 -- Arredondei pra não ficar numero quebrado maxm = 30 * 70 = 2100 1,05 + 2100 = 2101,05 maxA = -0.0 maxB = -10 (2101,05) * 1 * maxA + maxB = (2101,05) * 1 * -0.0 + -10 = [- 21010,5] -- Dano -- Dano máximo 21010 Então o dano da primeira magia supondo alguns valores que não tem como saber iria varia de no min (15015) a no max (21010). _____________________________________________________________________________________ Agora o segundo : [Formula dano Minimo] minl = 100 / 50 = 2 minm = 30 * 50 = 1500 1500 + 2 = 1502 minA = -0.0 minB = -37 (1502) * 1 * minA + minB = (1502) * 1 * -0.0 + -37 = [-55574] -- Dano what
-
(Resolvido)AJuda Entende a Formula
Eu tb achei curioso a sua pergunta ai dei uma rápida pesquisada e encontre isso, eu entendi + ou - a lógica de como é calculada o dano. ________________________________________________________________________________________________________________________ Quanto ao COMBAT_FORMULA, tem nas sources a formula dele, em combat.cpp Ai no script e mais ou menos assim: setCombatFormula(combat, COMBAT_FORMULA_XXX, mina, minb, maxa,maxb) Esses valores são aplicados na formula da source, a formula do que eu tenho aqui e assim: min = (int32_t)((player->getLevel() / minl + player->getMagicLevel() * minm) * 1. * mina + minb); max = (int32_t)((player->getLevel() / maxl + player->getMagicLevel() * maxm) * 1. * maxa + maxb); Provavelmente depois de ter os dois damages min e max definidos, deve ser feito um random entre eles pra gerar um final e pode ainda e provavelmente tem mais coisas que influenciam no damage. Obs.: Não me pergunte o que é minl,maxl,minm,maxm, não sei lhe dizer. créditos : dalvorsn
-
Três de muitos motivos para o Tibiaking não fechar
-
(Resolvido)[AJUDA] Apenas dando EXP...
Tenta agora : local tb = { [3088] = {9776, 1, "You've found a yalahari armor."}, [3089] = {9778, 1, "You've found a yalahari mask."}, [3090] = {9777, 1, "You've found a yalahari leg piece."} } function onUse(cid, item) local player = Player(cid) for bau, v in pairs(tb) do if item.uid == bau then if player:getStorageValue(10012) < 1 then player:AddItem(v[1], v[2]) player:setStorageValue(30, 54) player:addExperience(20000) player:setStorageValue(10012, 1) player:setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" player:sendTextMessage(MESSAGE_INFO_DESCR, v[3]) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end end end return true end