• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved VIP Promotion with a Item (Action)

Xeikh

詠春 ☯
Joined
Oct 23, 2009
Messages
724
Reaction score
17
Hello, im looking for a item that promote a VIP Player to a second promotion...

The features would be the item can be only used by a VIP Player, that player need level 100 and that player have to be first promoted (master, elder, elite or royal)

something else i want to know if is possible... If player vip time ends, the vip promotion goes -1? (Like premium when have promotion and when the premium time ends, the promotion get off untill get premium time again)

this something i tried to use but theres errors:S

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local a = getPlayerPromotionLevel(cid)
	if getPlayerVipDays(cid) > 0 then
		if a == 0 then else 
		doPlayerSendCancel(cid, 'You need to be promoted in order and have VIP account to use this item.')
	elseif a == 1 then
		doPlayerSendCancel(cid, 'Your\'re already promoted!')
	else
		doPlayerSetPromotionLevel(cid, 1)
		doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
	end
	return true
		end
	end

Please help me *-*
 
Last edited:
LUA:
local a = getPlayerPromotionLevel(cid)
local item = 123      <-- ITEM ID

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerItemCount(cid, item) >= 1 and getPlayerVipDays(cid) > 0 then
		setPlayerPromotionLevel(cid, 2)
		doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
		doPlayerRemoveItem(cid, item, 1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
	else
		doPlayerSendCancel(cid, "You need to be promoted in order and have VIP account to use this item.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		else
		doPlayerSendCancel(cid, 'Your\'re already promoted!')
	end
return TRUE
end
 
LUA:
local a = getPlayerPromotionLevel(cid)
local item = 123      <-- ITEM ID

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerItemCount(cid, item) >= 1 and getPlayerVipDays(cid) > 0 then
		setPlayerPromotionLevel(cid, 2)
		doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
		doPlayerRemoveItem(cid, item, 1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
	else
		doPlayerSendCancel(cid, "You need to be promoted in order and have VIP account to use this item.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		else
		doPlayerSendCancel(cid, 'Your\'re already promoted!')
	end
return TRUE
end

.lua13: 'end' expected (to close line 'if' at line 5) near 'else' :S
 
try now
LUA:
local a = getPlayerPromotionLevel(cid)
local item = 123 <-- ITEM ID
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerItemCount(cid, item) >= 1 and getPlayerVipDays(cid) > 0 then
		setPlayerPromotionLevel(cid, 2)
		doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
		doPlayerRemoveItem(cid, item, 1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
	else
		doPlayerSendCancel(cid, "You need to be promoted in order and have VIP account to use this item.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		else
		doPlayerSendCancel(cid, 'Your\'re already promoted!')
	end
	end
return TRUE
end
 
I really don't know if that shit will work, btw if don't work, sorry it's 03:57 a.m and I need go sleep.

LUA:
local item = 123 <-- ITEM ID
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerItemCount(cid, item) >= 1 then
		if getPlayerVipDays(cid) > 0 then
			if getPlayerPromotionLevel(cid) > 1 then
				setPlayerPromotionLevel(cid, 2)
				doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
				doPlayerRemoveItem(cid, item, 1)
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
			else
				doPlayerSendCancel(cid, 'Your\'re already promoted!')
			end
		else
			doPlayerSendCancel(cid, "You need have VIP account to use this item.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, 'Sorry, not possible. You need an apple to use.')
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end
return TRUE
end
 
I don't get it, what EXCATLY is it that you want? Because I keep reading the script over and over again but it's so bad I can't understand what you guys are trying to do here lol
 
LUA:
local days = [90]
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerPromotionLevel(cid) == 1 and getPlayerPremiumDays(cid) == 0 then
		doRemoveItem(item.uid, 1)
		doPlayerAddPremiumDays(cid, days)
		setPlayerPromotionLevel = 2
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations! You have been promoted to " ..getPlayerVocation(cid).. ".")
	elseif getPlayerPremiumDays(cid) >= 1 then
		doPlayerAddPremiumDays(cid, days)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
	else
	end
	return true
end



LUA:
function onLogin(cid)
	if not isPremium(cid) and getPlayerPromotionLevel(cid) == 2 then
		setPlayerPromotionLevel = 1
	end
end
 
LUA:
local days = [90]
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerPromotionLevel(cid) == 1 and getPlayerPremiumDays(cid) == 0 then
		doRemoveItem(item.uid, 1)
		doPlayerAddPremiumDays(cid, days)
		setPlayerPromotionLevel = 2
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations! You have been promoted to " ..getPlayerVocation(cid).. ".")
	elseif getPlayerPremiumDays(cid) >= 1 then
		doPlayerAddPremiumDays(cid, days)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
	else
	end
	return true
end



LUA:
function onLogin(cid)
	if not isPremium(cid) and getPlayerPromotionLevel(cid) == 2 then
		setPlayerPromotionLevel = 1
	end
end

This like im looking for, let me test it :D
 
Back
Top