|
||
|
|
#1 (permalink) |
|
Summary:
Hey Just thought ill add this, cause i had a hard time finding it, then altering it so people couldnt get all there skills GM'd from one ball, im not a great scripter but i hope some people like it and use it. Ive set it to give 1 skill at 100%, you can alter it to 50% 70% or what ever you wish. Its made not movable, i had it as a item in a new characters bag, and so they couldnt make 1 character then make 10 characters or more and transfer the balls. Well hope someone likes it. Description: Installation: |
|
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
and see how items are added to new players
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#7 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
A few key things to remember when giving out skill balls -
You have a few options to prevent exploits of massive gaining of skills First off, if you dont require 0 skill (or below 50% or something), make sure that you have the skillball associated with a player, so that they cannot be transferred via new characters to allow someone to gain to the skillcap. Another thing is, if you dont want to give owners, make sure you do restrict how they are used, because if you give each ball 50% skill gain charge, then someone can have balls given to them to gain 50% in EVERY skill (or to the skill cap). So what I do is, give them 2 balls, put it into their bank, and dont make it movable. Then make it usable from the bank and require that the skill is 0%. If they try to use the ball, and there are no skills to gain (either goes over skill cap, or all skills are above 0%), then remove the ball. - Exploit Security at its best. These key ideas brought to you by your local Exploit Police. Here to make the community exploit free. |
|
|
|
|
|
#9 (permalink) |
|
Join Date: Feb 2004
Location: Kansas City
Age: 33
Posts: 293
|
this is a great script i have several skill balls i have modded from this script. ty for the contribution.
__________________
Why do cats always puke on the carpet when the kitchen floor is only a foot away? |
|
|
|
|
|
#10 (permalink) |
|
I have it set up on my shard to give each player two 100's and one 85.
I would like to give them the choice to raise the skills they are given when they create the character. Example. Warrior starts with: 50 Swords 30 Tactics 20 Healing (Im Typing on the fly those aren't actual numbers :-P) I want that character to be able to raise lets say both Swords and Tacts to 100 with the two 100 balls, and healing to 85. But if they skill has any points in it it doesnt show on the gump for choosing a skill. I looked through the script and i might have missed the location of what the cut-off is for what skills can be choosen. Any help would be a blessing. Thanks in advance :-) --Deacon |
|
|
|
|
|
|
#11 (permalink) |
|
Guest
Posts: n/a
|
im stuck on this i DLed it and the thing imhaven trouble with is i put it on so cahrs start out with a skill ball but when they click on it a gump comes up says teh tittle but thats it... they cant choice what skill or anything .. Am i doing something wrong or do i need to cahnge something?
|
|
|
|
#12 (permalink) |
|
Join Date: Feb 2004
Location: Earth
Age: 34
Posts: 158
|
Here is the statball since this is a really old script
Code:
using System;
using Server.Network;
using Server.Items;
using Server.Gumps;
namespace Server.Items
{
public class StatBall : Item
{
private int m_StatBonus = 0;
private string m_BaseName = "a stat ball +";
public bool GumpOpen = false;
[CommandProperty( AccessLevel.GameMaster )]
public int StatBonus
{
get { return m_StatBonus; }
set {
m_StatBonus = value;
this.Name = m_BaseName + Convert.ToString(m_StatBonus);
}
}
[Constructable]
public StatBall( int StatBonus ) : base( 6249 )
{
m_StatBonus = StatBonus;
Name = m_BaseName + Convert.ToString(StatBonus);
Movable = false;
}
[Constructable]
public StatBall() : base( 6249 )
{
Name = m_BaseName + Convert.ToString(StatBonus);
Movable = false;
}
public StatBall( Serial serial ) : base( serial )
{
}
public override void OnDoubleClick( Mobile from )
{
if ( (this.StatBonus == 0) && (from.AccessLevel < AccessLevel.GameMaster) ) {
from.SendMessage("This Stat Ball isn't charged. Please page for a GM.");
return;
}
else if ( (from.AccessLevel >= AccessLevel.GameMaster) && (this.StatBonus == 0) ) {
from.SendGump( new PropertiesGump( from, this ) );
return;
}
if ( !IsChildOf( from.Backpack ) )
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
else if (!GumpOpen) {
GumpOpen = true;
from.SendGump( new StatBallGump( from, this ) );
}
else if (GumpOpen)
from.SendMessage("You're already using the ball.");
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_StatBonus );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch (version) {
case 0 : {
m_StatBonus = reader.ReadInt();
break;
}
}
}
}
}
namespace Server.Gumps
{
public class StatBallGump : Gump
{
private StatBall m_skb;
public StatBallGump ( Mobile from, StatBall skb ) : base ( 20, 30 )
{
m_skb = skb;
AddPage ( 0 );
AddBackground( 0, 0, 260, 115, 5054 );
AddImageTiled( 10, 10, 240, 23, 0x52 );
AddImageTiled( 11, 11, 238, 21, 0xBBC );
AddLabel( 65, 11, 0, "Stats you can raise" );
int Strength = from.RawStr; // (sic!)
int Dexterity = from.RawDex;
int Intelligence = from.RawInt;
if ( (Strength + m_skb.StatBonus) <= 100 ) {
AddImageTiled( 10, 32 + (0 * 22), 240, 23, 0x52 );
AddImageTiled( 11, 33 + (0 * 22), 238, 21, 0xBBC );
AddLabelCropped( 13, 33 + (0 * 22), 150, 21, 0, "Strength" );
AddImageTiled( 180, 34 + (0 * 22), 50, 19, 0x52 );
AddImageTiled( 181, 35 + (0 * 22), 48, 17, 0xBBC );
AddLabelCropped( 182, 35 + (0 * 22), 234, 21, 0, Strength.ToString( "F1" ) );
if ( from.AccessLevel >= AccessLevel.Player )
AddButton( 231, 35 + (0 * 22), 0x15E1, 0x15E5, 1, GumpButtonType.Reply, 0 );
else
AddImage( 231, 35 + (0 * 22), 0x2622 );
}
if ( (Dexterity + m_skb.StatBonus) <= 100 ) {
AddImageTiled( 10, 32 + (1 * 22), 240, 23, 0x52 );
AddImageTiled( 11, 33 + (1 * 22), 238, 21, 0xBBC );
AddLabelCropped( 13, 33 + (1 * 22), 150, 21, 0, "Dexterity" );
AddImageTiled( 180, 34 + (1 * 22), 50, 19, 0x52 );
AddImageTiled( 181, 35 + (1 * 22), 48, 17, 0xBBC );
AddLabelCropped( 182, 35 + (1 * 22), 234, 21, 0, Dexterity.ToString( "F1" ) );
if ( from.AccessLevel >= AccessLevel.Player )
AddButton( 231, 35 + (1 * 22), 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0 );
else
AddImage( 231, 35 + (1 * 22), 0x2622 );
}
if ( (Intelligence + m_skb.StatBonus) <= 100 ) {
AddImageTiled( 10, 32 + (2 * 22), 240, 23, 0x52 );
AddImageTiled( 11, 33 + (2 * 22), 238, 21, 0xBBC );
AddLabelCropped( 13, 33 + (2 * 22), 150, 21, 0, "Intelligence" );
AddImageTiled( 180, 34 + (2 * 22), 50, 19, 0x52 );
AddImageTiled( 181, 35 + (2 * 22), 48, 17, 0xBBC );
AddLabelCropped( 182, 35 + (2 * 22), 234, 21, 0, Intelligence.ToString( "F1" ) );
if ( from.AccessLevel >= AccessLevel.Player )
AddButton( 231, 35 + (2 * 22), 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0 );
else
AddImage( 231, 35 + (2 * 22), 0x2622 );
}
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
if ( (from == null) || (m_skb.Deleted) )
return;
m_skb.GumpOpen = false;
if ( info.ButtonID > 0 ) {
int count = 0;
count = from.RawStr + from.RawDex + from.RawInt;
if ( (count + m_skb.StatBonus) > (from.StatCap) ) {
from.SendMessage( "You cannot exceed the Stat cap." );
return;
}
switch (info.ButtonID)
{
case 1 : {
if (from.RawStr + m_skb.StatBonus <= 100) {
from.RawStr += m_skb.StatBonus;
m_skb.Delete();
}
else
from.SendMessage("You have to choose another Stat.");
break;
}
case 2 : {
if (from.RawDex + m_skb.StatBonus <= 100) {
from.RawDex += m_skb.StatBonus;
m_skb.Delete();
}
else
from.SendMessage("You have to choose another Stat.");
break;
}
case 3 : {
if (from.RawInt + m_skb.StatBonus <= 100) {
from.RawInt += m_skb.StatBonus;
m_skb.Delete();
}
else
from.SendMessage("You have to choose another Stat.");
break;
}
}
}
}
}
}
__________________
All there souls belong to me on Nubblies shard. |
|
|
|
|
|
#16 (permalink) |
|
Join Date: Oct 2003
Location: Colorado
Age: 29
Posts: 808
|
Anyway to make these balls give .1, .2, .3, .4, .5, .6, .7, .8, or .9 instead of only whole numbers?
I am sure there is a way but I cant figure it out and since you can make the skill balls maybe you have the knowledge on how this is done? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|