• 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 New vocation (LUA Script)

Rewexx

New Member
Joined
Oct 22, 2008
Messages
36
Reaction score
0
Hello, I am wondering if someone can give me a working script..

I have created new vocations today and all of them works perfectly. However, I want if a player is using the "scroll" they will be promoted to a VIP Vocation.

So for an example, if a sorcerer or master sorcerer is using it, they should be upgraded from 1 or 4 to 9 (Vip Sorcerer)

Same for the other vocations, please help me with this! I'd appreciate.

here is the vip vocation id's:

VIP Sorcerer = 9
VIP Druid = 10
VIP Paladin = 11
VIP Knight = 12
 
Hello, I am wondering if someone can give me a working script..

I have created new vocations today and all of them works perfectly. However, I want if a player is using the "scroll" they will be promoted to a VIP Vocation.

So for an example, if a sorcerer or master sorcerer is using it, they should be upgraded from 1 or 4 to 9 (Vip Sorcerer)

Same for the other vocations, please help me with this! I'd appreciate.

here is the vip vocation id's:

VIP Sorcerer = 9
VIP Druid = 10
VIP Paladin = 11
VIP Knight = 12


This should work ( i hope )

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerVocation(cid) == 1 then
		doPlayerSetVocation(cid, 9)
		doCreatureSay(cid, "You've been promoted to: VIP Sorcerer!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 2 then
		doPlayerSetVocation(cid, 10)
		doCreatureSay(cid, "You've been promoted to: VIP Druid!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 3 then
		doPlayerSetVocation(cid, 11)
		doCreatureSay(cid, "You've been promoted to: VIP Paladin!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 4 then
		doPlayerSetVocation(cid, 12)
		doCreatureSay(cid, "You've been promoted to: VIP Knight!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
end


EDIT: Doing now for vocations 5-8 sorry i missed them :P
 
This should work ( i hope )

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerVocation(cid) == 1 then
		doPlayerSetVocation(cid, 9)
		doCreatureSay(cid, "You've been promoted to: VIP Sorcerer!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 2 then
		doPlayerSetVocation(cid, 10)
		doCreatureSay(cid, "You've been promoted to: VIP Druid!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 3 then
		doPlayerSetVocation(cid, 11)
		doCreatureSay(cid, "You've been promoted to: VIP Paladin!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 4 then
		doPlayerSetVocation(cid, 12)
		doCreatureSay(cid, "You've been promoted to: VIP Knight!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 5 then
		doPlayerSetVocation(cid, 9)
		doCreatureSay(cid, "You've been promoted to: VIP Sorcerer!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 6 then
		doPlayerSetVocation(cid, 10)
		doCreatureSay(cid, "You've been promoted to: VIP Druid!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 7 then
		doPlayerSetVocation(cid, 11)
		doCreatureSay(cid, "You've been promoted to: VIP Paladin!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 8 then
		doPlayerSetVocation(cid, 12)
		doCreatureSay(cid, "You've been promoted to: VIP Knight!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
end


Now it may do :D
 
This should work ( i hope )

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerVocation(cid) == 1 then
		doPlayerSetVocation(cid, 9)
		doCreatureSay(cid, "You've been promoted to: VIP Sorcerer!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 2 then
		doPlayerSetVocation(cid, 10)
		doCreatureSay(cid, "You've been promoted to: VIP Druid!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 3 then
		doPlayerSetVocation(cid, 11)
		doCreatureSay(cid, "You've been promoted to: VIP Paladin!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 4 then
		doPlayerSetVocation(cid, 12)
		doCreatureSay(cid, "You've been promoted to: VIP Knight!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
end


EDIT: Doing now for vocations 5-8 sorry i missed them :P

when i logout i loss the promo & get other voc :s halp!!
 
Back
Top