• 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 Bug Level 1 [3 Promotion]

raell5

Premium User
Joined
Aug 23, 2010
Messages
82
Reaction score
9
Location
Deaths Of Tentacles Planet
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

local vocationName = ''
if getPlayerVocation(cid) == 13-4 then
vocationName = 'Frozenhell Magician'
elseif getPlayerVocation(cid) == 14-4 then
vocationName = 'Frozenhell Shaman'
elseif getPlayerVocation(cid) == 15-4 then
vocationName = 'Frozenhell Champion'
elseif getPlayerVocation(cid) == 16-4 then
vocationName = 'Frozenhell Guardian'
else
vocationName = 'You do not match any vocation'
end
if(msgcontains(msg, 'leave')) then
if getPlayerStorageValue(cid,20008) <= 0 then
selfSay('Before I send you off, I would like to give you this small {reward} for all of your hard work.', cid)
talkState[talkUser] = 1
else
selfSay('Begone!.', cid)
doTeleportThing(cid,{x = 518, y = 840, z = 7},false)
end

elseif(msgcontains(msg, 'reward') and talkState[talkUser] == 1) then
setPlayerPromotionLevel(cid, 3)
setPlayerStorageValue(cid, 20008, 1)
selfSay('You have shown to me that you have mastered each aspect of your vocation. From this point on you may call yourself a '..vocationName..', Ask me to {leave} when you are ready.', cid)
talkState[talkUser] = 0
end
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Code:
[B]After What They starling this Promotion if they die They return level 1 And Now?[/B]
 
Change For ME

Code:
		<vocation id="13" name="Frozenhell Magician" description="a frozenhell magician" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="180" gainmanaticks="2" gainmanaamount="360" manamultiplier="1.1" attackspeed="750" soulmax="250" gainsoulticks="5" fromvoc="9" lessloss="70">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="2.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
		<skill id="0" multiplier="1.5"/>
		<skill id="1" multiplier="2.0"/>
		<skill id="2" multiplier="2.0"/>
		<skill id="3" multiplier="2.0"/>
		<skill id="4" multiplier="2.0"/>
		<skill id="5" multiplier="1.5"/>
		<skill id="6" multiplier="1.1"/>
	</vocation>
	<vocation id="14" name="Frozenhell Shaman" description="a frozenhell shaman" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="180" gainmanaticks="2" gainmanaamount="360" manamultiplier="1.1" attackspeed="750" soulmax="250" gainsoulticks="5" fromvoc="10" lessloss="70">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="2.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
		<skill id="0" multiplier="1.5"/>
		<skill id="1" multiplier="1.8"/>
		<skill id="2" multiplier="1.8"/>
		<skill id="3" multiplier="1.8"/>
		<skill id="4" multiplier="1.8"/>
		<skill id="5" multiplier="1.5"/>
		<skill id="6" multiplier="1.1"/>
	</vocation>
	<vocation id="15" name="Frozenhell Champion" description="a frozenhell champion" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="280" gainmanaticks="3" gainmanaamount="260" manamultiplier="1.4" attackspeed="750" soulmax="250" gainsoulticks="5" fromvoc="11" lessloss="70">
		<formula meleeDamage="1.0" distDamage="2.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
		<skill id="0" multiplier="1.2"/>
		<skill id="1" multiplier="1.2"/>
		<skill id="2" multiplier="1.2"/>
		<skill id="3" multiplier="1.2"/>
		<skill id="4" multiplier="1.1"/>
		<skill id="5" multiplier="1.1"/>
		<skill id="6" multiplier="1.1"/>
	</vocation>
	<vocation id="16" name="Frozenhell Guardian" description="a frozenhell guardian" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="360" gainmanaticks="4" gainmanaamount="180" manamultiplier="3.0" attackspeed="750" soulmax="250" gainsoulticks="5" fromvoc="12" lessloss="70">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
		<skill id="0" multiplier="1.1"/>
		<skill id="1" multiplier="1.1"/>
		<skill id="2" multiplier="1.1"/>
		<skill id="3" multiplier="1.1"/>
		<skill id="4" multiplier="1.4"/>
		<skill id="5" multiplier="1.1"/>
		<skill id="6" multiplier="1.1"/>
	</vocation>

</vocations>
 
That option is already in your vocations, so this error only happens on your new vocations? Did you noticed any error in console?
 
Back
Top