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

Lua Vocation Select

CynterO

Active Member
Joined
Nov 21, 2011
Messages
457
Reaction score
30
Location
Norway
Hello, i got a problem to create so when you click on example 1444 you become a knight.

Can anyone help?
giving rep if u helped me!

yours

CynterO
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(not isInArray({4, 8}, getPlayerVocation(cid))) then
		doPlayerSetVocation(cid, 4)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
		doCreatureSay(cid, "You are a Knight!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	else
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	return true
end

Where shall i put it?
movements?

data/actions/scripts/script.lua
 
Last edited:
Back
Top