|
||
|
|||||||
| Custom Script Releases This forum is where you can release your custom scripts for other users to use. Please note: By releasing your scripts here you are submitting them to the public and as such agree to publish them under the GPL licensing terms. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
Advanced Player Gate Script for RunUO 2.0
Script version# 6.07.12 by Lokai Additional scripting by Mum_Chamber and Alcore Completely rescripted for RunUO 2.0, and completely redesigned for maximum performance. Description: This gate allows GameMasters to create (IN GAME) custom gates that perform a variety of functions. They can teleport to somewhere, they can change the Player's Stats, Skills, or Hue, they can Resurrect the Player, or they can do all of these things and more. This can be used as a Profession Gate, a Resurrection Gate, a Race Gate, a Class Gate, or an Event Gate. To Use: Simply add this script to your RunUO 2.0 custom scripts folder. Then, use the [add command to create an AdvancedPlayerGate, and use [props command to adjust the many built-in features. NEW! Now you can adjust many features from the GateDialogGump! HERE IS THE CURRENT LIST OF FEATURES THAT CAN BE ACCESSED BY THE GUMP:
The gate now can add a title of your choice, limit the number of players, show a custom message, give items (blessed or not) and take them back. (May be useful for Events.) Modified By Alcore...added the bushido and ninjitsu skills Update 6/19/2006 by Lokai
__________________
Advanced Player Gate with Shard Control - My Master Runebook - Linked Books & Bags - Full Toolbar (Fubar) - XML Bible system - Music Box - Enhancement Deeds - House Paints - Light Switch Last edited by Lokai; 06-10-2007 at 06:56 PM. |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: Sep 2004
Age: 33
Posts: 685
|
You still have the null reference error problem, Lokai? Or is it ready for download and installation? We're looking forward to using this as a keystone to our extensive race system.
__________________
Please don't preach to me. You won't convert me. You won't convince me. I am me and you are you. I will respect you because that's who I am. Disrespect me, and you've only proven who you really are. |
|
|
|
|
|
#5 (permalink) | |
|
Forum Expert
|
Quote:
I have been trying to make it work, but have been running into some roadblocks, including lack of time to work on it.... Anyway, if you want a stable version, please download my original 2.0 release which you can find in the Archive scripts section here: Advanced Player Gate for RunUO 2.0 RC1 SORRY, JUST FIXED THE URL ABOVE. IT NOW TAKES YOU TO THE ARCHIVED SCRIPT. whew!
__________________
Advanced Player Gate with Shard Control - My Master Runebook - Linked Books & Bags - Full Toolbar (Fubar) - XML Bible system - Music Box - Enhancement Deeds - House Paints - Light Switch Last edited by Lokai; 07-14-2006 at 06:32 PM. |
|
|
|
|
|
|
#6 (permalink) | |
|
Forum Expert
|
Quote:
![]() |
|
|
|
|
|
|
#7 (permalink) |
|
Newbie
Join Date: Mar 2006
Posts: 97
|
Love this script Lokai. Was the perfect solution for a caste system I was wanting to add to one of my playable races.
One question. Could you help me locate where in the script the actual action of walking through the gate first occurs? I would like to add a gump that asks the player if they are sure they want to go through it since it will make them unable to learn certain skills. Dont want people going through it on accident. hehe |
|
|
|
|
|
#8 (permalink) | |
|
Forum Expert
|
Quote:
You have a couple options. You can write your own routine and place everything in the 'UseGate' routine inside a big 'IF' loop. Or, you could override the Moongate's other routines that I never called, like OnMoveOver, or something. Technically, I suppose OnMoveOver is the routine that actually gets the whole ball rolling. In a Moongate, the sequence of routines is like this: OnMoveOver or OnDoubleClick calls CheckGate CheckGate calls a DelayTimer DelayTimer calls DelayCallback DelayCallback calls BeginConfirmation BeginConfirmation calls EndConfirmation EndConfirmation calls UseGate Whew! You can check those routines if you want to see what each one does. |
|
|
|
|
|
|
#9 (permalink) | |
|
Lurker
Join Date: Jul 2006
Location: Kansas
Posts: 12
|
Quote:
|
|
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
|
Everyone,
Just something to watch for in this. A couple times I made a gate, and did not set any STR, DEX or INT on it, but accidentally left the 'ChangesStats' to True. BIG mistake. If anyone goes through it, it sets their Stats to '0', hehe. They can't move or cast spells or anything! Plus it strips them naked! That'll teach em. |
|
|
|
|
|
#11 (permalink) | |
|
Newbie
Join Date: Mar 2006
Posts: 97
|
Quote:
![]() |
|
|
|
|
|
|
#13 (permalink) |
|
Lurker
Join Date: Mar 2006
Posts: 12
|
I agree, very nice script only one problem i have found
when players click on the gate and the item option comes up and any player or myself clicks on it and targets an item we get a crash i have commented those lines of the script out, or i think i did regardless this is the crash were getting, just bringing this to your attnetion bud other than that nice job Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Server.Custom.AdvancedPlayerGate.ItemDialog..ctor( AdvancedPlayerGate gate, Item item) at Server.Custom.AdvancedPlayerGate.InternalTarget.On Target(Mobile from, Object o) at Server.Targeting.Target.Invoke(Mobile from, Object targeted) at Server.Network.PacketHandlers.TargetResponse(NetSt ate state, PacketReader pvSrc) at Server.Network.MessagePump.HandleReceive(NetState ns) at Server.Network.MessagePump.Slice() at Server.Core.Main(String[] args) |
|
|
|
|
|
#14 (permalink) |
|
Lurker
Join Date: Dec 2005
Posts: 22
|
I dropped the script in and restarted shard. Set props to change skills and stats. Set all stats to 100 and certain skills to what I wanted. Then I used my player character and walked through gate. Everything worked as expected except for his stats did not change from what they were before he walked through the gate. Any thoughts?
|
|
|
|
|
|
#15 (permalink) | |
|
Forum Expert
|
You are quite right, obelix. I have never been able to get the Item part to work since updating it from the old version. I just moved 1400 miles north from Florida to Rochester, NY, so I am not quite settled in, but this script is about 4th on my list when I get started again. In the meantime, please comment out the Item sections, as you are doing.
Thanks. Quote:
|
|
|
|
|
|
|
#16 (permalink) | |
|
Forum Expert
|
LNewman, all I can figure is that you have the boolean value set to false that states whether stats change or not. (right?)
Quote:
|
|
|
|
|
|
|
#17 (permalink) |
|
Lurker
Join Date: Aug 2006
Posts: 5
|
Great script I have modified items to work with my shard. Now my question is How would I add some sort of check, on lets say their stats, if they have the gates set amount it tells them they cant go through again, but if they dont have it, it will let them proceed through the gate? I do not understand C# but I am good at figuring stuff out, so a point in the right direction would be helpful.
Thanks, Merlinman27 |
|
|
|
|
|
#18 (permalink) | |
|
Forum Expert
|
PHP Code:
Quote:
|
|
|
|
|
|
|
#21 (permalink) |
|
Forum Novice
|
I figure that may be it's better to give out skill items based on player's skill level instead of the gate settings.
Code:
if (_SkillsGiveItems)
{
Server.Skills s = m.Skills;
for (int i = 0; i < s.Length; ++i)
//if (gAllSkills[i] >= _SkillsItemsMin)
if (s[i].Base >= _SkillsItemsMin)
SkillsItems((SkillName)i, m);
}
![]() |
|
|
|
|
|
#22 (permalink) | |
|
Forum Expert
|
The gate gives out items based on the gate skill setting because the gate is already setting all skills anyway. The gate assumes that a player has no skills to speak of. So, when the gate gives someone 60 mage and 70 carpentry, if the 'SkillsItemsMin' is set to 65 it will only give them carpentry items, but if the value is 55 then it will give them both mage and carpentry items.
Quote:
|
|
|
|
|
|
|
#23 (permalink) | |
|
Forum Novice
|
Quote:
You are right. I said so just because I need to set up the last gate in the new player area, then give him all the newbie stuff (bookoftravel...etc) together with some stuff depending on his chosen profession. That's why I tweak the code such that the gate gives out skill items depending on both the gate setting and the player's skill chosen. Code:
if (_SkillsGiveItems)
{
Server.Skills s = m.Skills;
for (int i = 0; i < s.Length; ++i)
if ((gAllSkills[i] >= _SkillsItemsMin) && (s[i].Base >= _SkillsItemsMin))
SkillsItems((SkillName)i, m);
}
![]() Thanks and your scripts are awesome. |
|
|
|
|
|
|
#25 (permalink) |
|
Forum Novice
|
I am getting this error after carefully merging Lokai's ShardControl/AdvancedPlayerGate script to mine, any one have any ideas?
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2870.7162
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Spells/Base/Spell.cs:
CS1513: Line 67: } expected
CS1520: Line 126: Class, struct, or interface method must have a return type
CS1513: Line 1018: } expected
Code:
m_Contexts.Remove( m );
}
private class DelayedDamageContext {
Here is line 126 Code:
public Spell( Mobile caster, Item scroll, SpellInfo info ) Code:
m_Spell.m_CastTimer = null; } } } } } Last edited by neuton; 11-12-2007 at 01:26 AM. Reason: Changed the lines for easier read. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|