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

Too many items are added on login - DEBUG?

GarQet

Own3d!
Joined
Feb 10, 2009
Messages
1,381
Solutions
14
Reaction score
81
Hello!
I have a small problem with my script.
When a player logs into the game script give him backpack with items:
Code:
	if getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).itemid ~= 1988 then
	local bp = doPlayerAddItem(cid, 1988, 1)
		doAddContainerItem(bp, 7434, 1)
		doAddContainerItem(bp, 7429, 1)
	local bag1 = doAddContainerItem(bp, 1992, 1)
	for i = 1, 8  do
	local bag1mw = doAddContainerItem(bag1, 1992, 1)
		for i = 1, 8  do
			doAddContainerItem(bag1mw, 2293, 2)	
		end
	end
		doAddContainerItem(bp, 2293, 2)
	local bag2 = doAddContainerItem(bp, 1993, 1)
	for i = 1, 4  do
	local bag2fb = doAddContainerItem(bag2, 1993, 1)
	local bag2d = doAddContainerItem(bag2, 1996, 1)
		for i = 1, 8  do
			doAddContainerItem(bag2fb, 2305, 3)
			doAddContainerItem(bag2d, 2261, 3)
		end
	end
		doAddContainerItem(bp, 2305, 3)
	local bag3 = doAddContainerItem(bp, 1995, 1)
	for i = 1, 8  do
	local bag3uh = doAddContainerItem(bag3, 1995, 1)
		for i = 1, 8  do
			doAddContainerItem(bag3uh, 2273, 3)	
		end
	end
		doAddContainerItem(bp, 2273, 3)
	local bag4 = doAddContainerItem(bp, 1993, 1)
	for i = 1, 8  do
	local bag4ghp = doAddContainerItem(bag4, 2000, 1)
		for i = 1, 8  do
			doAddContainerItem(bag4ghp, 7591, 20)	
		end
	end
		doAddContainerItem(bp, 7591, 1)
	local bag5 = doAddContainerItem(bp, 1994, 1)
	for i = 1, 8  do
	local bag5mp = doAddContainerItem(bag5, 2001, 1)
		for i = 1, 8  do
			doAddContainerItem(bag5mp, 7620, 20)	
		end
	end
		doAddContainerItem(bp, 7620, 1)
	local bag6 = doAddContainerItem(bp, 5801, 1)
		doAddContainerItem(bag6, 2207, 2)
		doAddContainerItem(bag6, 2209, 2)
		doAddContainerItem(bag6, 2208, 2)
		doAddContainerItem(bag6, 2214, 2)
		doAddContainerItem(bag6, 2169, 2)
		doAddContainerItem(bag6, 2197, 3)
		doAddContainerItem(bag6, 2197, 3)
		doAddContainerItem(bag6, 5710, 1)
		doAddContainerItem(bag6, 2120, 1)
		doAddContainerItem(bag6, 2420, 1)
		doAddContainerItem(bp, 2789, 100)
	end
All is good without one thing... When player gets this backpack with full equipment automatically throw him out of the game by DEBUG :blink:?
The Tibia client encountered a critical error and had to be stoped.

A detailed error report has been written to the error file witch you are asked to submit at your next login.


Please help me with it. Yours GarQet.
 
this happend to me ones and i fixed its realy ease i removed script and enter with a CM character then made items one by one(items of the script) untill one of them give me debug then i deleted that item from the script
 
this happend to me ones and i fixed its realy ease i removed script and enter with a CM character then made items one by one(items of the script) untill one of them give me debug then i deleted that item from the script

a lot of fun with it will, maybe can somehow get around this?
 
use this ;)
Code:
function onLogin(cid)
local storage = getPlayerStorageValue(cid, 9192)
    if storage < 1 then
        if getPlayerVocation(cid) == 1 then
            doPlayerAddItem(cid, 2190, 1)--Wand Of Vortex
            doPlayerAddItem(cid, 2175, 1)--Spellbook
            doPlayerAddItem(cid, 8820, 1)--Mage hat
            doPlayerAddItem(cid, 8819, 1)--Magician Robe
            doPlayerAddItem(cid, 2648, 1)--Chain Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
            doPlayerAddItem(cid, 2152, 25)--Money
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Sorcerer items.")
        end
        if getPlayerVocation(cid) == 2 then
            doPlayerAddItem(cid, 2182, 1)--Snakekbite Rod
            doPlayerAddItem(cid, 2175, 1)--Spellbook
            doPlayerAddItem(cid, 8820, 1)--Mage hat
            doPlayerAddItem(cid, 8819, 1)--Magician Robe
            doPlayerAddItem(cid, 2648, 1)--Chain Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
            doPlayerAddItem(cid, 2152, 25)--Money
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Druid items.")
        end
        if getPlayerVocation(cid) == 3 then
            doPlayerAddItem(cid, 2389, 2)--Spear
            doPlayerAddItem(cid, 2530, 1)--Copper Shield
            doPlayerAddItem(cid, 2660, 1)--Cloak
            doPlayerAddItem(cid, 8923, 1)--Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
			doPlayerAddItem(cid, 2456, 1)--Bow
            doPlayerAddItem(cid, 2152, 25)--Money
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Paladin items.")
        end
        if getPlayerVocation(cid) == 4 then
            doPlayerAddItem(cid, 2481, 1)--Soldier Helmet
            doPlayerAddItem(cid, 2465, 1)--Brass Armor
            doPlayerAddItem(cid, 2509, 1)--Steel Shield
            doPlayerAddItem(cid, 2478, 1)--Brass Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
            doPlayerAddItem(cid, 8602, 1)--Sword
            doPlayerAddItem(cid, 2439, 1)--Club
            doPlayerAddItem(cid, 8601, 1)--Axe
            doPlayerAddItem(cid, 2152, 25)--Money  
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Knight items.")
        end
            setPlayerStorageValue(cid, 9192, 1)
    end
     return true
end
 
use this ;)
Code:
function onLogin(cid)
local storage = getPlayerStorageValue(cid, 9192)
    if storage < 1 then
        if getPlayerVocation(cid) == 1 then
            doPlayerAddItem(cid, 2190, 1)--Wand Of Vortex
            doPlayerAddItem(cid, 2175, 1)--Spellbook
            doPlayerAddItem(cid, 8820, 1)--Mage hat
            doPlayerAddItem(cid, 8819, 1)--Magician Robe
            doPlayerAddItem(cid, 2648, 1)--Chain Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
            doPlayerAddItem(cid, 2152, 25)--Money
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Sorcerer items.")
        end
        if getPlayerVocation(cid) == 2 then
            doPlayerAddItem(cid, 2182, 1)--Snakekbite Rod
            doPlayerAddItem(cid, 2175, 1)--Spellbook
            doPlayerAddItem(cid, 8820, 1)--Mage hat
            doPlayerAddItem(cid, 8819, 1)--Magician Robe
            doPlayerAddItem(cid, 2648, 1)--Chain Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
            doPlayerAddItem(cid, 2152, 25)--Money
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Druid items.")
        end
        if getPlayerVocation(cid) == 3 then
            doPlayerAddItem(cid, 2389, 2)--Spear
            doPlayerAddItem(cid, 2530, 1)--Copper Shield
            doPlayerAddItem(cid, 2660, 1)--Cloak
            doPlayerAddItem(cid, 8923, 1)--Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
			doPlayerAddItem(cid, 2456, 1)--Bow
            doPlayerAddItem(cid, 2152, 25)--Money
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Paladin items.")
        end
        if getPlayerVocation(cid) == 4 then
            doPlayerAddItem(cid, 2481, 1)--Soldier Helmet
            doPlayerAddItem(cid, 2465, 1)--Brass Armor
            doPlayerAddItem(cid, 2509, 1)--Steel Shield
            doPlayerAddItem(cid, 2478, 1)--Brass Legs
            doPlayerAddItem(cid, 2173, 1)--Amulet of loss
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 2004, 1)--Golden Backpack
            doPlayerAddItem(cid, 8602, 1)--Sword
            doPlayerAddItem(cid, 2439, 1)--Club
            doPlayerAddItem(cid, 8601, 1)--Axe
            doPlayerAddItem(cid, 2152, 25)--Money  
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Knight items.")
        end
            setPlayerStorageValue(cid, 9192, 1)
    end
     return true
end

For what :blink:?
I want to run my script.
 
Back
Top