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

[Move] Fire hit for vocation (POI)

Albert José

Rambocop Infernus
Joined
Jun 10, 2008
Messages
94
Solutions
1
Reaction score
13
Location
Portugal
I need script of fires of the poi!
Hit for vocation..
There are 4 paths each filled with the purple fire. Purple fire does 300 damage and not 20 like a normal fire. Each path is made for a certain Vocation. Anyone walking on the wrong path will get a message saying he has entered the wrong path, and will take more and more damage from the fires, eventually leading to death. These are the correct ways to go:

* Knights - north
* Druids - north-east
* Paladins - south-east
* Sorcerers - south

Sorry for bad english!
 
Make a file called knightsfire.lua on your movements/scripts

In the file you put:

Code:
function onStepIn(cid, item, position, fromPosition)

	if not(isPlayer(cid) == TRUE) then
		return FALSE
	end

local voc1 = 4
local voc2 = 8
local pvoc = getPlayerVocation(cid)

	if item.uid == 1033 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1034 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1035 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -600, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1036 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -600, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1037 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -1200, -1200, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1038 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -1200, -1200, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1039 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -1200, -1200, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1040 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -2400, -2400, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1041 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -4800, -4800, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1042 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -9600, -9600, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	elseif item.uid == 1043 then
		if pvoc == voc1 or pvoc == voc2 then
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -300, -300, 15)
		else
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -19200, -19200, 15)
			doCreatureSay(cid, "You seem to be on the wrong path.", TALKTYPE_ORANGE_1 )
		end
	end
return 1
end

Then, go to your mapeditor and put uniqueids in the fire of the knights in this order: 1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043

Now I think you can do the paladins, sorcerers and druids scripts. Remember that uniqueids must be different, and you must change the "local voc1 = 4
local voc2 = 8" on the beginning of the script.
 
Back
Top