Galera tava precisando de um script que dps q cria o char, se for a primeira vez q vc logou vc fosse pra 3000,3000,7 o lugar onde escolhe vocação no meu ot, dps que vc tive-se sua vocação toda vez q vc loga-se vc ia pra 160,50,7, na real é só no primeiro login logar em 3000,3000,7
Pedido ao logar pela primeira vez ir pra um lugar sem ser o templo
dentro do arquivo firstitems.lua na pasta data\creaturescripts\scripts
Procure por setPlayerStorageValue
e antes do end adicione
local posc = {x=3000, y=3000, z=7}
doTeleportThing(cid,posc)
ficando algo assim.
--------- teleport para onde vc quiser
local posc = {x=3000, y=3000, z=7}
doTeleportThing(cid,posc)
--------
end
setPlayerStorageValue(cid, storage, 1)
local commonItems = {
-- ITEMS ALL VOCS RECEIVE
{itemid=2480, count=1}, -- legion helmet
{itemid=2464, count=1}, -- chain armor
{itemid=2468, count=1}, -- studded legs
{itemid=2643, count=1}, -- leather boots
{itemid=2120, count=1}, -- rope
{itemid=5710, count=1} -- shovel
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2190, count=1}, -- wand of vortex
{itemid=2175, count=1} -- spellbook
},
{ -- DRUID ITEMS
{itemid=2182, count=1}, -- snakebite rod
{itemid=2175, count=1} -- spellbook
},
{ -- PALADIN ITEMS
{itemid=2456, count=1}, -- bow
{itemid=2544, count=100} -- 100 arrows
},
{ -- KNIGHT ITEMS
{itemid=2412, count=1}, -- katana
{itemid=2530, count=1} -- copper shield
}
}for _, items in ipairs(firstItems) do
for _, item in ipairs(commonItems) do
table.insert(items, item)
end
end
local storage = 35353
function onLogin(cid)
if getPlayerGroupId(cid) < 3 then
local receivedItems = getPlayerStorageValue(cid, storage)
if receivedItems == -1 then
--[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)
local giveItems = firstItems[getPlayerVocation(cid)]
if giveItems ~= nil then
for _, v in ipairs(giveItems) do
--doAddContainerItem(backpack, v.itemid, v.count or 1)
doPlayerAddItem(cid, v.itemid, v.count or 1)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved your first items!")
--------- teleport para onde vc quiser
local posc = {x=3000, y=3000, z=7}
doTeleportThing(cid,posc)
--------
end
setPlayerStorageValue(cid, storage, 1)
end
return true
end
mais e melhor fazer pelo config.lua
Tem como por só a função de teleportar? Pq eu já tenho o meu first itens, vai ficar mt ruim com dois :S
local posc = {x=3000, y=3000, z=7}
doTeleportThing(cid,posc)
Também preciso do mesmo script, já ví esse esquema em um Ot por ae.
Aguardando a resposta de positivo do autor do tópico. (:
(Retired)
Ué, muda no config lua
newPlayerSpawnPosX = 1000 newPlayerSpawnPosY = 1000 newPlayerSpawnPosZ = 10 newPlayerTownId = 1 newPlayerLevel = 50 newPlayerMagicLevel = 25
Ajuda
newPlayerSpawnPosX = 1000 -- A PRIMEIRA POSIÇÃO Q VC QUER newPlayerSpawnPosY = 1000 -- A SEGUNDA POSIÇÃO Q VC QUER newPlayerSpawnPosZ = 10 -- A TERCEIRA POSIÇÃO Q VC QUER newPlayerTownId = 1 -- O TOWNID Q VAI INICIAR newPlayerLevel = 50 -- O LEVEL QUE VAI SER AO CRIAR O CHAR newPlayerMagicLevel = 25 -- O MAGIC LEVEL QUE VAI SER AO CRIAR O CHAR
coisa boba,mas tem gente q n entende, porém esse ai ele vai logar ai a primeira vez e depoois vai logar na posicao q vc por nos samples se teu ot for mysql, caso seja sql é vai ficar logando no lugar do acc manager , flw
Ué, muda no config lua
newPlayerSpawnPosX = 1000 newPlayerSpawnPosY = 1000 newPlayerSpawnPosZ = 10 newPlayerTownId = 1 newPlayerLevel = 50 newPlayerMagicLevel = 25
Ajuda
newPlayerSpawnPosX = 1000 -- A PRIMEIRA POSIÇÃO Q VC QUER newPlayerSpawnPosY = 1000 -- A SEGUNDA POSIÇÃO Q VC QUER newPlayerSpawnPosZ = 10 -- A TERCEIRA POSIÇÃO Q VC QUER newPlayerTownId = 1 -- O TOWNID Q VAI INICIAR newPlayerLevel = 50 -- O LEVEL QUE VAI SER AO CRIAR O CHAR newPlayerMagicLevel = 25 -- O MAGIC LEVEL QUE VAI SER AO CRIAR O CHAR
coisa boba,mas tem gente q n entende, porém esse ai ele vai logar ai a primeira vez e depoois vai logar na posicao q vc por nos samples se teu ot for mysql, caso seja sql é vai ficar logando no lugar do acc manager , flw
Assim que puder te reputo, só que o unico problema é que meus samples não funcionam :\
Tenta me ajudar aqui pfvr...
http://www.xtibia.com/forum/topic/213870-error-ao-criar-novo-char-com-nova-vocacao/
local pos = {x=x, y=y, z=z}
function onLogin(cid)
if getPlayerStorageValue(cid, storage) == -1 then
doTeleportThing(cid, pos)
setPlayerStorageValue(cid, storage, 1)
else
return doPlayerSendCancel(cid, "You are already teleported for the initial position.")
end
Estagiário 24/01/2013
pedido para sair : 23/02/2013
Volta como estagiário: 11/04/2013
Pedido para sair: 10/05/2013










