|
||
|
|||||||
| 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 Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
/*
Script Name: playerwealth.cs Author: CEO Version: 1.0 Purpose: Registers command to create an html report of all player's wealth on shard. Description: Creates playerwealth.html in your shard's root folder. This file contains a breakdown of all player's wealth on your shard by account. The report 'walks' player's backpacks and bank boxes as well as items in houses they own recording all gold and checks for the account. A nice color-coded report is then produced allowing you to see who the tycoons are on your shard! Installation: Install your custom scripts folder and restart. Usage: ]playerwealth */ To view a sample report, click here: http://www.easyuo.com/downloads/sampleplayerwealth.html (Names and numbers have been changed to protect the rich!) Edit: Oh, RunUO 2.0 (the SVN distribution) only and you must have Owner privs to run.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 06-15-2008 at 01:05 PM. |
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
|
got an error for you...
Code:
+ Custom/New Scripts/Systems/Commands/playerwealth.cs:
CS0029: Line 102: Cannot implicitly convert type 'System.Collections.ArrayLi
st' to 'System.Collections.Generic.List<Server.Multis.BaseHouse>'
CS1502: Line 110: The best overloaded method match for 'System.Collections.G
eneric.List<Server.Multis.BaseHouse>.AddRange(System.Collections.Generic.IEnumer
able<Server.Multis.BaseHouse>)' has some invalid arguments
CS1503: Line 110: Argument '1': cannot convert from 'System.Collections.Arra
yList' to 'System.Collections.Generic.IEnumerable<Server.Multis.BaseHouse>'
|
|
|
|
|
|
#4 (permalink) | |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
Quote:
Hmm, Though that line shouldn't be there.. It looks like older testing stuff. I'll remove some things a repost...
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 06-28-2007 at 12:10 AM. |
|
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
Yeah, some stuff I missed cleaning up. That shouldn't affect how it runs though.. You can remove a couple of lines that do nothing.. Or regrab it in a sec, I'll replace the current one.
Edit: Ok removed 2 lines and replaced. Though not sure if that's going to get rid of your issue... Compiled clean and tested fine for me...
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 06-28-2007 at 12:17 AM. |
|
|
|
|
|
#8 (permalink) |
|
Forum Expert
|
Oh, this looks good. I am going to try it!
Thanks for sharing!
__________________
;)My C# Bookshelf (carpented by Soultaker);) BTW: Please ask questions in the adequat forum and not on a private message! Otherwise nobody can learn from it!
|
|
|
|
|
|
#10 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 744
|
I get same error are Pyro. 2.0 RC1 server
Code:
Errors:
+ Customs/playerwealth.cs:
CS1502: Line 107: The best overloaded method match for 'System.Collections.G
eneric.List<Server.Multis.BaseHouse>.AddRange(System.Collections.Generic.IEnumer
able<Server.Multis.BaseHouse>)' has some invalid arguments
CS1503: Line 107: Argument '1': cannot convert from 'System.Collections.Arra
yList' to 'System.Collections.Generic.IEnumerable<Server.Multis.BaseHouse>'
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#11 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
Strange. That's what we're running, least I thought so. Can you look at your basehouse.cs in multis. Search for allHouses, around line 86. What is that code like. This is what I have in my basehouse.cs at those lines:
Code:
List<BaseHouse> allHouses = new List<BaseHouse>( 2 );
for ( int i = 0; i < acct.Length; ++i )
{
Mobile mob = acct[i];
if ( mob != null )
allHouses.AddRange( GetHouses( mob ) );
}
![]() You have to run the command, or you can add it into your reports.cs file to fire off automatically as well with other reports.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 06-28-2007 at 11:27 AM. |
|
|
|
|
|
#12 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 744
|
Line 86 Basehouse.cs
Code:
ArrayList allHouses = new ArrayList( 2 );
for ( int i = 0; i < acct.Length; ++i )
{
Mobile mob = acct[i];
if ( mob != null )
allHouses.AddRange( GetHouses( mob ) );
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#13 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
You guys are not running 2.0 or at least RC1 or the latest or something..
http://svn.runuo.com/repos/runuo/dev.../BaseHouse.cs: Code:
List<BaseHouse> allHouses = new List<BaseHouse>();
for ( int i = 0; i < acct.Length; ++i )
{
Mobile mob = acct[i];
if ( mob != null )
allHouses.AddRange( GetHouses( mob ) );
}
![]()
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx |
|
|
|
|
|
#14 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 744
|
When I boot my server it says I am running
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527 Edit: I just downloaded the latest RC1 rar extracted it and checked the version and it says " Version 2.0.2357.32527 " Which is the same as my running shard.
__________________
Friends Come and go but Enemies accumulate Last edited by oiii88; 06-28-2007 at 02:29 PM. |
|
|
|
|
|
#15 (permalink) | ||
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
No idea, whatever you're running it's not the same. I've grabbed 187 clean, compiled it with playerwealth.cs the only added extra and it worked fine.
Quote:
Quote:
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 06-28-2007 at 03:03 PM. |
||
|
|
|
|
|
#16 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 744
|
Well if you go to runuo.com and click download and download the package they have posted as runuo2.0rc1 it is the exact same version as I am running. So I dont see how I can not be running current code. Anyways thanks just to bad i cant run it....
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#17 (permalink) | ||
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
Quote:
Ah, the version in the download section <> SVN 187. Quote:
I checked it and it is old ArrayList code. Use the SVN version. As far as I know SVN is the way to get the latest/greatest, site admins should make it clear it's not the same as SVN and maybe provide an SVN link on those pages. Supporting multiple versions gets tough, I'll no longer write for 1.0, but if we gotta check difs between the download version vs. SVN that'll be a pita. Switch to SVN and you'll be good to go.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 06-28-2007 at 04:45 PM. |
||
|
|
|
|
|
#18 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 744
|
Ok thanks for looking into it. I am editing the version I downloaded to use Arraylist as you mentioned. So far Ive gotten 5 of the compiling errors fixed guess if I get anymore errors on this compile Ill post in script support.
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#20 (permalink) | |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
Quote:
You need to get an SVN client, I recommend Tortoise.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx |
|
|
|
|
|
|
#22 (permalink) | |
|
Forum Novice
Join Date: Jun 2004
Age: 49
Posts: 806
|
Quote:
Line 103: Code:
List<BaseHouse> allHouses = new List<BaseHouse>(2); Code:
ArrayList allHouses = new ArrayList(2); and Line 113: Code:
BaseHouse house = allHouses[i]; Code:
BaseHouse house = (BaseHouse) allHouses[i];
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx Last edited by CEO; 07-06-2007 at 01:10 PM. |
|
|
|
|
|
|
#23 (permalink) | |
|
Forum Novice
|
Quote:
Most scripts i usually have to tweek a bit to get them working lol |
|
|
|
|
|
|
#24 (permalink) |
|
Forum Expert
|
Great!
I got rid of the 10.000gp barrier, because I am just too curious! ![]() Well done! This is something I can definately learn from! Lia
__________________
;)My C# Bookshelf (carpented by Soultaker);) BTW: Please ask questions in the adequat forum and not on a private message! Otherwise nobody can learn from it!
|
|
|
|
|
|
#25 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: (Near) Atlanta, GA
Posts: 527
|
Forgive me for being pretty ignorant in C#... but does anyone know what code I would add (or alter) in the report.cs file to make this happen automatically when the reports are ran?
I tried to do it myself... but I have NO idea what to do in there. ![]() EDIT: Also... is there way to not make it poll anything higher than access level of a player or seer? I have an admin that has 10 million (and is taking up the #1 spot), and we cant' figure out where that total is coming from. He has no gold in the bank or on his pack.. no checks.... I love for it to just report that player's totals and not anything that the admins / GMs have. EDIT, EDIT - Nevermind, we just deleted the GM account. It was a problem somewhere in the account. He had no gold on him, yet it was reporting 10 million. Once we nuked the account, it started working right.Last edited by nadious; 07-12-2007 at 12:34 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|