Postado Março 13, 2012 13 anos Autor Pow, Kimoszin Adicionei o codigo que vc mandou, dei reload creaturescripts com adm, criei um char e loguei Só apareceu a janela de "Change Outfit", achei que ia aparecer depois dela, + tbm não apareceu =| e agora?
Postado Março 13, 2012 13 anos Autor Daew Jared Meu Firstitens é esse cara: ver o que faz please local storage = 67777 function onLogin(cid) local config = { voc_items = { { -- SORC {2190}, -- wand of vortex {2175}, -- spellbook {8820}, -- mage hat {8819} -- mage robe }, { -- DRUID {2182}, -- snakebite rod {2175}, -- spellbook {8820}, -- mage hat {8819} -- mage robe }, { -- PALADIN {2410, 7}, -- throwing knife {2530}, -- copper shield {2480}, -- legion helmet {2464} -- chain armor }, { -- KNIGHT {2409}, -- serpent sword {2530}, -- copper shield {2480}, -- legion helmet {2465} -- brass armor } }, all_items = { {2468}, -- studded legs {2160, 1}, -- 10k {2643} -- leather boots }, extra_items = { {2789, 10}, {2120}, {5710} }, knight_weapons = { {2398}, -- mace {2388} -- hatchet } } if getPlayerGroupId(cid) < 3 then if getPlayerStorageValue(cid, storage) == -1 then local common = config.voc_items[getPlayerVocation(cid)] if common ~= nil then for _, v in ipairs(common) do doPlayerAddItem(cid, v[1], v[2] or 1) end end local all = config.all_items if all ~= nil then for _, v in ipairs(all) do doPlayerAddItem(cid, v[1], v[2] or 1) end end local extra = config.extra_items local bp = doPlayerAddItem(cid, 1988, 1) if extra ~= nil then for _, v in ipairs(extra) do doAddContainerItem(bp, v[1], v[2] or 1) end end local weapons = config.knight_weapons if weapons ~= nil then for _, w in ipairs(weapons) do if isKnight(cid) then doAddContainerItem(bp, w[1], w[2] or 1) end end end setPlayerStorageValue(cid, storage, 1) end end return true end
Postado Março 13, 2012 13 anos O motivo de não funcionar é. Que contém duas variáveis iguais. faz assim, vou fazer bem rápido. cria um arquivo chamado serverinfo,lua na creaturescript. local config = { rateExperience = getConfigInfo('rateExperience'), rateSkill = getConfigInfo('rateSkill'), rateLoot = getConfigInfo('rateLoot'), rateMagic = getConfigInfo('rateMagic'), rateSpawn = getConfigInfo('rateSpawn'), protectionLevel = getConfigInfo('protectionLevel'), stages = getBooleanFromString(getConfigInfo('experienceStages')) } function onLogin(cid) local exp = config.rateExperience if(config.stages) then exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) end doPlayerPopupFYI(cid, "Server Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel) return true end end ai adiciona a tag assim <event type="login" name="ServerInfo" event="script" value="serverinfo.lua"/> UHauh. http://baiakuza.com/IP: baiakuza.com TIBIA: 10.96 Baiak Custom [ High Exp Rate ]
Postado Março 13, 2012 13 anos Pronto, bote isso dentro do firstitem.lua, e a mensagem aparecerá apenas 1 vez, assim que o player der login pela primeira vez ! local storage = 67777 function onLogin(cid) local config = { voc_items = { { -- SORC {2190}, -- wand of vortex {2175}, -- spellbook {8820}, -- mage hat {8819} -- mage robe }, { -- DRUID {2182}, -- snakebite rod {2175}, -- spellbook {8820}, -- mage hat {8819} -- mage robe }, { -- PALADIN {2410, 7}, -- throwing knife {2530}, -- copper shield {2480}, -- legion helmet {2464} -- chain armor }, { -- KNIGHT {2409}, -- serpent sword {2530}, -- copper shield {2480}, -- legion helmet {2465} -- brass armor } }, all_items = { {2468}, -- studded legs {2160, 1}, -- 10k {2643} -- leather boots }, extra_items = { {2789, 10}, {2120}, {5710} }, knight_weapons = { {2398}, -- mace {2388} -- hatchet } } if getPlayerGroupId(cid) < 3 then if getPlayerStorageValue(cid, storage) == -1 then local config = { rateExperience = getConfigInfo('rateExperience'), rateSkill = getConfigInfo('rateSkill'), rateLoot = getConfigInfo('rateLoot'), rateMagic = getConfigInfo('rateMagic'), rateSpawn = getConfigInfo('rateSpawn'), protectionLevel = getConfigInfo('protectionLevel'), stages = getBooleanFromString(getConfigInfo('experienceStages')) } local exp = config.rateExperience if(config.stages) then exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) end doPlayerPopupFYI(cid, "Server Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel) local common = config.voc_items[getPlayerVocation(cid)] if common ~= nil then for _, v in ipairs(common) do doPlayerAddItem(cid, v[1], v[2] or 1) end end local all = config.all_items if all ~= nil then for _, v in ipairs(all) do doPlayerAddItem(cid, v[1], v[2] or 1) end end local extra = config.extra_items local bp = doPlayerAddItem(cid, 1988, 1) if extra ~= nil then for _, v in ipairs(extra) do doAddContainerItem(bp, v[1], v[2] or 1) end end local weapons = config.knight_weapons if weapons ~= nil then for _, w in ipairs(weapons) do if isKnight(cid) then doAddContainerItem(bp, w[1], w[2] or 1) end end end setPlayerStorageValue(cid, storage, 1) end end return true end Espero ter ajudado ! Jared Leto
Postado Março 13, 2012 13 anos Autor Muitas tentativas.... e nada =| Eu fiz do modo da skydangerous e até coloquei essa linha no login.lua, porém, sem sucesso, erro no distro registerCreatureEvent(cid, "ServerInfo") Fiz com o script do Jared + deu erro no script linha 64 e com esse erro, eu não consegui nem logar =| e agora? =/
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.