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

Explosions on some areas, bosse's phases, summons and other stuff

lycefur

New Member
Joined
Jul 13, 2010
Messages
99
Reaction score
2
Hey there. I'm searching for few script-answers for some complicated things: (btw if you will be pasting code and stuff please describe where should I put it and etc, I'm an ots newbie - working on TFS 0.3.6, RME and tibia 8.54)

1.How can I make 'explosions' which damage players in some locations I will list, in interval I will give it? Solved

2.Is it possible to make a location to which for example only 5 ppl can go at the same time and if more people would like to enter they would receive a message that the location is full?

3.Can I make my boss encounters have 'phases'? For example when boss is at 75% he begins to use different abilities?

4.How can I make creatures get summoned when boss is for example at 50% of his health?

Thanks a lot for all attempts to help me.
 
Last edited:
No shit sherlock :D . If I knew lua I wouldn't be here, thats why I am requesting[begging you] to do zeh scripts, I think they won't take huge amount of time, and not only I would use em... Help plxplz!
 
1. Global events.

2. Yes, if you get there via NPC, with a npc script, via tp, with a movement script, via item, with a action script.

3. I don't know, not in lua i think.

4. Yes, creaturescript, function onStatsChange
 
3. is possible yes, just make a script to check an area where the boss is and when he drops below X% hp, remove the boss and create another with different spells and atks and spawn it with only 75% hp ;p
maybe onStatsChange would work for this. Then you dont need a script to check the area
 
1.
Code:
local positions = {
	[1] = {x = 100, y = 100, z = 7},
	[2] = {x = 200, y = 200, z = 8}
}
local damage = {-100, -300}

function onThink(interval)
	for _, position in ipairs(position) do
		local player = isPlayer(getTopCreature(position).uid)
		if(player) then
			doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, damage[1], damage[2], CONST_ME_EXPLOSIONAREA)
		end
	end
	return true
end
 
1. Global events.

2. Yes, if you get there via NPC, with a npc script, via tp, with a movement script, via item, with a action script.

3. I don't know, not in lua i think.

4. Yes, creaturescript, function onStatsChange

Fine, but I already said that I have no idea about lua (and xml too) - if I knew them I would make them myself and wouldn't attack forums - and that I request the scripts :p . Could you solve at least one of my problems, for example this 1. so I could proceed with my work?
 
1.
Code:
local positions = {
	[1] = {x = 100, y = 100, z = 7},
	[2] = {x = 200, y = 200, z = 8}
}
local damage = {-100, -300}

function onThink(interval)
	for _, position in ipairs(position) do
		local player = isPlayer(getTopCreature(position).uid)
		if(player) then
			doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, damage[1], damage[2], CONST_ME_EXPLOSIONAREA)
		end
	end
	return true
end

Ty, this is what I exactly wanted to see :D . Gonna check if it works later.
 
1.
Code:
local positions = {
	[1] = {x = 100, y = 100, z = 7},
	[2] = {x = 200, y = 200, z = 8}
}
local damage = {-100, -300}

function onThink(interval)
	for _, position in ipairs(position) do
		local player = isPlayer(getTopCreature(position).uid)
		if(player) then
			doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, damage[1], damage[2], CONST_ME_EXPLOSIONAREA)
		end
	end
	return true
end

How to declare it in globalevents.xml? I'm getting errors :S.


3 and 4 can be custom spells that can only be used by monsters (the boss).

Could u give me lua code for that? :p
 
globalevents.xml
Code:
	<globalevent name="effect" interval="2" event="script" value="scriptname.lua"/>
if you're using 0.4, interval is in milliseconds, so put seconds * 1000
 
little fix:
Code:
local positions = {
	[1] = {x = 100, y = 100, z = 7},
	[2] = {x = 200, y = 200, z = 8}
}
local damage = {-100, -300}

function onThink(interval)
	for _, position in ipairs(positions) do
		local player = isPlayer(getTopCreature(position).uid)
		if(player) then
			doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, damage[1], damage[2], CONST_ME_EXPLOSIONAREA)
		end
	end
	return true
end
 
Back
Top