Full Version : Server Error
xmlspawner >>Scripting Support >>Server Error
<< Prev | Next >>
Neuton- 09-20-2007

QUOTE (ArteGordon @ September 20, 2007 10:24 pm)
yes, they are always visible=false so that only staff can see them. Players will never see the crystals. Staff can see all visible=false items by default. They just appear gray.

thats the thing I can't even see it gray, I remember that when I first starting trying to learn this I used svn 219 or something and I did see the crystals grey but now I dont see them at all unless I change the visible to true and I am owner/admin?
ArteGordon- 09-21-2007
so you cant see any invisible items? How about invisible creatures?
Do you still have the problem with not being able to see things inside of your backpack?
Neuton- 09-21-2007
Nope still can't see invisible items and still have problems with the staffcloak, I can add it and see it while its on the ground but once I move it to the pack or my person it disappears.
What do you mean about invisible creatures? can you give me a name of one and I will try it out?
P.S. I removed this pic and changed the other 2 they r now smaller
Neuton- 09-21-2007
These are the pics I made sorry they are big I haven't really worked with pics much I always worked on other stuff for computers
Neuton- 09-21-2007
And the last one I put the cloak in my pack.
Neuton- 09-21-2007
I am going to try one other thing, going to delete the runuo files and re-export the svn then re-install your xmlspawner files w/o the stealing and container one and see what happens?
Neuton- 09-21-2007
ok I got this and I just got the latest svn just now, and I added the xmlspawner files as well w/o stealing and container files...the svn is 261.
** I remembered that you had setup the beta version on the next xmlspawner release with a fix for this
Neuton- 09-21-2007
Ok I put the beta xmlspawner.cs in place then I got this new error I never seen before, did I forget something here? I did not add the stealing and container.cs from the support zip

CODE
case "JournalNotifyColor": XmlQuestHolder.JournalNotifyColor = ConvertToInt(value); break; case "JournalEchoColor": XmlQuestHolder.JournalEchoColor = ConvertToInt(value);
break;
case "BlockKeyword":

ArteGordon- 09-22-2007
make sure that you have the most up to date version of XmlQuestHolder.cs
As for the staff cloak, it is probably deleting itself because the the StaffLevel property on the cloak does not match your accesslevel. It is a protection put in to avoid accesslevel exploits.
Use [add to place it on the ground, then use [props to change the StaffLevel to your accesslevel, and then you should be able to put it in your pack.
Neuton- 09-22-2007
ahhh ok I should of checked that on the staff cloak ty so much. And I will get the latest files from here on the xml stuff
** The xml scripts I was using was the older ones, used the new ones 3.22b and the new beta xmlspawner.cs and it is working, now to test the staffcloak...Thank You so much again Arte.
Neuton- 09-22-2007
So the part with not able to see the spawner crystal even tho I am the owner w/o going into the [props menu and turning visible to true, is a problem that can't be figured out just now Arte?
Like I said earlier on earlier version of the server like 219 I was able to see the spawner w/o going into the [props...so I can see the grey version of the spawners with no problem however on the newer server I can't.
I have svn 261 and my client is patched to the latest 6.0.3.0
ArteGordon- 09-23-2007
post the CanSee methods from your Playermobile.cs that should look like this

CODE
public override bool CanSee(Mobile m) { if (m is PlayerMobile && ((PlayerMobile)m).m_VisList.Contains(this)) return true; return base.CanSee(m);
}
public override bool CanSee(Item item)
{
if (m_DesignContext != null && m_DesignContext.Foundation.IsHiddenToCustomizer(item))
return false;
return base.CanSee(item);
}

post the same method from Mobile.cs in the Server scripts, or use the core server executable that I have posted.

CODE
public virtual bool CanSee( object o ) { if( o is Item ) { return CanSee( (Item)o );
}
else if( o is Mobile )
{
return CanSee( (Mobile)o );
}
else
{
return true;
}
}
public virtual bool CanSee( Item item )
{
if( m_Map == Map.Internal )
return false;
else if( item.Map == Map.Internal )
return false;
if( item.Parent != null )
{
if( item.Parent is Item )
{
if( !CanSee( (Item)item.Parent ) )
return false;
}
else if( item.Parent is Mobile )
{
if( !CanSee( (Mobile)item.Parent ) )
return false;
}
}
if( item is BankBox )
{
BankBox box = item as BankBox;
if( box != null && m_AccessLevel <= AccessLevel.Counselor && (box.Owner != this || !box.Opened) )
return false;
}
else if( item is SecureTradeContainer )
{
SecureTrade trade = ((SecureTradeContainer)item).Trade;
if( trade != null && trade.From.Mobile != this && trade.To.Mobile != this )
return false;
}
return !item.Deleted && item.Map == m_Map && (item.Visible || m_AccessLevel > AccessLevel.Counselor);
}

Then confirm your accesslevel by using either a "[get accesslevel" on yourself, or reporting the value of the AccessLevel property via [props.
Post your AccessLevel enum from Mobile.cs or use the core server executable that I have posted.

CODE
public enum AccessLevel { Player, Counselor, GameMaster,
Seer,
Administrator,
Developer,
Owner
}

Neuton- 09-23-2007
Here the copy of my scripts that you wanted to see, also there is a SS with the access level for my player.

CODE
public override bool CanSee( Mobile m ) { if ( m is PlayerMobile && ((PlayerMobile)m).m_VisList.Contains( this ) ) return true; return base.CanSee( m );
}
public override bool CanSee( Item item )
{
if ( m_DesignContext != null && m_DesignContext.Foundation.IsHiddenToCustomizer( item ) )
return false;
return base.CanSee( item );

CODE
public virtual bool CanSee( object o ) { if( o is Item ) { return CanSee( (Item)o );
}
else if( o is Mobile )
{
return CanSee( (Mobile)o );
}
else
{
return true;
}
}
public virtual bool CanSee( Item item )
{
if( m_Map == Map.Internal )
return false;
else if( item.Map == Map.Internal )
return false;
if( item.Parent != null )
{
if( item.Parent is Item )
{
if( !CanSee( (Item)item.Parent ) )
return false;
}
else if( item.Parent is Mobile )
{
if( !CanSee( (Mobile)item.Parent ) )
return false;
}
}
if( item is BankBox )
{
BankBox box = item as BankBox;
if( box != null && m_AccessLevel <= AccessLevel.Counselor && (box.Owner != this || !box.Opened) )
return false;
}
else if( item is SecureTradeContainer )
{
SecureTrade trade = ((SecureTradeContainer)item).Trade;
if( trade != null && trade.From.Mobile != this && trade.To.Mobile != this )
return false;
}

CODE
public enum AccessLevel { Player, Counselor, GameMaster,
Seer,
Administrator,
Developer,
Owner
}

ArteGordon- 09-23-2007
where is the rest of this method? It is the last part that is missing that is the important part.

CODE
public virtual bool CanSee( Item item ) { if( m_Map == Map.Internal ) return false; else if( item.Map == Map.Internal )
return false;
if( item.Parent != null )
{
if( item.Parent is Item )
{
if( !CanSee( (Item)item.Parent ) )
return false;
}
else if( item.Parent is Mobile )
{
if( !CanSee( (Mobile)item.Parent ) )
return false;
}
}
if( item is BankBox )
{
BankBox box = item as BankBox;
if( box != null && m_AccessLevel <= AccessLevel.Counselor && (box.Owner != this || !box.Opened) )
return false;
}
else if( item is SecureTradeContainer )
{
SecureTrade trade = ((SecureTradeContainer)item).Trade;
if( trade != null && trade.From.Mobile != this && trade.To.Mobile != this )
return false;
}

Neuton- 09-23-2007

CODE
public virtual bool CanSee( object o ) { if( o is Item ) { return CanSee( (Item)o );
}
else if( o is Mobile )
{
return CanSee( (Mobile)o );
}
else
{
return true;
}
}
public virtual bool CanSee( Item item )
{
if( m_Map == Map.Internal )
return false;
else if( item.Map == Map.Internal )
return false;
if( item.Parent != null )
{
if( item.Parent is Item )
{
if( !CanSee( (Item)item.Parent ) )
return false;
}
else if( item.Parent is Mobile )
{
if( !CanSee( (Mobile)item.Parent ) )
return false;
}
}
if( item is BankBox )
{
BankBox box = item as BankBox;
if( box != null && m_AccessLevel <= AccessLevel.Counselor && (box.Owner != this || !box.Opened) )
return false;
}
else if( item is SecureTradeContainer )
{
SecureTrade trade = ((SecureTradeContainer)item).Trade;
if( trade != null && trade.From.Mobile != this && trade.To.Mobile != this )
return false;
}
return !item.Deleted && item.Map == m_Map && (item.Visible || m_AccessLevel > AccessLevel.Counselor);
}
public virtual bool CanSee( Mobile m )
{
if( m_Deleted || m.m_Deleted || m_Map == Map.Internal || m.m_Map == Map.Internal )
return false;
return this == m || (
m.m_Map == m_Map &&
(!m.Hidden || (m_AccessLevel != AccessLevel.Player && (m_AccessLevel >= m.AccessLevel || m_AccessLevel >= AccessLevel.Developer))) &&
((m.Alive || (Core.SE && Skills.SpiritSpeak.Value >= 100.0)) || !Alive || m_AccessLevel > AccessLevel.Player || m.Warmode));
}

Is this what you wanted to see Arte?