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

Click Get Vocation x

LUA:
local itemID = xxxx -- enter itemid here --
local voc = x -- enter voc id here --

function onUse(cid, item, frompos, item2, topos)
if item.itemid == itemID then
doPlayerAddVocation(cid, voc)
doRemoveItem(cid, item.uid)
doPlayerSendTextMessage(cid,22,"You Are Now A "..voc.."."")
end
return true
end

this is not tested and created via mobile so tell me if it works or no :)
 
LUA:
local itemID = xxxx -- enter itemid here --
local voc = x -- enter voc id here --

function onUse(cid, item, frompos, item2, topos)
if item.itemid == itemID then
doPlayerAddVocation(cid, voc)
doRemoveItem(cid, item.uid)
doPlayerSendTextMessage(cid,22,"You Are Now A "..voc.."."")
end
return true
end

this is not tested and created via mobile so tell me if it works or no :)

Rofl, via mobile? Wat!
 
Rofl, via mobile? Wat!

Small fingers ftw(?

@Ont:
LUA:
local voc = x -- enter voc id here --
function onUse(cid, item, frompos, item2, topos)
doPlayerAddVocation(cid, voc)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22,"You Are Now A "..getPlayerVocation(cid)..".")
return true
end
 
More optional:

LUA:
local vocations = {1,2,3,4,5,6,7,8} -- All vocation ids.
local vocation = 5 -- Set the players vocation with this vocation id.
function onUse(cid, item, frompos, item2, topos)
	doPlayerSetVocation(cid, vocations[vocation])
	doPlayerSendTextMessage(cid, 22, "You are now a ".. getPlayerVocationName(vocation) ..".")
	doSendMagicEffect(getCreaturePosition(cid), 12)
	doRemoveItem(item.uid, 1)
return true
end
 
LUA:
local vocid = 4 -- id vocation 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doPlayerSetVocation(cid, vocid)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are now a ".. getVocationInfo(vocid).name..".")
	doSendMagicEffect(getCreaturePosition(cid), 12)
	doRemoveItem(item.uid, 1)
	return true
end
 
Back
Top