• 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!

Request, starter item fell down into the floor! rep++ for help

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello otland!
I got some wierd bug or something, and i dont know how to fix it, when players log on fly all things into the ground, when I tried that one would start with the chests instead, but then you can not open the chests, to it says that it has no place, so I think the place to have equitment dont work, because you have to pick up a bag / bp to be able to open the chest. ( the bag with items fell into the bp/bag ), rep+ for help!
 
tfs/mods/firstitems.xml:
Code:
<?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)
	local config = {
		voc_items = {
			{ -- SORC
				{2190}, -- wand of vortex
				{2525}, -- spellbook
				{2457}, -- hat of the mad
				{2463}, -- plate armor
				{2647} -- plate legs
			},
			{ -- DRUID
				{2182}, -- snakebite rod
				{2525}, -- spellbook
				{2457}, -- helmet
				{2463}, -- plate armor
				{2647} -- plate legs
			},
			{ -- PALADIN
				{2389}, -- throwing knife
				{2525}, -- dwarven shield
				{2457}, -- steel helmet
				{2463}, -- plate armor
				{2647} -- ranger legs
			},
			{ -- KNIGHT
				{2383}, -- spike sword
				{2428}, -- orcish axe
				{2422}, -- iron hammer
				{2525}, -- dwarven shield
				{2457}, -- steel helmet
				{2463}, -- plate armor
				{2647} -- plate legs
			}
		},
		all_items = {			
			{2643}, -- leather boots
			{2661} -- Necklace
		},
		extra_items = {
			{2789, 20},			
			{2120},
			{2554},
			{7620,1}, -- small hp
			{7618,1}, -- hp
			
		},
		knight_weapons = {
			{2394}, -- morning star
			{2428} -- orcish axe
		}
	}
	if getPlayerGroupId(cid) < 3 then
		if getPlayerStorageValue(cid, storage) == -1 then
			local common = config.voc_items[getPlayerVocation(cid)]
			if common ~= nil then
				for _, v in ipairs(common) do
					doPlayerAddItem(cid, v[1], v[2] or 1)
				end
			end
 
			local all = config.all_items
			if all ~= nil then
				for _, v in ipairs(all) do
					doPlayerAddItem(cid, v[1], v[2] or 1)
				end
			end
 
			local extra = config.extra_items
			local bp = doPlayerAddItem(cid, 1988, 1)
			if extra ~= nil then
				for _, v in ipairs(extra) do
					doAddContainerItem(bp, v[1], v[2] or 1)
				end
			end
 
			local weapons = config.knight_weapons
			if weapons ~= nil then
				for _, w in ipairs(weapons) do
					if isKnight(cid) then
						doAddContainerItem(bp, w[1], w[2] or 1)
					end
				end
			end
 
			setPlayerStorageValue(cid, storage, 1)
		end
	end
	return true
end
	]]></event>
</mod>
 
tfs/mods/firstitems.xml:
Code:
<?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"><=!=[=C=D=A=T=A=[
		config = {
			storage = 30001,
			items = {2050, 2382}
		}
	]=]=></config>
	<event type="login" name="FirstItems" event="script"> <=!=[=C=D=A=T=A=[
		domodlib('firstitems_config')
 
		function onLogin(cid)
	local config = {
		voc_items = {
			{ -- SORC
				{2190}, -- wand of vortex
				{2525}, -- spellbook
				{2457}, -- hat of the mad
				{2463}, -- plate armor
				{2647} -- plate legs
			},
			{ -- DRUID
				{2182}, -- snakebite rod
				{2525}, -- spellbook
				{2457}, -- helmet
				{2463}, -- plate armor
				{2647} -- plate legs
			},
			{ -- PALADIN
				{2389}, -- throwing knife
				{2525}, -- dwarven shield
				{2457}, -- steel helmet
				{2463}, -- plate armor
				{2647} -- ranger legs
			},
			{ -- KNIGHT
				{2383}, -- spike sword
				{2428}, -- orcish axe
				{2422}, -- iron hammer
				{2525}, -- dwarven shield
				{2457}, -- steel helmet
				{2463}, -- plate armor
				{2647} -- plate legs
			}
		},
		all_items = {			
			{2643}, -- leather boots
			{2661} -- Necklace
		},
		extra_items = {
			{2789, 20},			
			{2120},
			{2554},
			{7620,1}, -- small hp
			{7618,1}, -- hp
			
		},
		knight_weapons = {
			{2394}, -- morning star
			{2428} -- orcish axe
		}
	}
	if getPlayerGroupId(cid) < 3 then
		if getPlayerStorageValue(cid, storage) == -1 then
			local common = config.voc_items[getPlayerVocation(cid)]
			if common ~= nil then
				for _, v in ipairs(common) do
					doPlayerAddItem(cid, v[1], v[2] or 1)
				end
			end
 
			local all = config.all_items
			if all ~= nil then
				for _, v in ipairs(all) do
					doPlayerAddItem(cid, v[1], v[2] or 1)
				end
			end
 
			local extra = config.extra_items
			local bp = doPlayerAddItem(cid, 1988, 1)
			if extra ~= nil then
				for _, v in ipairs(extra) do
					doAddContainerItem(bp, v[1], v[2] or 1)
				end
			end
 
			local weapons = config.knight_weapons
			if weapons ~= nil then
				for _, w in ipairs(weapons) do
					if isKnight(cid) then
						doAddContainerItem(bp, w[1], w[2] or 1)
					end
				end
			end
 
			setPlayerStorageValue(cid, storage, 1)
		end
	end
	return true
end
	]=]=></event>
</mod>

thank you, but all these items drop to the floor, " under him "
 
Check if the samples have enough capacity for carry new items. If yes, remove all items from samples then turn on script that i paste. If no, then add cap in your database for the samples. If it does not work, we will try to fix it by other way :). There is script by J.Dre, hope its works: http://otland.net/f163/mod-advanced-first-items-useslot-slottype-usemessage-incontainer-149556/

it doesnt work, still dropping all into the floor, the samples got 400+ cap so it isnt that problem ;s
 
[05/03/2012 20:53:34] [Error - CreatureScript Interface]
[05/03/2012 20:53:34] buffer:eek:nLogin
[05/03/2012 20:53:34] Description:
[05/03/2012 20:53:34] (luaDoAddContainerItem) Container not found
 
I think your error shows that Container (bag) can't be loaded so put your backpack with all items to arrow slot, then create new character and tell us this working or not :$
 
I think your error shows that Container (bag) can't be loaded so put your backpack with all items to arrow slot, then create new character and tell us this working or not :$

i cant even put items on sample chars, its why i need first item script, and it will always drop, do i need fix any .cpp file or something? :S
 
I have the same problem... Also, just for your guys information.. maybe this will help, maybe it won't but when you are wearing nothing and make a backpack (1988) it will drop on the floor instead of going in your backpack slot.
 
I have the same problem... Also, just for your guys information.. maybe this will help, maybe it won't but when you are wearing nothing and make a backpack (1988) it will drop on the floor instead of going in your backpack slot.

This is the same here, also if you have a backpack in your bp slot, and you create, for example, a demon armor , it won't wear on armor slot, it will be inside your backpack... It's a bug this?
 
Back
Top