help itme plz

07/17/2013 02:45 مصطفى خضرى#1
I want to make item can not be traded like the GoldPrize

انا مليش فى الانجليزى قوى

<div align="center">انا عاوز طلب بسيط جدا عاوز اخلى ايتمز ميتردش لحد زى الــGoldPrize محدش يقدر يترده لحد<br>وادى اكواد الايتمز<br>
PHP Code:
831002@@Necklace~P7@@0@@0@@139@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@2000@@0@@1@@1@@0@@0@@0@@120@@5@@0@@1@@0@@5@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@600@@0@@0@@0@@0@@0@@30@@30@@0@@0@@0@@P7NecklaceSoul@@It~can~purify~a~Necklace~of~Level~139~or~above,~to~increase~its~attributes~Created~By~Mr~YuRi.@@9@@6@@30@@0@@12020@@500@@

831014@@Headgear~P7@@0@@0@@140@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@3000@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@1@@0@@0@@0@@4@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@1100@@0@@0@@0@@80@@0@@0@@30@@0@@0@@30@@P7HeadgearSoul@@It~can~purify~a~Headgear(physical)~of~Level~140~or~above,~to~increase~its~attributes~Created~By~MrYuRi.@@9@@6@@30@@0@@12010@@500@@

7108200@@Ring~P7@@0@@0@@136@@0@@0@@0@@0@@0@@0@@0@@0@@0@@4000@@4000@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@150@@7@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@0@@0@@4000@@0@@0@@0@@0@@100@@0@@0@@0@@30@@0@@30@@0@@P7RingSoul@@u~Can~Use~It~When~ur~Ring~Level~136~to~Improve~ur~Attriputes~By~Mr~YuRi.@@9@@6@@30@@0@@12040@@500@@


8111233@@Boot~P7@@0@@0@@129@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@8@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@1000000@@0@@1500@@0@@0@@0@@0@@200@@0@@0@@0@@0@@0@@0@@0@@BootSoulP7@@u~Can~Use~It~When~ur~Boot~Level~129~to~Improve~ur~Attriputes~By~Ali123333~And~SychoTech.@@9@@6@@30@@0@@12050@@500@@

500500@@Tower~P7@@0@@0@@100@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@5000@@0@@0@@0@@0@@1@@1@@0@@0@@0@@202@@7@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@P7StarTowerSoul@@It~can~purify~a~StarTower~of~Level~100~or~above,~to~increase~its~attributes~Created~By~Mr~YuRi.@@9@@6@@30@@0@@7010@@500@@

600600@@Fan~P7@@0@@0@@100@@0@@0@@0@@0@@0@@0@@0@@0@@0@@5000@@5000@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@201@@7@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@P7FanSoul@@It~can~purify~a~HeavenFan~of~Level~100~or~above,~to~increase~its~attributes~Created~By~YuRi.@@9@@6@@30@@0@@12040@@500@@ 
ineed
07/17/2013 02:58 Spirited#2
Making it so an item cannot be dropped or traded would probably relate to your server's database. Wherever you're loading items from, there's a field relating to the item's drop type. Make that the same as the gold prize, and you'll be good to go.

If that's too complicated, you can always hard-code it in using a conditional statement.
For example (this is just pseudocode - not real code):
Code:
IF item.Name == "Necklace~P7" THEN:
   EXECUTE cannot drop function 
   RETURN
07/17/2013 03:13 مصطفى خضرى#3
يارجالة انا مش فاهم حاجة ياريت حد من الاخوة المصرين او العرب يفهمنى اعمل ايه
07/17/2013 07:35 go for it#4
well ill add something to what fang said then translate it all
you may also find some sources just reading items and there properties from the itemtype instead of doing that through database (which i do not particularly like it this way, the db one sounds more organized)
well now ill translate all of that (including the rule of languages that apply to this forum as his english isn't good enough to read it on his own)

بص يا معلمي انتا اودامك حلين
اول حل انو انتا تروح علي الايتم دات او في الداتا بايز وتشوف اني صف المسأول انو يخلي الايتم بتعملها تريد او لا وتنقل منو البروبيرتي ديه لبأيت الايتمز
بس انا مش فاكر هوه كان اني صف بس كان مكتوب هنا في المنتدي
دور هتلاقيها او بص في البيتروس سورس وهتلاقيها في الداتاباز

الحل التاني هوه انو انتا تعمل شيك علي التريد وتشوف هل ديه ايتم من الي انتا مش عايزهم يتعملهم تريد ولا لا
اخيرا المنتدي هنا قوانينو انو المواضيع تبقي انجليزي او الماني

on a side note i've added that he can search epvp to figure out the structure of the item type or even check it on albetrous source (assuming that he is using one of trinity edited versions which still reading items prop from decreypted itemtype)
07/17/2013 12:39 مصطفى خضرى#5
I do not know any row makes the item or not trading
Who knows explains a detailed explanation
===============================
This is the code where it is placed
PHP Code:
IF item.Name == "Necklace~P7" THEN:
   
EXECUTE cannot drop function 
   RETURN 
07/17/2013 12:51 go for it#6
Quote:
Originally Posted by مصطفى خضرى View Post
I do not know any row makes the item or not trading
Who knows explains a detailed explanation
===============================
This is the code where it is placed
PHP Code:
IF item.Name == "Necklace~P7" THEN:
   
EXECUTE cannot drop function 
   RETURN 
well as it turns to be that you know more english or at least good to use google then use google to figure what im going to say cuz im not typing in arabic anymore
here is what you need to have a look at
[Only registered and activated users can see links. Click Here To Register...]
where it says
Quote:
entry 11. Tradability 0=fully tradable/put in wh/sellable in shop 1=Unknown 2=Unknown 3= UNTRADALBE AND NO WH AND no SELL IN SHOP
check what is the entry for the goldenprize and apply it for other items

and what fang gave you is pseudo code which is not really code but it's representation for programming with common easier programmatically related syntax but feel free to google that too

and it should be placed at trading handlers
and you welcome
07/17/2013 14:10 مصطفى خضرى#7
Quote:
Originally Posted by go for it View Post
well as it turns to be that you know more english or at least good to use google then use google to figure what im going to say cuz im not typing in arabic anymore
here is what you need to have a look at
[Only registered and activated users can see links. Click Here To Register...]
where it says


check what is the entry for the goldenprize and apply it for other items

and what fang gave you is pseudo code which is not really code but it's representation for programming with common easier programmatically related syntax but feel free to google that too

and it should be placed at trading handlers
and you welcome
Thank you brother for this interpretation

Now I want to cancel the item after merging so can not be traded
07/18/2013 03:31 go for it#8
Quote:
Originally Posted by مصطفى خضرى View Post
Thank you brother for this interpretation

Now I want to cancel the item after merging so can not be traded
you mean "merging" item with a dragon soul ? well in that case i guess a check would fit better (maybe yes the only choice left), check on the item soul and if it contains any soul you want to forbid trading then just end the trade

but yup i got your point, you just want everyone to buy souls from your npcs and not from other players in that case you could just stop spawning the bosses which will be easier to done and no one can find an exploit to bypass it
07/18/2013 13:10 مصطفى خضرى#9
Quote:
Originally Posted by go for it View Post
you mean "merging" item with a dragon soul ? well in that case i guess a check would fit better (maybe yes the only choice left), check on the item soul and if it contains any soul you want to forbid trading then just end the trade

but yup i got your point, you just want everyone to buy souls from your npcs and not from other players in that case you could just stop spawning the bosses which will be easier to done and no one can find an exploit to bypass it
How can I do check on this item
07/18/2013 13:45 go for it#10
Quote:
Originally Posted by مصطفى خضرى View Post
How can I do check on this item
at packethandler.cs (assuming that you are using another shitty edit for trinity)
you will find a method called
Code:
        static void AddTradeItem(Trade trade, Client.GameState client)
you will find this check

Code:
if (infos.BaseInformation.Type != Database.ConquerItemBaseInformation.ItemType.Dropable || (item.Lock != 0 && !client.Partners.ContainsKey(_client.Entity.UID) && !client.Partners[_client.Entity.UID].StillOnProbation) || item.Bound || item.Suspicious)
                                        {
also there is a nice struct at itemadding.cs
called
Code:
public struct Purification_
        {
            public bool Available;
            public uint ItemUID;
            public uint PurificationItemID;
            public uint PurificationLevel;
            /// <summary>
            /// In minutes.
            /// </summary>
            public uint PurificationDuration;
            public DateTime AddedOn;
        }
you would simply use it to get something like
Code:
 if (infos.BaseInformation.Type != Database.ConquerItemBaseInformation.ItemType.Dropable || (item.Lock != 0 && !client.Partners.ContainsKey(_client.Entity.UID) && !client.Partners[_client.Entity.UID].StillOnProbation) || item.Bound || item.Suspicious || (item.Purification.PurificationItemID = /*YOUR SOUL ID*/))
or maybe create a bool at this struct, call it tradeable, set it to false on login and loading the items
and do something like

Code:
if(item.Purification.Treadable)
{
trade
}
else
{
                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "learn programming");
                        npc.OptionID = 255;
                        client.Send(npc.ToArray());
}
07/18/2013 23:03 abdoumatrix#11
Quote:
Originally Posted by مصطفى خضرى View Post
I want to make item can not be traded like the GoldPrize

انا مليش فى الانجليزى قوى

<div align="center">انا عاوز طلب بسيط جدا عاوز اخلى ايتمز ميتردش لحد زى الــGoldPrize محدش يقدر يترده لحد<br>وادى اكواد الايتمز<br>
PHP Code:
831002@@Necklace~P7@@0@@0@@139@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@2000@@0@@1@@1@@0@@0@@0@@120@@5@@0@@1@@0@@5@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@600@@0@@0@@0@@0@@0@@30@@30@@0@@0@@0@@P7NecklaceSoul@@It~can~purify~a~Necklace~of~Level~139~or~above,~to~increase~its~attributes~Created~By~Mr~YuRi.@@9@@6@@30@@0@@12020@@500@@

831014@@Headgear~P7@@0@@0@@140@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@3000@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@1@@0@@0@@0@@4@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@1100@@0@@0@@0@@80@@0@@0@@30@@0@@0@@30@@P7HeadgearSoul@@It~can~purify~a~Headgear(physical)~of~Level~140~or~above,~to~increase~its~attributes~Created~By~MrYuRi.@@9@@6@@30@@0@@12010@@500@@

7108200@@Ring~P7@@0@@0@@136@@0@@0@@0@@0@@0@@0@@0@@0@@0@@4000@@4000@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@150@@7@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@0@@0@@4000@@0@@0@@0@@0@@100@@0@@0@@0@@30@@0@@30@@0@@P7RingSoul@@u~Can~Use~It~When~ur~Ring~Level~136~to~Improve~ur~Attriputes~By~Mr~YuRi.@@9@@6@@30@@0@@12040@@500@@


8111233@@Boot~P7@@0@@0@@129@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@8@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@1000000@@0@@1500@@0@@0@@0@@0@@200@@0@@0@@0@@0@@0@@0@@0@@BootSoulP7@@u~Can~Use~It~When~ur~Boot~Level~129~to~Improve~ur~Attriputes~By~Ali123333~And~SychoTech.@@9@@6@@30@@0@@12050@@500@@

500500@@Tower~P7@@0@@0@@100@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@5000@@0@@0@@0@@0@@1@@1@@0@@0@@0@@202@@7@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@P7StarTowerSoul@@It~can~purify~a~StarTower~of~Level~100~or~above,~to~increase~its~attributes~Created~By~Mr~YuRi.@@9@@6@@30@@0@@7010@@500@@

600600@@Fan~P7@@0@@0@@100@@0@@0@@0@@0@@0@@0@@0@@0@@0@@5000@@5000@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@201@@7@@0@@1@@0@@0@@1@@800@@0@@0@@1@@1000000@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@P7FanSoul@@It~can~purify~a~HeavenFan~of~Level~100~or~above,~to~increase~its~attributes~Created~By~YuRi.@@9@@6@@30@@0@@12040@@500@@ 
ineed
Just Take it From TQ ItemType.dat
and put it ur source item and again to ur client items.

انقلهم من كونكر العادية وهحطهم في السورس وفي الباتش
07/19/2013 15:39 مصطفى خضرى#12
Thank you