Official 5165 FAQ/Question thread

01/07/2010 20:32 ~*NewDuuDe*~#541
Google for example the expball id and search for it. There is the place to add it. Don't know myself as I've only looked into the source once.
01/07/2010 21:33 Pitylee#542
And I still havent got answers for my questions, for example, where can I find the regpage, cuz the reg.html I have uses as action="" regcomplete.html from another server which is offline.

And how can I correct the mob-one-hit-kill problem?
01/07/2010 22:15 Arcо#543
Actually for items go to Game -> Character.cs and search for UseItem, and items will be there.
01/07/2010 22:45 NoFatChicks#544
Thanks NewDude and big thank Hepapitis, i found it. I must add the item there in "Misc" (right?) but dont know sure how to write it.

***About the pk in maps i got something weird to me: PK is not abble in twin city but if i try to pk when i hit the other character it spels like tornados and can kill. lol
(maybe if i just add some more guards it can me "solved".. but how?)


Atm i'm trying to add the pk amulet there in Character.cs and wondering how to make the Block System works.. any idea about it?

Thanks thanks for every help.




#Searching#
01/07/2010 23:43 bart2712#545
Sorry to sound like a noob(which i actually am when it comes to coding)...

I got the server running, and my client connects no problem.

The issue im having is how can i add and edit the code so the changes will show up in game when the compiler keeps finding errors in the code so i cant build it?

Im using beta version of Visual Studio 2010 btw, since all links i found to older versions didnt work.
01/07/2010 23:50 dragon89928#546
@NoFatChicks
The easiest way to add items into the source is to find how other items are done. For example you want to use pk amulets. Ask yourself what other items have the same function more or less as the pk ammy? So take twin city scroll for example. The item id is 1060020. Look for it in the source, then see how it is coded.
PHP Code:
case 1060020:
                        {
                            if (
Loc.Map != 6000 && Loc.Map != 6001)
                            {
                                
Teleport(1002429378);
                                
RemoveItem(I);
                            }
                            else
                                
MyClient.LocalMessage(2005"Cannot use teleport scrolls in jail.");
                            break;
                        } 
The important part there is the "Teleport(1002, 429, 378);" since that is what actually does the moving.
So now, what you want to do is find the pk ammy item id which is 723727 (PenitenceAmulet), from Items.txt in oldcodb.

Now that you have the itemid you want to add a case for it and write the code for what you want it to do, for pk ammy the "important part" would be reducing pk points so:
PHP Code:
case 723727:
                        {
                            if (
PKPoints >= 30)
                            {
                                
PKPoints -= 30;
                                
RemoveItem(I);
                            }
                            else
                                
MyClient.LocalMessage(2005"only Red name players can use this item.");
                            break;
                        } 
So the point is if you can think of something similar, you can tweak the code a bit to make it work how you want it to work. As for cases, so you wont be confused with the brackets, just go one line above some other case in the same section.
01/07/2010 23:57 bart2712#547
oh that much i understand...im just asking how do i get my changes to show up in game if theres errors in the source, and visual studio wont compile it?

(just for info, im very basic at coding...know just enough from the past to understand the general idea of what im looking at in the .cs files, but not enough to actually go in and fix the errors its giving me)

btw thx for the help
01/08/2010 00:08 NoFatChicks#548
@dragon89928

Thanks.. its really the point. I alredy was going by the "easiest way".. i just got confused when i found 2 numbers for PenitenceAmulet in Items.ini.. "720128" and "723727".
But you came out and told the one i need to use(+more). I appreciate.



Any idea about the weird pk thing in Twin City i said?





#Searching#
01/08/2010 00:30 dragon89928#549
Quote:
Originally Posted by bart2712 View Post
oh that much i understand...im just asking how do i get my changes to show up in game if theres errors in the source, and visual studio wont compile it?

(just for info, im very basic at coding...know just enough from the past to understand the general idea of what im looking at in the .cs files, but not enough to actually go in and fix the errors its giving me)

btw thx for the help
changes will only show if you actually compile it successfully. you need to find the bug before it will update.

Quote:
Originally Posted by NoFatChicks View Post
@dragon89928

Thanks.. its really the point. I alredy was going by the "easiest way".. i just got confused when i found 2 numbers for PenitenceAmulet in Items.ini.. "720128" and "723727".
But you came out and told the one i need to use(+more). I appreciate.

Any idea about the weird pk thing in Twin City i said?

#Searching#
haha i didnt notice there were two. in that case you can just go:
PHP Code:
case 720128:
case 
723727
and for the pk in tc, just delete the value (ushort)1002 from the array nopkmaps
01/08/2010 00:40 bart2712#550
oh, man, VS gives me a list of 28 errors in the code that id have to fix for it to compile...and since i dont know enough about coding to be able to fix them myself i guess im screwed.
01/08/2010 00:47 Arcо#551
Quote:
Originally Posted by bart2712 View Post
oh, man, VS gives me a list of 28 errors in the code that id have to fix for it to compile...and since i dont know enough about coding to be able to fix them myself i guess im screwed.
What're the errors you are receiving?
01/08/2010 00:55 bart2712#552
This is just some of them, but most look similar

[Only registered and activated users can see links. Click Here To Register...]
01/08/2010 00:57 Arcо#553
Can you post a bigger screenshot.
Its really really blurry.
01/08/2010 00:57 bart2712#554
heres the rest

[Only registered and activated users can see links. Click Here To Register...]
01/08/2010 00:58 Arcо#555
Like I said, bigger screenshot please?