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

[REQUEST] Vocation Floor!

Exedion

Active Member
Joined
Jun 11, 2007
Messages
628
Reaction score
30
Please, i need this script for finish my server (for now)... i need a moveevent, when a player step in, they check the vocation of the player and if the player no have the correct vocation, the moveevent inflic damage to the player... thank S!
 
Remember this is the second time i script movements :p this will bug but just past me the error's and i'll try to fix them..

made this in 1 minut lol.
Code:
function getVocationTile(cid, item, position)
local fire = createConditionObject(CONDITION_FIRE)
addDamageCondition(fire, 4, 6000, -20)
addDamageCondition(fire, 4, 6000, -10)	
	if item.itemid == 426 then and item.actionid > 1000 then
	isPlayer(cid) == TRUE then
	  if getPlayerVocation(cid,1) ==TRUE then
			doTeleportThing(cid, {x = , y = , z = }, TRUE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end
		else
		doTargetCombatCondition(0, cid, fire, CONST_ME_NONE)
	end
	return TRUE
end

i know this will bug but just need to check some errors;.
 
ok!! thx!! really needed! but... don't need condition damage, only a simple damage! can you fix that?

i'm not even sure if it works anywais

Code:
function getVocationTile(cid, item, position)
	if item.itemid == 426 and item.actionid > 1000 then
	if isPlayer(cid) == TRUE then
	  if getPlayerVocation(cid,1) == TRUE then
			doTeleportThing(cid, {x = , y = , z = }, TRUE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end
		else
          doCreatureAddHealth(cid, -200)
	end
	return TRUE
end
 
Last edited:
can you tell me what voc will get dmg and how dmg he will get?

edit--
made it.

function onStepIn(cid, item, pos)

voc = getPlayerVocation(cid)
health = math.random(MIN, MAX)

if item.uid == tile_uniqueid and voc == VOC1 or voc == VOC2 or voc == VOC3 then
doSendMagicEffect(topos, NM_ME_MAGIC_BLOOD)
doCreatureAddHealth(cid, -health)
doSendAnimatedText(pos, -health, 180)
else
doSendMagicEffect(topos, NM_ME_MAGIC_POISON)
end
return TRUE
end

(MIN, MAX) -> put here the numbers of the dmg who the player will get. (remenber max>min)
tile_uniqueid -> put here the UNIQUEID of the tile (same as mapeditor)
VOC1 -> voc who will get the DAMAGE
VOC2 -> voc who will get the DAMAGE
VOC3 -> voc who will get the DAMAGE

and the last voc, will pass at the tile without dmg.


<movevent event="StepIn" uniqueid="tile_uniqueid" script="voc_tile.lua"/>
 
Last edited:
Back
Top