
huquinho
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
huquinho deu reputação a SkyDark em Ajuda com um problema.Se vem sem item,so vc faze um bau,para os players pegarem os first items
-
huquinho deu reputação a TonyHalk em Ajuda com um problema.Cria 1 Bau para cada Vocação e quando o Player Clicar ele ganha os ITENS
é até melhor mano
ou Copie do meu Otserv
<?xml version="1.0" encoding="UTF-8"?> <mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
config = {
storage = 30001,
items = {2050, 2382}
}
]]></config>
<event type="login" name="FirstItems" event="script"> <![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
local config = {
voc_items = {
{ -- SORC
{2190} -- wand of vortex
},
{ -- DRUID
{2182} -- snakebite rod
},
{ -- PALADIN
{2389} -- spear
},
{ -- KNIGHT
{8602} -- jagged sword
}
},
all_items = {
{ID}, -- aqui vc vai colocando o set que vai vir para todos
},
extra_items = {
-- abaixo vc coloca os extra itens que vão vir na bp de todos
{2120}, -- rope
{2554}, -- shovel
{2789, 50} -- food
},
knight_weapons = {
-- aqui vc coloca as outras armas de kina que vão vir tipo axe, club
{8601}, -- steel axe
{2439} -- daramanian mace
}
}
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
]]></event>
</mod>
-
huquinho deu reputação a tiagoduuarte em Ajuda com um problema.Abra a pasta do seu ot, vá em mods, crie um arquivo.xml ( copiando um já existente, renomeie ele para firstitens, edite-o com o bloco de notas e deixe assim: