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

[SIMPLE] Vocation script

Forum General

1st Donator Division
Joined
May 6, 2010
Messages
200
Reaction score
1
Location
Toronto, Canada
Anyone know what is exactly wrong with this?
It is basically a simple script where you click on an object in the game and it changes your vocation.
When I use the current script in the game, it does the smoke on the object and says "You already chose your vocation!". I want it to say "You are now a druid!".
I have a feeling that something is wrong in the storage value, but I'm not exactly sure.

Here is adruid.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
stor = getPlayerStorageValue(cid, 10050)

	if isPlayer(cid) and stor == 0 then
		doSendMagicEffect(fromPosition, 13)
		doPlayerSetVocation(cid, 2)
		doPlayerSetStorageValue(cid, 10050, 1)
		doCreatureSay(cid, "You are now a druid!", TALKTYPE_ORANGE_1)
	else
		doSendMagicEffect(fromPosition, 2)
		doCreatureSay(cid, "You already chose your vocation!", TALKTYPE_ORANGE_1)
	end
	return true
end
 
Back
Top Bottom