Tudo que Pedro. postou
-
Ajuda Script NPC Barco
adiciona em globa.lua function getBlessingsCost(level) if level <= 30 then return 2000 elseif level >= 120 then return 20000 else return (level - 20) * 200 end end
-
(Resolvido)script de skills por stages para otserv 10.00 e 11.00
events/scripts/player.lua
-
Ajuda Script NPC Barco
porém da algum erro no distro?
-
(Resolvido)script de skills por stages para otserv 10.00 e 11.00
local config = { -- base vocationId [1] = { -- skillId [SKILL_FIST] = { -- [{skillLevel}] = skillRate [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_CLUB] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_SWORD] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_AXE] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_DISTANCE] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_SHIELD] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_FISHING] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_MAGLEVEL] = { [{10, 19}] = 10, [{20, 29}] = 5 } } } --[[ function Vocation.getBase(self) local demotion = self:getDemotion() while demotion do local tmp = demotion:getDemotion() if not tmp then return demotion end demotion = tmp end return self end ]] local function getSkillRate(player, skillId) local targetVocation = config[player:getVocation():getBase():getId()] if targetVocation then local targetSkillStage = targetVocation[skillId] if targetSkillStage then local skillLevel = player:getSkillLevel(skillId) for level, rate in pairs(targetSkillStage) do if skillLevel >= level[1] and skillLevel <= level[2] then return rate end end end end return skillId == SKILL_MAGLEVEL and configManager.getNumber(configKeys.RATE_MAGIC) or configManager.getNumber(configKeys.RATE_SKILL) end function Player:onGainSkillTries(skill, tries) if not APPLY_SKILL_MULTIPLIER then return tries end return tries * getSkillRate(self, skill) end
-
Ajuda Script NPC Barco
testa esse aqui, é que uso no meu servidor local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- Travel local function addTravelKeyword(keyword, cost, destination) local travelKeyword = keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'Do you seek a passage to ' .. keyword:titleCase() .. ' for ' .. cost .. ' gold coins?', cost = cost, discount = 'postman'}) travelKeyword:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, cost = cost, discount = 'postman', destination = destination}) travelKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'We would like to serve you some time.', reset = true}) end addTravelKeyword('carlin', 110, Position(32387, 31820, 6)) addTravelKeyword('ab\'dendriel', 130, Position(32734, 31668, 6)) addTravelKeyword('edron', 160, Position(33175, 31764, 6)) addTravelKeyword('venore', 170, Position(32954, 32022, 6)) addTravelKeyword('port hope', 160, Position(32527, 32784, 6)) addTravelKeyword('svargrond', 180, Position(32341, 31108, 6)) addTravelKeyword('liberty bay', 180, Position(32285, 32892, 6)) keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, text = 'Where do you want to go? To Carlin, Ab\'Dendriel, Edron, Venore, Port Hope, Liberty Bay or Svargrond?'}) npcHandler:setMessage(MESSAGE_GREET, "Welcome on board, |PLAYERNAME|. Where can I {sail} you today?") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. Recommend us if you were satisfied with our service.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye then.") npcHandler:addModule(FocusModule:new())
-
Sistema Bugado
[Frags: 25 - Deaths: 52]. que era pra ser Frags: 25 - Deaths: 52]. ???????????????????
-
(Resolvido)Ferumbras Ascendente (igual a do global)
baixando um servidor que tenha, recomendo do maluco gitlab.com/malucooo/Otxserver-Global
-
(Resolvido)Ao Char Criar Ja Tem Pre-Skills
tudo que você editar nos samples quando criarem já vai ter, se tu adicionar os sample skill 40, qndo eu criar um char já vai tá igual.
-
Suporte p/ quest.
em actions, vê o storage que ta no bau, vê no XML qual é o lua, e edita lá.
-
Duvida sobre item
somente elas poderão equipar o item.
-
Duvida sobre item
não entendo de derivados, mas isso é o que? items, movements, weapons? se for movements só você setar no xml por exemplo <movevent type="DeEquip" itemid="11410" slot="feet" level="1" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="11410" slot="feet" level="1" event="function" value="onEquipItem"> <vocation id="22"/> <vocation id="23"/> <vocation id="24"/> <vocation id="25" showInDescription="0"/> <vocation id="26 showInDescription="0"/> </movevent>
-
Ajuda Script NPC Barco
você setou em o string em core.lua?
-
Criar Channel quando toda vez q o char longa ele estiver lá aberto
adicionou corretamente? nao to podendo testar o script
-
Ajuda Script NPC Barco
adiciona ai string.split = function(str, sep) local res = {} for v in str:gmatch("([^" .. sep .. "]+)") do res[#res + 1] = v end return res end string.trim = function(str) return str:match'^()%s*$' and '' or str:match'^%s*(.*%S)' end string.starts = function(str, substr) return string.sub(str, 1, #substr) == substr end string.titleCase = function(str) return str:gsub("(%a)([%w_']*)", function(first, rest) return first:upper() .. rest:lower() end) end
-
DarkTheme e AutoComplete para Notepad++
Cara, genial pra eu que estou aprendendo lua agora, muitas vezes vejo outros scripts pois não sei ainda aonde usar CID, type, target, essas coisas se um dia vocês quiserem adaptar um pra tfs 1x
-
Erro Record
postei ai, troca esse por aquele eu já adicionei, ou então você mesmo adiciona.
-
account management não que registrar a conta
tenta usar outro php, qual a versão do teu site? 0.36, 2012 etc.
-
Erro Record
troca lá 100-compat.lua
-
Ajuda Script NPC Barco
cola aqui p mim data/lib/core/string.lua
-
Erro Record
vai em lib/100-compat.lua procura por db.executeQuery ou db.query ou então cola i compat aqui para eu ver.
-
Erro Record
posta ai o record.
-
Criar Channel quando toda vez q o char longa ele estiver lá aberto
tem que registrar o evento registerCreatureEvent(cid, "ProtectLevel") <event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/>
-
Um probleminha com o Ajax... [atualizar página sem refresh]
posta aqui seu layout.php.
-
Criar Channel quando toda vez q o char longa ele estiver lá aberto
local config = { onlypremium = true, -- se precisa ser premium para não perder nada exp = true, -- se ao morrer o jogador irá perder exp skills = true, -- se ao morrer vai perder skills magic = true, -- se vai perder magic level loot = false, -- se ao morrer o jogador irá perder o loot level = 700000 -- até que level irá proteger o player } function onDeath(cid, corpse, deathList) if isPlayer(cid) and getPlayerLevel(cid) <= config.level then if config.onlypremium == true and isPremium(cid) then if config.loot == false then doCreatureSetDropLoot(cid, false) end if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end end end return true end adiciona em creaturescript, e registra em login
-
Criar Channel quando toda vez q o char longa ele estiver lá aberto
config.lua deathLostPercent = 0 ML function onDeath(cid, corpse, deathList) if isPlayer(cid) and getPlayerMagLevel(cid) >= 1 then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end return true end