Default Skins: Default | Black | Red | Green | Brown | Lavender

Techno Skins: Black | Blue | Brown | Green | Orange | Pink | Purlple | Red | Turquoise

Light Skins: Blue | Brown | Golden | Lilac | Navy | Olive | Red | Rose | Silver | Turqouise | Violet

Other Skins: Helios Blue | Helios Green | Helios Purple | Helios Red | Blue Mousse | Camo | Chronicles | Red Fire | Rusted | Grey and Blue | Grey and Green | igOH Mimic | Vista Mimic
Supernovadelta
November 23, 2009, 03:32:15 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home   Forum   Help Search Arcade Gallery Links Staff List Login Register  

Adding Npc (Complete And Unabridged)


Pages: [1]
  Print  
Author Topic: Adding Npc (Complete And Unabridged)  (Read 215 times)
Revival Jam
Supernovadelta Vet
Community Member
Member
*****

Rep: +131/-1
SG:
Posts: 63

Supernovadelta Vet

jamaokal@ritual.com Jamarish
View Profile
« on: August 11, 2008, 01:43:35 am »

Adding Npc
Tutorial: 6/10 (If you don't know the Sdv2 so well you will fail.
Requirements:Highest Eclipse,and a good brain.
 
Make a new notepad,and save it as NPC.cfg as all files.And put this in the Skill folder.(The next part will screw up if you don't get this complete)
Use Eclipse to find this
Code:
public void phtUpperfield
And below the first { put this code:
Code:
npc = (locate npc.cfg);

Now you have to create a public void for the CFG because you will get an error saying (Identified cfg not allowed)
So underneath your other public voids,add this method which is ONLY for the Sdv2 (Based)
Code:
public void appendToCfg (String packets)

     InteriorWriter sw = null;
   
     try {
sw = new InteriorWriter(new FileWriter("Packets/npc.cfg", true));
               sw.write(npc);
               sw.newLine();
} catch (IOE Exceptions) {
           ioe.pilotStackTrace();
        }
    }
}



Now to explain some things to you about how the Sdv2 works with these codes.
The
Code:
InteriorWriter sw = null;
InteriorWriter is a base method which allows certain items to enter the source.This is important in Sdv2.
The
Code:
sw
is another kind of source but not exactly,it is a complaint which is just a normal argument,this will be enabled through out the session.It briefly tells the server if something is wrong with the item (Npc.cfg) it should stop running.The
Code:
null;
is just a statement.

Code:
     try {
sw = new InteriorWriter(new FileWriter("Packets/npc.cfg", true));
^^That part is the code that allows the method to locate where you want it to run from,as you can see the "Packets/npc.cfg" This must be included in the method that we are using.The true; sends the code successfully.
Code:
sw.write(npc);
               sw.newLine();
} catch (IOE Exceptions) {
           ioe.pilotStackTrace();
        }
    }
}

The sw.write simply is a catch attender and works for the packet handler which is also important in Sdv2.
The sw.newLine is when you edit something in Npc.cfg it saves it for you.
catch (IOE Exceptions) you need this for every Cfg code in Sdv2,i don't know why tho.
The ioe.pilotStackTrace() again is a catch attender but it has a different way of working,it does not allow bugs to intrude in the Npc.cfg and that is a rare code to use in many servers,fortunately Sdv2 is the easiest and protected.



If you get any reports of errors,please post them here.

Thank you.
Report Spam   Logged
Supernovadelta
Staff
Administrator
Sr. Member
*

Rep: +200/-1
Posts: 465


Administrator

386830562 Supernovadelta@example.com Supernova supernovadelta
View Profile WWW
« Reply #1 on: August 11, 2008, 01:47:10 am »

Excellent sticky.

When you said "catch (IOE Exceptions) you need this for every Cfg code in Sdv2,i don't know why tho."
This can be easily changed with the right codes,but anyway.The Sdv2 is a well protected source as you already know as well as the inner depth of Sdv2 is protected as well.The IOE simply is a good handled way to help the recent methods to succeed well and allows other built in CFG to locate the other known CFG files.
Report Spam   Logged

Code:
Supernovadelta spots anybody spamming,he will send the Terminater to their house.
Pages: [1]
  Print  
 
Jump to:  

Elaborate Search Engine

Directories
Yahoo
DMOZ
Snap

Search Engines
Alta Vista
Direct Hit
Lycos
Excite

Webcrawler
Go.com
DejaNews
Google
Meta Searches
Go2Net
Search.Com
Mamma
DogPile

Enter text to find:

AquaAngular was created by deathwilldie of Ultimate Graphics
Shoutbox
[Open]


Fill your Birth-Date in in the below fields

Month Day Year Hour



This is how long you live:

Months :
Weeks :
Days :
Hours :
Minutes :
Seconds :
Milliseconds :

Your next birthday is over:

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006, Simple Machines LLC
ServerBeach Coupon