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

Lua Guild and script problem!

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
Hello there, i dno if anyonelse is having this problem but anyway i do


You'll need to be offline when creating a guild and joining it, same goes for inviting others.

Example: The character that you wanna invite need to be offline when you are inviting him and he also needs to be offline when joining it! Othwerwise the invitation will disappear.

Anyone know why?

The other problem is this

Error - action interface]
Data/scripts/other/yalaharcreate.lua:eek:nuse
Description:
Dara/actions/scripts/other/yalaharcreate.lua:32: attempt to index boloean value

Stack tracback:
Data/actions/scripts/other/yalaharcreate.lua:32: in function <data/actions/scripts/other/yalaharcreate.lua:24>

Lua:
local t = {
-- from, to, itemid[, count]
	{1, 36},
	{37, 46, 2148, 80},
	{47, 55, 2148, 50},
	{56, 64, 2671, 5},
	{65, 73, 2789, 5},
	{74, 81, 7620},
	{82, 87, 7618},
	{88, 92, 9811},
	{93, 96, 9808},
	{97, 100, 2213}
}
 
function doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
	for i, tid in ipairs(getSpectators(position or getThingPos(cid), radiusx, radiusy, false)) do
		if(isPlayer(tid) == TRUE) then
			doCreatureSay(cid, text, type, false, tid, position or getThingPos(cid))
		end
	end
	return TRUE
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if os.time() - getPlayerStorageValue(cid, 65000) >= 3600 then
		setPlayerStorageValue(cid, 65000, os.time())
		local rand = math.random(100)
		for i = 1, #t do
			local k = t[i]
			if rand >= k[1] and rand <= k[2] then
				if k[3] then
					local itemid, count, article = k[3], k[4] or 1, getItemInfo(itemid).article
					doPlayerAddItem(cid, itemid, count)
					doCreatureSayWithRadius(cid, count > 1 and 'You found ' .. count .. ' ' .. getItemInfo(itemid).plural .. '.' or 'You found ' .. (article ~= '' and article .. ' ' or '') .. getItemInfo(itemid).name .. '.', TALKTYPE_ORANGE_1, 1, 1)
				else
					doCreatureSayWithRadius(cid, 'You found nothing useful.', TALKTYPE_ORANGE_1, 1, 1)
				end
				break
			end
		end
	else
		doCreatureSayWithRadius(cid, 'You found nothing useful.', TALKTYPE_ORANGE_1, 1, 1)
	end
	return true
end
 
Lua:
local t = {
-- from, to, itemid[, count]
	{1, 36},
	{37, 46, 2148, 80},
	{47, 55, 2148, 50},
	{56, 64, 2671, 5},
	{65, 73, 2789, 5},
	{74, 81, 7620},
	{82, 87, 7618},
	{88, 92, 9811},
	{93, 96, 9808},
	{97, 100, 2213}
}
 
function doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
	for i, tid in ipairs(getSpectators(position or getThingPos(cid), radiusx, radiusy, false)) do
		if isPlayer(tid)  then
			doCreatureSay(cid, text, type, false, tid, position or getThingPos(cid))
		end
	end
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if os.time() - getPlayerStorageValue(cid, 65000) >= 3600 then
		setPlayerStorageValue(cid, 65000, os.time())
		local rand = math.random(100)
		for i = 1, #t do
			local k = t[i]
			if rand >= k[1] and rand <= k[2] then
				if k[3] then
					local itemid, count = k[3], k[4] or 1
					local article = getItemInfo(itemid).article
					doPlayerAddItem(cid, itemid, count)
					doCreatureSayWithRadius(cid, count > 1 and 'You found ' .. count .. ' ' .. getItemInfo(itemid).plural .. '.' or 'You found ' .. (article ~= '' and article .. ' ' or '') .. getItemInfo(itemid).name .. '.', TALKTYPE_ORANGE_1, 1, 1)
				else
					doCreatureSayWithRadius(cid, 'You found nothing useful.', TALKTYPE_ORANGE_1, 1, 1)
				end
				break
			end
		end
	else
		doCreatureSayWithRadius(cid, 'You found nothing useful.', TALKTYPE_ORANGE_1, 1, 1)
	end
	return true
end
 
Back
Top