Jump to content

John Lamprou

Members
  • Posts

    131
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by John Lamprou

  1. Den boroume peksoume korea gt den eine opos europe p bazoume pass kai id alla stin korea kathe politi eine ena noumera.Bazeis kai afto.Ara ....
  2. Den ipaxi c6.Apo c1 mexri c5 legotai cronicle.GIafto ta fonazoume c1,c2,c3,c4,c5.Meta apo c5 bgike to interlude p eine chaotic throne.All epidi eine prelude t chatic throne den to leme ct1.To kamael p bgainei twra legete ct1
  3. Here is where you should be able to change the max level for your retail C4 server. Function CCreature::ValidateLevel() Code: 00517C95 mov rax, [rbx+588h] ; CSharedData class 00517C9C mov esi, [rax+11Ch] 00517CA2 mov ebp, [rax+444h] ; level 00517CA8 mov rax, [rbx] 00517CAB mov rcx, rbx 00517CAE mov rax, [rax+28h] 00517CB2 call rax 00517CB4 mov ecx, 4Eh ; mov 78 into ecx 00517CB9 mov r12d, 57h 00517CBF test al, al 00517CC1 cmovnz r12d, ecx 00517CC5 cmp ebp, r12d ; cmp level to 78 00517CC8 cmovg ebp, r12d ; if < 78, make it 78 00517CCC mov eax, 1 00517CD1 cmp ebp, eax ; cmp level to 1 00517CD3 cmovl ebp, eax ; if < 1, make it 1 I didn't test this yet, but if you change the 4Eh ( 78 ) to a different number, you should be able to change the max level. I didn't test this,i am working on etail interlude files
  4. this compiler you post is vey good but best is microsoft visual studio
  5. What is C++? C++ is a general purpose programming language invented in the early 1980s by Bjarne Stroustrup at Bell Labs. It is similar to C, invented in the early 1970s by Dennis Ritchie, but is a safer language than C and includes modern programming techniques such as object oriented programming. You can read more about object oriented programming. In fact C++ was originally called C with Classes and is so compatible with C that it will probably compile more than 99% of C programs without changing a line of source code. This was a deliberate design feature by the designer. Here is a short overview and history of C++. The purpose of C++ is to precisely define a series of operations that a computer can perform to accomplish a task. Most of these operations involve manipulating numbers and text, but anything that the computer can physically do can be programmed in C++. Computers have no intelligence- they have to be told exactly what to do and this is defined by the programming language you use. Once programmed they can repeat the steps as many times as you wish at very high speed. Modern PCs are so fast they can count to a billion in a second or two. What can a C++ program do? Typical programming tasks includes putting data into a database or pulling it out, displaying high speed graphics in a game or video, controlling electronic devices attached to the PC or even playing music and/or sound effects. You can even write software to generate music or help you compose. Is C++ the best programming language? Some computer languages were written for a specific purpose. Java was originally devised to control toasters, C for programming Operating Systems, Pascal to teach good programming techniques but C++ is a general purpose language and well deserves the "Swiss Pocket Knife of Languages" nickname. There are some tasks that can be done in C++ but not very easily, for example designing GUI screens for applications. Other languages like Visual Basic, Delphi and more recently C# have GUI design elements built in to them and so are better suited for this type of task. Also some scripting languages that provide extra programmability to applications like MS Word and even Photoshop tend to be done in variants of Basic, not C++. You can find out more about the other computer languages and how they stack up against C++. Which computers have C++? This is better stated as which computers don't have C++! The answer- almost none, it is so widespread. It is a nearly universal programming language and can be found on most microcomputers, and all the way up to big computers costing millions of dollars. There are C++ compilers for just about every type of operating system. Find out more about Operating Systems. How do I get started with C++? First you need a C++ compiler. There are many commercial and free ones available. The list below has instructions for downloading and installing each of the compilers. All three are completely free and include an IDE to make life easier for you to edit, compile and debug your applications. How do I begin writing C++ applications? C++ is written using a text editor. This can be notepad or an IDE like those supplied with the three compilers listed above. You write a computer program as a series of instructions (called statements) in a notation that looks a little like mathematical formulas. int c=0; float b= c*3.4+10; This is saved out in a text file and then compiled and linked to generate machine code which you then can run. Every application you use on a computer will have been written and compiled like this, and many of them will be written in C++. Read more about compilers and how they work. You can't usually get hold of the original source code unless it was open source. Is there plenty of C++ Open Source? Because it is so widespread, much open source software has been written in C++. Unlike commercial applications, where the source code is owned by a business and never made available, open source code can be viewed and used by anyone. It's an excellent way to learn coding techniques. You can see many examples in the C++ Code Library Could I get a programming job? Certainly. There are many C++ jobs out there and an immense body of code exists that will need updating, maintaining and occasionally rewriting. The top three most popular programming languages according to the quarterly Tiobe.com survey, are Java, C and C++. You could write your own games but you'll need to be artistic or have an artist friend. You'll also need music and sound effects. Find out more about game development. Perhaps a professional 9-5 career would suit you better- read about a professional career or perhaps consider entering the world of software engineering writing software to control nuclear reactors, aircraft, space rockets or for other safety critical areas I make ti thread to make you understand what you can make with c++.Everything....
  6. No its not.And it is cool.I am a dev for free in rfactor.If yo now a computer race simulator
  7. Read and see.Loginserver packets and explanation of how to update packets or correct
  8. This guide i repost it with more updates for my good friend solution n this guide we wil learn how to set up/optimize a faction server like gve Guide status:v3 First of all faction system was created by Evill33t and for his old server and now the files are stored in his l2jteam "L2JFREE" Note:The guide was created by EzEraL(John Lamprou) Checkout L2jfree source First because evilL33t create this wonderfull system, in this thread we give support only for l2jfree not other pack that you want to add the files So go toL2jfree svn and checkout with eclipse If you dont now what eclipse is,search in forums or l2j repository for guides.When you download the source code of l2jfree you will see 3 folders. 1)Trunk 2)Branches 3)Tages If you want to make a faction(gve)server interlude go to trunk folder if you want a c5 go to branches. Faction files read Well to be able to start and make a server like this, you must first read the files carefully.So i will tell you what files to read The faction files are located in: 1)src\main\java\net\sf\l2j\gameserver\instancemanage r.Here you will find FanctionManager.java and FanctionQuestManager 2)src\main\java\net\sf\l2j\gameserver\model/actor/instance.Here you will find the L2FanctionQuestManagerInstance 3)src\main\java\net\sf\l2j\gameserver\model\entity\f action.Here you will find the Faction.java the FactionQuest.java and FactionMember.java Read these files carefully and you will understand many things of what you must to do! Acivate Faction system Go to trunk/L2_GameServer_IL/src/main/java/net/sf/l2j(for interlude-for c5 the same but in branches folder) In this location you will find a file called "config.java"Open it with notepad and go to up options and press "Edit"and select "Find"and write faction and press enter.So you will see public static boolean FACTION_ENABLED = false; public static boolean FACTION_KILL_REWARD = false; public static int FACTION_KILL_RATE = 1000; public static int FACTION_QUEST_RATE = 1; change with that public static boolean FACTION_ENABLED = true; public static boolean FACTION_KILL_REWARD = true; public static int FACTION_KILL_RATE = 1000; public static int FACTION_QUEST_RATE = 1; With these configs i enable the faction engine and faction point.If you want you can change faction quests rate.... Save it and thats all for enamble it New tables and htms required Well after you read a bit the source code of l2jfree you will understand that there are missing some sqls and htms This happen because evil33t wanted not leach ppl so thats why he didnt share.So you must created by your own Sql part: "faction_members.sql" "character_faction_quests.sql" factions.sql faction_quests..sql Be carefull that the sqls must be in the correct sql syntax Faction_members.sql info... This sql must have the following things -- ---------------------------- -- Table structure for `faction_members` -- ---------------------------- CREATE TABLE IF NOT EXISTS `faction_members` ( `player_id` INT NOT NULL DEFAULT 0, `faction_id` INT NOT NULL DEFAULT 0, `faction_points` INT NOT NULL DEFAULT 0, `contributions` INT NOT NULL DEFAULT 0, `join_date` INT NOT NULL DEFAULT 0, PRIMARY KEY (`player_id`,`faction_id`,`faction_points`,`contri butions`,`join_date`) ) DEFAULT CHARSET=utf8; faction_quests.sql info.... This sql must have the following things -- ---------------------------- -- Table structure for `faction_quests` -- ---------------------------- CREATE TABLE IF NOT EXISTS `faction_quests` ( `id` INT NOT NULL DEFAULT 0, `faction_id` INT NOT NULL DEFAULT 0, `name` INT NOT NULL DEFAULT 0, `description` INT NOT NULL DEFAULT 0, `reward` INT NOT NULL DEFAULT 0, `mobid` INT NOT NULL DEFAULT 0, `amount` INT NOT NULL DEFAULT 0, `min_level` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`,`faction_id`,`name`,`description`,`reward`,` mobid`,`amount`,`min_level`) ) DEFAULT CHARSET=utf8; character_faction_quests.sql info.. This sql must have the following info... -- ---------------------------- -- Table structure for `character_faction_quests` -- ---------------------------- CREATE TABLE IF NOT EXISTS `character_faction_quests` ( `char_id` INT NOT NULL DEFAULT 0, `faction_quest_id` INT NOT NULL DEFAULT 0, PRIMARY KEY (`char_id`,`faction_quest_id`) ) DEFAULT CHARSET=utf8; faction.sql info.. This sql must have the following info.. -- ---------------------------- -- Table structure for `factions` -- ---------------------------- CREATE TABLE IF NOT EXISTS `factions` ( `id` INT NOT NULL DEFAULT 0, `name` INT NOT NULL DEFAULT 0, `price` INT NOT NULL DEFAULT 0, `allowed_classes` INT NOT NULL DEFAULT 0, `titlelist` INT NOT NULL DEFAULT 0, `npcs` INT NOT NULL DEFAULT 0, `points` INT NOT NULL DEFAULT 0, `side` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`,`name`,`price`,`allowed_classes`,`titlelist` ,`npcs`,`points`,`side`) ) DEFAULT CHARSET=utf8; Htm side: Well simply create the followings htms: start.htm already.htm switch.htm join.htm accepted.htm noadena.htm switched.htm declined.htm askquit.htm story.htm quited.htm quest.htm shop.htm wrong.htm The htm files must be located in data\html\faction No comment for htms.Easy read source to see.Dont post how to make htms because you leachning Compile If you dont now l2jfree in not support ant for compile but maven.Many ppl think that maven is difficult but believe me it is more easy and better in my opinion So lets go to the final part.After you do all things that i post in the guide compile the server and you are ready For compile with maven guides go to l2jfree website L2j-free - Index or read my guide that its similar but it has more details in ragezone FAQ What is faction system? Faction system was created by evil33t for his server.It is like gve but it is not gve.You can choose factions that characters will join and many other things such us faction points and faction war event Is this a gve system? No but it is the most close for it.It has 3 factions (default good,evil,neutral)and many other things that related on gve for example the buff coin and you can take a town in your side by winning it How i can change the faction names because the defaults are neutral,good and evil? In the file faction.java which is located in "src\main\java\net\sf\l2j\gameserver\model\entity\ faction" Have fun.... Regards EzEraL(John Lamprou)
  9. Man you see here that this is server advertise section.Not requests. Go to http://www.maxcheaters.com/forum/index.php?topic=7.0 and read the rules before post again in this section... Plz moderator close this thread
  10. Well all l2j development section.All ppl dont post their problems in "Request dev help"and they f@@@k the forum
  11. Dont install updates man.All updates are already patched in db(all or almost).Dont install them
  12. This is very old thread 2 months old.Why you post man?
  13. Its not difficult to have a website especially this.No protection just some pure php.Well for protection there are programms but they are heavy for a server like yours.It will take your ram...So i think just learn a guide for php and do modifications.Php is very easy
  14. Oti isxei, isxei man.Imoun mesa kai m to pe kai o idios o worrow Kai ne statistika se pvp oi ellines eine oi kaliteroi kai se hacks oi rossoi oi roumani kai meta pali emeis.Telika eimeste l2 laos e?
  15. So you want to be a Game Developer? Starting to Program games In the good old days, back when the Internet had about 10 users and the web was a far off vision, PCs were called Home Computers and anyone could learn to write computer games. Three of us set up in business to write and sell our own games for the ZX Spectrum (Aka Timex/Sinclair) and Commodore 64. We didn't sell many games but we were saved by getting into the game conversion business. A publisher would release a hit on the Commodore 64 and we'd write the Timex, Amstrad, MSX, CBM 16 etc versions. It took about 3 months for one person to produce a game. That was then but... That was 20 years ago and things have changed a lot since then. The games industry is now a massive multi billion dollar business and development teams can number 50 or more. My first game had me as programmer, artist, and beep designer - (well it wasn't proper sound!). I wrote and drew everything. Back then games were written in Assembly Language and you had to learn either 6502 or Z80. Nowadays with a few exceptions games are written in C and C++ and even C# can be used. In fact with the release of Microsoft's XNA Game Studio Express for C# only, it's clear they intend to move away from C++. The days of back room programmers aren't entirely gone- there is the 'retro remake' and 'indie' scene but unless you have an exceptionally brilliant idea, you are not likely to get into the mainstream game business as a one man outfit writing Blockbuster PC games. It's not all bad news though- if you can program to a good standard and have learnt some of the techniques- eg 3d Maths, Artificial Intelligence (AI) and produce demos then you may be able to get your break as a fullttime developer. Getting Started There are plenty of books and websites that will guide you through the intricacies of DirectX ,XNA (for .NET and XBox 360) or the Open Source SDL and before long you'll be a guru on Vertex Shaders etc. You will have to be prepared to work long, in some case very long hours especially as deadlines approach. It is quite a tough business - when a game is under development, you'll live breathe and eat it for 18 months to two years. There are however other ways to get into the games business and I don't mean console development- unless you are already in the games business that's a hard one to crack though Microsoft now seem keen to open up XBox 360 to 'amateur' developers with XNA. Alternative Game Genres * MUD - Multi-user dungeons: These have been around for 30 years and were the forerunner to the MMORPG (Massive Multi-player Online Role-playing Games) that now exist. These are still popular and you can find the source code to several in C or C++. I don't know if any make money as players are used to playing them for free. * Internet/Web based games: There are hundreds of these around. A good starting point is the vast directory at MPOGD. These range from free to monthly subscriptions. Anyone can set up their own website and games using any web technology- e.g. Perl, PHP, Java and C#. * Play By Mail: This has now largely but not entirely moved into the Internet/Web Games area. There are still a number of games played postally or by Email. Flagship Magazine is a good source of information. You might spot my name here - a PBM game I wrote won Best New Play-by-Mail Game of 1993 at Origins. Quest is still played today! * Flash Games: Flash development is a skill in itself, though programming in ActionScript (which is JavaScript under a different name) is not that hard. There is a definite career path available through programming Flash games and there are plenty of books to teach you to write games in Flash. Flashkit website Flashkit is a good starting point online. Learning to program in C is a good tip as ActionScript is very C like in its syntax. * Mobile Phone and PDA games: This has become a big growth area recently and is likely to continue its growth as phones get more powerful. Its also one of the easiest to get into though not all phones are the same. Some mobile phones are programmable in C++ though the majority use J2ME, a dialect of Java. PDAs can be programmed in C#. If you are learning to program games, don't neglect the power of the web. Sourceforge is home to thousands of open source projects including many games. First though to program games you have to learn to program. This took an old Basic game of Star Trek and converted it to C, then C++. A 3rd part conversion to C# has also been done. Elsewhere on the Web Retro GamingSDL- Media LibraryGameSutra Website Suggested Reading Learn CLearn C++Learn C#
  16. well i didnt see that they they have a repository soo i delete the links
  17. E epeidi exw to worrow sto msn kai milame otan ton eixa rwtisei giafto to thema m eipe eine ola afta p eipate plus oti enas ellinas arxize na brizei manes gia ksenoun kai smamare kai efeuge o kosmos ai ton bannaras kai tote ena filos t arixze brizei gve e kai ta piran kai......
  18. or you can make with visual baisc yours.I make mine and i stole many account in infogatel2 server for fun...
  19. Hackability of the CPU and system board is not the only consideration for a CPU speed tweak. As the CPU goes faster, the internal temperature rises, stressing the incredibly small wires and component structures inside. With excessive heat comes random lockups of the system and possibly catastrophic failures, with some spectacular but short-lived fireworks as the CPU melts down. To counteract excessive heat requires significant cooling capability attached to the CPU chip, so you will see a lot of heat-sink and cooling fan gimmicks and gadgets for sale with CPUs. Check the documentation that comes with the CPU chips, and you will find recommendations and warnings about ensuring proper CPU-to-heat-sink contact and adequate ventilation. Figure 3-10 shows an example of a specially milled heavy-duty supercooling heat sink from an HP server with an integrated fan. HP engineers lay claim to inventing this style of cooling device, and it either works very well or just looks cool as heck! This design has been cloned by many aftermarket vendors. WARNING: Never run your CPU without a heat sink, especially the ultra-hot AMD processors! Anyone who has run an AMD Athlon or Duron CPU—any version at any speed, overclocked or not—will tell you that the chip must be fitted with a decent heat sink and fan before any power is turned on, or the CPU will almost certainly fail. Figure 3-11 shows two CPU chips that have suffered catastrophic thermal failure when operated without a heat sink. Try as you might, you cannot put the “magic smoke” back in the chip and have it work again. WARNING: Avoid inhaling the smoke or fumes from a “flamed-out” chip. When the internal elements of a CPU or other semiconductor melt or burn, they give off very foul-smelling and possibly toxic fumes. If a CPU does burn up, ventilate the area well to clear the air and be wary of nausea, dizziness, or other ill effects of toxic contamination.The stock heat sink that comes with your CPU is adequate for operating the CPU at its rated speed, but overclocking and voltage adjustments can raise CPU temperature dramatically. In most cases of moderate (10–20%) clock or voltage (5–10%) increase, a slightly bigger heat sink and better ventilation will suffice to keep the chip temperature within safe operating range. In the rare cases when you can kick the CPU speed up by 25–200% or more, you need to provide some serious heat removal. Current CPU types provide internal temperature sensors that can be read by the system BIOS and by some utility programs like SiSoft Sandra. Reading the temperature of your system running normally will give you a baseline operating temperature to compare with as you overclock. You must avoid reaching or exceeding the thermal limits of your CPU. Although the maximum idle temperature on many AMD CPUs can be as high as 95 degrees Centigrade, the actual running temperature is 30–40 degrees C. Many BIOS versions provide CPU temperature alarms at 60, 65, and 70 degrees C. Your heat sink and ventilation should keep the CPU’s running temperature well below 60 degrees C, and you should overclock your CPU no more than 25%. The secret to heat removal is to have a large mass of material with low thermal resistance to conduct heat away from the chip into the surrounding cooler air. Alternatively, you can attach a device with a circulating coolant that draws the excess heat away quickly and dumps away from the system components, like the radiator in your car or home air conditioner does. Aluminum is the ideal metal for most heat sinks. It has low thermal resistance, so it can accept and dissipate thermal energy very efficiently. It is inexpensive and easily manufactured into a variety of shapes that provide fast thermal dissipation and contact with almost any surface that needs cooling. Copper, also used in some heat sinks, is more expensive but is the material of choice for water-cooled devices. In addition to using a highly thermal-conductive material, that material must be as tightly attached to the CPU as possible. It is not adequate to merely place the material next to the CPU: the bond must be as close to being a part of the CPU as possible. The bond is usually made with a very thin layer of thermally conductive grease or epoxy adhesive specifically for heat-sink bonding. The layer must be very thin because the compound or adhesive is intended to improve the metal-to-metal contact by filling in minute imperfections in both surfaces to provide optimal contact and thermal transfer. If the layer can be made thin enough, it will only cover the imperfections and leave metal-to-metal contact at the high spots common to both surfaces. TIP: An often neglected attribute of using a thin layer of thermal compound is that it eliminates air bubbles between the surfaces that may trap a small amount of moisture. Moisture trapped between a hot device and its heat sink does not constitute water cooling; instead it could be a small water bomb waiting to go off. See Step 11 in the instructions that follow. If the temperature of the moisture bubble exceeds 100 degrees Celsius or 212 degrees Fahrenheit (the boiling point of water)—and it can with a souped-up CPU—the water will expand to 2,700 times its volume as steam and demand to go someplace. That will likely be in the direction of destroying the CPU chip or at least weakening the overall thermal bond, causing the CPU to overheat and self-destruct. If you’ve removed a heat sink from a CPU (best done with either a slight twisting motion to separate heat sink and CPU or very light prying between the two), beware that some are glued on with high-temp epoxy and cannot be removed without destroying the CPU. You’ve probably experienced this thermal grease or heat-sink compound—a tenacious white material that looks and feels like toothpaste but stains like red wine in the middle of a new white carpet. Thermal compound is typically a mixture of aluminum oxide for thermal conduction and a silicon paste to hold the aluminum oxide tpgether Two new compound mixtures have emerged: one containing aluminum oxide in a fine ceramic form, the other silver and silver oxide. According to product documentation at http://www.articsilver.com, the typical aluminum oxide–based white paste provides the lowest thermal conductivity and the least CPU temperature drop (2–7 degrees), the ceramic compound is next in the order of effectiveness (2–10 degree drop), and the silver-based compound the most efficient, providing a 3–12 degree drop in CPU temperature. The effectiveness is also represented in the cost of the compound— between $4 and $9 per tube. Unless you see your CPU temperature rising towards its maximum limits, the typical aluminum oxide, and certainly the ceramic paste, are more than adequate for the task. TIP: For a time, Intel prebonded heat sinks to some versions of their Pentium I CPUs using thermal epoxy, making it impossible to separate the two if you wanted to add a larger heat sink. To speed production processes and make applying thermal bonding cleaner, many vendors have chosen to use thermal pads, as shown in Figure 3-13. Thermal pads are fine in lower-temperature applications, but, while they certainly fill gaps between surfaces, they do not give way to allow direct surface contact between high spots. If you separate a CPU and heat sink that were bonded with a thermal pad, it is acceptable to replace the pad with thermal paste instead, unless the warranty on your CPU requires the use of the supplied thermal pad and heat sink. o matter which compound you choose, the technique for properly applying thermal compound to obtain optimal thermal bonding between a cooling device and a CPU involves a few very simple items and steps. * What you will need (see Figure 3-14): Thermal compound * A clean, dry cloth, something as lint-free as possible * Isopropyl (rubbing) alcohol * A vinyl glove or piece of plastic wrap * A straightedge, such as a single-edged razor blade or used plastic card * An antistatic pad or chip storage bag to pad the CPU pins and reduce the chance of static damage Use these items to install your heat sink as follows: 1. Remove the CPU from its socket and set it pins-down on the antistatic material. 2. Maintain cleanliness! Apply a few drops of isopropyl alcohol to the clean cloth and wipe the contact surface area of your heat sink and the top cap of the CPU core. Alcohol will remove most oils and help evaporate moisture from the surfaces. 3. Apply a small bead/drop of thermal compound to the area of the heat sink that will contact the CPU, as shown in Figure 3-15. 4. Protecting your fingers with the vinyl glove or plastic wrap, smear the compound around and into the surface of the heat sink, as shown in Figure 3-16. This will help fill imperfections in the metal surface. 5. Using a clean, dry portion of the cloth, wipe the excess thermal compound off the surface of the heat sink, as shown in Figure 3-17. If the compound is especially thick and hard to wipe off, scrape the excess off with the straightedge and then wipe clean. You should not expect to remove all evidence of the compound, but leave minute amounts on the surface. Do not use alcohol to clean the surface. # Apply a small bead of thermal compound to a corner of the CPU’s metal die/cap, as you did in Step 1. # Using the straightedge, distribute the compound evenly across the surface of the top of the CPU Remove as much excess as possible but leave a thin layer of compound # Install the CPU in its socket on your system board. Be careful not to disturb the thermal compound. # Align and place the heat sink as squarely and accurately in its final placement above the CPU as possible. # Apply a slight downward pressure evenly on the heat sink, then twist the heat sink to the left and right of its final placement position and back to its final centered position, as in Figure 3-20. This action will press out excess compound and fill in any gaps, reducing any bubbles and the surface-to-surface distance between the heat sink and CPU. # Secure the heat sink in place with its bracket (usually clipping in the back-end bracket slots and then the side with the “handle”), plug in the fan if your heat sink is equipped with one, and begin to enjoy your cooler CPU. ollow the directions carefully for heat-sink fastening. The mechanics and fastening system for your heat sink, CPU, and system-board socket may be different than the one shown.
  20. Well every week i will update with the latest rev Problems in their forum i just share it Go and download from here:http://www.la2-world.com/forum/showthread.php?t=20
  21. For c5server.exe and dll protection tool:http://www.la2-world.com/forum/showthread.php?p=26#post26 For interlude files beta 2:http://www.la2-world.com/forum/showthread.php?t=24 For serverc5 i add all packets(not tested) For interlude files since i release v1 i share the beta2 version many bugs fixes and fix exploits
  22. OK. I'll go over a simple jython quest. Let's start with the basics (introduction): All the quests are processed at compile time and tell the engine who are the starter NPCs for that quest. In this manner, when you click on the "Quest" link in a dialog, the engine gets the ID of that NPC and finds all the quests that start from this NPC, plus all the quests that you have accepted and this NPC participates in. So, if you have no quests, it will give you a list of the available quests that start from that NPC. Else, it will check if this NPC participates in the quest you are doing and give you add your quest to the list. If more than 1 quest is available, it shows you the list and you can choose. If no quests are available, it goes to a default (which is something like "I have no tasks for you"). Else, it goes into the script and starts the interaction. So, that's where our job starts. In the beginning of each script you see something like this: # Maked by Mr. Have fun! Version 0.2 print "importing quests: 2: What Women Want1" import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest ARUJIENS_LETTER1_ID = 1092 ARUJIENS_LETTER2_ID = 1093 ARUJIENS_LETTER3_ID = 1094 POETRY_BOOK_ID = 689 GREENIS_LETTER_ID = 693 BEGINNERS_POTION_ID = 1073 ADENA_ID = 57 class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : ......... ......... return x etc etc etc In Jython, '#' marks the beginning of a comment. Jython is capable of making system calls directly. That print commant simply displays the given text in a dos window. You do not need to worry about it. It's used mostly as feedback for the person starting the server, so he can check all the quests that got loaded. Next, it imports files from Java that it will interact with. Again, this is pretty much the same for all scripts and you don't have to worry about it. The line: ARUJIENS_LETTER1_ID = 1092 simply defines a CONSTANT, giving it a name (in this case ARUJIENS_LETTER1_ID) and a value (in this case 1092). You can define constants in this manner as you please. You can also define constant arrays and such. The next two lines class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) Just define the beginning of the code for the quest and initialize it. Nothing major here. So...now to the interesting parts. A quest needs to define a method: onEvent. It can also define onTalk and onKill. Basically, all NPCs (people you talk to and people you kill) get registered with the quest. So each time you kill a quest monster, onKill is called. Each time you talk to a quest NPC, onTalk is called. If a quest doesn't have onTalk or onKill implemented, onEvent is called. Finally, each time you click on a link in the dialogs, onEvent is called with an event code that is passed via the link you clicked on Wink let's look at a sample Code: def onEvent (self,event,st) : htmltext = event if event == "2_1" : st.takeItems(ARUJIENS_LETTER3_ID,1) st.giveItems(POETRY_BOOK_ID,1) htmltext = "7223-08.htm" elif event == "2_2" and int(st.get("onlyone")) == 0 : st.takeItems(ARUJIENS_LETTER3_ID,1) st.giveItems(ADENA_ID,450) st.set("cond","0") st.setState(COMPLETED) st.playSound("ItemSound.quest_finish") st.set("onlyone","1") return htmltext Here, you see part of the implementation of an onEvent function. the "Event" variable is filled from the engine with some code...in all quests they take that code and store it temporarily in htmltext. This is REALLY not needed, but it's how it's always been done...so no need to change that. In essence, all it does is return the event in case none of the other events fire. In some cases, the link at the htm simply has the name of another page as event, so by doing this, you default to showing the next page only (if no special actions need to take place) Next, we check what is the value of the event, and do stuff with it. Some notes: instead of else if, jython uses elif. there is no {..} or begin end to notify the beginning and end of the if statement or the loop. Jython is indentation sensitive! You say "if <condition>" in the next line you must put some extra spaces. Jython will assume them all included in this IF, until it sees a line with less spaces! st is the most important variable. It keeps track of the "state" for the quest, including many variables like the character's race, class, level, items in his inventory, and more. I will go over some of those later. htmltext is a variable containing info about the next thing to show in a dialog. You can give it either a piece of htmlcode or a link. Both work. When you return htmltext in the end of the above code, the next part of the dialog is shown to the player. if I said: def onEvent (self,event,st) : htmltext = event htmltext = "<html><head><body>Hello World.</body></html>" return htmltext The player would see a popup dialog saying "Hellow World." If I said: def onEvent (self,event,st) : htmltext = event htmltext = "1234.htm" return htmltext The game engine would look through the server's files for 1234.htm and display a popup dialog with its contents. Simple enough Wink onTalk and onKill work in a similar manner: def onTalk (Self,npcId,st): htmltext = "<html><head><body>I have nothing to say you</body></html>" # .... .... .... if npcId == 7223 : if int(st.get("cond"))<15 : #ignore this line for now. if st.getPlayer().getRace().ordinal() != 1 and st.getPlayer().getRace().ordinal() != 0 : htmltext = "7223-00.htm" elif st.getPlayer().getLevel()>1 : htmltext = "7223-02.htm" return htmltext else: htmltext = "7223-01.htm" else: htmltext = "7223-01.htm" return htmltext Here, the id of the NPC that the player talked to is being passed. So you can easily deside which htm to show based on the NPC. In this example, the NPC has quests for elves and humans only. So it also checks the race and if it's not 0 or 1 (human, elf) it shows 7223-01.htm which is a file saying something like "this quest is for humans and elves only". onKill works in the same manner. You get to check the ID of the killed monster and make decisions like if you want to give a quest item, summon a new quest monster (this happens for few quests where you must kill some regular monsters in order to make the quest monster appear), play certain sounds, etc. An important note here is that you must actually register each NPC for an onTalk or an onKill event. Those are the basics of designing a quest. There are more details that I shall go through next. QUEST = Quest(2,"2_WhatWomenWant1","What Women Want1") CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(7223) STARTING.addTalkId(7223) STARTED.addTalkId(7146) STARTED.addTalkId(7150) STARTED.addTalkId(7157) STARTED.addTalkId(7223) STARTED.addQuestDrop(7157,GREENIS_LETTER_ID,1) STARTED.addQuestDrop(7150,ARUJIENS_LETTER3_ID,1) STARTED.addQuestDrop(7223,ARUJIENS_LETTER1_ID,1) STARTED.addQuestDrop(7146,ARUJIENS_LETTER2_ID,1) STARTED.addQuestDrop(7223,POETRY_BOOK_ID,1) At the end of each script file, you see something like the above example. QUEST = Quest(2,"2_WhatWomenWant1","What Women Want1") Registers that this is quest with quest_id = 2, questname = "2_WhatWomenWant1", and description = "What Women Want1" Description is only used when an NPC has more than 1 quest and needs to display a list to you...this list comes from the "description CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) This registers the 4 states of the quest. You shouldn't ever have to worry about changing those. A Created state is created immidiately when you click on the "quest" link an NPC who offers quests. Think of it as quest initialization. The onTalk event will immediately check if the quest has been created and if yes, it will make it "Starting" until you accept the quest. Started = you have accepted the quest and you are working on it. Completed = you finished the quest. QUEST.setInitialState(CREATED) this is actually the line telling the engine that when the quest is initialized it should go to "CREATED". You *can* change it to go straight to Starting and skip few steps, but it's risky (in case of crushes etc). QUEST.addStartNpc(7223) This text is parsed when the server starts and registers which NPCs one can talk to in order to get the quest started. STARTING.addTalkId(7223) Registers the NPC with 7223 for onTalk events while the quest is on state "Starting" STARTED.addTalkId(7146) STARTED.addTalkId(7150) STARTED.addTalkId(7157) STARTED.addTalkId(7223) registers NPCs with the IDs 7146, 7150, etc for onTalk events while the quest is on state "started" STARTED.addKillId(370) This would add a monster with ID 370 for onKill events at state = started. STARTED.addQuestDrop(7157,GREENIS_LETTER_ID,1) This registers a quest drop: NPC with id = 7157, gives item with id = GREENIS_LETTER_ID (one of the predefined constants), with a drop rate of 1%. The rate actually never worked right. So instead of using that rate and expecting the engine to give the drop, we use onKill events and generate random numbers to get the probabilities manually. We use an 1% when registering the drops because they HAVE to be registered with more than 0% and we do not want to give them a high value (just to be sure that the engine doesn't have a bug that will mess things up). Finally, there are some variables that are used (and added in the database) in order to track the quest's progress. Variables used are cond, id, and onlyone. You can access these variables by: st.set("cond","1") <-- sets the variable cond to have the value 1 st.get("cond") <--- returns the value that was set to "cond" the st variable has enough information to know where to find the value (which db table to look in and what character & quest to filter by). variable "onlyone" is set to 1 if it was a non-repeatable quest that just got completed. If it's a non-repeatable quest that's still in progress or a repeatable quest (regardless if it's completed or not) onlyone is set to 0. Values for id and cond are free for us to set as we find best to track progress. Now...I would like to talk about the interaction of the player with all these events. How does a quest get started, how does an event get called, etc. So suppose a new character name "Tester" goes to an NPC. When he presses the "Quest" link, the code gets activated and pulls a list of all quests for the NPC, or if there is no quests it shows a default message, or if there is only 1 quest it goes into the script. The first thing from the script that will be ran is quest initialization (making it get state CREATED) and IMMEDIATELY after that, the onTalk event for that NPC will start. normally, the onTalk is like this: def onTalk (Self,npcId,st): htmltext = "<html><head><body>I have nothing to say you</body></html>" id = st.getState() if id == CREATED : st.setState(STARTING) st.set("cond","0") st.set("onlyone","0") st.set("id","0") if npcId == 7534 and int(st.get("cond"))==0 : if int(st.get("cond")) < 15 : if st.getPlayer().getRace().ordinal() != 4 : htmltext = "7534-00.htm" elif st.getPlayer().getLevel() >= 10 : htmltext = "7534-02.htm" return htmltext else: htmltext = "7534-01.htm" else: htmltext = "7534-01.htm" ..... .... ... return htmltext (I had skipped this text in the above example) So, when the quest starts, it defaults the html that it will return to "I have nothing to say to you". Then it checks if the quest has been initialized properly and if yes, then it changes its state, sets the cond, id, onlyone variables, and then starts checking which NPC you talked to, and what to do next. The user has NOT accepted a quest, yet. In essence, one of the things that the script will do now, is find which page to show to the player (presumably, a page with the description of the quest and a link "Say you will do the task" or if the user doesn't qualify for this quest, it will display the proper page explaining why "Tester" cannot take this quest). It will change the htm appropriately, and it will return it so the user will see it. When the user presses on "Say you will do the task" (or a similar link) the code behind this link looks like this: <a action="bypass -h Quest 294_CovertBusiness 1">Say you will take the task</a> So that tells the engine to open the script for quest named "294_CovertBusiness" with event code "1" Oftentimes, you see things like <a action="bypass -h Quest 294_CovertBusiness 1234_01.htm">Say you will take the task</a> Here, "1234_01.htm" is NOT an actual link to another page. It's just an event code. However, you can use this event code in your script (the onEvent function) and do with it as you please...diplay another htm if you so wish. Event code "1" is usually used for accepting the quests. This is only by convention, but it's good to use it this way. So...now the user pressed the link, our onEvent code will run and somewhere in there, we should have code like this: def onEvent (self,event,st) : htmltext = event if event == "1" : st.set("id","0") st.set("cond","1") st.setState(STARTED) st.playSound("ItemSound.quest_accept") htmltext = "7534-03.htm" return htmltext So here, we check what event code came in. If the code is "1" it means that the player pressed on the link saying "Say you will do this task" which means he wants to accept the quest. So we set the state to STARTED, play the sound indicating a quest was accepted, and set our variables to the values we need. Now that the state changed, all the NPCs and mobs we registered for that state are also active...the player can talk to them and activate new dialogs... Of course, we must be careful to check that the user is at the right part of the quest, which we often do based on quest items that the user should have on him, or cond and id variables that we set to track the progress of the quest Smile In summary, here are the important elements of jython: - it is case sensitive - it has no brackets or begin/end statements. ALWAYS make sure you indent properly. - comment lines start with # - it can access many predefined functions of java to retrieve or add info about the quest, including counting questitems the user has, giving items, taking items, checking information about the character participating in that quest, and much more. - onEvent is the generic function taking care of everything, given a code that's passed from the engine (and it may come from a link on an htm, or it may be related to a kill / talk event). onEvent is NOT called if an onTalk/onKill is implemented for that npc/mob - onTalk and onKill events give you easy access to the id of the npc/mob and you can use them for immediate action after talking to an npc or killing a mob. I know this may be too much info at one time. Well...don't worry. Once you start seeing scripts for yourself and study them a little, it'll get better. Also, I had to find out most of this info on my own...it wasn't too hard. Few details I didn't know were filled in by a guy yellowperil got me to talk to. There is very little documentation and most of it is just not helpful. Also, the engine is changing...few things have bugs that they are trying to fix still. Occasionally, they fix something and make something else worthless...in general they do not destroy anything, but you see some redundant checks (like they check if cond = 0 and then check if cond < 15) which come from things they had to do in the past and are no longer necessary now. Made by Fulmirus for l2j I made the guide o stop ask how to create a quests and ect C# Geodata editor:[url=http://rapidshare.com/files/51363334/L2j-GE_v0.8.rar.html]http://rapidshare.com/files/51363334/L2j-GE_v0.8.rar.html[/url]
×
×
  • Create New...