|
You last visited: Today at 22:39
Advertisement
Item Plus Restrition?
Discussion on Item Plus Restrition? within the CO2 Private Server forum part of the Conquer Online 2 category.
04/22/2009, 01:01
|
#1
|
elite*gold: 0
Join Date: Mar 2009
Posts: 48
Received Thanks: 15
|
Item Plus Restrition?
I was messing round with Hybrid's bugles source , and i was wondering how i would go about putting and item + reststion on so players that are not gms can't spawn anything above +9 (Like Acid). I have been messing around but i am not sure how to do it. Anyone have any idea's.
Ive been editing it through the cmds
Thank.
Edit : Nvm i got it
|
|
|
04/22/2009, 01:47
|
#2
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
Good stuff, you kept working on it, even after you asked for help.
|
|
|
04/22/2009, 02:07
|
#3
|
elite*gold: 0
Join Date: Mar 2009
Posts: 48
Received Thanks: 15
|
For Everyone else who may wonder. This is what i did don't think its the best way but if Hybrid has a better way and would like to share that would be great! Here is what i did btw
Quote:
string[] Info = Item.Split('-');
ItemData.ID = uint.Parse(Info[0]);
ItemData.Plus = 9;
ItemData.Bless = byte.Parse(Info[2]);
ItemData.Enchant = byte.Parse(Info[3]);
ItemData.SocketOne = byte.Parse(Info[4]);
ItemData.SocketTwo = byte.Parse(Info[5]);
ItemData.UID = NextItemUID;
return true;
|
then even if u type @item ConquestArmor super 12 7 255 13 13 it will still come out as +9 everytime
|
|
|
04/22/2009, 02:09
|
#4
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
ItemData.Plus = Math.Min(byte.Parse(Info[1]), 9);
|
|
|
04/22/2009, 02:23
|
#5
|
elite*gold: 0
Join Date: Mar 2009
Posts: 48
Received Thanks: 15
|
Hey Tao i ran in to a problem or Hybrid since it your source i am using. I have been packet logging packets working on trying to update above 5017+ . Now i have not broken it but where in the Source are the First and Second keys stored?
Edit : Nvm I found them in the socket dll Just got to decompose it
|
|
|
04/22/2009, 04:49
|
#6
|
elite*gold: 0
Join Date: Apr 2006
Posts: 55
Received Thanks: 12
|
Lord, I haven't truly looked at Hybrids source, but in mine how I would do it is in the list of if statements for commands, I would go to my if (Msg[1] == "Create Item") or what ever how ever its coded, because thats not even how mine is coded. than what you do is right at the beginning do a if statement and basically do something like this
assume a GM is 1
if (Client.AccType = 1)
{
put how ever the item is created in his source so if its like this
string[] Info = Item.Split('-');
ItemData.ID = uint.Parse(Info[0]);
ItemData.Plus =byte.Parse(Info[1]);
ItemData.Bless = byte.Parse(Info[2]);
ItemData.Enchant = byte.Parse(Info[3]);
ItemData.SocketOne = byte.Parse(Info[4]);
ItemData.SocketTwo = byte.Parse(Info[5]);
ItemData.UID = NextItemUID;
return true;
}
else
{
if (info[1] > 9 || info[1] < 0)
{
//construct a packet here to send a chat message to the player saying that he is using a invalid number for the plus
and than break it or return it depending on how it is doing it
}
else
{
string[] Info = Item.Split('-');
ItemData.ID = uint.Parse(Info[0]);
ItemData.Plus = byte.Parse(Info[1]);
ItemData.Bless = byte.Parse(Info[2]);
ItemData.Enchant = byte.Parse(Info[3]);
ItemData.SocketOne = byte.Parse(Info[4]);
ItemData.SocketTwo = byte.Parse(Info[5]);
ItemData.UID = NextItemUID;
return true;
}
}
I just came up with this in like two seconds, its not going to work right off the bat but that is the basic logic behind how you could check to make sure its not a value you don't want.
|
|
|
04/22/2009, 04:58
|
#7
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
ItemData.Plus = Client.AccType == 1 ? Math.Min(12, byte.Parse(Info[1])) : Math.Min(byte.Parse(Info[1]), 9));
Simple solutions guys..
Again assuming AccType == 1 stands for GM, change based on your source syntax.
|
|
|
04/22/2009, 17:19
|
#8
|
elite*gold: 0
Join Date: Mar 2009
Posts: 48
Received Thanks: 15
|
@joshvette001
Yea the source does not have "Status's" setup for players or gms yet. I am working on setting that up now.
>>
I am not sure how to go about when a player equips an item that the other player can see it. Ill keep trying and see if i can come up with a solution.
|
|
|
 |
Similar Threads
|
[Suche] Komplette item.eix/epk, icon.eix/epk, item proto und item list
12/25/2010 - Metin2 Private Server - 6 Replies
Hey =)
Wie die Überschrift schon sagt, suche ich eine komplette item.eix/epk, icon.eix/epk, item proto und item list am liebsten noch von den Waffen von .darki und den ganzen neuen Rüstungen/Schilden/Helmen, da ich überhaupt nicht weiß wie man dass zB mit der item proto macht und wenn ich sie einfach nur ersetze, wie zB durch die "Waffen" item proto von .darki sind die ganzen neuen Rüstungen weg ....
Ich hoffe irgendjemand könnte das machen, weil es bestimmt nicht nur für mich hilfreich ist...
|
[Request]How to Change Item Colour or selected item when use lootalarm
05/14/2010 - 12Sky2 - 0 Replies
ex1.
item is rare colour i want to change to elite colour.
ex2.
item is rare but i don't want it then no alarm.
|
ProMt2.eu free P Server with all item over 80 e withot item shop it's the best
01/21/2010 - Metin2 Private Server - 6 Replies
***** new private server on 24/24 armour lil 66+9 free all item over 80 for free in the npgs. hourse level 21 when you start the pg is level 78. yang unlimited with a bug... in this server you can have all. alse armour gm liv 50. all rate are 1000% register and play for free. There isn't the item shop all is for free here.
|
All times are GMT +1. The time now is 22:42.
|
|