View Full Version: prob pour le nouveau gump zedmort

RunUO.FR Support > Probleme de script > prob pour le nouveau gump zedmort


Title: prob pour le nouveau gump zedmort
Description: plantage de serveur


zedar - April 29, 2004 09:06 PM (GMT)
bon je me suis dit que pour mon system il fallai refaire le gump .... le nouveau est beaucoup plus beau mais bon j aurrai voulu le ballancer direct sur le site mais voila g un plantage de mon serveur avec se nouveau gump 100% de ma conseption...(si quelqu un veut il bien y jeter un oeil dessus pour voir si il voit pas la grosse connerie que j ai pu faire........


zedmort.cs


CODE
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Items;
using Server.Mobiles;

namespace Server.Gumps
{
public class ZedmortGump : Gump
{
 
 public ZedmortGump() : base( 0, 0 )
 {  
  this.Closable=true;
  this.Disposable=true;
  this.Dragable=true;
  this.Resizable=false;
  this.AddPage(0);
  this.AddBackground(75, 438, 244, 100, 9200);
  this.AddBackground(55, 66, 280, 347, 9200);
  this.AddHtmlLocalized( 105, 467, 200, 20, 1049011, 0, (bool)false, (bool)false);
  this.AddHtmlLocalized( 105, 503, 200, 20, 1049012, 0, (bool)false, (bool)false);
  this.AddImageTiled(86, 139, 4, 217, 9303);
  this.AddImageTiled(90, 354, 214, 3, 9307);
  this.AddImageTiled(90, 136, 212, 4, 9301);
  this.AddImageTiled(90, 138, 213, 216, 9304);
  this.AddHtml( 96, 170, 201, 176, "<center>Vous êtes Mort</center><p> Malgrés tous vos efforts pour vous maintenir en vie en ce monde, vous n'y êtes pas parvenu </P> <p> Un choix s'impose désormais; rester ici un fantome ou accepter le pacte des Dieux qui consiste à vous ressusciter en sécurité en lieux sûr ", false, true );
  this.AddImage(80, 42, 1419);
  this.AddImage(21, 106, 10421);
  this.AddImage(157, 25, 1417);
  this.AddImage(166, 34, 5578);
  this.AddImage(51, 62, 10460);
  this.AddImage(310, 62, 10460);
  this.AddImageTiled(302, 137, 3, 217, 9305);
  this.AddImage(45, 92, 10420);
  this.AddLabel(159, 144, 1152, "Pacte Divin");
  this.AddImage(241, 150, 2104);
  this.AddImage(106, 144, 95);
  this.AddImage(315, 112, 10431);
  this.AddImage(293, 91, 10430);
  this.AddImage(310, 242, 10432);
  this.AddImage(306, 388, 10460);
  this.AddImage(35, 240, 10422);
  this.AddImage(49, 388, 10460);
  this.AddImage(104, 368, 10452);
  this.AddButton(159, 374, 1149, 1148, 1, GumpButtonType.Reply, 0);
  this.AddImageTiled(105, 107, 187, 13, 10100);
  this.AddImage(229, 193, 50930);
  this.AddImage(232, 193, 12);
  this.AddImage(233, 192, 60970);
  this.AddImage(275, 144, 97);
  this.AddLabel(167, 443, 16, "Tu est :");
 }

 public override void OnResponse( NetState state, RelayInfo info )
 {
  Mobile from = state.Mobile;

  if ( info.Switches[0] == 1 )
  {
         
              Item a = from.Corpse;
              a.MoveToWorld(new Point3D(1625, 1304, 0), Map.Trammel);
   from.Map = Map.Trammel;
   from.Location = new Point3D(1625, 1304, 0);
   from.PlaySound( 0x1F8 );
   from.FixedEffect( 0x376A, 10, 16 );
   from.Resurrect();
   
  }
  else
  {
   from.SendMessage( "Vous restez donc à errer dans les Limbes." );
  }
 }
}
}

zedar - April 29, 2004 09:12 PM (GMT)
QUOTE
Server Crash Report
===================

Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 29/04/2004 23:11:18
Mobiles: 2
Items: 147
Clients:
- Count: 1
+ 127.0.0.1: (account = vates) (mobile = 0x1 'zedar')

Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Server.Gumps.ZedmortGump.OnResponse(NetState state, RelayInfo info)
  at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
  at Server.Network.MessagePump.HandleReceive(NetState ns)
  at Server.Network.MessagePump.Slice()
  at Server.Core.Main(String[] args)




c vers OnResponse que sa doi coinser

zedar - April 29, 2004 09:20 PM (GMT)
arf g oublier de mettre...



CODE
gumpX = 80; gumpY = 305;
  initialState = true;
  AddRadio( gumpX, gumpY, 0x25F9, 0x25FC, initialState, 1 );

  gumpX = 80; gumpY = 338;
  initialState = false;
  AddRadio( gumpX, gumpY, 0x25F9, 0x25FC, initialState, 2 );



sa donne:



CODE
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Items;
using Server.Mobiles;

namespace Server.Gumps
{
public class ZedmortGump : Gump
{
 
 public ZedmortGump() : base( 0, 0 )
 {
  int gumpX = 0; int gumpY = 0; bool initialState = false;  
  this.Closable=true;
  this.Disposable=true;
  this.Dragable=true;
  this.Resizable=false;
  this.AddPage(0);
  this.AddBackground(75, 438, 244, 100, 9200);
  this.AddBackground(55, 66, 280, 347, 9200);
  this.AddHtmlLocalized( 105, 467, 200, 20, 1049011, 0, (bool)false, (bool)false);
  this.AddHtmlLocalized( 105, 503, 200, 20, 1049012, 0, (bool)false, (bool)false);
  this.AddImageTiled(86, 139, 4, 217, 9303);
  this.AddImageTiled(90, 354, 214, 3, 9307);
  this.AddImageTiled(90, 136, 212, 4, 9301);
  this.AddImageTiled(90, 138, 213, 216, 9304);
  this.AddHtml( 96, 170, 201, 176, "<center>Vous êtes Mort</center><p> Malgrés tous vos efforts pour vous maintenir en vie en ce monde, vous n'y êtes pas parvenu </P> <p> Un choix s'impose désormais; rester ici un fantome ou accepter le pacte des Dieux qui consiste à vous ressusciter en sécurité en lieux sûr ", false, true );
  this.AddImage(80, 42, 1419);
  this.AddImage(21, 106, 10421);
  this.AddImage(157, 25, 1417);
  this.AddImage(166, 34, 5578);
  this.AddImage(51, 62, 10460);
  this.AddImage(310, 62, 10460);
  this.AddImageTiled(302, 137, 3, 217, 9305);
  this.AddImage(45, 92, 10420);
  this.AddLabel(159, 144, 1152, "Pacte Divin");
  this.AddImage(241, 150, 2104);
  this.AddImage(106, 144, 95);
  this.AddImage(315, 112, 10431);
  this.AddImage(293, 91, 10430);
  this.AddImage(310, 242, 10432);
  this.AddImage(306, 388, 10460);
  this.AddImage(35, 240, 10422);
  this.AddImage(49, 388, 10460);
  this.AddImage(104, 368, 10452);
  this.AddButton(159, 374, 1149, 1148, 1, GumpButtonType.Reply, 0);
  this.AddImageTiled(105, 107, 187, 13, 10100);
  this.AddImage(229, 193, 50930);
  this.AddImage(232, 193, 12);
  this.AddImage(233, 192, 60970);
  this.AddImage(275, 144, 97);
  this.AddLabel(167, 443, 16, "Tu est :");
  gumpX = 80; gumpY = 305;
  initialState = true;
  AddRadio( gumpX, gumpY, 0x25F9, 0x25FC, initialState, 1 );

  gumpX = 80; gumpY = 338;
  initialState = false;
  AddRadio( gumpX, gumpY, 0x25F9, 0x25FC, initialState, 2 );

 
 }

 public override void OnResponse( NetState state, RelayInfo info )
 {
  Mobile from = state.Mobile;

  if ( info.Switches[0] == 1 )
  {
         
              Item a = from.Corpse;
              a.MoveToWorld(new Point3D(1625, 1304, 0), Map.Trammel);
   from.Map = Map.Trammel;
   from.Location = new Point3D(1625, 1304, 0);
   from.PlaySound( 0x1F8 );
   from.FixedEffect( 0x376A, 10, 16 );
   from.Resurrect();
   
  }
  else
  {
   from.SendMessage( "Vous restez donc à errer dans les Limbes." );
  }
 }
}
}


mais bon il y a encore un prob sa choisi automatiquement le tranport

zedar - April 30, 2004 11:08 AM (GMT)
C bon g trouver tout seul........ :D aller voir dans systeme zedar res system




Hosted for free by InvisionFree