Queria começar com os seguintes itens .
jacket id [2650].
wooden sword [13829].
bp 1988
rope 2120
shovel 2524
2 platinum coins. 2152
não sei como fazer
Queria começar com os seguintes itens .
jacket id [2650].
wooden sword [13829].
bp 1988
rope 2120
shovel 2524
2 platinum coins. 2152
não sei como fazer
Projeto
Venha fazer parte desta equipe.
Precisamos de scripter urgente.
local firstItems = {} firstItems[0] = { 2173, 2525, 3965, 2124, 2457, 2647, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2457, 2647, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2457, 2647, 2643 } firstItems[3] = { 2173, 2525, 2399, 2124, 2457, 2647, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2457, 2647, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then doPlayerSetMaxCapacity(cid, 500) for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end doPlayerAddItem(cid, 2463, 1) local bag = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) doAddContainerItem(bag, 8602, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
Só esclareçendo o que nosso amigo ali fez:
Vai em data/creaturescripts/scripts/firstitems.lua ... Na sua pasta creaturescripts, haverá um arquivo em .lua chamado First Items, pega e substitiu tudo q tive la dentro por isso aí:
local firstItems = {} firstItems[0] = { 2173, 2525, 3965, 2124, 2457, 2647, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2457, 2647, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2457, 2647, 2643 } firstItems[3] = { 2173, 2525, 2399, 2124, 2457, 2647, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2457, 2647, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then doPlayerSetMaxCapacity(cid, 500) for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end doPlayerAddItem(cid, 2463, 1) local bag = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) doAddContainerItem(bag, 8602, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
++REP (Ajudei)?
- REP (Não Ajudei)?
Tutoriais de ElfBot: http://www.xtibia.co...__fromsearch__1
Fórum Oficial: http://www.mreonline.com.br
só edita os IDS
essa parte e de
Sorcerer
firstItems[1] = { 2173, 2525, 2190, 2124, 2457, 2647, 2643 }
Druid
firstItems[2] = { 2173, 2525, 2182, 2124, 2457, 2647, 2643 }
Pally
firstItems[3] = { 2173, 2525, 2399, 2124, 2457, 2647, 2643 }
Knight
firstItems[4] = { 2173, 2525, 2428, 2124, 2457, 2647, 2643 }
Por Favor quando for fazer pedidos faz o pedido com mais clareza e com os mínimos detalhes
GOSTO DOS MEUS SCRIPT CLICK EM CURTIR :D
Eu quero a No vocation, eu ja troquei por todos e nenhum nasce com os itens que quero. ):
Projeto
Venha fazer parte desta equipe.
Precisamos de scripter urgente.
No caso, no vocation seria esse:
firstItems[0] =
{
2173,
2525,
3965,
2124,
2457,
2647,
2643
}
Pois é a vocation 0 - Rooker... Edita esse aí, vou colocar em negrito o script inteiro aki:
local firstItems = {}
firstItems[0] =
{
2173,
2525,
3965,
2124,
2457,
2647,
2643
}
firstItems[1] =
{
2173,
2525,
2190,
2124,
2457,
2647,
2643
}
firstItems[2] =
{
2173,
2525,
2182,
2124,
2457,
2647,
2643
}
firstItems[3] =
{
2173,
2525,
2399,
2124,
2457,
2647,
2643
}
firstItems[4] =
{
2173,
2525,
2428,
2124,
2457,
2647,
2643
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
doPlayerSetMaxCapacity(cid, 500)
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1)
end
doPlayerAddItem(cid, 2463, 1)
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2160, 3)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
doAddContainerItem(bag, 8602, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
++REP (Ajudei)?
- REP (Não Ajudei)?
Tutoriais de ElfBot: http://www.xtibia.co...__fromsearch__1
Fórum Oficial: http://www.mreonline.com.br
Não funcionou continuo sem ganhas os itens ):
Projeto
Venha fazer parte desta equipe.
Precisamos de scripter urgente.
cara vai no mods e procura por first item la vai ter um arquivo Firstitem.XML e no mods ou no >> data/creaturescripts/scripts/firstitems.lua
flw!
editei aqui da uma olhada ver se pega ai
local firstItems = {} firstItems[0] = { 2173, 2525, 2428, 2124, 2460, 2478, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2460, 2478, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2460, 2478, 2643 } firstItems[3] = { 2173, 2525, 2389, 2124, 2460, 2478, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2460, 2478, 2643 } newItems = { 2650,1, 13829,1, 2120,1, -- id e as quantidades 2524,2, 2160,1, 1988 -- esse id é da bag } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2465, 1) else doPlayerAddItem(cid, 2465, 1) end local bag = doPlayerAddItem(cid, newItems[11], 1) doAddContainerItem(bag, newItems[1], newItems[2]) doAddContainerItem(bag, newItems[3], newItems[4]) doAddContainerItem(bag, newItems[5], newItems[6]) doAddContainerItem(bag, newItems[7], newItems[8]) doAddContainerItem(bag, newItems[9], newItems[10]) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
edita
newItems = {
2650,1,
13829,1,
2120,1, -- id e as quantidades
2524,2,
2160,1,
1988 -- esse id é da bag
}
Por Favor quando for fazer pedidos faz o pedido com mais clareza e com os mínimos detalhes
GOSTO DOS MEUS SCRIPT CLICK EM CURTIR :D
notle, eu uso um sistema de itens refinados.. uso o seguinte first itens.. queria ve se voce consegue adicionar esta funcao pra comecar com itens refinados (eu uso essa funcao em action.xml(quest):
doItemSetAttribute(item1, "armor", 13)
doItemSetAttribute(item1, "description", "Refinado(Arm): +3.\nEste Item foi obtido por " .. getPlayerName(cid) .. ".")
<?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)
if getPlayerStorageValue(cid, 30001) == -1 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 9 then
doPlayerAddItem(cid, 2190, 1)--Wand Of Vortex
doPlayerAddItem(cid, 2175, 1)--Spellbook
doPlayerAddItem(cid, 2457, 1)--Steel Helm
doPlayerAddItem(cid, 2463, 1)--Plate Armor
doPlayerAddItem(cid, 2647, 1)--Plate Legs
doPlayerAddItem(cid, 2643, 1)--Leather Boots
doPlayerAddItem(cid, 5926, 1)--Pirate Backpack
doPlayerAddItem(cid, 2160, 2)--Money
doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Mage items.")
end
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 or getPlayerVocation(cid) == 10 then
doPlayerAddItem(cid, 2182, 1)--Snakekbite Rod
doPlayerAddItem(cid, 2175, 1)--Spellbook
doPlayerAddItem(cid, 2457, 1)--Steel Helm
doPlayerAddItem(cid, 2463, 1)--Plate Armor
doPlayerAddItem(cid, 2647, 1)--Plate Legs
doPlayerAddItem(cid, 2643, 1)--Leather Boots
doPlayerAddItem(cid, 5926, 1)--Pirate Backpack
doPlayerAddItem(cid, 2160, 2)--Money
doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Mage items.")
end
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 11 then
doPlayerAddItem(cid, 2399, 1)--Thworing Star
doPlayerAddItem(cid, 2525, 1)--Dwarven Shield
doPlayerAddItem(cid, 2457, 1)--Steel Helm
doPlayerAddItem(cid, 2463, 1)--Plate Armor
doPlayerAddItem(cid, 2647, 1)--Plate Legs
doPlayerAddItem(cid, 2643, 1)--Leather Boots
doPlayerAddItem(cid, 5926, 1)--Pirate Backpack
doPlayerAddItem(cid, 2160, 2)--Money
doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Paladin items.")
end
if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 12 then
doPlayerAddItem(cid, 2457, 1)--Steel Helm
doPlayerAddItem(cid, 2463, 1)--Plate Armor
doPlayerAddItem(cid, 2647, 1)--Plate Legs
doPlayerAddItem(cid, 2643, 1)--Leather Boots
doPlayerAddItem(cid, 5926, 1)--Pirate Backpack
doPlayerAddItem(cid, 2525, 1)--Dwarven Shield
doPlayerAddItem(cid, 2383, 1)--Spike Sword
doPlayerAddItem(cid, 2423, 1)--Clerical Mace
doPlayerAddItem(cid, 2428, 1)--Orcish Axe
doPlayerAddItem(cid, 2160, 2)--Money
doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Knight items.")
end
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
]]></event>
</mod>
Na pasta mod é aonde tem que mecher alguem pode me fazer configurado ja ?
<?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="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
if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
doPlayerAddItem(cid, 2651, 1)
else
doPlayerAddItem(cid, 2650, 1)
end
doAddContainerItem(doPlayerAddItem(cid, 1987, 1), 2674, 1)
setPlayerStorageValue(cid, config.storage, 1)
]]></event>
</mod>
Projeto
Venha fazer parte desta equipe.
Precisamos de scripter urgente.
cara ses tem que passar a tag do creaturescripts.xml
copie um arquivo em data/creaturesripts/scripts e cole depois renomeie para firstitems.lua e dentro cole o codigo abaixo:
local firstItems = {} firstItems[0] = { 2173, 2525, 3965, 2124, 2457, 2647, 2643 } firstItems[1] = { 2173, 2525, 2190, 2124, 2457, 2647, 2643 } firstItems[2] = { 2173, 2525, 2182, 2124, 2457, 2647, 2643 } firstItems[3] = { 2173, 2525, 2399, 2124, 2457, 2647, 2643 } firstItems[4] = { 2173, 2525, 2428, 2124, 2457, 2647, 2643 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then doPlayerSetMaxCapacity(cid, 500) for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end doPlayerAddItem(cid, 2463, 1) local bag = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) doAddContainerItem(bag, 8602, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
Assim que fizer isso volta a pasta creaturescripts e no arquivo creaturescripts.xml adicione essa tag:
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
Agora veja se esta recebendo os itens!
Daijobu!