Is there anyway to force an auto "end" combat. So the enemy become peaceful and the PC won't automatically attack?
I think this is what peacemaking does, if so, is there a way we can .js script it to a GM command?
Here are the problems my GM's face:
--Ocassionly a PC may accidentally attack a good NPC, even though they want to end the combat, the NPC will fight to the death as well as the "auto-attack" of hte client. There is no way to get around this.
--When using the xattack command, occasionally a GM has accidentally selected the same NPC twice. It's quite humorous, the NPC commits a vile suicide, and there is no way to stop him.
--As part of a plot line, GMs want the PC to be able to "injure" an opponent to a certain level of health, and then "force end" the combat, so the Enemey can surrender, thus furthering the plot.
If there is anyway to stop combat, at least for enough time for the GM to use 'set NPCAI to a neutral AI, then I think ti will work. The main problem is if the PC is carrying a bow, and the client has the NPC tagged as hostile, the PC will continue to shoot at him/her until he/she is dead.
Hopefully this makes sense (posting late at night can make me wander). If there is anyway to do this let me know.
Auto "peacemaking"?
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Sorry for the slow replies atm, stranf
I'm not sure how well this works, as I've only done limited testing with myself and two NPCs, but here's a command to let you manually halt fights that ensue, as long as the opponents in the fight are not guard/fighter vs criminal/evil - in which case the fight will restart immediately anyway.
Also, if there are more than two characters involved in the fight, you might have to use the command several times to stop everyone involved from fighting, since I don't know of a way to determine all the attackers of a character and thus halt them all from fighting at the same time.
I'm not sure how well this works, as I've only done limited testing with myself and two NPCs, but here's a command to let you manually halt fights that ensue, as long as the opponents in the fight are not guard/fighter vs criminal/evil - in which case the fight will restart immediately anyway.
Also, if there are more than two characters involved in the fight, you might have to use the command several times to stop everyone involved from fighting, since I don't know of a way to determine all the attackers of a character and thus halt them all from fighting at the same time.
Code: Select all
function CommandRegistration()
{
RegisterCommand( "endfight", 2, true ); //Targeted character (and character being fought) will stop fighting
}
function command_ENDFIGHT( pSock, execString )
{
pSock.CustomTarget( 14, "Subdue which fight?" );
}
function onCallback14( pSock, myTarget )
{
var pUser = pSock.currentChar;
if( !pSock.GetWord( 1 ) && myTarget.isChar )
{
if( myTarget.atWar == true )
{
pUser.SysMessage( myTarget.attacker );
var opponent = myTarget.target;
opponent.target = null;
opponent.atWar = null;
opponent.attacker = null;
myTarget.target = null;
myTarget.atWar = false;
myTarget.attacker = null;
pUser.SysMessage( "Fight has been subdued." );
}
else
pUser.SysMessage( "That character is not in a fight." );
}
else if( !pSock.GetWord( 1 ) && myTarget.isItem )
{
pUser.SysMessage( "You must select a character!" );
}
else
pUser.SysMessage( "Impossible!" );
}-= Ho Eyo He Hum =-
Thanks Xuri,
It's finals week, so it might be awhile before I test it out, but I will report to you when I do.
As a second request.....anyway to post a .PDF on the main site showing a refrence chart (for GM lookups) of:
--item types.
--NPCwander codes (what NPCWander 1, 2, 3 does, etc.
--NPCAI codes (what NPCAI 1, 2, 3 does, etc.)
and maybe some other nifty things that you can think of? The UOx3 Guide is perfect for setting up quests (how to enchant items, make books, etc.) but it dosen't cover some of the "on-the-fly" things that GM's use.
For example, I use NPCWander to get an NPC to stop so we can converse with him. When the conversation is done, I usually just set a random, NPCwander. Usually 2.
Instead of the NPC wandering in an area where we can find him again if needed, it seems he wanders around all britannia!
It's finals week, so it might be awhile before I test it out, but I will report to you when I do.
As a second request.....anyway to post a .PDF on the main site showing a refrence chart (for GM lookups) of:
--item types.
--NPCwander codes (what NPCWander 1, 2, 3 does, etc.
--NPCAI codes (what NPCAI 1, 2, 3 does, etc.)
and maybe some other nifty things that you can think of? The UOx3 Guide is perfect for setting up quests (how to enchant items, make books, etc.) but it dosen't cover some of the "on-the-fly" things that GM's use.
For example, I use NPCWander to get an NPC to stop so we can converse with him. When the conversation is done, I usually just set a random, NPCwander. Usually 2.
Instead of the NPC wandering in an area where we can find him again if needed, it seems he wanders around all britannia!