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

will this script work?

IMac

entrepreneur
Joined
May 31, 2009
Messages
2,482
Reaction score
16
Location
Pluto
im concerned about the db query since i copied it and edited it i found it in other thread:$
LUA:
function(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerAccess(cid) < 2 then
		db.query('UPDATE `players` SET `group_id` = 2, `id` = ' .. getPlayerGUID(cid))
			doSendAnimatedText(pos, you have became a tutor!, 21[, cid])
	elseif getPlayerAccess(cid) > 3 then
		doSendAnimatedText(pos, you already a tutor, 21[, cid])
		return true
	end
 
LUA:
function onUse(cid,item,fromPos,itemEx,toPos)
local g,v = getPlayerGroupId(cid),getThingPos(cid)
	if g > 3 then
		doPlayerSetGroupId(cid,3)
		doSendAnimatedText(v,'You became tutor!',COLOR_GREEN)
		doSendMagicEffect(v,CONST_ME_MAGIC_GREEN)
	else
		doSendAnimatedText(v,'You\'re already a tutor!',COLOR_RED)
		doSendMagicEffect(v,CONST_ME_POFF)
	end
	return true
end
 
Back
Top