• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Script Doesnt Work Help!

Nux

Yzeria Custom War
Joined
Jan 2, 2009
Messages
1,067
Reaction score
1
This is the error i always got when i start the server.. its an error on the console

[30/07/2009 13:40:03] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)
[30/07/2009 13:40:03] data/creaturescripts/scripts/login.lua:145: '<eof>' expected near 'end'

And here is the script im using

PHP:
ITEMS = {} --[[##do not touch it!##]]
--for empty slot use nil or false
--[[sorcerer]] ITEMS[5] = {
9778, --1 // head // yalahari mask
2200, --2 // necakle // protection amulet
2000, --3 // backpack // red backpack
8890, --4 // armor // robe of the underworld
8922, --5 // right hand // wand of voodoo
8918, --6 // left hand // spellbook of dark mysteries
7730, --7 // legs // blue legs
6132, --8 // feet // soft boots
2214, --9 // ring // ring of healing
nil, --10 // ammo slot // EMPTY
----
--items to a backpack -- {id, inBackpack[, count/subtype]}
----
{RUNES.UH[GLOBAL_RUNE_TYPE], false, 2}, --UH
{RUNES.SD[GLOBAL_RUNE_TYPE], false}, --SD
{RUNES.EXPLO[GLOBAL_RUNE_TYPE], false}, --EXPLOSION
{RUNES.HMM[GLOBAL_RUNE_TYPE], false}, --HMM
{2274, false}, --avalanche rune
{RUNES.GFB[GLOBAL_RUNE_TYPE], false}, --GFB
{2261, false}, --destroy field rune
{RUNES.PBOMB[GLOBAL_RUNE_TYPE], false}, --poison bomb rune
{RUNES.FBOMB[GLOBAL_RUNE_TYPE], false}, --firebomb rune
{RUNES.EBOMB[GLOBAL_RUNE_TYPE], false}, --energy bomb rune
{7590, true}, --GMP
{RUNES.MW[GLOBAL_RUNE_TYPE], false} --magic wall rune 
}

--[[druid]] ITEMS[6] = {
9778, --1 // head // yalahari mask
2200, --2 // necakle // protection amulet
2002, --3 // backpack // blue backpack
8866, --4 // armor // serpent coat
8910, --5 // right hand // underworld rod
8918, --6 // left hand // spellbook of dark mysteries
7730, --7 // legs // blue legs
6132, --8 // feet // soft boots
2214, --9 // ring // ring of healing
nil, --10 // ammo slot // EMPTY
----
--items to a backpack -- {id, inBackpack[, count/subtype]}
----
{RUNES.UH[GLOBAL_RUNE_TYPE], false, 2}, --UH
{RUNES.SD[GLOBAL_RUNE_TYPE], false}, --SD
{RUNES.EXPLO[GLOBAL_RUNE_TYPE], false}, --EXPLOSION
{RUNES.EXPLO[GLOBAL_RUNE_TYPE], false}, --EXPLOSION
{2274, false}, --avalanche rune
{RUNES.GFB[GLOBAL_RUNE_TYPE], false}, --GFB
{2261, false}, --destroy field rune
{RUNES.PBOMB[GLOBAL_RUNE_TYPE], false}, --poison bomb rune
{RUNES.FBOMB[GLOBAL_RUNE_TYPE], false}, --firebomb rune
{RUNES.EBOMB[GLOBAL_RUNE_TYPE], false}, --energy bomb rune
{7590, true}, --GMP
{RUNES.MW[GLOBAL_RUNE_TYPE], false} --magic wall rune
}

--[[paladin]] ITEMS[7] = {
2493, --1 // head // demon helmet
2200, --2 // necakle // protection amulet
2003, --3 // backpack // grey backpack
8888, --4 // armor // master archer's armor
8850, --5 // right hand // chain bolter
nil, --6 // left hand // EMPTY
9777, --7 // legs // yalahari leg piece
6132, --8 // feet // soft boots
2214, --9 // ring // ring of healing
6529, --10 // ammo slot // infernal bolts
----
--items to a backpack -- {id, inBackpack[, count/subtype]}
----
{RUNES.UH[GLOBAL_RUNE_TYPE], false, 2}, --UH
{RUNES.SD[GLOBAL_RUNE_TYPE], false}, --SD
{RUNES.EXPLO[GLOBAL_RUNE_TYPE], false}, --EXPLOSION
{RUNES.EXPLO[GLOBAL_RUNE_TYPE], false}, --EXPLOSION
{2274, false}, --avalanche rune
{RUNES.GFB[GLOBAL_RUNE_TYPE], false}, --GFB
{2261, false}, --destroy field rune
{RUNES.PBOMB[GLOBAL_RUNE_TYPE], false}, --poison bomb rune
{RUNES.FBOMB[GLOBAL_RUNE_TYPE], false}, --firebomb rune
{RUNES.EBOMB[GLOBAL_RUNE_TYPE], false}, --energy bomb rune
{8472, true}, --GSP
{RUNES.MW[GLOBAL_RUNE_TYPE], false} --magic wall rune
}

--[[knight]] ITEMS[8] = {
2493, --1 // head // demon helmet
2200, --2 // necakle // protection amulet
1999, --3 // backpack // yellow backpack
9776, --4 // armor // yalahari armor
2431, --5 // right hand // stonecutter axe
6433, --6 // left hand // necromancer shield
2470, --7 // legs // golden legs
6132, --8 // feet // soft boots
2214, --9 // ring // ring of healing
nil, --10 // ammo slot // EMPTY
----
--items to a backpack -- {id, inBackpack[, count/subtype]}
----
{RUNES.UH[GLOBAL_RUNE_TYPE], false, 2}, --UH
{RUNES.EXPLO[GLOBAL_RUNE_TYPE], false}, --EXPLOSION
{2274, false}, --avalanche rune
{RUNES.GFB[GLOBAL_RUNE_TYPE], false}, --GFB
{2261, false}, --destroy field rune
{RUNES.PBOMB[GLOBAL_RUNE_TYPE], false}, --poison bomb rune
{RUNES.FBOMB[GLOBAL_RUNE_TYPE], false}, --firebomb rune
{RUNES.EBOMB[GLOBAL_RUNE_TYPE], false}, --energy bomb rune
{7591, true}, --GHP
{7620, true} --mana potion
}

ITEMS[1], ITEMS[2], ITEMS[3], ITEMS[4] = ITEMS[5], ITEMS[6], ITEMS[7], ITEMS[8]
ITEMS[0] = ITEMS[1] --prevents debugs

	if getPlayerAccess(cid) < 3 then
		local vocItems = ITEMS[getPlayerVocation(cid)]
		for i = CONST_SLOT_HEAD, CONST_SLOT_AMMO do
			local slotItem = getPlayerSlotItem(cid, i)
			if slotItem.itemid > 0 then
				doRemoveItem(slotItem.uid)
			end
			if vocItems[i] and vocItems[i] ~= nil and i ~= CONST_SLOT_BACKPACK then
				if i == CONST_SLOT_AMMO then
					doPlayerAddItem(cid, vocItems[i], 100)
				else
					doPlayerAddItem(cid, vocItems[i])
				end

			end
		end
		local backpack = doPlayerAddItem(cid, vocItems[CONST_SLOT_BACKPACK], 1)
		for b = 11, #vocItems do
			if vocItems[b] and vocItems[b] ~= nil then
				if vocItems[b][2] then
					vocItems[b][3] = vocItems[b][3] or 1
					doPlayerBuyItemContainer(cid, 2000, vocItems[b][1], 1, 0, vocItems[b][3])
				else
					doAddContainerItem(backpack, vocItems[b][1], vocItems[b][3])
				end
			end
		end
	end
 	return TRUE
end
 
Back
Top