Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:17

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

Advertisement



Suppose to be WaterTao and Firetao

Discussion on Suppose to be WaterTao and Firetao within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
Suppose to be WaterTao and Firetao

suppose to be Fire tao and Water tao can't use Shield Item
Where can i modify the code

I have this idea

if Job == 145 (145 is for FireTao) then shield item can't wear
any one knows where should i modify and add this ideas into code
marlyandedsel is offline  
Old 11/01/2010, 11:41   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
You could always do something like this when equipping a shield type item...

if(ItemType(Item) == ItemType.Shield)
{
if(!Warrior(GC.MyChar))
return;
}

Where ItemType is your calculation which determines which type of item you are equipping (you should have one in the source already, it would use a number though rather than an enum like in this example)

Then the warrior method is very simple!

Just do something like..

public static bool Warrior(Character C)
{
if(C.Job >=20 && C.Job <=25)
return true;
else
return false;
}

You should have a section of code dedicated to equipping items, just search through it and find a logical place to put a check for itemtype/char class.
pro4never is offline  
Thanks
1 User
Old 11/01/2010, 12:41   #3
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
I have use this

Quote:
Originally Posted by pro4never View Post
You could always do something like this when equipping a shield type item...

if(ItemType(Item) == ItemType.Shield)
{
if(!Warrior(GC.MyChar))
return;
}

Where ItemType is your calculation which determines which type of item you are equipping (you should have one in the source already, it would use a number though rather than an enum like in this example)

Then the warrior method is very simple!

Just do something like..

public static bool Warrior(Character C)
{
if(C.Job >=20 && C.Job <=25)
return true;
else
return false;
}

You should have a section of code dedicated to equipping items, just search through it and find a logical place to put a check for itemtype/char class.
i tried this code under the
public void UseItem(Item I)
{
try
{
if (I.ID >= 1000000 && I.ID <= 1002050)
{
if (!(DateTime.Now > UnableToUseDrugs.AddSeconds(UnableToUseDrugsFor)))
{
MyClient.LocalMessage(2005, "You've been poisoned. You cannot use drugs for a while.");
return;
}
}


if (Job == 145)
{
if (I.ID >= 900000 && I.ID <= 900109)
{
MyClient.LocalMessage(2005, "You can't use this item");
return false;
}
else
return true;

}


the red one is the code but i got error on the return false and return true

what thing should i add in order to make it right?


thanks in advance
marlyandedsel is offline  
Old 11/01/2010, 13:50   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by marlyandedsel View Post
i tried this code under the
public void UseItem(Item I)
{
try
{
if (I.ID >= 1000000 && I.ID <= 1002050)
{
if (!(DateTime.Now > UnableToUseDrugs.AddSeconds(UnableToUseDrugsFor)))
{
MyClient.LocalMessage(2005, "You've been poisoned. You cannot use drugs for a while.");
return;
}
}


if (Job == 145)
{
if (I.ID >= 900000 && I.ID <= 900109)
{
MyClient.LocalMessage(2005, "You can't use this item");
return false;
}
else
return true;

}


the red one is the code but i got error on the return false and return true

what thing should i add in order to make it right?


thanks in advance
... you need to write a different method to handle to bool return.

You should have something like....


public static void EquipItem(ItemInfo Item, Character C)
{
ALL YOUR EQUIP CODE
}

Put the method ABOVE or BELOW that. Not inside obviously.

Then you can call it using something like...


if(!MethodName(Input Values))
{
code
}

means you have used the return false in the method you call.

You should REALLY read up a bit on how to program. There are tons of tutorials on the forum/net. It'll save you so much time
pro4never is offline  
Old 11/01/2010, 14:22   #5
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
yes i gues soo

yes thats the thing i should do, thanks pro4..
marlyandedsel is offline  
Reply


Similar Threads Similar Threads
[Question] Simple I Suppose
12/23/2009 - Mabinogi - 6 Replies
Well, how would you modify a dll to make it so you don't walk when you use meditation (without a wand OFC) A simple tutorial would be of much gratitude :3 Tanxs :3
Good lvling of watertao alone!!!
02/04/2008 - Conquer Online 2 - 28 Replies
Ok, so I had an idea. AND IT WORKS! :bandit: It went something like this. Transfered all the dbs I had on my old server, then I made a watertao on a new server. Made the water elite 2soc wand and +3 and a ref drag+ref rainbow, then I bought a HUGE bunch of mets (well buy them only as you need, since mets prices are 1st very low but increase). Then upgrade the wand in tg to the level you want it, and you use Cotobo to repair (or packets if you feel like going ). But as other watertaos...
[macro] WaterTao skill lvler
11/28/2007 - CO2 Bots & Macros - 3 Replies
This macro is super easy *WORKS ONLY WITH 800x600 Window mode* Put sit to F9 meditation to F10 And your skill to your right mouse There is PIC in the rar , Ty :)
Simple Questions.....i suppose
04/04/2007 - Conquer Online 2 - 6 Replies
another thing i would like to ask .....is there rly something that can make normal gems look super and is there some moneything dat makes u have more many then u already have........if so plz post the hack or program or w.e
I suppose this work as the effect removal thingy..
10/08/2005 - CO2 Guides & Templates - 5 Replies
I think this is the same. I dunno, i dont use the effect removal. Rather trust my own files then use .bat files. Kinda troublesome but...still safe =) This is for those who wanna know how to do it manually.Make a blank file. Make sure it is a .ini file .rename the real 3DEffects to anything you want. next name the blank file 3DEffects. And boom, you can totally no effects =)



All times are GMT +2. The time now is 15:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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