Making complete areas NoCombat....
Moderator: Event DM
Making complete areas NoCombat....
Anyone know of an existing script or how a n00b scripter can make entire areas No Combat.
I want to make 'peace' areas that prevent anyone/everyone from initiating Combat, no matter if it's Players or NPC's?
Any assistance would be greatly appreciated...
I want to make 'peace' areas that prevent anyone/everyone from initiating Combat, no matter if it's Players or NPC's?
Any assistance would be greatly appreciated...
Maska
- Strangg
- Team Member; Retired with Honors
- Posts: 4174
- Joined: Wed Jul 17, 2002 11:25 am
- Location: Heaven
- Contact:
I would have a clue, but it makes very little sense, especialy if your wanting to be a RP world.
~S
~S
Fighters do it face to face, Rogues may do it from behind, Rangers can do it from a distance, Wizards do it from out of nowhere, Clerics may not do it at all, Barbarians may do it in a rage, Sorcerers can do it on a whim, Bards on a note, but Paladins have to pay for it!
"You have a way with words... like a sage with a two-by-four" ~ Ava
"You have a way with words... like a sage with a two-by-four" ~ Ava
- WrathOG777
- Master Sage
- Posts: 5325
- Joined: Fri Mar 07, 2003 4:17 pm
- Location: Abyss (GMT 2200-0500)
- Aloro
- Team Member; Retired with Honors
- Posts: 12805
- Joined: Sat Dec 28, 2002 5:11 am
- Location: Rainbow's End
- Contact:
Hrm.
Errr...
Hmm.
Maybe. You could fuck with the DetermineCombatRound function for the whole module, but 1) I strongly recommend against trying - this is more complicated than it sounds, and 2) this would never ever be allowed in Avlis, because it would cause a lot of problems. If it's for a personal project though, and if you're very comfortable scripting, yeah, it's probably possible.
It'd be easier to find another way to accomplish your goal here. There are always workarounds - but I can't suggest any because I'm not sure what you're hoping to accomplish with this.
- Aloro
Errr...
Hmm.
Maybe. You could fuck with the DetermineCombatRound function for the whole module, but 1) I strongly recommend against trying - this is more complicated than it sounds, and 2) this would never ever be allowed in Avlis, because it would cause a lot of problems. If it's for a personal project though, and if you're very comfortable scripting, yeah, it's probably possible.
It'd be easier to find another way to accomplish your goal here. There are always workarounds - but I can't suggest any because I'm not sure what you're hoping to accomplish with this.

- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
You could...
Set that area to use the "No PVP" setting, then attach scripts to the OnAttacked and OnDamaged event handlers for EVERY placeable in the area that would insta-daze the target of GetLastAttacker().
Plot all yer placeables and all yer NPC's, and then you're done. Someone could, conceivably, make one attack, but it would fail and they'd be paralyzed for a few moments which would convince them not to do it again.
You wouldn't be able to stop folks from beating on other PC's, but it'd just be playing the animations, 'cause no one would take any damage.
That's a serious kludge, but it might work. You could even replace the daze effect with an effect of your choice, or scrap the effect and have any attack on an NPC or placeable spawn an NPC named "Little Bunny Juanistat" that would hop over, hit the PC w/ an unavoidable knockdown, then stand over them shouting, "THIS GUY'S A L33T D00D! THIS GUY'S A L33T DOOD!" or what have you.
Bye Now,
Jerry Cornelius - Hmmm... *wanders off to build for Travellers*
Set that area to use the "No PVP" setting, then attach scripts to the OnAttacked and OnDamaged event handlers for EVERY placeable in the area that would insta-daze the target of GetLastAttacker().
Plot all yer placeables and all yer NPC's, and then you're done. Someone could, conceivably, make one attack, but it would fail and they'd be paralyzed for a few moments which would convince them not to do it again.
You wouldn't be able to stop folks from beating on other PC's, but it'd just be playing the animations, 'cause no one would take any damage.
That's a serious kludge, but it might work. You could even replace the daze effect with an effect of your choice, or scrap the effect and have any attack on an NPC or placeable spawn an NPC named "Little Bunny Juanistat" that would hop over, hit the PC w/ an unavoidable knockdown, then stand over them shouting, "THIS GUY'S A L33T D00D! THIS GUY'S A L33T DOOD!" or what have you.
Bye Now,
Jerry Cornelius - Hmmm... *wanders off to build for Travellers*

Everything I need to know in life, I learned from being an alcoholic.
For clarification, this isn't for Avlis... it's for my own PW....
The effect I want to achieve is a series of areas that are infused with a overwelming aura of peace/harmony. While in this area players/npc's can converse and roleplay... but no 'hostile' action is permissible.... the 'aura' is just overwelming and no hostile intentions occur.
That's it, thats all I want to do... I'm not adverse to the 'paralyzing' idea for PC's that's put forward... but I want it to be an area wide thing... not something I have to place into every placeable/mob/etc. in the area itself. I'd also like to avoid something that's gonna be cheesy in how it stops players from trying to muck around...
Thx in advance,
The effect I want to achieve is a series of areas that are infused with a overwelming aura of peace/harmony. While in this area players/npc's can converse and roleplay... but no 'hostile' action is permissible.... the 'aura' is just overwelming and no hostile intentions occur.
That's it, thats all I want to do... I'm not adverse to the 'paralyzing' idea for PC's that's put forward... but I want it to be an area wide thing... not something I have to place into every placeable/mob/etc. in the area itself. I'd also like to avoid something that's gonna be cheesy in how it stops players from trying to muck around...
Thx in advance,
Maska
Short of following Aloro's very tentative advice and donging around with the engine, it's just not going to happen.
PC's don't have event handlers. You can't do anything to preempt someone queueing the attack action for their own PC.
Even if you were to put an OnHeartbeat script for the whole area that would constantly check for, and unequip, any weapon a PC might have equipped, you still can't stop someone from targetting something and attacking or bashing it bare handed.
It just isn't going to happen. Sorry.
Best you can do is work around the idea, devise half-measures that will add up to more or less the effect you want.
Bye Now,
Jerry Cornelius - Little Bunny Juanistat? Now that's funny.
PC's don't have event handlers. You can't do anything to preempt someone queueing the attack action for their own PC.
Even if you were to put an OnHeartbeat script for the whole area that would constantly check for, and unequip, any weapon a PC might have equipped, you still can't stop someone from targetting something and attacking or bashing it bare handed.
It just isn't going to happen. Sorry.
Best you can do is work around the idea, devise half-measures that will add up to more or less the effect you want.
Bye Now,
Jerry Cornelius - Little Bunny Juanistat? Now that's funny.
Everything I need to know in life, I learned from being an alcoholic.
-
- Prince of Bloated Discourse
- Posts: 186
- Joined: Thu Feb 06, 2003 8:49 pm
- Location: Nova Scotia (GMT - 4)
You could de-equip anything equipped in the weapon slots but PCs could still attack ith their hands and feet. Even if you cut off those, you couldn't control what's said by them anyways so it might be easiest to have them RP this aura.
The Island(s) of Hala
http://www.hala-world.org
http://www.hala-world.org
- Aloro
- Team Member; Retired with Honors
- Posts: 12805
- Joined: Sat Dec 28, 2002 5:11 am
- Location: Rainbow's End
- Contact:
Anyhow, none of these kludges would prevent hostile spellcasting. 
Frankly, there isn't a good way to do this that I can see.
You can make NPCs immortal, so they pop back up after they die. You can change your PC OnDeath script so if a PC dies in these areas, they are instantly brought back. You can make all placeables plot, or static. You can add healing scripts on triggers or * shudders * heartbeats (hey, it's your world), to keep PCs and/or NPCs at full health. You can do all sorts of things to make an area special and peaceful.
But stop PCs from attacking, in all the possible ways they can do so? I don't think you can, without (probably) resorting to some serious game engine tweaking. This would likely require hakpaks.
- Aloro

Frankly, there isn't a good way to do this that I can see.
You can make NPCs immortal, so they pop back up after they die. You can change your PC OnDeath script so if a PC dies in these areas, they are instantly brought back. You can make all placeables plot, or static. You can add healing scripts on triggers or * shudders * heartbeats (hey, it's your world), to keep PCs and/or NPCs at full health. You can do all sorts of things to make an area special and peaceful.
But stop PCs from attacking, in all the possible ways they can do so? I don't think you can, without (probably) resorting to some serious game engine tweaking. This would likely require hakpaks.
- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.