/************************************************************************
*
* This script was made by milt, AKA Pokey.
*
* Email: [email protected]
*
* AIM: TrueBornStunna
*
* Website: www.f13nd.net
*
* Version: 1.0.3
*
* Release Date: December 25, 2005
*
* Edited by Twice AKA Kitchen
*
*************************************************************************/
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Items;
namespace Server.Gumps
{
public class TJoinGump : Gump
{
MasterTStone m_Stone;
public TJoinGump( MasterTStone stone )
: base( 0, 0 )
{
m_Stone = stone;
string allow = "<baseFONT color='green'>Allowed</baseFONT>";
string disallow = "<baseFONT color='red'>Disallowed</baseFONT>";
string Information = "Welcome to the Drug Dynasty arena sign-ups! Do you think you wtfpwn the fuck out of everyone? If so, signup and prove it. You just may be good enough to win the whole thing, and get the prize at the end! Good luck. A game master has set the following rules for this tourney:<P>";
string BoolRules = "Potions: " + (m_Stone.CanUsePotions ? allow : disallow) + "<P>Healing: " + (m_Stone.CanHeal ? allow : disallow) + "<P>Magic Weps: " + (m_Stone.MagicWeapons ? allow : disallow);
string TemplateRules = "<P>Template: " + (m_Stone.DuelType == DuelType.Any ? "<baseFONT color='green'>Any</baseFONT>" : m_Stone.DuelType == DuelType.Mage ? "<baseFONT color='green'>Mages</baseFONT>" : m_Stone.DuelType == DuelType.Dexxer ? "<baseFONT color='green'>Dexxers</baseFONT>" : m_Stone.DuelType == DuelType.Tank ? "<baseFONT color='green'>Tanks</baseFONT>" : "");
string SetRules = "<P>Skill Set: " + (m_Stone.DuelSet == DuelSet.Allow ? "<baseFONT color='green'>Any</baseFONT>" : m_Stone.DuelSet == DuelSet.Sevenx ? "<baseFONT color='green'>7x</baseFONT>" : m_Stone.DuelSet == DuelSet.Fivex ? "<baseFONT color='green'>5x</baseFONT>" : "");
string final = Information + BoolRules + TemplateRules + SetRules;
this.Closable=false;
this.Disposable=false;
this.Dragable=true;
this.Resizable=false;
this.AddPage(0);
this.AddBackground(145, 134, 282, 373, 2600);
this.AddLabel(224, 158, 1267, @"Tourney Signup");
this.AddImage(175, 214, 2117);
this.AddLabel(196, 212, 1267, @"What is it?");
this.AddLabel(192, 237, 1168, @"- A 1v1 ladder system.");
this.AddImage(175, 267, 2117);
this.AddLabel(196, 264, 1267, @"How do I win?");
this.AddLabel(192, 293, 1168, @"- Pwn everyone.");
this.AddImage(175, 320, 2117);
this.AddLabel(196, 316, 1267, @"More Information/Rules");
this.AddHtml( 186, 345, 200, 100, @final, (bool)true, (bool)true);
this.AddButton(210, 458, 2510, 2511, (int)Buttons.JoinButton, GumpButtonType.Reply, 0);
this.AddButton(298, 458, 2510, 2511, (int)Buttons.CancelButton, GumpButtonType.Reply, 0);
this.AddLabel(231, 458, 1267, @"Join");
this.AddLabel(319, 458, 1168, @"Cancel");
this.AddImage(322, 186, 9804);
}
public enum Buttons
{
JoinButton = 1,
CancelButton,
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
switch ( info.ButtonID )
{
case 1: //Join Button
{
from.CloseGump( typeof( TJoinGump ) );
from.Emote( "*"+from.Name+" has registered*" );
World.Broadcast( 0x35, true, "{0} has signed up for the tournament. {1} have registered so far.", from.Name, m_Stone.Players.Count);
m_Stone.VerifyJoin(from);
[COLOR="Red"]from.Title = "*";[/COLOR]
break;
}
case 2: //Cancel Button
{
from.CloseGump( typeof( TJoinGump ) );
from.SendMessage( 0x35, "You decide not to join the tourney." );
break;
}
}
}
}
}
Most likely yes...Then again, im not sure how that system works...Scripture said:Ok, I was having a problem with once signing up for the tourney, it would put a asterisk in your name, I found what was causing that, and removed it, but was curious as to whether or not a certain line would mess up another script (FS PvP point system), that gives people titles.
This is my Tjoingump.cs
Code:/************************************************************************ * * This script was made by milt, AKA Pokey. * * Email: [email protected] * * AIM: TrueBornStunna * * Website: www.f13nd.net * * Version: 1.0.3 * * Release Date: December 25, 2005 * * Edited by Twice AKA Kitchen * *************************************************************************/ using System; using Server; using Server.Gumps; using Server.Network; using Server.Items; namespace Server.Gumps { public class TJoinGump : Gump { MasterTStone m_Stone; public TJoinGump( MasterTStone stone ) : base( 0, 0 ) { m_Stone = stone; string allow = "<baseFONT color='green'>Allowed</baseFONT>"; string disallow = "<baseFONT color='red'>Disallowed</baseFONT>"; string Information = "Welcome to the Drug Dynasty arena sign-ups! Do you think you wtfpwn the fuck out of everyone? If so, signup and prove it. You just may be good enough to win the whole thing, and get the prize at the end! Good luck. A game master has set the following rules for this tourney:<P>"; string BoolRules = "Potions: " + (m_Stone.CanUsePotions ? allow : disallow) + "<P>Healing: " + (m_Stone.CanHeal ? allow : disallow) + "<P>Magic Weps: " + (m_Stone.MagicWeapons ? allow : disallow); string TemplateRules = "<P>Template: " + (m_Stone.DuelType == DuelType.Any ? "<baseFONT color='green'>Any</baseFONT>" : m_Stone.DuelType == DuelType.Mage ? "<baseFONT color='green'>Mages</baseFONT>" : m_Stone.DuelType == DuelType.Dexxer ? "<baseFONT color='green'>Dexxers</baseFONT>" : m_Stone.DuelType == DuelType.Tank ? "<baseFONT color='green'>Tanks</baseFONT>" : ""); string SetRules = "<P>Skill Set: " + (m_Stone.DuelSet == DuelSet.Allow ? "<baseFONT color='green'>Any</baseFONT>" : m_Stone.DuelSet == DuelSet.Sevenx ? "<baseFONT color='green'>7x</baseFONT>" : m_Stone.DuelSet == DuelSet.Fivex ? "<baseFONT color='green'>5x</baseFONT>" : ""); string final = Information + BoolRules + TemplateRules + SetRules; this.Closable=false; this.Disposable=false; this.Dragable=true; this.Resizable=false; this.AddPage(0); this.AddBackground(145, 134, 282, 373, 2600); this.AddLabel(224, 158, 1267, @"Tourney Signup"); this.AddImage(175, 214, 2117); this.AddLabel(196, 212, 1267, @"What is it?"); this.AddLabel(192, 237, 1168, @"- A 1v1 ladder system."); this.AddImage(175, 267, 2117); this.AddLabel(196, 264, 1267, @"How do I win?"); this.AddLabel(192, 293, 1168, @"- Pwn everyone."); this.AddImage(175, 320, 2117); this.AddLabel(196, 316, 1267, @"More Information/Rules"); this.AddHtml( 186, 345, 200, 100, @final, (bool)true, (bool)true); this.AddButton(210, 458, 2510, 2511, (int)Buttons.JoinButton, GumpButtonType.Reply, 0); this.AddButton(298, 458, 2510, 2511, (int)Buttons.CancelButton, GumpButtonType.Reply, 0); this.AddLabel(231, 458, 1267, @"Join"); this.AddLabel(319, 458, 1168, @"Cancel"); this.AddImage(322, 186, 9804); } public enum Buttons { JoinButton = 1, CancelButton, } public override void OnResponse( NetState state, RelayInfo info ) { Mobile from = state.Mobile; switch ( info.ButtonID ) { case 1: //Join Button { from.CloseGump( typeof( TJoinGump ) ); from.Emote( "*"+from.Name+" has registered*" ); World.Broadcast( 0x35, true, "{0} has signed up for the tournament. {1} have registered so far.", from.Name, m_Stone.Players.Count); m_Stone.VerifyJoin(from); [COLOR="Red"]from.Title = "*";[/COLOR] break; } case 2: //Cancel Button { from.CloseGump( typeof( TJoinGump ) ); from.SendMessage( 0x35, "You decide not to join the tourney." ); break; } } } } }
I removed that asterisk, but began to think that if the asterisk being in there over rode the title for each player, will it interfere with the titles FS PvP point system gives?
Thanks, hopefully i feel lots better within a week or so...Slither said:Sorious:- Cheers for the fix we ran a test with 8 peeps and worked a treat.
Tell Pokey g/l with exams
Msyt say's hi and is pleased your getting better.............
seanandre said:Word to the wise.... Do not try to add more than 1 arena with this script. I tried to set up more than 1 arena, 1 for 1v1 and 1 for 2v2 which was a little larger arena, and the server all of a sudden gave a fatal exception or something. Any time I tried to restart it after that, it kept giving the fatal exception. Had tor evert to a backup I made 2 hours before I installed the script. Other than that, it works great.
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Gumps;
using Server.Challenge;
namespace Server
{
public class DualKeywords
{
public static void Initialize()
{
EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
}
private static void EventSink_Speech( SpeechEventArgs e )
{
Mobile from = e.Mobile;
string s_PlayersSpeech = e.Speech;
if (!(e.Mobile is PlayerMobile))
return;
PlayerMobile x = (PlayerMobile)(e.Mobile);
if (s_PlayersSpeech.ToLower().IndexOf( "i challenge thee" ) >= 0 )
StartDuel(false , x , Challenge.Challenge.WorldStones);
if (s_PlayersSpeech.ToLower().IndexOf( "as a team we challenge thee" ) >= 0 )
StartDuel(true , x , Challenge.Challenge.WorldStones);
}
public static void StartDuel ( bool TwoPlayers, PlayerMobile challenger, ArrayList m_Stones )
{
Mobile from = (Mobile)challenger;
PlayerMobile m = from as PlayerMobile;
Items.ChallengeGameType m_Game;
if (TwoPlayers)
m_Game = ChallengeGameType.TwoPlayerTeam;
else
m_Game = ChallengeGameType.OnePlayerTeam;
foreach( Item chall in m_Stones )
{
ChallengeStone challstone = chall as ChallengeStone;
if (challstone.Active == true && challstone.Game == m_Game)
{
if(m.Frozen == true)
{
from.SendMessage(43, "You cannot use right now because you are frozen!");
return;
}
else if (m.Young)
{
from.SendMessage( 43, "You can not use the ladder system if your young!" );
return;
}
else if(m.IsInChallenge)
{
from.SendMessage(43, "You are already in the process of using the ladder system!");
return;
}
/* else if ( from.Map == Map.Trammel || from.Map == Map.Malas || from.Map == Map.Ilshenar )
{
from.SendMessage(1266, "You can only dual in Felucca as we are having problems dualing in other facets!" );
} */
else
{
challstone.ClearAll();
challenger.IsInChallenge = true;
challstone.OnDoubleClick(from);
{
if( m.Hits != m.HitsMax )
{
m.Hits = m.HitsMax;
m.Mana = 125;
m.Stam = 125;
}
return;
}
}
}
}
}
} }
milt said:Yah I dunno how you did 2v2 or even set up multiple arenas, when you click set region, it will replace the old one, not add a new one.
Heres the fix for that, anyone can take it please. I simply made it so you cant join unless either A. theres enough money in the barrel, or B. there is a OverrideBarrel in the props you can set to true.Slither said:Pokey/Milt.......
Run's a treat with the exception of peeps can still sign up again tho the funding barrel is empty...
Any idea if ya can sort so that after the events won all taking part [inc spectators] will be tele'd to Brit ?.
*Slither aka Wraith VoF*
Isletim Sistemi: Microsoft Windows NT 5.2.3790.0
.NET Framework: 1.1.4322.2300
Tarih: 17.02.2006 20:20:02
Hareketliler: 17327
Objeler: 276234
Bagli kullanicilar:
- Count: 95
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Items.MasterTStone.LetThemDuel()
at Server.Items.InternalTimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)
I havent seen milt on in a couple weeks, he is off at school and im not sure when he will be back to fix this stuff so dont explect it any time soon unless you fix it yourself. I do know he had started on working on Version 2.0 last I talked to him so hopefully it will be a Work In Progress when he gets backDragon Slayer said:ok just a coupe noring bugs i found using lastest release first is
if you click start turny no on is signed up will freeze up shard no crash just freeze server up
next one is after a turny no one can enter the turny region any more ??? even if its over thanks
and well the z for the placing people after turny is over is off its setting them to z level 5 when it should be 10 and same happens when going though turny moongates
Sorious said:I havent seen milt on in a couple weeks, he is off at school and im not sure when he will be back to fix this stuff so dont explect it any time soon unless you fix it yourself. I do know he had started on working on Version 2.0 last I talked to him so hopefully it will be a Work In Progress when he gets back
Nah, but more then likely it may take that long :/Greystar said:I think Milt was going to wait for RunUO 2.0 to release 2.0 of this script however I could be wrong.