I get a error message that says
"Error - BaseEvents::loadFromXmll Failed to load data/creaturescrips/creaturescripts.xml: Error parsing element attribute
line 68: <event type= login" name="Firstitems" script=others/firstitems.lua"/>"
My creaturescripts.xml
My firstitems.lua
and my login.lua
Please help me and write what i have done wrong. Please post the correct code in a Php format so i can copy and paste if it is wrong in login.lua.
Regards Jalllee
"Error - BaseEvents::loadFromXmll Failed to load data/creaturescrips/creaturescripts.xml: Error parsing element attribute
line 68: <event type= login" name="Firstitems" script=others/firstitems.lua"/>"
My creaturescripts.xml
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<!-- Secret by Super Radio"> service[IMG]https://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png[/IMG] Quest -->
<event type="kill" name="SecretServiceBlackKnight" script="others/blackKnight.lua"/>
<!-- Spike Task: Drillworm -->
<event type="kill" name="SpikeDrillworm" script="spike task/drillworm.lua"/>
<!-- Thieves Guild Quest -->
<event type="kill" name="ThievesGuildNomad" script="others/nomad.lua"/>
<!-- Pythius The Rotten -->
<event type="kill" name="pythiusDead" script="pythius the rotten/pythiusDead.lua" />
<!-- Gray Island -->
<event type="kill" name="bossesGrayIsland" script="gray island/bossesgrayisland.lua"/>
<!-- The Elemental Spheres -->
<event type="death" name="ElementalSpheres" script="elemental spheres quest/the_elemental_spheres.lua"/>
<event type="kill" name="ElementalSpheresKill" script="elemental spheres quest/the_elemental_spheres.lua"/>
<event type= by Super Radio"> login[IMG]https://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png[/IMG]" name="ElementalSpheresLogin" script="elemental spheres quest/the_elemental_spheres.lua"/>
<!-- Gnomebase -->
<event type="kill" name="WarzoneTwo" script="gnomebase/warzone2.lua"/>
<event type="kill" name="WarzoneThree" script="gnomebase/warzone3.lua"/>
<event type="kill" name="bossesWarzone" script="gnomebase/bossesWarzone.lua"/>
<!-- Svargrond Arena: Killing a boss -->
<event type="kill" name="SvargrondArenaKill" script="svargrond arena quest/arena_kill.lua"/>
<!-- Pharaos: Portal to reward room -->
<event type="kill" name="PharaoKillPortal" script="others/pharaoPortal.lua"/>
<!-- In by Super Radio"> service[IMG]https://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png[/IMG] Of Yalahar Quest -->
<event type="kill" name="inServiceOfYalaharQuestsDiseased" script="in service of yalahar quest/inServiceOfYalaharQuestsDiseased.lua"/>
<event type="kill" name="inServiceOfYalaharQuestsMorik" script="in service of yalahar quest/inServiceOfYalaharQuestsMorik.lua"/>
<event type="kill" name="inServiceOfYalaharQuestsQuara" script="in service of yalahar quest/inServiceOfYalaharQuestsQuara.lua"/>
<!-- Inquisition Quest -->
<event type="kill" name="inquisitionQuestBosses" script="inquisition quest/inquisitionQuestBosses.lua"/>
<event type="kill" name="inquisitionQuestUngreez" script="inquisition quest/inquisitionQuestUngreez.lua"/>
<!-- Killing In The Name Of Quest -->
<event type="kill" name="killingInTheNameOfQuestKills" script="killing in the name of quest/killingInTheNameOfQuestKills.lua"/>
<event type="kill" name="TaskCustom" script="killing in the name of quest/taskcustom.lua"/>
<!-- Raging Mage Tower -->
<event type="kill" name="Yielothax" script="raging mage tower/yielothax.lua"/>
<event type="kill" name="Energized" script="raging mage tower/energized.lua"/>
<event type="kill" name="Raging" script="raging mage tower/raging.lua"/>
<!-- The Masters Voice Quest -->
<event type="kill" name="MastersVoiceServants" script="their master's voice quest/ServantsKill.lua"/>
<!-- Wrath of Emperor -->
<event type="kill" name="wrathBoss" script="wrath of the emperor quest/wrathOfTheEmperorQuestBoss.lua"/>
<event type="kill" name="wrathZalamon" script="wrath of the emperor quest/wrathOfTheEmperorQuestZalamon.lua"/>
<!-- Others -->
<event type="logout" name="Cast" script="others/cast.lua"/>
<event type= by Super Radio"> login[IMG]https://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png[/IMG]" name="PlayerLogin" script="others by Super Radio"> login[IMG]https://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png[/IMG].lua"/>
<event type="death" name="PlayerDeath" script="others/playerdeath.lua"/>
<event type="advance" name="AdvanceSave" script="others/advance_save.lua"/>
<event type="advance" name="AdvanceRook" script="others/advance_rook.lua"/>
<event type="advance" name="Recompense" script="others/recompense.lua"/>
<event type="login" name="AddonsMounts" script="others/addons-montarias.lua"/>
<event type= by Super Radio"> login[IMG]https://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png[/IMG]" name="FirstItems" script="others/firstitems.lua"/>
</creaturescripts>
My firstitems.lua
PHP:
-- With Rookgaard
--[[
local firstItems = {2050, 2382}
function onLogin(cid)
local player = Player(cid)
if player:getLastLoginSaved() <= 0 then
for i = 1, #firstItems do
player:addItem(firstItems[i], 1)
end
player:addItem(player:getSex() == 0 and 2651 or 2650, 1)
player:addItem(1987, 1)
player:addItem(2674, 1)
end
return true
end
]]--
-- Without Rookgaard
local config = {
[1] = {
--equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf
items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}},
--container rope, shovel, mana potion
container = {{2120, 1}, {2554, 1}, {7620, 1}}
},
[2] = {
--equipment spellbook, snakebite rod, magician's robe, mage hat, studded legs, leather boots scarf
items = {{2175, 1}, {2182, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}},
--container rope, shovel, mana potion
container = {{2120, 1}, {2554, 1}, {7620, 1}}
},
[3] = {
--equipment dwrven shield, 5 spear, ranger's cloak, ranger legs scarf, legion helmet
items = {{2525, 1}, {2389, 5}, {2660, 1}, {8923, 1}, {2643, 1}, {2661, 1}, {2480, 1}},
--container rope, shovel, health potion, bow, 50 arrow
container = {{2120, 1}, {2554, 1}, {7618, 1}, {2456, 1}, {2544, 50}}
},
[4] = {
--equipment dwarven shield, steel axe, brass armor, brass helmet, brass legs scarf
items = {{2525, 1}, {8601, 1}, {2465, 1}, {2460, 1}, {2478, 1}, {2643, 1}, {2661, 1}},
--container jagged sword, daramian mace, rope, shovel, health potion
container = {{8602, 1}, {2439, 1}, {2120, 1}, {2554, 1}, {7618, 1}}
}
}
function onLogin(cid)
local player = Player(cid)
local targetVocation = config[player:getVocation():getId()]
if not targetVocation then
return true
end
if player:getLastLoginSaved() ~= 0 then
return true
end
for i = 1, #targetVocation.items do
player:addItem(targetVocation.items[i][1], targetVocation.items[i][2])
end
local backpack = player:addItem(1988)
if not backpack then
return true
end
for i = 1, #targetVocation.container do
backpack:addItem(targetVocation.container[i][1], targetVocation.container[i][2])
end
return true
end
and my login.lua
PHP:
-- ordered as in creaturescripts.xml
local events = {
'pythiusDead',
'bossesGrayIsland',
'ElementalSpheres',
'ElementalSpheresKill',
'ElementalSpheresLogin',
'WarzoneThree',
'WarzoneTwo',
'bossesWarzone',
'SvargrondArenaKill',
'PharaoKillPortal',
'inServiceOfYalaharQuestsDiseased',
'inServiceOfYalaharQuestsMorik',
'inServiceOfYalaharQuestsQuara',
'inquisitionQuestBosses',
'inquisitionQuestUngreez',
'killingInTheNameOfQuestKills',
'TaskCustom',
'Yielothax',
'Energized',
'Raging',
'MastersVoiceServants',
'wrathBoss',
'wrathZalamon',
'PlayerDeath',
'ThievesGuildNomad',
'AdvanceSave',
'SpikeDrillworm',
'SecretServiceBlackKnight'
}
function onLogin(cid)
local player = Player(cid)
local loginStr = 'Welcome to ' .. configManager.getString(configKeys.SERVER_NAME) .. '!'
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. ' Please choose your outfit.'
player:sendTutorial(1)
else
if loginStr ~= '' then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end
loginStr = string.format('Your last visit was on %s.', os.date('%a %b %d %X %Y', player:getLastLoginSaved()))
db.query("UPDATE `players` SET `cast` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
for i = 1, #events do
player:registerEvent(events[i])
end
return true
end
Please help me and write what i have done wrong. Please post the correct code in a Php format so i can copy and paste if it is wrong in login.lua.
Regards Jalllee