Register for your free account! | Forgot your password?

You last visited: Today at 05:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] dropping code

Discussion on [Help] dropping code within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
_MaryJuana's Avatar
 
elite*gold: 66
Join Date: Feb 2008
Posts: 949
Received Thanks: 495
[Help] dropping code

heya all!

i need a bit help with a drop command. Thats my simple code atm:
Code:
                                        if (Splitter[0] == "/massdrop")
                                        {
                                            if (Splitter[1] == "expball")
                                                MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                                        }
If i "activate" this command then only I get a exp ball in my inventory (coz thats the code) but i want that every char whos online get a expball DROPPED near his char would be nice if someone could help me because i have no idea and i tryed it now sometimes and always I fail
_MaryJuana is offline  
Old 06/24/2010, 19:46   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,381
do a foreach loop through all connected clients.


Then don't add to character, rather drop it on the ground.



You will want to do a few things.

#1 Setup a command that runs through all connected clients (I don't use lotf but on CoEmu it would be something like:

foreach (KeyValuePair<int, Client> Char in World.AuthenticatedClients)
{
Char.Value.w/e
}


Now you want to write a drop item function. I'd go to where your items are already being dropped and use it as an example. Again... coemu example is in my linklist seeing as I've already coded this stuff for it and released most of it... but w/e.

basically you want to do a loop through the number of items you wanna drop, create an item structure to store the new item (in CoEmu it would be something like Struct.ItemData Item = new Struct.ItemData() )

Then populate the values for the new item (item uid and such) and then drop the item using your drop code based on the foreach loop coords (map/x/y of the Client.Value you have)


It's not super complicated but not working with lotf I can't provide super specific advice.
pro4never is offline  
Old 06/24/2010, 19:59   #3
 
_MaryJuana's Avatar
 
elite*gold: 66
Join Date: Feb 2008
Posts: 949
Received Thanks: 495
your knowledge is great :P

...but i dont understand what u wanted to tell me im not a good coder still at learning but thats too "high" for me :/
_MaryJuana is offline  
Reply


Similar Threads Similar Threads
just dropping to say hi
04/07/2010 - Say Hello - 0 Replies
hello to all... i just want to say hi... even if i'm not new here i just want to say so because i skip it before... :D:D:D:D
Dropping by to say HI
06/21/2009 - Say Hello - 0 Replies
HI ^^
Just dropping in
05/15/2008 - Say Hello - 1 Replies
Hey what's up, just joined so it's time to say, "Hi!"
Just Dropping by to say HI!
03/13/2008 - Say Hello - 7 Replies
Hi everyone! elitepvpers provides great help all the time! :cool::cool::cool::cool::cool:
Dropping Fun
06/24/2006 - Ragnarok Online - 47 Replies
LunarisRo http://img74.imageshack.us/img74/6861/screenlunar isro0007xq.jpg http://img74.imageshack.us/img74/6914/screenlunar isro0014qp.jpg http://img74.imageshack.us/img74/7733/screenlunar isro0025lr.jpg http://img76.imageshack.us/img76/3127/screenlunar isro0033yj.jpg Post yours!



All times are GMT +1. The time now is 05:05.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.