Ir para conteúdo

Featured Replies

  • Respostas 11
  • Visualizações 584
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado
local vocations = {
	--[id da vocation] = {lookType = newtype}
	[1] = {lookType = 2},
	[2] = {lookType = 3},
	[3] = {lookType = 4},
	[4] = {lookType = 5},
}

local AID = 1000 -- actionid do tile

local function AddMana(cid)
	if not isPlayer(cid) then return true end
	if getTileInfo(getThingPos(cid)).actionid == AID then
		if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) < 50 then
			doCreatureAddMana(cid, 500)
			doSendMagicEffect(getThingPos(cid), 12)
		elseif getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) < 100 then
			doCreatureAddMana(cid, 1000)
			doSendMagicEffect(getThingPos(cid), 12)
		elseif getPlayerLevel(cid) >= 100 then
			doCreatureAddMana(cid, 1500)
			doSendMagicEffect(getThingPos(cid), 12)
		end
		addEvent(AddMana, 1000, cid)
	end
	return true
end

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) then
		local getVoc = vocations[getPlayerVocation(cid)]
		if not getVoc then return true end
		doSetCreatureOutfit(cid, getVoc, -1)
		AddMana(cid)
	end
	return true
end

function onStepOut(cid, item, position, fromPosition)
	doRemoveCondition(cid, CONDITION_OUTFIT)
	return true
end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo