Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 03-14-2004, 04:48 PM   #1 (permalink)
 
Join Date: Feb 2004
Location: New York City, USA
Age: 35
Posts: 39
Send a message via AIM to twoballcane
Default Artifact Vendor

Summary:
A vendor who sells artifacts.

Description:
This has almost all of the OSI artifacts listed.

If you don't have OSI artifacts installed on your shard this script won't work. There are a few arties I added that weren't included with the B36 dist. so you may have to search the script submissions to find them.

If you can't find the artie anywhere just comment out [" // "] the lines in SBArtifacts that refer to artifacts you are missing.

You can also use this script to figure out how to create a script that creates a vendor that sells ANYTHING.

Installation:
Unzip ArtyDealer.zip into your Scripts/Customs/Mobiles folder.

Restart your server.

Say " [add ArtyDealer " to add the vendor to your shard.
Attached Files
File Type: zip ArtyDealer.zip (2.3 KB, 1038 views)
twoballcane is offline   Reply With Quote
Old 03-22-2004, 01:50 AM   #2 (permalink)
 
Join Date: Feb 2004
Posts: 24
Unhappy Problem With Artifact Dealer, please help.

I tried using the artifact dealer but can't seem to get it to work...listed below are the errors i'm getting. Please help.

Scripts: Compiling C# scripts...failed (4 errors, 1 warnings)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 28, column 57)
The type or namespace name 'SpiritOfTheTotem' could not be found (are you missin
g a using directive or an assembly reference?)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 35, column 55)
The type or namespace name 'HuntersHeaddress' could not be found (are you missin
g a using directive or an assembly reference?)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 38, column 53)
The type or namespace name 'HatOfTheMagi' could not be found (are you missing a
using directive or an assembly reference?)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 40, column 56)
The type or namespace name 'DivineCountenance' could not be found (are you missi
ng a using directive or an assembly reference?)
- Warning: Scripts\Custom\Tent\Chest.cs: CS0162: (line 114, column 10) Unreacha
ble code detected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Tarkan is offline   Reply With Quote
Old 03-22-2004, 01:54 AM   #3 (permalink)
 
Join Date: Feb 2004
Location: Canada eh
Posts: 413
Default

All of the lines in SBArtifact.cs seem to refer to artifacts you probably do not have loaded. You might be able to find them by searching the forums but I suggest that as twoballcane said in his original post you simply add two / characters to the start of each of those lines to comment them out and try compiling again.

For what it's worth, on a clean distribution of B36 I get exactly the same errors in SBArtifact.cs, pretty much as twoballcane warned.

---------------------------------------------------------
awdball (old school c coder learning and luvin c#)
__________________
awdball
awdball is offline   Reply With Quote
Old 03-22-2004, 02:16 AM   #4 (permalink)
 
Join Date: Feb 2004
Posts: 24
Default Problems with Atifact Dealer

Thanks for the tip...done and works fine but why are those 4 artifacts giving me heck and why does it cause a tent error? Strange. How do I get those 4 artifacts loaded and in game?

Quote:
Originally Posted by awdball
All of the lines in SBArtifact.cs seem to refer to artifacts you probably do not have loaded. You might be able to find them by searching the forums but I suggest that as twoballcane said in his original post you simply add two / characters to the start of each of those lines to comment them out and try compiling again.

For what it's worth, on a clean distribution of B36 I get exactly the same errors in SBArtifact.cs, pretty much as twoballcane warned.

---------------------------------------------------------
awdball (old school c coder learning and luvin c#)
Tarkan is offline   Reply With Quote
Old 03-22-2004, 02:26 AM   #5 (permalink)
 
Join Date: Feb 2004
Location: Canada eh
Posts: 413
Default

Unreachable code, is just that. Code that the compiler has detected could never get reached. I'm sure if you look in the chest.cs file in your tent subdirectory of scripts\custom at line 114 would be some innocuous statement and line 113 or 112 would be a 'return' or an 'if' that will never get evaluated as false or some other reason why the compiler will flag that line.

Several other folks will jump on you and just say its a warning 'cause its not that important. but usually these are poorly coded parts of scripts.

This is just one of the many ways the C# compiler trys to help keep us from shooting ourselves in the foot. C or C++ would have merrily ignored those lines of code and the optimizer would likely have never even compiled them into the resultant object or executable, just cause they could never be reached.
---------------------------------------------------------
awdball (old school c coder learning and luvin c#)
__________________
awdball
awdball is offline   Reply With Quote
Old 03-22-2004, 02:32 AM   #6 (permalink)
 
Join Date: Feb 2004
Posts: 24
Default

The funny thing is that I only get those tent errors when I add anything to do with artifacts. oh well....
Thanks for all the info...I'm no C# genius and am green as they get with this stuff...all help is welcome.

[quote=awdball]Unreachable code, is just that. Code that the compiler has detected could never get reached. I'm sure if you look in the chest.cs file in your tent subdirectory of scripts\custom at line 114 would be some innocuous statement and line 113 or 112 would be a 'return' or an 'if' that will never get evaluated as false or some other reason why the compiler will flag that line. etc..
Tarkan is offline   Reply With Quote
Old 03-22-2004, 01:02 PM   #7 (permalink)
 
Join Date: Feb 2004
Location: New York City, USA
Age: 35
Posts: 39
Send a message via AIM to twoballcane
Default

Quote:
Originally Posted by Tarkan
I tried using the artifact dealer but can't seem to get it to work...listed below are the errors i'm getting. Please help.

Scripts: Compiling C# scripts...failed (4 errors, 1 warnings)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 28, column 57)
The type or namespace name 'SpiritOfTheTotem' could not be found (are you missin
g a using directive or an assembly reference?)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 35, column 55)
The type or namespace name 'HuntersHeaddress' could not be found (are you missin
g a using directive or an assembly reference?)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 38, column 53)
The type or namespace name 'HatOfTheMagi' could not be found (are you missing a
using directive or an assembly reference?)
- Error: Scripts\Custom\ArtyDealer\SBArtifact.cs: CS0246: (line 40, column 56)
The type or namespace name 'DivineCountenance' could not be found (are you missi
ng a using directive or an assembly reference?)
- Warning: Scripts\Custom\Tent\Chest.cs: CS0162: (line 114, column 10) Unreacha
ble code detected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Your error regarding the Tent script will most likely go away once you fix the Artifact dealer errors.
Whenever I add a custom script that may not be 100% plug-n-play, I get errors for the new script AS WELL AS errors in my Jail system script [and some times the Tent script] that aren't even related to the new custom I was trying to add. But, once I fix the errors pertaining to the new script, the other errors go away on their own.
I don't know why this happens since the errors in the new custom script don't even refer to the Jail system [on the surface at least].
twoballcane is offline   Reply With Quote
Old 03-24-2004, 08:38 AM   #8 (permalink)
 
Join Date: Feb 2004
Posts: 24
Question Adding artifacts to vendor

How do I add more artifacts to the list already present?
Tarkan is offline   Reply With Quote
Old 03-24-2004, 09:42 AM   #9 (permalink)
 
Join Date: Feb 2004
Location: New York City, USA
Age: 35
Posts: 39
Send a message via AIM to twoballcane
Default

Quote:
Originally Posted by Tarkan
How do I add more artifacts to the list already present?
Open up SBArtifact.cs. Once you do that, certain lines of script in that file are going to jump out and bite you.

It's really not too difficult. Look for these lines:
Code:
	Add( new GenericBuyInfo( "Voice Of The Fallen King",typeof( VoiceOfTheFallenKing ), 500000, 20, 5063, 1361 ) );
Here's the key:
Code:
	Add( new GenericBuyInfo( "<NAME YOU WANT DISPLAYED ON VENDOR SELL LIST>",typeof( <ActualNameOfTheConstructable> ), <Price>, <AMOUNT TO STOCK>, <ItemID TO DISPLAY ON THE VENDOR'S LIST (picture of the BASE item)>, <HUE TO DISPLAY FOR THE ITEM> ) );
twoballcane is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5