Tudo que Vodkart postou
-
(Resolvido)Dar 10% a mais de exp + skills para quem está dominando o castle.
local rate = 1 local rate_castle = 0.10 local storage = 211320111636 local skills = {SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD, SKILL__MAGLEVEL} function onLogin(cid) if getPlayerGuildId(cid) > 0 and getGlobalStorageValue(storage) == getPlayerGuildName(cid) then doPlayerSetExperienceRate(cid, rate + rate_castle) for _, ret in pairs(skills) do doPlayerSetRate(cid, ret, rate + rate_castle) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você tem "..((rate_castle)*100).."% a mais de experiencia e skills Agora. (Bonus Castle).") end return true end
-
(Resolvido)Ajuda - systema castle of honor erro
cadê o código?
-
Ajuda Sistema Do Reset
qual o seu sistema de reset? -------------------------- function getResetLevelStages(cid) local reset_stages = { [{0, 10}] = 10, [{11, 20}] = 8, [{21, 30}] = 6, [{31, 40}] = 4, [{41, math.huge}] = 2 } for v , r in pairs(reset_stages) do if getPlayerResets(cid) >= v[1] and getPlayerResets(cid) <= v[2] then return doPlayerSetRate(cid, SKILL__LEVEL, r) end end end
-
(Resolvido)Dar 10% a mais de exp + skills para quem está dominando o castle.
@daniel.braga989 é o código do onLogin que vc colocou no tópico, só editei... e na lib, pode ser sim, ou até no functions-050.lua (algo assim)
-
(Resolvido)Dar 10% a mais de exp + skills para quem está dominando o castle.
local rate = 1 local rate_castle = 0.10 local storage = 211320111636 function onLogin(cid) if getPlayerGuildId(cid) > 0 and getGlobalStorageValue(storage) == getPlayerGuildName(cid) then doPlayerSetExperienceRate(cid, rate + rate_castle) doPlayerAddCastleBuff(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você tem "..((rate_castle)*100).."% a mais de experiencia e skills Agora. (Bonus Castle).") end return true end e na lib adicione: condition_casbuff = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition_casbuff, CONDITION_PARAM_TICKS, -1) setConditionParam(condition_casbuff, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_MELEEPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_FISTPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_CLUBPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_SWORDPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_AXEPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SKILL_SHIELDPERCENT, 10) setConditionParam(condition_casbuff, CONDITION_PARAM_SUBID, 1515) -- n mexer function doPlayerAddCastleBuff(cid) return doAddCondition(cid, condition_casbuff) end function doPlayerRemoveCastleBuff(cid) return doRemoveCondition(cid, CONDITION_ATTRIBUTES, 1515) end para remover o buff das skills usa a função: doPlayerRemoveCastleBuff(cid) para adicionar o buff das skills usa a função: doPlayerAddCastleBuff(cid)
-
(Resolvido)Teleport aparecer Em X Local somente ao matar 2 ''boss'' Gerador.
e quem estiver na area matando o boss? fica lá? é teleportado? o boss some? me chama discord
-
(Resolvido)Dar 10% a mais de exp + skills para quem está dominando o castle.
são todas as skills? magic level tbm? e hp e mana 10% max?
-
[TFS] New Auto Loot Unlimited Edition 2.0
Me manda pm que eu faço as alterações que vc precisa, o que você quer? que seja por onDeath man? manda PM lá
-
[Dúvida] Jinchuuriki System [NTO]
No caso desse sistema, você só pode ter uma Bijuu por character, mas eu também pensei nisso, em poder selar mais que uma Bijuu e ai o buff iria acumulando!
-
[Dúvida] Jinchuuriki System [NTO]
Sobre a primeira eu achei achei bastante interessante, é algo que os membros da akatsuki faziam, eles "roubavam" as bijuus dos jinchuurikis, vou implementar essa ideia!! Já a questão da segunda, eu não acho viável, até pq quando o usuário que é um jinchuuriki morrer, ele automaticamente já perde a bijuu... sendo que a mesma tem uma certa chance de reaparecer em determinado local.
-
[Dúvida] Jinchuuriki System [NTO]
Obrigado pela contribuição dando sua ideia! Neste caso eu acho que foge muito do que é o sistema jinchuuriki, que como o desenho retrata, é algo que está selado dentro do seu corpo, não é o selo(item) em si, tanto é que para selar você pode morrer, caso não suporte tal feito. Também creio que comercializar esse tipo de item, perde a graça de caçar a Bijuu... De qualquer jeito obrigado novamente!!
-
[Dúvida] Jinchuuriki System [NTO]
Boa noite, primeiramente estou criando um Jinchuuriki System e quero ideias para melhora-lo! O meu Sistema ele está "pronto", falta traduzir algumas partes para inglês, porém quero ideia para deixar ele com mais algumas funções... O que tem no sistema por enquanto? - Ele é feito por banco de dados(db), (depois alguém pode implementar para colocar algumas informações no shop. - De forma automática, uma Bijuu pode aparecer a cada X dias no mapa, (de forma aleatória a bijuu é summonada, ela obviamente não pode estar selada por algum jinchuuriki). - O jogador que é um Jinchuuriki pode ficar com a Biju por até X dias, por exemplo, dois dias... - O jogador assim que se torna um Jinchuuriki ele aprende novas skills, além de receber um Buff, onde ganhará mais SKILLS, HP e MANA e fica saindo um efeito! - Ao acabar o Tempo ou o Jinchuuriki morrer, ele perderá a Bijuu, efeito, spells e o Buff. - Quando o Jinchuuriki morrer, tem uma chance de a Bijuu renascer dentro de "X" minutos no local dela(cada bijuu tem uma área, por exemplo, shukaku nasce em qualquer parte do deserto.) - Quando você for selar a Bijuu, tem uma pequena chande de falha, se falhar, o jogador irá morrer e outro poderá tentar selar a bijuu. - Você só pode selar a Bijuu se ela estiver com 20% ou menos de HP. - Existe alguns comandos que eu criei, por exemplo: Comando !jinchuuriki : Mostra em tempo real, quanto tempo você ainda tem como um Jinchuuriki. Comando !jinchuuriki list : Mostra a Lista de Bijuu do servidor que estão ou não selados!! Comando !jinchuuriki time : comando extra, é baseado no globalevents , onde o respaw é a cada X dia, então vai mostrando quanto falta para o próximo respaw da Bijuu Caso alguém tenha alguma ideia para implementar, favor colocar no tópico!! OBS: Estarei trabalhando nesta semana na traduçãoo para TFS 1.3 o Survive system(sistema que não irei postar) para meu amigo @black hawk e fazendo um sistema de Dragon Ball para o Hique!! Então até sábado vou pegar as melhores ideias!! Valeu galera.
-
[TFS] New Auto Loot Unlimited Edition 2.0
Link: https://pastebin.com/raw/1ied0FbM se usa com aspas, por exemplo BlockMonsters = {"demon","hydra","rat"},
-
[TFS] New Auto Loot Unlimited Edition 2.0
manda PM ou me adc no discord que eu passo a versão alterada
-
(Resolvido)Shop Enviando Items Infinitamente
function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`= 1 WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`= 1 WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end
-
[NPC] Fixando BUG de o NPC comprar itens equipados nos slots(corpo)!
Em alguns servidores a função 'doPlayerRemoveItem' não tem o parâmetro 'ignoreEquipped', fazendo com que o jogador acabe vendendo os itens que estão nos slots(equipados). Esta função(gambiarra) serve para que o jogador ao vender itens no npc, o mesmo só compre itens que estiverem dentro da bp. Primeiramente coloque essas duas funções na lib do seu ot caso você não tenha: https://pastebin.com/raw/BfRLcrLA agora vá em \data\npc\lib\npcsystem e abra o seu modules.lua substitua essa função: -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell(). function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) if(self.npcHandler.shopItems[itemid] == nil) then error("[ShopModule.onSell]", "items[itemid] == nil") return false end if(self.npcHandler.shopItems[itemid].sellPrice == -1) then error("[ShopModule.onSell]", "Attempt to sell a non-sellable item") return false end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = amount * self.npcHandler.shopItems[itemid].sellPrice, [TAG_ITEMNAME] = self.npcHandler.shopItems[itemid].realName } if(subType < 1) then subType = -1 end if(doPlayerRemoveItem(cid, itemid, amount, subType)) then local msg = self.npcHandler:getMessage(MESSAGE_SOLD) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg) doPlayerAddMoney(cid, amount * self.npcHandler.shopItems[itemid].sellPrice) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true else local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end end por esta: -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell(). function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) if(self.npcHandler.shopItems[itemid] == nil) then error("[ShopModule.onSell]", "items[itemid] == nil") return false end if(self.npcHandler.shopItems[itemid].sellPrice == -1) then error("[ShopModule.onSell]", "Attempt to sell a non-sellable item") return false end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = amount * self.npcHandler.shopItems[itemid].sellPrice, [TAG_ITEMNAME] = self.npcHandler.shopItems[itemid].realName } if(subType < 1) then subType = -1 end if getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).itemid ~= 0 then local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local z = getContainerItemsById(bp, itemid) if #z >= amount then for i = 1, amount do doRemoveItem(z[i].uid) end local msg = self.npcHandler:getMessage(MESSAGE_SOLD) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg) doPlayerAddMoney(cid, amount * self.npcHandler.shopItems[itemid].sellPrice) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true else local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end else doPlayerSendCancel(cid, "I only buy items that are inside a BackPack") if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end end
-
[PEDIDO] Tile para encher stamina
@brunojp11 depois dessa parte function onStepIn(cid) if isPlayer(cid) then stamina[cid] = addEvent(staminadd, config.delay*60*1000, cid) end return true end para function onStepIn(cid) if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Bem-vindo ao trainer, a cada "..config.delay.."min treinando você recebe "..config.addStamina.." de stamina") stamina[cid] = addEvent(staminadd, config.delay*60*1000, cid) end return true end
-
monster
local pozycje = { {pos = {x = 661, y = 396, z = 15}, mob="smaug"}, {pos = {x = 1712, y = 449, z = 14}, mob="ancalagon"}, {pos = {x = 2286, y = 462, z = 9}, mob="Scatha"}, {pos = {x = 1241, y = 498, z = 11}, mob="Adramelech"}, {pos = {x = 1208, y = 734, z = 7}, mob="Emelianenko"}, {pos = {x = 614, y = 478, z = 0}, mob="The Necromancer"}, } function onThink(interval, lastExecution, thinkInterval) local storage = 72300 if(math.random(1, 1000) < 900) then -- 1000 = 100%, np. 500 to 50% local t = {} for i = 1, #pozycje do if i ~= getGlobalStorageValue(storage) then t[#t+1] = pozycje[i] end end local r = math.random(1, #t) doCreateMonster(t[r].mob, t[r].pos, false) setGlobalStorageValue(storage, r) end return true end
-
[PEDIDO] Tile para encher stamina
deixa eu ver seu código
-
Quest Skeleton[by Cerberus]
Nesse caso eu preferia refazer o código todo, assim que terminar alguns projetos eu refaço esse
-
Quest Skeleton[by Cerberus]
estou em aula, não olhei mas creio que seja isso local itens = {2337,2339,2341,2338,2340,2336,2335} local basin = 2605 local Toten = 6972 local tempo = 2 local actionId = 20021 --local Skeleton = {Skel_parede,Skel_chao,posição no chao,pos_parede} local Skeleton = {6524,2843,{x=1027, y=1021, z=7},{x=1027, y=1021, z=7}} local pos = { {x=1027, y=1021, z=7}, {x=1027, y=1021, z=7}, {x=1027, y=1021, z=7}, {x=1027, y=1021, z=7}, {x=1027, y=1021, z=7}, {x=1027, y=1021, z=7}, {x=1027, y=1021, z=7} } function onUse(cid, item, fromPosition, itemEx, toPosition) for x = 1, 7 do local check = getTileItemById(pos[x], itens[x]).uid if check >= 1 and item.actionid == 20021 then local basin = getTileItemById(pos[x], basin).uid doRemoveItem(item.uid,1) doCreateItem(Skeleton[2], 1, Skeleton[3]) doRemoveItem(check[x],1) doRemoveItem(basin,1) doCreateItem(Toten, 1, pos[x]) doSendMagicEffect(pos[x],35) addEvent(Ativar_Caveira, tempo * 60 * 1000) else doPlayerSendCancel(cid,'está faltando itens.') end end return true end function Ativar_Caveira() local caveira = getTileItemById(Skeleton[4],Skeleton[1]).uid if caveira <= 1 then for x = 1,7 do local Toten = getTileItemById(pos[x],Toten).uid local Id_caveira = doCreateItem(Skeleton[1], 1,Skeleton[4]) local basin = getTileItemById(pos[x],basin).uid doItemSetAttribute(Id_caveira, "aid", actionId) doRemoveItem(Toten,1) doCreateItem(basin, 1,pos[x]) end else doBroadcastMessage("Já tem 1 caveira na parede", 21) end return true end
-
[OTX] New Auto Loot Unlimited Edition 2.0
testei e não apresentou esse erro, vou dar suporte para você via discord. ##Edit## o "bug" é que estava duplicado o valor da storage no código do Lotus, já resolvido.
-
Deletar player
Usando desse jeito, você pode deletar o player com ele offline ou online: function onSay(cid, words, param) local t, k = string.explode(param:lower(), ","), "No Reason" if (param == "") then doPlayerSendCancel(cid, "use um comando valido") return true end local id = getPlayerGUIDByName(t[1]) if not id then doPlayerSendCancel(cid, "Desculpe, mas o jogador [" .. t[1] .. "] não existe.") return true end local pid = getPlayerByNameWildcard(t[1]) if isPlayer(pid) then doRemoveCreature(pid) end db.executeQuery("DELETE FROM `players` WHERE `id` = " .. id) broadcastMessage("o player "..t[1].." foi deletador por: "..(not t[2] and k or t[2])..".") return true end obs: modifiquei a query, quem fez esse código é um baita de um noob.
-
[Pedido] Porta por reset
e qual seu sistema de reset?
-
[OTX] New Auto Loot Unlimited Edition 2.0
Fiz aqui em LUA, vou te passar e assim que vc testar eu anexo no tópico!! OBS: Não esqueça de criar a pasta vazia chamada autoloot em data/logs!! new_perfect_autoloot_otx.rar