Postado Janeiro 29, 2012 13 anos O script tem a função de dar experiência a guild inteira, por um determinado tempo que você pode escolher é muito bom também, caso a guild vença o evento e você pode adicionar um bônus para ela. Crie um arquivo na pasta mods nome de guildexp.xml e em seguida cole <!--?xml version="1.0" encoding="UTF-8"?--> <mod name="Guild Experience Reward" version="1.0" author="Summ" contact="otland.net" enabled="yes"> <config name="ge_config"><!--[CDATA[ ge_storage = 45501 function loadGuildExp() local ret = getStorage(ge_storage) if type(ret) == "string" then return loadstring("return " .. ret)() end return {} end function saveGuildExp(list) local ret = "{" for guild, conf in pairs(list) do ret = ret .. "[" .. guild .. "] = {" .. table.concat(conf, ",") .. "}," end ret = ret .. "}" doSetStorage(ge_storage, ret) end function addGuildExp(name, exp, time) local id = getGuildId(name) if not(id) then return print("Guild Exp System: Guild '" .. name .. "' was not found. (add)") end local c = loadGuildExp() c[id] = {exp, time+os.time()} saveGuildExp(c) updateGuildExp(id, exp, time+os.time()) end function removeGuildExp(id) local c = loadGuildExp() c[id] = nil saveGuildExp(c) end function setRate(cid, exp) if not(isPlayer(cid)) then return true end doPlayerSetRate(cid, SKILL__LEVEL, exp) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your guild's extra experience time ended.") end function addRate(cid, exp, time) local ex = getPlayerRates(cid)[SKILL__LEVEL] doPlayerSetRate(cid, SKILL__LEVEL, (ex+exp)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your guild received " .. exp * 100 .. "% extra experience.") addEvent(setRate, (time-os.time())*1000, cid, ex) end function updateGuildExp(guild, exp, time) for _, cid in pairs(getPlayersOnline()) do if guild == getPlayerGuildId(cid) then addRate(cid, exp, time) end end end ]]--></config> <talkaction log="yes" words="/ge" access="5" event="buffer"><!--[CDATA[ domodlib('ge_config') local split = param:explode(",") local name, exp, time = split[1], tonumber(split[2]), tonumber(split[3]) if not(split[3]) then return doPlayerSendCancel(cid, "The commands requires 3 parameters: guild name, experience and time") end if not(exp and time) then print(exp .. time) return doPlayerSendCancel(cid, "Numeric parameter required (experience and time in minutes).") end addGuildExp(split[1], exp, time*60) return true ]]--></talkaction> <event type="login" name="GuildExpLogin" event="buffer"><!--[CDATA[ domodlib('ge_config') local gid = getPlayerGuildId(cid) if gid ~= 0 then local c = loadGuildExp()[gid] if c then if os.time() --> c[2] then removeGuildExp(gid) else addRate(cid, c[1], c[2]) end end end ]]></event> </mod> Pronto, rode o seu servidor e divirta-se Como Usar: /ge nome da guild,o tanto de extra de exp, tempo /ge SkyDangerous,20,500 Créditos Citar Está no script Editado Janeiro 29, 2012 13 anos por skydangerous (veja o histórico de edições) http://baiakuza.com/IP: baiakuza.com TIBIA: 10.96 Baiak Custom [ High Exp Rate ]
Postado Janeiro 29, 2012 13 anos Muito bacana sky...gostei muito do script. # Regras Gerais - TibiaKing.com # Contato: augusto@tibiaking.comNão respondo dúvidas via MP.
Postado Fevereiro 3, 2012 13 anos sky percebi um erro olha ]]--></talkaction> <event type="login" name="GuildExpLogin" event="buffer"><!--[CDATA[ domodlib('ge_config') local gid = getPlayerGuildId(cid) if gid ~= 0 then local c = loadGuildExp()[gid] if c then if os.time() --> c[2] then removeGuildExp(gid) else addRate(cid, c[1], c[2]) end end end ]]></event> </mod> removeGuildExp(gid) nao seria removeGuildExp(cid) ? Ae ajudei? Rep+
Postado Fevereiro 3, 2012 13 anos Ali no script tem uma variavel, então está certo. local gid = getPlayerGuildId(cid)
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.