View Full Version : Is it possible to teleport players away from territory aft
nitromaxboi
30.03.2006, 17:56
is it possible to teleport players away from territory after some time to another area? or after a mob dies etc like after castle siege ends OR when someone logout, it will teleport the players from that territory to town.
nitromaxboi
31.03.2006, 06:13
help pls
//recall ?
-about mobs i guess it could be done with AI
barabashka
31.03.2006, 09:05
is it possible to teleport players away from territory after some time to another area? or after a mob dies etc like after castle siege ends OR when someone logout, it will teleport the players from that territory to town.
Maybe this help you.
When NPC see you - result: teleport player to x,y,z.
EventHandler SEE_CREATURE(creature)
{
if (InMyTerritory(creature))
{
InstantTeleport(creature, x, y, z);
}
}
When NPC dye - the same result
EventHandler MY_DYING(c1)
{
c1 = GetLastAttacker();
InstantTeleport(c1, x, y, z);
}
When Castle Siege is end - teleport to town
EventHandler SEE_CREATURE(creature)
{
if(Castle_IsUnderSiege())
{
AddDoNothingDesire(-1, 9999);
}
else Castle_BanishOthers();
}
Or PM me for detail information
nitromaxboi
31.03.2006, 09:34
hmm yes but players can just log out and wont get teleported. Ok can you also please tell me how do i party the mobs together because there is a handler that is party_died
barabashka
31.03.2006, 10:21
Something I shall not understand what exactly you want to make. Explain to me what exactly you wishes to realize, and I shall help you as.
Sorry for my bad english
nitromaxboi
31.03.2006, 10:38
ok i wan to make like when a particular mob dies or despawn , the other mob will despawn too so i thought of using party_died in AI but i do not know how to party both mobs together
barabashka
31.03.2006, 10:57
ok i wan to make like when a particular mob dies or despawn , the other mob will despawn too so i thought of using party_died in AI but i do not know how to party both mobs together
OK. Look at this:
Example:
When Raid boss die, all his pets are die too:
class raid_boss : party_leader
{
parameter:
string Privates = "raid_pet:party_private:1:10sec";
handler:
EventHandler CREATED()
{
myself.sm.weight_point = 10;
CreatePrivates(Privates);
super;
}
}
class raid_pet : party_private
{
parameter:
string Privates = "raid_boss:party_private:1:10000000sec";
handler:
EventHandler PARTY_DIED(private)
{
if(private != myself.sm)
Despawn();
}
}
And this another example: when raid pet die, raid boss die too
class raid_boss : party_leader
{
parameter:
string Privates = "raid_pet:party_private:1:10sec";
handler:
EventHandlerPARTY_DIED(private)
{
if(private != myself.sm)
Despawn();
}
}
nitromaxboi
31.03.2006, 11:12
but the thing is i want the other mob that spawn on npcpos on that location to despawn when this particular mob is killed. This only works if the raid boss spawns a npc as its private and you can't state location to spawn the privates.
nitromaxboi
31.03.2006, 11:25
or is it even possible to use the user_connected handler 52 to check if user is within the territory when connected and if user is within the territory , teleport user to an specify area. if this is possible can you tell me how can i do it
barabashka
31.03.2006, 11:36
Try this to spawn a privates without editing npcpos:
EventHandler ATTACKED(attacker, damage)
{
CreatePrivates(Privates);
super;
}
or
try
if (DistFromMe(c1) < X) InstantTeleport(c1, x,y,z);
c1=attacker or c1=creature and so on
Maybe I can't understand what you want to do:)