|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
any one know where i can get a race script ???.....ive seen them all over search i just cant get them to work ......and i was wanting tyo ask ...can some buddy tell me how to make it where myplayerscan butmy static houses and live in them ???.....plz & ty
![]() |
|
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
for race scripts look at this thread
http://www.runuo.com/forum/viewtopic.php?t=18485&highlight=combination and do a search for statichousing there a nice system for making houses in town player ownable |
|
|
|
|
|
#8 (permalink) |
|
thats ok i removed it any way .....not the right race thing imlooking for ...and how would i go about making the ar for my armors to go over 70 ??...cuz im thinking about puting ELven armor in game andi want it to be 90 ar ...i tryed fixing the armors ar but when i get in game it still stays at 70 ??
|
|
|
|
|
|
|
#11 (permalink) | |
|
Account Terminated
|
Quote:
You set this for all mobiles by doing the following in any class, everyone else suggestion most likely won't work talking about Ceday's suggestion modifying ArmorRating :-) [code:1]public static void Initialize() { Mobile.MaxPlayerResistance = 71; }[/code:1] |
|
|
|
|
|
|
#13 (permalink) |
|
Forum Novice
|
I already did that before, but thought I was wrong cause I was getting the following error:
[code:1] Error: Scripts\Custom\NewMine\customPlayerMobile.cs: CS0506: <line 19, column1> īServer.Mobile.ArmorRating.getī because it is not marked virtual, abstract or override [/code:1] and this is my code: [code:1] using System; using System.IO; using System.Collections; using Server; using Server.Misc; using Server.Items; using Server.Gumps; using Server.Multis; using Server.Engines.Help; using Server.Network; using Server.Mobiles; namespace Server.Mobiles { public class customPlayerMobile : PlayerMobile { public override double ArmorRating { get { return 99; } } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int)2 );//version } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } } } [/code:1] Can anyone help me with this? |
|
|
|
|
|
#14 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
you are trying to inherit customPM from original PlayerMobile script.
but to override, it should have modifers like override, abstract or virtual in the base class.. In PlayerMobile, there is not.. If you want to write a custom script. C/P PlayerMobile to customPM and change class name. (Remove the enums part) After that you can add the code lines, I suggested.. |
|
|
|
|
|
#20 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
OK, then you can use:
public override int MaxPlayerResistance { get { return 90; } set { MaxPlayerResistance=value; } } you can also do with Phantom code, but then, it changes for all Mobiles not for just Players. If it is OK with you, you can use it too.. |
|
|
|
|
|
#22 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
public int MaxPlayerResistance
{ get { return 90; } set { MaxPlayerResistance=value; } } this works fine with me..it doesnt give any error. but it doesnt override, because it need abstract, virtual or override modifiers. The function in the base class doesnt have any of those. |
|
|
|
|
|
#24 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
btw, the code above doesnt work..(someone says in another thread)
so you have to do Mobile.MaxPlayerResistance.. but I am confused at a point. I am using VS.NET 2K2 and in the object browser it says public int MaxPlayerResistance [ get, set ] but in the documents which RunUO includes: (static) int MaxPlayerResistance( get; set; ) that is interesting ![]() |
|
|
|
|
|
#25 (permalink) |
|
Forum Novice
|
then I could do:
[code:1] using System; using System.IO; using System.Collections; using Server; using Server.Misc; using Server.Items; using Server.Gumps; using Server.Multis; using Server.Engines.Help; using Server.Network; using Server.Mobiles; public class customPlayerMobile : PlayerMobile { public customPlayerMobile() { } public customPlayerMobile( Serial s ) : base( s ) { } public double ArmorRating { get { return 99; } } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); int version = writer.ReadInt(); } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } } [/code:1] ??? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|