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

..Help me in auto promo for vips

fewdox

New Member
Joined
Jan 9, 2010
Messages
244
Reaction score
2
Location
192.168.1.2 else try 127.0.0.1
--[[
Promotion_OnAdvance
|-------------------|
(> Author: Cybermaster
(> Revised by: Shawak
(> Scripted in: TFS 0.3.6pl1
(> OtLand
--]]

function onAdvance(cid, skill, oldLevel, newLevel)

local _SETUP = {
level = 20, --level where the player will obtain the promotion when he reaches it
type = MESSAGE_STATUS_CONSOLE_ORANGE, --the message class
text = "You have just been promoted to " .. getPlayerVocationName(cid) .."!",
effect = 37 --the effect for the leveling up animation
}

if skill == SKILL__LEVEL and newLevel < _SETUP.level then
return true
end

if getPlayerPromotionLevel(cid) ~= 0 then
return true
end

local p = getPlayerPosition(cid)

local positions = {
{ pos= {x=p.x+1,y=p.y,z=p.z}, delay = 100, delay2 = 900},
{ pos= {x=p.x+1,y=p.y+1,z=p.z}, delay = 200, delay2 = 980},
{ pos= {x=p.x,y=p.y+1,z=p.z}, delay = 300, delay2 = 1060},
{ pos= {x=p.x-1,y=p.y+1,z=p.z}, delay = 400, delay2 = 1140},
{ pos= {x=p.x-1,y=p.y,z=p.z}, delay = 500, delay2 = 1220},
{ pos= {x=p.x-1,y=p.y-1,z=p.z}, delay = 600, delay2 = 1300},
{ pos= {x=p.x,y=p.y-1,z=p.z}, delay = 700, delay2 = 1380},
{ pos= {x=p.x+1,y=p.y-1,z=p.z}, delay = 800, delay2 = 1460}
}

for i = 1, 8 do
addEvent(doSendDistanceShoot, positions.delay, positions.pos, p, _SETUP.effect)
addEvent(doSendDistanceShoot, positions.delay2, positions.pos, p, _SETUP.effect)
end

addEvent(doSendMagicEffect, 900, p, 49)
setPlayerPromotionLevel(cid, 1)
doPlayerSendTextMessage(cid, _SETUP.type, _SETUP.text)
doSendAnimatedText(p, "Promoted!", math.random(1,255))
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
doPlayerSave(cid, true)
return true
end


i need to put if get Player Storage (555555) .

if get player storage 55555 = vip .. he got promotion level 2

vocations 9 , 10 , 11 , 12
 
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
queststatus = getPlayerStorageValue(cid,555555)
if queststatus > 1 then
setPlayerPromotionLevel(cid, 2)
end
return true
end
 
Try it:
Lua:
local config  = {
level = 20,
msgtype = MESSAGE_STATUS_CONSOLE_ORANGE,
effect = 39
}
function onAdvance(cid, skill, oldlevel, newlevel)
	if newlevel == config.level and skill >= SKILL__LEVEL and getPlayerStorageValue(cid, 2136) == -1 then
	setPlayerStorageValue(cid, 2136, 1)
	doPlayerSendTextMessage(cid, config.msgtype, "You have promoted!")
	doSendMagicEffect(getPlayerPosition(cid),config.effect)
	doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
end
return TRUE
end
 
Lua:
  function onAdvance(cid, skill, oldLevel, newLevel)
queststatus = getPlayerStorageValue(cid,555555)
queststatus2 = getPlayerStorageValue(cid,66335)
if queststatus > 1 and queststatus2 == -1 then
setPlayerPromotionLevel(cid, 2)
setPlayerStorageValue(cid, 66335, 1)
end
return true
end
Try. What errors?
 
use codes next time please
Lua:
---- {scripted by Joseph15}

local level = 2000  -- Level to get auto promotion
local vocations = (1,4)
local storage = 12345   --- vip storage value

function onAdvance(cid, skill, oldLevel, newLevel)
	queststatus = getPlayerStorageValue(cid,3547) --- storage id for the thingy
	if queststatus == -1 then
		if getPlayerStorageValue == storage then
			if getPlayerLevel(cid) >= level then
				if getPlayerVocation(cid) == vocations then
					if getPlayerVocation(cid) == 1 then
						setPlayerVocation(cid) == 5
						setPlayerStorageValue(cid,3547,1)
						doSendMagicEffect(getThingPos(cid), 31)
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a sorcerer to a master sorcerer!")
					end
					if getPlayerVocation(cid) == 2 then
						setPlayerVocation(cid) == 6 
						setPlayerStorageValue(cid,3547,1)
						doSendMagicEffect(getThingPos(cid), 31)
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a druid to an elder druid!")
					end
					if getPlayerVocation(cid) == 3 then
						setPlayerVocation(cid) == 7
						setPlayerStorageValue(cid,3547,1)
						doSendMagicEffect(getThingPos(cid), 31)
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a paladin to a royal paladin!")
					end
					if getPlayerVocation(cid) == 4 then
						setPlayerVocation(cid) == 8
						setPlayerStorageValue(cid,3547,1)
						doSendMagicEffect(getThingPos(cid), 31)
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a knight to an elite knight!")
					end
				end
			end
		end
	end
return TRUE
end

REP++ ME IF I HELPED YOU :ninja:
 
Last edited:
you want ppl to promote to elite or to custom vocations 9,10,11,12?

@edit
Lua:
local storage = 12345   --- vip storage value
This is the vip storage value... any vip player have a storage value... edit this to ur vip system storage value

but this is the quest storage value
Lua:
setPlayerStorageValue(cid,3547,1)

if i helped you please REP++ me
 
Last edited:
Lua:
---- {scripted by Joseph15}

local level = 2000  -- Level to get auto promotion
local vocations = (5,8)
local storage = 12345   --- vip storage value

function onAdvance(cid, skill, oldLevel, newLevel)
        queststatus = getPlayerStorageValue(cid,3547) --- storage id after u have been promoted
        if queststatus == -1 then
                if getPlayerStorageValue == storage then
                        if getPlayerLevel(cid) >= level then
                                if getPlayerVocation(cid) == vocations then
                                        if getPlayerVocation(cid) == 5 then
                                                setPlayerVocation(cid) == 9
                                                setPlayerStorageValue(cid,3547,1)
                                                doSendMagicEffect(getThingPos(cid), 31)
                                                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a master sorcerer to a new vocation name!")
                                        end
                                        if getPlayerVocation(cid) == 6 then
                                                setPlayerVocation(cid) == 10 
                                                setPlayerStorageValue(cid,3547,1)
                                                doSendMagicEffect(getThingPos(cid), 31)
                                                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from an elder druid to a new vocation name!")
                                        end
                                        if getPlayerVocation(cid) == 7 then
                                                setPlayerVocation(cid) == 11
                                                setPlayerStorageValue(cid,3547,1)
                                                doSendMagicEffect(getThingPos(cid), 31)
                                                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a royal paladin to a New vocation Name!")
                                        end
                                        if getPlayerVocation(cid) == 8 then
                                                setPlayerVocation(cid) == 12
                                                setPlayerStorageValue(cid,3547,1)
                                                doSendMagicEffect(getThingPos(cid), 31)
                                                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from an elite knight to a New vocation name!")
                                        end
                                end
                        end
                end
        end
return TRUE
end

Change the word new vocation name to the new name when promoted from old vocation to new ones

Rep++ me! :ninja:
 
Code:
local level = 2000  -- Level to get auto promotion
local storage = 12345 -- vip storage value

function onAdvance(cid, skill, oldLevel, newLevel)
	if newLevel >= level and getPlayerPromotionLevel(cid) == 1 and getPlayerStorageValue(cid, storage) == 1 then
		doPlayerSetPromotionLevel(cid, 2)
		doSendMagicEffect(getThingPos(cid), 31)
		local cur = getPlayerVocation(cid)
		doCreatureSay(cid, 'You have been promoted from ' .. getVocationInfo(cur-4).description .. ' to ' .. getVocationInfo(cur).description .. '!', TALKTYPE_ORANGE_1)
	end
	return true
end
 
Promotion after buy vip

hello. i need a system for promotion player after buy vip. exanple refugiaot.com
have this system
help me

sorry for my bad inglish
 
Back
Top