Você não adicionou o evento no login.lua
registerCreatureEvent(cid, "FirstItems")
Por goesraphael1, 08 de nov. de 2012 em Tópicos Sem Resposta
info
Grupo: Lorde
Registrado: 17/01/09
Posts: 2.1k
Reputação: +395
Char no Tibia: Adra Sata

Você não adicionou o evento no login.lua
registerCreatureEvent(cid, "FirstItems")
info
Grupo: Campones
Registrado: 08/07/10
Posts: 78
Reputação: +2
Char no Tibia: Lady Bewulf

Eu ja tentei fazer isso, não foi, ai eu tirei.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Campones
Registrado: 08/07/10
Posts: 78
Reputação: +2
Char no Tibia: Lady Bewulf
Galera, eu troquei meu distro de realserver 3.0 (compilado para windows) e compilei um TFS 0.4_DEV para linux.
Praticamente TUDO do realserver funcionou perfeitamente no TFS, porém o firstitem.lua de creaturescripts não, os chars criados estão começando sem item nenhum, apenas uma backpack.
Meu server é de war, então tenho que dividir os items por creaturescripts.
Por favor, preciso saber o que está dando errado..
/creaturescripts/creaturescripts.xml
/creaturescripts/scripts/firstitems.lua
local commonItems = { -- ITEMS ALL VOCS RECEIVE {itemid=2120, count=1}, -- rope {itemid=2420, count=1}, -- machete {itemid=2789, count=100}, -- brown mushrooms {itemid=2305, count=1}, -- fire bomb rune {itemid=2261, count=1}, -- destroy field rune } local firstItems = { { -- SORC ITEMS {itemid=2323, count=1}, -- hat of the mad {itemid=8871, count=1}, -- focus cape {itemid=7730, count=1}, -- blue legs {itemid=2195, count=1}, -- boots of haste {itemid=8902, count=1}, -- spellbook of mind control {itemid=2187, count=1}, -- wand of inferno {itemid=2268, count=1}, -- sd {itemid=2273, count=1}, -- uh {itemid=7590, count=1}, -- gmp {itemid=2293, count=1}, -- mw }, { -- DRUID ITEMS {itemid=2323, count=1}, -- hat of the mad {itemid=8871, count=1}, -- focus cape {itemid=7730, count=1}, -- blue legs {itemid=2195, count=1}, -- boots of haste {itemid=8902, count=1}, -- spellbook of mind control {itemid=2183, count=1}, -- hailstorm rod {itemid=2268, count=1}, -- sd {itemid=2273, count=1}, -- uh {itemid=7590, count=1}, -- gmp {itemid=2293, count=1}, -- mw {itemid=2269, count=1}, -- wg {itemid=2278, count=1}, -- para }, { -- PALADIN ITEMS {itemid=2493, count=1}, -- demon helmet {itemid=8891, count=1}, -- paladin armor {itemid=7730, count=1}, -- blue legs {itemid=2195, count=1}, -- boots of haste {itemid=2514, count=1}, -- mastermind shield {itemid=7368, count=10}, -- assassin stars {itemid=2268, count=1}, -- sd {itemid=2273, count=1}, -- uh {itemid=8472, count=1}, -- gsp {itemid=7589, count=1}, -- smp {itemid=7588, count=1}, -- shp {itemid=2293, count=1}, -- mw }, { -- KNIGHT ITEMS {itemid=2493, count=1}, -- demon helmet {itemid=2472, count=1}, -- magic plate armor {itemid=2470, count=1}, -- golden legs {itemid=2195, count=1}, -- boots of haste {itemid=2514, count=1}, -- mastermind shield {itemid=2400, count=1}, -- magic sword {itemid=2431, count=1}, -- Stonecutter Axe {itemid=8927, count=1}, -- dark trinity mace {itemid=7620, count=1}, -- mp {itemid=8473, count=1}, -- uhp {itemid=2313, count=1}, -- explosion {itemid=2293, count=1}, -- mw } } for _, items in ipairs(firstItems) do for _, item in ipairs(commonItems) do table.insert(items, item) end end function onLogin(cid) if getPlayerGroupId(cid) < 2 then local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708) if hasReceivedFirstItems == -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, "Voce Recebeu seus equipamentos") setPlayerStorageValue(cid, 67708, 1) end end end return TRUE end/creaturescripts/scripts/login.lua
local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doPlayerAddPremiumDays(cid, 2) doPlayerSetPromotionLevel(cid, 1) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "kill") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "deathBroadcast") registerCreatureEvent(cid, "DeathBroadcast") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") return true endEditado Novembro 8 por RaphaelGoes