Thread: How to start your server coding, (My First tut)

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 How to start your server coding, (My First tut) 
    IGotSkillz
    Guest
    Hey, Logically, im here to teach you how to start with your source, ok, first if you want a source go here
    [Only registered and activated users can see links. ]

    It's a source i would reccomend, its Project Czar, and its a fun good source, if you want to start off and edit loads then just follow my first beginner tuts on how to change Proj Czar

    Tut 1:
    To make monsters drop items.
    Go to your Item2.Java and you will see Ints like this
    public static int rat[] = {5698,1305,3105,1725,1704,1323,1153,1115,1067,1081 ,1157,1119,1069,1083};

    public static int randomrat()
    {
    return rat[(int)(Math.random()*rat.length)];
    }
    This is very simple. Inside the { } are the ID's of the items in order of being dropped first to last.

    So if i wanted to make my goblin drop p'hats id do this
    public static int Goblin[] = {1038,1040,1042,1044};

    public static int randomGoblin()
    {
    return Goblin[(int)(Math.random()*Goblin.length)];
    }
    Now go to NPCHandler.java
    This is where we put the ID of the monster
    You should see something like this, if you dont, stop reading this
    if(npcs[NPCID].npcType == NPCID) {
    ItemHandler.addItem(Item2.randomGoblin(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
    }

    That would be the second part to complete the Item2.java so the NPC actually drops the items.

    So lets summarize this back up.

    NPCHandler.java specifies the NPC's ID

    The Item2.java Specifies the items being dropped by probability

    Tut 2:
    Making Safe Zones on czar, So you can delete the PK Emote on the tabs and change it to somewhere else.

    First open up Client.java
    Press Ctrl+F and search
    public boolean nonWild() {
    This is where we specify the areas that are nonwild.
    How we do this is with X and Y Co-ordinates.

    It works in a diagonal, but it joins up the square

    What we do first is, get a piece of paper, draw a square or rectangle.
    Go to the bottom left corner of the building first.Write down the X and Y Co-ordinates.

    Then go to the top right corner of the building. Get the X and Y Co-Ordinates of that corner.

    BotLeftX = Bottom left hand corner X Co-ordinate
    BotLeftY = Bottom left hand corner Y Co-ordinate

    TopRightX = Top Right hand corner X Co-ordinate
    TopRightY = Top Right hand corner Y Co-ordinate

    ||(absX >=BotLeftX && absX <= TopRightX && absY >= BotLeftY && absY <=TopRightY ) ||
    That's it for safe zones.

    IGotSkillz

    Tut 3: how to Get Item Bonuses
    Open up Item.cfg in your Cfg or normal folder.
    You should see this
    item = 15156 Dark_Bow A_Dark_Bow. 4000000 4000000 4000000 0 0 0 120 91 0 0 0 0 0 86 0
    Or so


    To add a new item just copy a line and paste it at the end.
    Change item = 15156 to the new item ID.

    Etc, Abyssal whip
    item = 4151 Abby whip A_Whip. 4000000 4000000 4000000 0 132 0 0 0 0 0 0 0 0 132 0
    Tut 4: How to make Silab items ( Actually "Java" items ) go in the right slot, so they dont show through, or like hoods dont show through your head, so it fits 100%, ok first.

    You should see
    public static int capes[] = {
    This makes it so if you put a cape inside of the { }
    the cape will equip in the cape equipment spot.

    This is the same for all of them.

    There are a few things you should know as well.

    If the Item is a platebody you will put it in public static int platebody[] = as well as public static int body[] =

    This will terminate the glitch of your sleeves showing through the platebody.

    Now To Fix Helms, (Hoods etc)

    Its different
    This is where it changes, if the item is a fullhelm you will put it into public static int fullhelm[] = as well as public int hats[] =


    Dragon
     

  2. #2  
    Registered Member
    Join Date
    Jan 2008
    Posts
    111
    Thanks given
    2
    Thanks received
    0
    Rep Power
    4
    nice this will help noob's like me but i already knew these things.
     

  3. #3  
    IGotSkillz
    Guest
    Thanks , i hope noobs find it useful
     

  4. #4  
    i hazy i
    Guest
    You said how to make silab items(actually "Java" items) its jagex items. but good work i guess
     

  5. #5  
    IGotSkillz
    Guest
    nice this will help noob's like me but i already knew these things.
    Btw that doesnt make sense
    It says "This Will HELP noobs like me", But i already knew these things.

    nice this will help noob's like me but i already knew this stuff
    Btw that doesnt make sense
    It says "This Will HELP noobs like me", But i already knew these things.
    Please explain what you mean

    I will add another tutorial tommorow Explaining Booleans,Methods, And voids and where to add them, and how to use them And my 3rd tut, How to add minigames!
    Last edited by IGotSkillz; 02-16-2008 at 09:24 PM. Reason: Double posting is not allowed!
     

  6. #6  
    DeltaScape is Pro!!

    Join Date
    Feb 2008
    Age
    26
    Posts
    743
    Thanks given
    4
    Thanks received
    5
    Rep Power
    77
    pretty good. UI need to add pk to czar tho
    [Only registered and activated users can see links. ]
     

  7. #7 Post 
    IGotSkillz
    Guest
    Thanks N I C K, Id reccomend you as a good coder, its my first tut, and ill put how to add pk area to Czar later,

    [Only registered and activated users can see links. ] Code for how to add a PK zone to your czar

    My Beer is getting dangerously low!
    Why isnt my signature working


    My Beer is getting dangerously low!
    Last edited by IGotSkillz; 02-16-2008 at 10:15 PM. Reason: Double posting is not allowed!
     

  8. #8  
    DeltaScape is Pro!!

    Join Date
    Feb 2008
    Age
    26
    Posts
    743
    Thanks given
    4
    Thanks received
    5
    Rep Power
    77
    Thanks man But is it my comp or is UppIT not working? I wont work for anthing...
    [Only registered and activated users can see links. ]
     

  9. #9  
    IGotSkillz
    Guest
    No, i think the uppit your using is virused.
    My beer is decreasing
     

  10. #10  
    Registered Member Pheonix's Avatar
    Join Date
    Feb 2008
    Age
    26
    Posts
    287
    Thanks given
    0
    Thanks received
    0
    Rep Power
    50
    Good work m8, will help all the new server owners out there =)))) nice tut, covered alot i suppose GW =)

    ~~Nightmare~~
    Name is spelled this way on purpose, before you ask. It's a personal choice, and matches with my YouTube: [Only registered and activated users can see links. ]
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •