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

The Forgotten Server v0.3.1[pl2] (Crying Damson)

Status
Not open for further replies.
Well I have this but I want a full backpack with wand of vortex, 5cc, serpent sword, dwarven axe, rope, light shovel. and EQ: Steel Helmet, Blue Robe, Blue Legs, Boots of Haste, aol *BP = Backpack of Holding*

Im a newbie and I cant edit it myself can you help me please?:

local firstItems =
{
2050,
2382
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems, 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2651, 1)
else
doPlayerAddItem(cid, 2650, 1)
end
local bag = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(bag, 2674, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
 
Here is Mine If you whant to use it.

Code:
-- Colandus @ 1337Rox0r
-- Slighty Modified by ArtofWork
-- How to think when adding items? Try fill the hands first, then the arrow slot. This because armor etc won't go to hand slot (Vocation items will be given before commonItems, as you usually use to have
-- the hand/arrow slot items there and not in common items. Take a look at how I did it:
 
local commonItems = {
	-- ITEMS ALL VOC RECEIVE
	{itemid=2457, count=1}, -- steel helmet
	{itemid=2463, count=1}, -- plate armor
	{itemid=2647, count=1}, -- plate legs
	{itemid=2152, count=50}, -- 50 platinum coins
	{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}, -- spell book
		{itemid=2173, count=1} -- aol
	},
	{ -- DRUID ITEMS
		{itemid=2182, count=1}, -- snakebite rod
		{itemid=2175, count=1}, -- spellbook
		{itemid=2173, count=1} -- aol
	},
	{ -- PALADIN ITEMS
		{itemid=2456, count=1}, -- bow
		{itemid=2175, count=1}, -- spell book
		{itemid=2544, count=100}, -- 100 arrows
		{itemid=2173, count=1} -- aol
	},
	{ -- KNIGHT ITEMS
		{itemid=2423, count=1}, -- clerical mace
		{itemid=2383, count=1}, -- spike sword
		{itemid=2430, count=1}, -- knight axe
		{itemid=2518, count=1}, -- beholder shield
		{itemid=2175, count=1}, -- spell book
		{itemid=2173, count=1} -- aol
	}
}
 
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, 90808)
 
		if hasReceivedFirstItems ~= TRUE then
			--[[local backpack = ]]doPlayerAddItem(cid, 1988, TRUE)
 
			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_BLUE, "Welcome to Avolutions here is your items!")
			end
			setPlayerStorageValue(cid, 90808, TRUE)
		end
	end
	return TRUE
end
 
Help fast!!!
-- colandus @ 1337rox0r -- slighty modified by artofwork -- how to think when adding items? Try fill the hands first, then the arrow slot. This because armor etc won't go to hand slot (vocation items will be given before commonitems, as you usually use to have -- the hand/arrow slot items there and not in common items. Take a look at how i did it: Local commonitems = { -- items all voc receive {itemid=2457, count=1}, -- steel helmet {itemid=2463, count=1}, -- plate armor {itemid=2647, count=1}, -- plate legs {itemid=2170, count=5}, -- 5 crystal coins {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}, -- spell book {itemid=2173, count=1} -- aol {itemid=8900, count=1} -- spellbook of enlightenment {itemid=8870, count=1} -- spirit cloak }, { -- druid items {itemid=2182, count=1}, -- snakebite rod {itemid=2175, count=1}, -- spellbook {itemid=2173, count=1} -- aol {itemid=8900, count=1} -- spellbook of enlightenment {itemid=8870, count=1} -- spirit cloak }, { -- paladin items {itemid=2456, count=1}, -- bow {itemid=2175, count=1}, -- spell book {itemid=2544, count=100}, -- 100 arrows {itemid=2173, count=1} -- aol }, { -- knight items {itemid=2423, count=1}, -- clerical mace {itemid=2383, count=1}, -- spike sword {itemid=2430, count=1}, -- knight axe {itemid=2518, count=1}, -- beholder shield {itemid=2175, count=1}, -- spell book {itemid=2173, count=1} -- aol } } 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, 90808) if hasreceivedfirstitems ~= true then --[[local backpack = ]]doplayeradditem(cid, 1988, true) 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_blue, "welcome to avolutions here is your items!") end setplayerstoragevalue(cid, 90808, true) end end return true end-- colandus @ 1337rox0r -- slighty modified by artofwork -- how to think when adding items? Try fill the hands first, then the arrow slot. This because armor etc won't go to hand slot (vocation items will be given before commonitems, as you usually use to have -- the hand/arrow slot items there and not in common items. Take a look at how i did it: Local commonitems = { -- items all voc receive {itemid=2457, count=1}, -- steel helmet {itemid=2463, count=1}, -- plate armor {itemid=2647, count=1}, -- plate legs {itemid=2170, count=5}, -- 5 crystal coins {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}, -- spell book {itemid=2173, count=1} -- aol {itemid=8900, count=1} -- spellbook of enlightenment {itemid=8870, count=1} -- spirit cloak }, { -- druid items {itemid=2182, count=1}, -- snakebite rod {itemid=2175, count=1}, -- spellbook {itemid=2173, count=1} -- aol {itemid=8900, count=1} -- spellbook of enlightenment {itemid=8870, count=1} -- spirit cloak }, { -- paladin items {itemid=2456, count=1}, -- bow {itemid=2175, count=1}, -- spell book {itemid=2544, count=100}, -- 100 arrows {itemid=2173, count=1} -- aol }, { -- knight items {itemid=2423, count=1}, -- clerical mace {itemid=2383, count=1}, -- spike sword {itemid=2430, count=1}, -- knight axe {itemid=2518, count=1}, -- beholder shield {itemid=2175, count=1}, -- spell book {itemid=2173, count=1} -- aol } } 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, 90808) if hasreceivedfirstitems ~= true then --[[local backpack = ]]doplayeradditem(cid, 1988, true) 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_blue, "welcome to avolutions here is your items!") end setplayerstoragevalue(cid, 90808, true) end end return true end
and then ;/ :
[01/03/2009 15:41:02] warning: [event::loadscript] can not load script. Data/creaturescripts/scripts/firstitems.lua [01/03/2009 15:41:02] data/creaturescripts/scripts/firstitems.lua:21: '}' expected (to close '{' at line 17) near '{'
 
OMG WRONG, IDK HOW TO DO CODE -_- -- Colandus @ 1337Rox0r -- Slighty Modified by ArtofWork -- How to think when adding items? Try fill the hands first, then the arrow slot. This because armor etc won't go to hand slot (Vocation items will be given before commonItems, as you usually use to have -- the hand/arrow slot items there and not in common items. Take a look at how I did it: local commonItems = { -- ITEMS ALL VOC RECEIVE {itemid=2457, count=1}, -- steel helmet {itemid=2463, count=1}, -- plate armor {itemid=2647, count=1}, -- plate legs {itemid=2170, count=5}, -- 5 crystal coins {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}, -- spell book {itemid=2173, count=1} -- aol {itemid=8900, count=1} -- spellbook of enlightenment {itemid=8870, count=1} -- spirit cloak }, { -- DRUID ITEMS {itemid=2182, count=1}, -- snakebite rod {itemid=2175, count=1}, -- spellbook {itemid=2173, count=1} -- aol {itemid=8900, count=1} -- spellbook of enlightenment {itemid=8870, count=1} -- spirit cloak }, { -- PALADIN ITEMS {itemid=2456, count=1}, -- bow {itemid=2175, count=1}, -- spell book {itemid=2544, count=100}, -- 100 arrows {itemid=2173, count=1} -- aol }, { -- KNIGHT ITEMS {itemid=2423, count=1}, -- clerical mace {itemid=2383, count=1}, -- spike sword {itemid=2430, count=1}, -- knight axe {itemid=2518, count=1}, -- beholder shield {itemid=2175, count=1}, -- spell book {itemid=2173, count=1} -- aol } } 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, 90808) if hasReceivedFirstItems ~= TRUE then --[[local backpack = ]]doPlayerAddItem(cid, 1988, TRUE) 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_BLUE, "Welcome to Avolutions here is your items!") end setPlayerStorageValue(cid, 90808, TRUE) end end return TRUE end AND THEN IN CONSOLE vvvvvvvvvvvv [01/03/2009 15:41:02] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/firstitems.lua [01/03/2009 15:41:02] data/creaturescripts/scripts/firstitems.lua:21: '}' expected (to close '{' at line 17) near '{'
 
-- Colandus @ 1337Rox0r
-- Slighty Modified by ArtofWork
-- How to think when adding items? Try fill the hands first, then the arrow slot. This because armor etc won't go to hand slot (Vocation items will be given before commonItems, as you usually use to have
-- the hand/arrow slot items there and not in common items. Take a look at how I did it:

local commonItems = {
-- ITEMS ALL VOC RECEIVE
{itemid=2457, count=1}, -- steel helmet
{itemid=2463, count=1}, -- plate armor
{itemid=2647, count=1}, -- plate legs
{itemid=2170, count=5}, -- 5 crystal coins
{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}, -- spell book
{itemid=2173, count=1} -- aol
{itemid=8900, count=1} -- spellbook of enlightenment
{itemid=8870, count=1} -- spirit cloak
},
{ -- DRUID ITEMS
{itemid=2182, count=1}, -- snakebite rod
{itemid=2175, count=1}, -- spellbook
{itemid=2173, count=1} -- aol
{itemid=8900, count=1} -- spellbook of enlightenment
{itemid=8870, count=1} -- spirit cloak
},
{ -- PALADIN ITEMS
{itemid=2456, count=1}, -- bow
{itemid=2175, count=1}, -- spell book
{itemid=2544, count=100}, -- 100 arrows
{itemid=2173, count=1} -- aol
},
{ -- KNIGHT ITEMS
{itemid=2423, count=1}, -- clerical mace
{itemid=2383, count=1}, -- spike sword
{itemid=2430, count=1}, -- knight axe
{itemid=2518, count=1}, -- beholder shield
{itemid=2175, count=1}, -- spell book
{itemid=2173, count=1} -- aol
}
}

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, 90808)

if hasReceivedFirstItems ~= TRUE then
--[[local backpack = ]]doPlayerAddItem(cid, 1988, TRUE)

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_BLUE, "Welcome to Avolutions here is your items!")
end
setPlayerStorageValue(cid, 90808, TRUE)
end
end
return TRUE
end



And then in console vvvvvv
[01/03/2009 15:41:02] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/firstitems.lua
[01/03/2009 15:41:02] data/creaturescripts/scripts/firstitems.lua:21: '}' expected (to close '{' at line 17) near '{'
 
i want to update my tfs version but duno how :/ any 1 can help me ?? you ill get tutor in my serv + V.I.P my server is mojje.hopto.org 162 ppl record.
 
Hello I have a Problem..

On this TFS which I've downloaded the spawns are deleting auto. BUT IDK WHY please help me!!
 
gunz, haleko, maddz, Rith, Sonix, |Haxor| ARE WATCHIN THIS THREAD SO HELP US ;P
 
Command bugg? EXAMPLE
/n magic plate armor 1
"There is not enough room."
In console LuaDoCreateNpc
 
@MindFreak

Try to use
CORRECT:
/i magic plate armor (this will appear 1 eplate)
/i crystal coin (this will appear 100cc)

INCORECCT:
/n crystal coin 100 (not working)
/i crystal coin 50 (No working)
/n magic plate armor 1(no working)
 
@MindFreak

/n Is For Npc
/i Is For Item name/ID

Like /i Crystal coin (Will Get 100cc)
or /i 2160 (Will Get 100cc)
 
@MindFreak

create items works in this way:

/n Is For Npc
/i Is For Item name/ID

Like /i Crystal coin (Will Get 100cc)
or /i 2160 (Will Get 100cc)

infact create items work in this way:

/i name of the item, n
 
Status
Not open for further replies.
Back
Top