RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Harvestable Drugs [RUNUO 2.0] [Callandor2k ML SVN]

Sythen

Sorceror
Nope, SA Compatible means you went to Orbsydia.ca and looked up Peoharen's Stygian Abyss Modifications and modified your server accordingly with his map edits. If you don't do that, then Ter Mur will not be recognized by your server. :)
 
ok

where can i grow these...? i have built a house and cant plant seeds, i tried dirt and grass tiles. so? otherwise love this script and im sure that my player base will too. uhm, did you happen to do those edits? for the SA?
 

Sythen

Sorceror
where can i grow these...?
you can grow them in any furrow (farmland) throughout Sosaria! :D

did you happen to do those edits? for the SA?
Yes, for my server I have the map edits finished for SA... These scripts aren't specifically for SA but since I have the edits I chose to add compatibility for them. If you want the edits you need to go to Orbsydia.ca and look up SA and read Peoharens threads. They will tell you everything you need to know.
 

Soulshifter

Wanderer
I am trying to get the K9 drug dogs to work but they just walk around like a normal dog. I have been standing in a pack of them for hours with no results. Does anyone have these working? I am working on a quest for the drug system and I need to use them.
 

Thagoras

Sorceror
Soulshifter;848915 said:
I am trying to get the K9 drug dogs to work but they just walk around like a normal dog. I have been standing in a pack of them for hours with no results. Does anyone have these working? I am working on a quest for the drug system and I need to use them.

Ok, I know of this. The drug dog marks your character (when it first sees you) and it's supposed to wander over and check the contents of your pack. If it finds no drugs, it marks you as checked and won't check again until the Mark has been replaced with another mobile. I didn't want the dog to check and check and check the same player over and over and over again.

Try putting a few more mobiles in the area.
 

Soulshifter

Wanderer
I have 3 separate accounts standing in a pack of 5 drug dogs, each toon has 1 or 2 Marijuana Leaves in his pack. The dogs never came over to check any of the packs, that I noticed anyway. I am running the RUNUO 2.0 Callandor ML package.

Edit: Through some testing I have found that it is flagging me criminal but they never attack me.
 

Thagoras

Sorceror
Soulshifter;848948 said:
I have 3 separate accounts standing in a pack of 5 drug dogs, each toon has 1 or 2 Marijuana Leaves in his pack. The dogs never came over to check any of the packs, that I noticed anyway. I am running the RUNUO 2.0 Callandor ML package.

Edit: Through some testing I have found that it is flagging me criminal but they never attack me.

Right, as per the purpose of the drug dogs. Perhaps you might look for the Killable Guards. These are basically guards that can protect a town, but will attack players marked criminal. The nice thing about them is that you can run away (or fight them). No insta kill.
 

Soulshifter

Wanderer
Thagoras;848955 said:
Right, as per the purpose of the drug dogs. Perhaps you might look for the Killable Guards. These are basically guards that can protect a town, but will attack players marked criminal. The nice thing about them is that you can run away (or fight them). No insta kill.

K thanks, that is what I am after. I don't want insta kill. I thought the dogs would attack but the guards will be a nice addition. Now to add some Killer Nugs to the drug list for my courier quest :D
 

Soulshifter

Wanderer
Detect hidden

How hard would it be to get the dogs to detect a hidden player within a certain range?

Edit: NM, they see through stealth, now to make them reveal the player.
 

Soulshifter

Wanderer
I have been working on the reveal mod. It will reveal the any players that are with in 3 tiles.

1 line added to the OnThink section.
Code:
		public override void OnThink() 
		{ 
			if (this.mark != null)
			{
				double markPick = GetDistanceToSqrt(mark);
                                if ((markPick < 2) && (!HasChecked)) 
 				{
					if (mark.Backpack != null)
					{
						Container pouch = mark.Backpack;
						ArrayList finalitems = new ArrayList( pouch.Items );
						foreach (Item items in finalitems)
						{
							if ((items != null) && (!(items.Deleted)))
							{
								HasChecked = true;
								if (IsDrug(items))
								{
									if (mark is PlayerMobile)
									{
										PlayerMobile pm = (PlayerMobile) mark;
										pm.Criminal = true;
									}
									else if (mark is BaseCreature)
									{
										BaseCreature bc = (BaseCreature) mark;
										bc.Criminal = true;
										Combatant = mark;
										if ((bc.Controlled) && (bc.ControlMaster is PlayerMobile))
										{
											PlayerMobile pm = (PlayerMobile) bc.ControlMaster;
											pm.Criminal = true;
										}
									}
                                                                        DoReveal(); //Attempt to reveal player if has drugs. <-- added
								}
							}
						}
					}
				}
				else if ((markPick > 10) && (HasChecked))
				{
					HasChecked = false;
					mark = null;
				}
			}
		}

Then after the Onthink routine add.
Code:
        public void DoReveal()
        {
            ArrayList list = new ArrayList();

            foreach (Mobile m in this.GetMobilesInRange(3))
            {
                int h = m.Skills[SkillName.Hiding].Fixed;
                if (m == this || !CanBeHarmful(m) || !m.Alive || !InLOS(m) || h < 100)
                    continue;

                else
                    list.Add(m);
            }

            foreach (Mobile m in list)
            {
                m.RevealingAction();
            }
        }

Through testing I have noticed that if you put the drugs in a pack inside your backpack they will go undetected.
Either the drugs need to be made so they can be in your backpack only or the dogs need to search all packs.

Edit: I figured out a way around the pack problem for my quest. I generate my special nugs and make them unmovable.
I would like to put a timer on them so they decay after a while, does anyone know of a way to do that or a script I can look at for examples?
 

chiconanni

Wanderer
hi... i'm getting an error

Hello, first of all.. i want to send you my regards.. you made a great job!
So.. i'm working on your script to work on SNV 527 + ML and SA. SO.. i had removed the "using server.scripts" lines from the scripts, i'm receiving the following error:

RunUO - [www.runuo.com] Version 2.1, Build 3909.40844
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)
Errors:
+ Harvestable Drugs/Da Drug Dealer/DrugSystem_Dealer.cs:
CS1715: Line 18: 'Server.Mobiles.DrugSystem_Dealer.SBInfos': type must be 'S
ystem.Collections.Generic.List<Server.Mobiles.SBInfo>' to match overridden membe
r 'Server.Mobiles.BaseVendor.SBInfos'
CS0534: Line 15: 'Server.Mobiles.DrugSystem_Dealer' does not implement inher
ited abstract member 'Server.Mobiles.BaseVendor.SBInfos.get'
+ Harvestable Drugs/Da Drug Dealer/DrugSystem_SBInfo.cs:
CS1715: Line 22: 'Server.Mobiles.SBDrugSystem.BuyInfo': type must be 'System
.Collections.Generic.List<Server.Mobiles.GenericBuyInfo>' to match overridden me
mber 'Server.Mobiles.SBInfo.BuyInfo'
CS0534: Line 12: 'Server.Mobiles.SBDrugSystem' does not implement inherited
abstract member 'Server.Mobiles.SBInfo.BuyInfo.get'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again..

Can some of you help me on this?
Thanks in advance!
 

LdNS88

Wanderer
Help please

Hello. Sorry for my bad English :eek:
This script leads to a freeze on my server. If I start to use drugs quickly (purchased from drug dealer), the server freezes for a few seconds. There is no visible load on the processor, everything works as usual. Suppose, if I use the bong fast 4-5 times, the server freezes for a few seconds. Tried on two computers(*), it's definitely a problem on the server side. In this case, if we use the bong, etc. 1 every 15 seconds, then everything works without freezing. I do not understand what could be the problem.
Use RunUO Version 2.0, Build 3567.2838
( (*) first 1Ghz & 2GB ram DDR2 and second 3GhzX2 & 3.5GB ram DDR2 )
Thanks :)
 

Sythen

Sorceror
Hi guys, first I should let you know that there is an update for this script, but it won't be released until I restart the scripting phase on my own server - right now I've only been working on my custom maps.

As for your questions...

@chico-hybrid
I have no idea where to begin with your errors because I haven't played with the system in months. I'm thinking your issues lie with the vendor aspect of the NPC Drug Dealer in which case, I think perhaps there have been some updates to vendors in the last six months. I will have to start my server up again and take a look to fix the issue and unfortunately that wont happen until I know what RunUO, Callandor2k, and the people that are working on SA are doing in regards to this upcoming UO expansion. Its counter-productive to compile a new [.svn] console until I can figure out how to incorporate the new art slots.

@LdNS88
the bong uses a lot of resources for some reason. I lag up on my server as well when I've used it. I have no idea why this issue persists, but it happens no matter how i configure the effects. A rewrite of the effects is being outlined because what I'd like to do is have the engine read off another script page that just contains the effects for easy editing. Also I'm going to eventually include 3 new quests and a processing option on the npc that allows you to drop a drug harvest on it to get a refined drug in your pack along with some gold. Anyway... if you find a fix for this please let me know. Thanks. :D
 

Nuggsy

Wanderer
chico-hybrid;851077 said:
Hello, first of all.. i want to send you my regards.. you made a great job!
So.. i'm working on your script to work on SNV 527 + ML and SA. SO.. i had removed the "using server.scripts" lines from the scripts, i'm receiving the following error:

RunUO - [www.runuo.com] Version 2.1, Build 3909.40844
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)
Errors:
+ Harvestable Drugs/Da Drug Dealer/DrugSystem_Dealer.cs:
CS1715: Line 18: 'Server.Mobiles.DrugSystem_Dealer.SBInfos': type must be 'S
ystem.Collections.Generic.List<Server.Mobiles.SBInfo>' to match overridden membe
r 'Server.Mobiles.BaseVendor.SBInfos'
CS0534: Line 15: 'Server.Mobiles.DrugSystem_Dealer' does not implement inher
ited abstract member 'Server.Mobiles.BaseVendor.SBInfos.get'
+ Harvestable Drugs/Da Drug Dealer/DrugSystem_SBInfo.cs:
CS1715: Line 22: 'Server.Mobiles.SBDrugSystem.BuyInfo': type must be 'System
.Collections.Generic.List<Server.Mobiles.GenericBuyInfo>' to match overridden me
mber 'Server.Mobiles.SBInfo.BuyInfo'
CS0534: Line 12: 'Server.Mobiles.SBDrugSystem' does not implement inherited
abstract member 'Server.Mobiles.SBInfo.BuyInfo.get'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again..

Can some of you help me on this?
Thanks in advance!

I am getting the same errors trying to put it in SA. Hopefully someone can get it working, I have some custom drugs for a quest I was working on in my ML server that I would like to move over.
 

LdNS88

Wanderer
Sythen;851772 said:
@LdNS88
the bong uses a lot of resources for some reason. I lag up on my server as well when I've used it. I have no idea why this issue persists, but it happens no matter how i configure the effects. A rewrite of the effects is being outlined because what I'd like to do is have the engine read off another script page that just contains the effects for easy editing. Also I'm going to eventually include 3 new quests and a processing option on the npc that allows you to drop a drug harvest on it to get a refined drug in your pack along with some gold. Anyway... if you find a fix for this please let me know. Thanks. :D

Ok. I tried to fix it, but I did not succeed. My knowledge of C++ is sucks. I'll have to wait for your new release. Thanks for your work :)
 

Thagoras

Sorceror
@chico-hybrid
I have no idea where to begin with your errors because I haven't played with the system in months. I'm thinking your issues lie with the vendor aspect of the NPC Drug Dealer in which case, I think perhaps there have been some updates to vendors in the last six months. I will have to start my server up again and take a look to fix the issue and unfortunately that wont happen until I know what RunUO, Callandor2k, and the people that are working on SA are doing in regards to this upcoming UO expansion. Its counter-productive to compile a new [.svn] console until I can figure out how to incorporate the new art slots.

@LdNS88
the bong uses a lot of resources for some reason. I lag up on my server as well when I've used it. I have no idea why this issue persists, but it happens no matter how i configure the effects. A rewrite of the effects is being outlined because what I'd like to do is have the engine read off another script page that just contains the effects for easy editing. Also I'm going to eventually include 3 new quests and a processing option on the npc that allows you to drop a drug harvest on it to get a refined drug in your pack along with some gold. Anyway... if you find a fix for this please let me know. Thanks.

I was looking into it a bit too.
Bong first: Haven't really tinkered with this yet...but I'm wondering what this is
Code:
Thread.Sleep(3000);
Other than that, the script looks pretty typical.

Vendor:
Ok, I was going to paste all the changes...but the list was getting long, so my recommendation would be to copy one of the SA vendors and its SBInfo file and rename it (and the classes within) to DrugDealer and change the buy sell information to match the drug list. Probably the easiest way. If/When I have time, I might update to SA compatibility.


Edit: Bong: Played around with it. Couldn't get it to lag my server. My cpu did jump as high as 5%...but that's it. I wonder if it has anything to do with your server version. I couldn't help notice that you're running 2.0.
 

Nuggsy

Wanderer
Got the drug dealer working. Replace the ones you have and it will run on a SA server. I haven't really noticed any lag but it's just running on the test server on my local pc right now and I am the only one on it.
 

Attachments

  • newdrugdealer.zip
    2.8 KB · Views: 28
Top