Tudo que JcA postou
- [NPC] npc que responde com certa storage
-
(Resolvido)Update em script teleport
Obrigado meu querido, funcional!
-
(Resolvido)Existe uma limitação no uso de alguns itens?
Por exemplo, estou querendo que a key 2087, (bronze key) se torne um item usavel, no caso. Ao usar, ele suma, porém não estou conseguindo. Alguns itens são proibidos? Alguém sabe me dizer também, em qual pasta fica alguma função das chaves no otserver? Porque quando coloco outro evento, consta que existe uma duplicação do mesmo.
-
(Resolvido)Update em script teleport
Alguém pode fazer uma adaptação para min, basica mesmo, acrescentar que quando usar o item, alem de ir para X posição, você ganha uma storage X. tfs 0.4 tibia 8.60 function onUse(cid, item, frompos, item2, topos) pos = {x=547, y=332, z=7} if item.itemid == 4852 then doPlayerSendCancel(cid,"Parabéns! Você ganhou acesso a VIP 1.") doTeleportThing(cid,pos) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Fail !") end return 1 end
-
5 hunts de human
Caso algum mapper queira ajudar, preciso de 5 hunts diferentes para criaturas "humanas". tamanho médio, criatividade ao seu gosto.
-
(Resolvido)2 modificações em script
Versão 8.60 TFS 0.4 1 modificação: Remover desse script a possibilidade de identificar se o player esta pz ou não. Pois no meu server bugado, mesmo sem pz, diz que esta pz. function onUse(cid, item, frompos, item2, topos) local needPos = {x=1011, y=1025, z=7} -- pos que precisa está para usar o item local myPos = getPlayerPosition(cid) if myPos.x == needPos.x and myPos.y == needPos.y and myPos.z == needPos.z then if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then if getHouseByPlayerGUID(getPlayerGUID(cid)) then doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid,22,"Voce foi teleportado até sua house!") else doPlayerSendTextMessage(cid,22,"Você ainda não tem uma house, compre uma falando '!buyhouse' em frente a porta dela.") end else doPlayerSendTextMessage(cid,22,"Você deve esperar seu battle sair para usar a alavanca") end doPlayerSendTextMessage(cid,22,"Você precisa estár em cima do trono para usar a alavanca.") end return true end 2 modificação: Fazer aparecer uma lista pop up, onde estara escrito os comandos correto quando o player usar incorretamente algum comando desse fly. (tipo de um rank que ja vi) --[[Script By Vodkart]]-- function onSay(cid, words, param) local config = { pz = true, -- players precisam estar em protection zone para usar? (true or false) battle = true, -- players deve estar sem battle (true or false) custo = true, -- se os teleport irão custa (true or false) need_level = true, -- se os teleport irão precisar de level (true or false) premium = true -- se precisa ser premium account (true or false) } --[[ Config lugares]]-- local lugar = { ["depot"] = { -- nome do lugar pos = {x=937, y=1002, z=7},level = 8,price = 10000}, ["templo"] = { -- nome do lugar pos = {x=969, y=1003, z=7},level = 8, price = 10000}, ["arena"] = { -- nome do lugar pos = {x=932, y=983, z=9},level = 8,price = 10000}, ["bau"] = { -- nome do lugar pos = {x=965, y=929, z=7},level = 8,price = 10000}, ["trainers"] = { -- nome do lugar pos = {x=977, y=1003, z=9},level = 8,price = 10000}, ["equip"] = { -- nome do lugar pos = {x=977, y=1003, z=8},level = 8,price = 10000}, ["hunts"] = { -- nome do lugar pos = {x=1000, y=929, z=7},level = 8,price = 10000}, ["cassino"] = { -- nome do lugar pos = {x=986, y=1003, z=7},level = 8,price = 10000}, ["exclusiva"] = { -- nome do lugar pos = {x=1226, y=926, z=7},level = 8,price = 10000}, ["marvel"] = { -- nome do lugar pos = {x=1120, y=921, z=7},level = 8,price = 10000}, ["donate"] = { -- nome do lugar pos = {x=1410, y=914, z=7},level = 8,price = 10000}, ["quests"] = { -- nome do lugar pos = {x=849, y=922, z=7},level = 8,price = 10000} } --[[ Lista de Viagem (Não mexa) ]]-- if (param == "lista") then local str = "" str = str .. "lista de viagem :\n\n" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doShowTextDialog(cid, 6579, str) return TRUE end local a = lugar[param] if not(a) then doPlayerSendTextMessage(cid, 22, "desculpe,este lugar não existe") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE elseif config.premium == true and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem se teleportar.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler para poder se teleportar.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, 22, "Desculpe, você não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then doPlayerSendTextMessage(cid, 22, "Desculpe, você nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, 22, "" .. getPlayerName(cid) .. " foi teleportado para: \n " .. param .. ".") return TRUE end
-
(Resolvido)NPC DE TROCA
Olá, quem puder me ajudar, eu preciso de um script básico mesmo de um npc que troque 5 itens por 1. O player chega com os 5 itens, e fala "hi", "change", "yes", e recebe o item X.
-
(Resolvido)Script multiplo teleport
Obrigado, era exatamente o que eu precisava.
-
(Resolvido)Script multiplo teleport
É possível fazer um script para eu por em um teleport? Assim quando o player entrar, aleatoriamente vai enviar ele para 2 posições diferente a cada vez que ele passar.
-
(Resolvido)Quest, escolha de item
É o seguinte, vou tentar explicar de uma forma mais simples, talvez assim alguém entende e consiga esclarecer a duvida. Segue a imagem em anexo, e a dúvida e o seguinte: Como eu faço para o player escolher apenas 1 item desses, e impossibilitá-lo de escolher os demais? Inicialmente eu coloquei uma mesma actionid para ambos, e com uniquei diferente. Só que dessa maneira, o player consegue pegar os 5 itens. Então eu tentei deixar a mesma actionid, e, o mesmo uniqueid, funcionou, pode pegar apenas 1, porém aparece diversos "duplicate id" no distro. Tem outra maneira de fazer quest assim?
-
(Resolvido)Por Deus, alguém ajuda um problema com quest?
Não entendi o que você quis dizer, mas eu fiz isso aqui: Primeiro coloquei no action xml uma tag que redireciona para esse script acima. <action actionid="2024" event="script" value="5questitem.lua"/> e no rme, eu coloquei esse mesmo 2024 em todos baus, só mudei o uniqueid, segue a imagem em anexo.
-
(Resolvido)Por Deus, alguém ajuda um problema com quest?
Dessa seguinte forma, aparece no distro um monte de actionid repetido. Estou usando o script padrao que veio no ot. local specialQuests = { [2001] = 30015 --Annihilator } local questsExperience = { [30015] = 10000 } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF, cid) return true end local storage = specialQuests[item.actionid] if(not storage) then storage = item.uid if(storage > 65535) then return false end end if(getPlayerStorageValue(cid, storage) > 0) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") return true end local items = {} local reward = 0 local size = isContainer(item.uid) and getContainerSize(item.uid) or 0 if(size == 0) then reward = doCopyItem(item, false) else for i = 0, size do local tmp = getContainerItem(item.uid, i) if(tmp.itemid > 0) then table.insert(items, tmp) end end end size = table.maxn(items) if(size == 1) then reward = doCopyItem(items[1], true) end local result = "" if(reward ~= 0) then local ret = getItemDescriptions(reward.uid) if(reward.type > 0 and isItemRune(reward.itemid)) then result = reward.type .. " charges " .. ret.name elseif(reward.type > 0 and isItemStackable(reward.itemid)) then result = reward.type .. " " .. ret.plural else result = ret.article .. " " .. ret.name end else if(size > 20) then reward = doCopyItem(item, false) elseif(size > 8) then reward = getThing(doCreateItemEx(1988, 1)) else reward = getThing(doCreateItemEx(1987, 1)) end for i = 1, size do local tmp = doCopyItem(items[i], true) if(doAddContainerItemEx(reward.uid, tmp.uid) ~= RETURNVALUE_NOERROR) then print("[Warning] QuestSystem:", "Could not add quest reward") else local ret = ", " if(i == 2) then ret = " and " elseif(i == 1) then ret = "" end result = result .. ret ret = getItemDescriptions(tmp.uid) if(tmp.type > 0 and isItemRune(tmp.itemid)) then result = result .. tmp.type .. " charges " .. ret.name elseif(tmp.type > 0 and isItemStackable(tmp.itemid)) then result = result .. tmp.type .. " " .. ret.plural else result = result .. ret.article .. " " .. ret.name end end end end if(doPlayerAddItemEx(cid, reward.uid, false) ~= RETURNVALUE_NOERROR) then result = "You have found a reward weighing " .. getItemWeight(reward.uid) .. " oz. It is too heavy or you have not enough space." else result = "You have found " .. result .. "." setPlayerStorageValue(cid, storage, 1) if(questsExperience[storage] ~= nil) then doPlayerAddExp(cid, questsExperience[storage]) doSendAnimatedText(getCreaturePosition(cid), questsExperience[storage], TEXTCOLOR_WHITE) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, result) return true end
-
(Resolvido)Por Deus, alguém ajuda um problema com quest?
O problema é o seguinte, estou tentando criar uma sala de recompensa, porém não consigo resolver um seguinte problema. A quest tem 8 premiações, sendo 5 armas. O problema é o seguinte, o player escolher uma das 5 armas, e ainda sim, consegue pegar as demais, como resolver?
-
Alavanca que puxa PLAYS
@pablobion Você não adapta esse script para 8 player, e que obrigatoriamente seja necessário que estejam todos na posição devida?
-
(Resolvido)Doors por vocação
Quase deu certo, ele ainda entra no meio da porta, mais solucionei, coloquei uma porta "gartise experience", obrigado aos 2.
-
(Resolvido)Doors por vocação
Fala meus queridos, alguém consegue me sugerir uma opção melhor no script? O problema é quando a vocação certa abre a porta, "a porta não abre", o char atravessa no meio dela. Segue o anexo da imagem. function onUse(cid, item, topos) local doors = { [8651] = {vocation = {1, 5, 9}, messageFail = "Sorry, you need to be a Sorcerer or Master Sorcerer to pass."}, [8652] = {vocation = {2, 6, 10}, messageFail = "Sorry, you need to be a Druid or Elder Druid to pass."}, [8653] = {vocation = {3, 7, 11}, messageFail = "Sorry, you need to be a Paladin or Royal Paladin to pass."}, [8654] = {vocation = {4, 8, 12}, messageFail = "Sorry, you need to be a Knight or Elite Knight to pass."}, } if not(isInArray(doors[item.actionid].vocation, getPlayerVocation(cid))) then return doPlayerSendCancel(cid, doors[item.actionid].messageFail) end doTeleportThing(cid, topos, TRUE) return true end
-
(Resolvido)Alanvanca tp
Valeu meu querido... @ManoTobira O seu não funcionou
-
(Resolvido)Alanvanca tp
Eu estou tentando usar esse script abaixo, porém da erros de fechamento de código, acho que na vdd essa programação não funciona mais. O objetivo era um script que ao usar a alavanca, teleporta-se o player pra tal local. -- Start Config -- local topos = {885=, 1460=, 5=} -- Posição para onde o player será teleportado. -- End Config -- function onUse(cid) if doTeleportThing(cid, topos) then doPlayerSendTextMessage(cid,20,"You have been teleported.") -- Menssagem que aparecerá para o player ao ser teleportado. end end
-
(Resolvido)Problema com Rank, remoção do acc manager
Boa galera, alguém pode me ajudar a remover o account manager do rank? (Para não aparecer). local config = { MaxPlayer = 20, fight_skills = { ['fist'] = 0, ['club'] = 1, ['sword'] = 2, ['axe'] = 3, ['distance'] = 4, ['shielding'] = 5, ['fishing'] = 6, ['dist'] = 4, ['shield'] = 5, ['fish'] = 6, }, other_skills = { [''] = "level", ['level'] = "level", ['magic'] = "maglevel", ['health'] = "healthmax", ['reset'] = "reset", ['mana'] = "manamax" }, vocations = { ['sorcerer'] = {1,5}, ['druid'] = {2,6}, ['paladin'] = {3,7}, ['knight'] = {4,8} } } function onSay(cid, words, param) local store,exausted = 156201,5 local param,str = param:lower(),"" if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this ranking does not exists.") return true elseif getPlayerStorageValue(cid, store) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") return true end str = "--[ RANK "..(param == "" and "LEVEL" or string.upper(param)).." ]--\n\n" local query = config.fight_skills[param] and db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..config.fight_skills[param].." ORDER BY `value` DESC;") or config.other_skills[param] and db.getResult("SELECT `name`, `"..config.other_skills[param].."` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `"..config.other_skills[param].."` DESC, `name` ASC;") or db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` <= 2 AND `vocation` = "..config.vocations[param][1].." or `vocation` = "..config.vocations[param][2].." ORDER BY `level` DESC;") if (query:getID() ~= -1) then k = 1 repeat str = str .. "\n " .. k .. ". "..(config.fight_skills[param] and getPlayerNameByGUID(query:getDataString("player_id")) or query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[param] and "value" or config.vocations[param] and "level" or config.other_skills[param])) .. "]" k = k + 1 until not(query:next()) or k > config.MaxPlayer query:free() end doShowTextDialog(cid,6500, str) setPlayerStorageValue(cid, store, os.time()+exausted) return true end
-
(Resolvido)Acrescer função em script
Alguém pode acrescer neste script a função de Deaths? E mudar o frags para contar qualquer kill, mesmo sendo pk, etc... e não só injust de 11:06 You see yourself. You are Master Sorcerer. [Frags: 0], [Critical: 0], [Dodge: 0]. para 11:06 You see yourself. You are Master Sorcerer. [Kills: 0], [Deaths: 0], [Critical: 0], [Dodge: 0]. 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)..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48902)) or 0))..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,' [Frags: '..getPlayerFrags(cid)..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(cid,48902)) or 0))..']') 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
-
Talk actions faltando
<talkaction log="yes" words="/attr" access="5" event="function" value="thingProporties"/> Só poe isso no xml
-
Wrong Temple Position
Essa database é novinha, não sei se vocês estou rodando em sql ou mysql, essa é sql, qualquer coisa, se faltar alguma tabela de função do ot, seu amigo cria, só adicionar as query. Mas deve ser a database msm theforgottenserver.s3db
-
Wrong Temple Position
Ja tentou uma database nova? Pq essa que vem no ot do Werner e mais bugada que cyclops andando em cima de agua
-
Config.lua, o que significa essas funções?
rateSpawn = 1 deSpawnRange = 2 deSpawnRadius = 50
-
(Resolvido)pop up ao logar
Deu erro, segue a imagem. loginone é o primeiro script de apenas uma mensagem loginall é o script de mensagem diaria