Postado Outubro 29, 2018 6 anos Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). TFS 0.4.0.0 Qual erro está surgindo/O que você procura? Estou criando um servidor global 10.10, com rookgaard incluso. O servidor é com account manager, sem site. Fiz já as devidas mudanças para que o personagem ao ser criado pelo account manager seja criado em rook, porem estou com um problema relacionado aos firsts itens. Gostaria de configurar uns itens para que ele comece, pois até então ele vem sem nada. Você tem o código disponível? Se tiver publique-o aqui: Script do meu first itens que fica no creature scripts, hoje ele não coloca itens pra no vocation. function onLogin(cid) if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then if isSorcerer(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2190, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) elseif isDruid(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2182, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) elseif isPaladin(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2389, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2643, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2463, 1) setPlayerStorageValue(cid, 50000, 1) elseif isKnight(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 8601, 1) doAddContainerItem(bag, 2383, 1) doAddContainerItem(bag, 2417, 1) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) end end return TRUE end
Postado Outubro 29, 2018 6 anos Voce apenas precisa adicionar uma função que verifique se o player é Rook function onLogin(cid) if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then if isRook(cid) then setPlayerStorageValue(cid, 50000, 1) elseif isSorcerer(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2190, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) elseif isDruid(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2182, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) elseif isPaladin(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2389, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2643, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2463, 1) setPlayerStorageValue(cid, 50000, 1) elseif isKnight(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 8601, 1) doAddContainerItem(bag, 2383, 1) doAddContainerItem(bag, 2417, 1) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) end end return TRUE end Veja que apenas tem a função que identifica se o Player é Rook, se for Rook irá apenas adicionar a storage 50000 (apague se não for necessário)
Postado Outubro 30, 2018 6 anos Autor Coloquei aqui conforme você passou porem deu erro. [23:25:34.585] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/firstitems.lua:22: ')' expected near '´' [23:25:34.594] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/firstitems.lua) [23:25:34.597] data/creaturescripts/scripts/firstitems.lua:22: ')' expected near '´' Editado Outubro 30, 2018 6 anos por douglera21 (veja o histórico de edições)
Postado Outubro 30, 2018 6 anos 1 hora atrás, douglera21 disse: Coloquei aqui conforme você passou porem deu erro. [23:25:34.585] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/firstitems.lua:22: ')' expected near '´' [23:25:34.594] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/firstitems.lua) [23:25:34.597] data/creaturescripts/scripts/firstitems.lua:22: ')' expected near '´' troque if isRook(cid) then por if getPlayerVocation(cid) = 1 then
Postado Outubro 30, 2018 6 anos Solução @douglera21 Estanho ? testa esse mod e modifique <?xml version="1.0" encoding="UTF-8"?> <mod name="First Items" version="1.0" author="slawkens - edited by: mattyx14" contact="[email protected]" enabled="yes"> <description><![CDATA[ Custom First Items ]]></description> <config name="firstitems_config"><![CDATA[ config = { storage = 40046, items = {} } ]]></config> <event type="login" name="FirstItems" event="buffer"><![CDATA[ domodlib('firstitems_config') if(getPlayerStorageValue(cid, config.storage) > 0) then return end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) end -- All Vocation -- BackPack -- Rope -- in Backpack doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2120, 1) -- Brass Armor -- Body doPlayerAddItem(cid, 2465, 1) -- Steel Helmet -- Head doPlayerAddItem(cid, 2457, 1) -- Bonelord Shield -- Right Hand doPlayerAddItem(cid, 2518, 1) -- Sorcerer (Weapon) -- Hand if isSorcerer(cid) then doPlayerAddItem(cid, 2190, 1) -- Wand of Vortex -- Left Hand doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".") -- Druid (Weapon) -- Hand elseif isDruid(cid) then doPlayerAddItem(cid, 2182, 1) -- Snake Bite Rod -- Left Hand doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".") -- Paladin - Warrior (Weapon) -- Hand elseif isPaladin(cid) then doPlayerAddItem(cid, 2389, 20) -- Spear -- Left Hand doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".") -- Knight (Weapon) -- Hand elseif isKnight(cid) then doPlayerAddItem(cid, 8602, 1) -- Jagged Sword -- Left Hand doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".") end -- All Vocation -- Brass Legs -- in Feet doPlayerAddItem(cid, 2478, 1) -- Leather Boots -- in Boots doPlayerAddItem(cid, 2643, 1) -- Scarf -- in Necklacke doPlayerAddItem(cid, 2661, 1) -- Platinum Coin -- in Arrows doPlayerAddItem(cid, 2152, 1) -- Health Potion -- in Backpack doPlayerAddItem(cid, 7618, 10) -- Shovel -- in Backpack doPlayerAddItem(cid, 2554, 1) -- Crystal Ring -- in Ring doPlayerAddItem(cid, 2124, 1) -- Mana Potion -- in Backpack doPlayerAddItem(cid, 7620, 15) -- Knight (Weapon) -- in Backpack if isKnight(cid) then doPlayerAddItem(cid, 8601, 1) -- Steel Axe doPlayerAddItem(cid, 2439, 1) -- Daramanian mace end setPlayerStorageValue(cid, config.storage, 1) ]]></event> </mod>
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.