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

Action Promotion using action :)

Lua:
local promotion = 1
local itemId = 2159 -- here item id
local count = 100 -- how many items needed
local level = 200 -- level needed to use this item

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerPromotionLevel(cid) < promotion then
		if getPlayerLevel(cid) >= level then
			if doPlayerRemoveItem(cid, itemId, count) then
				doPlayerSetPromotionLevel(cid, 1)
				doCreatureSay(cid, "Promoted !", TALKTYPE_ORANGE_1)
			else
				doPlayerSendCancel(cid, "you need ".. count .. " of " .. getItemNameById(itemId) .. " to be promoted")
			end
		else
			doPlayerSendCancel(cid, "you don't have enough level")
		end
	else
		doPlayerSendCancel(cid, "You Already Promoted")
	end
	return true
end
thx bro :) haha but really i am not very keen on make scripts at the moment just i go otland check few requests then in 5 min i go logout :) so i make errors because i do more than 1 script in 5 min :)
 
heheh sorry Guys but i want it when use this script get effect and to buy second promotion you must have first promotion hope u can help me
 
thx bro :) haha but really i am not very keen on make scripts at the moment just i go otland check few requests then in 5 min i go logout :) so i make errors because i do more than 1 script in 5 min :)

Egyptian Logic.
 
is to make a script promotion vip? type when the player turning his vocation vip automatically switches to a vocation vip vip I use this system:

function onUse(cid, item, fromPosition, itemEx, toPosition)

local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}

local days = 30 -- dias que serão adicionados
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13540)
local timenow = os.time()

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
doPlayerSetVocation(cid, voc)
setPlayerStorageValue(cid, 13540, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end

return TRUE
end

vip type system would be like this:
id: 1 Shacal Mage> id: 5 VIP Mage
id: 2 Shacal Druid> id: 6 VIP Druid
id: 3 Shacal Pally> id: 7 Vip Pally
id: 4 Shacal Kina> id: 8 VIP Kina

I just would like shacal mage when I turn my vocation change to vip Vip Mage, thank you being able to help me.
 
Last edited:
Back
Top