Full Version : sending page in jail
xmlspawner >>Scripting Support >>sending page in jail
<< Prev | Next >>
ambak- 01-26-2006
i want to disable to send pages in jail.i think its in the region file of jail.cs but i couldnt find it
by the way, if all you guys thing i am making the forum busy you can say me ..
godfood- 01-26-2006
As long as you keep showing that you are not just trying to get other's to do your work for you, You should be ok.
ambak- 01-26-2006
in jail.cs i found

CODE
public override bool AllowBenificial( Mobile from, Mobile target ) { if ( from.AccessLevel == AccessLevel.Player ) from.SendMessage( "You may not do that in jail." );

i think i am goint to restrict it like this but i dont know the class for using pages
like AllowBenificial
OnPageUse is right ? or i am wrong?
ambak- 01-26-2006

CODE
public override bool CheckAllowedToPage( Mobile from, Mobile target ) { if ( from.AccessLevel == AccessLevel.Player ) from.SendMessage( "You may not do that in jail." );

ok i try this i think this is true?
ArteGordon- 01-26-2006
I would do this in PageQueue.cs

QUOTE
public static bool CheckAllowedToPage( Mobile from ) { PlayerMobile pm = from as PlayerMobile; if ( pm == null ) return true;
if(Region.Find( pm.Location, pm.Map) is Jail) return false;
if ( pm.DesignContext != null )
{
from.SendLocalizedMessage( 500182 ); // You cannot request help while customizing a house or transferring a character.
return false;
}
else if ( pm.PagingSquelched )
{
from.SendMessage( "You cannot request help, sorry." );
return false;
}
return true;
}

ambak- 01-26-2006
eheh i think i am close
ambak- 01-26-2006
arte your code didnt work
here is the error
- Error: Scripts\Engines\Help\PageQueue.cs: CS0246: (line 185, column 44) The t
ype or namespace name 'Jail' could not be found (are you missing a using directi
ve or an assembly reference?)
ArteGordon- 01-26-2006
you need to add this to the top of the script
using Server.Regions;