From no-reply_wiki at metalforge.org Fri Mar 7 18:20:23 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Fri, 07 Mar 2008 18:20:23 -0600 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: people Message-ID: <1204935623.376122.23344.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/07 18:20 User : Edit Summary: @@ -27,8 +27,9 @@ | Kevin Bulgrien | [[user:kbulgrien]] | kbulgrien | [[http://sourceforge.net/users/kbulgrien|kbulgrien]] | | [[http://kbulgrien.home.att.net/|kbulgrien.home.att.net]] | | Anthony Wyatt | [[user:buzzsaw]] | buzzsaw | | | | | James Lopeman | [[user:meflin]] | meflin | | | http://home.comcast.net/~meflin/ | | Simon C?t? | [[user:simonraven]] | simonrvn | [[http://sourceforge.net/users/simonraven|simonraven]] | | http://simonraven.kisikew.org/ | + | Austin | [[user:austin]] | Austin` | | | http://clan123.net/ | ===== Package Maintainers ===== ^ Full Name ^ irc ^ Distribution ^ IP-Address : 66.189.5.210 Old Revision: http://wiki.metalforge.net/doku.php/people?rev=1203279285 New Revision: http://wiki.metalforge.net/doku.php/people -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Wed Mar 12 17:50:41 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Wed, 12 Mar 2008 17:50:41 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: people Message-ID: <1205362241.899346.19263.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/12 17:50 User : Edit Summary: @@ -28,8 +28,9 @@ | Anthony Wyatt | [[user:buzzsaw]] | buzzsaw | | | | | James Lopeman | [[user:meflin]] | meflin | | | http://home.comcast.net/~meflin/ | | Simon C?t? | [[user:simonraven]] | simonrvn | [[http://sourceforge.net/users/simonraven|simonraven]] | | http://simonraven.kisikew.org/ | | Austin | [[user:austin]] | Austin` | | | http://clan123.net/ | + | Michael Rogato | [[user:michael]] | Elshar/Meznev | | | http://www.cheekan.org/ | ===== Package Maintainers ===== ^ Full Name ^ irc ^ Distribution ^ IP-Address : 216.110.206.92 Old Revision: http://wiki.metalforge.net/doku.php/people?rev=1204935621 New Revision: http://wiki.metalforge.net/doku.php/people -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Fri Mar 14 03:57:04 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Fri, 14 Mar 2008 03:57:04 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: osx Message-ID: <1205485024.232602.24547.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/14 03:57 User : buzzsaw Edit Summary: @@ -2,8 +2,9 @@ FIXME -- Instructions are still under development, use with caution ===== Client ===== + ==== Installation ==== @@ -63,25 +64,13 @@ - You will need //libpng// to compile the client - Download [[http://ethan.tira-thompson.com/Mac OS X Ports_files/libpng (universal).dmg]] the libpng individual installer - Double click the .dmg package and follow the on screen prompts and instructions - Change directories to **client.svn** and run the following commands: - - **./configure** - - Just about all of your errors from ./configure can be fixed by installing the fink packages for them, not including the libpng. - - == GTKv1 Client == - - - Change directories to the gtk directory - - Make sure you are in the correct directory by using the **pwd** command - it should be: **/Users//client.svn/gtk** - - Run this command: **./crossfire-client-gtk &** - - == GTKv2 Client == - - - Change directories to the gtk directory - - Make sure you are in the correct directory by using the **pwd** command - it should be: **/Users//client.svn/gtk-v2/src** - - Run this command: **./crossfire-client-gtk2 &** - - - + - export CFLAGS="-ggdb -g -O0"; ./autogen.sh --prefix=${HOME} + - sh autogen.sh + - make + - sudo make install + - You can now run the clients via the command crossfire-client-gtk2, crossfire-client-gtk, or crossfire-client-x11 ===== Server ===== Please note. The server will compile and run but stability as not been tested. Please let us know what you find out with it. IP-Address : 69.92.59.77 Old Revision: http://wiki.metalforge.net/doku.php/osx?rev=1201838720 New Revision: http://wiki.metalforge.net/doku.php/osx -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Fri Mar 14 18:41:19 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Fri, 14 Mar 2008 18:41:19 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: osx Message-ID: <1205538079.798171.30481.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/14 18:41 User : Edit Summary: @@ -2,8 +2,9 @@ FIXME -- Instructions are still under development, use with caution ===== Client ===== + IP-Address : 69.92.59.77 Old Revision: http://wiki.metalforge.net/doku.php/osx?rev=1205485020 New Revision: http://wiki.metalforge.net/doku.php/osx -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 01:55:26 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 01:55:26 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: gridarta Message-ID: <1205996126.909469.25299.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 01:55 User : Edit Summary: updated link for the svn on gridarta @@ -13,12 +13,13 @@ | Lines in Gridarta4Crossfire that differ from Daimonin | 12366 | | Lines in Gridarta4Daimonin that differ from Crossfire | 16063 | ^ //Last updated 2007/01/22 18:45 (Gridarta rev 1667)//^^ See also: [[http://gridarta.sourceforge.net/dev/mergeStats|Gridarta Merge Statistics Page]] + ===== Getting Gridarta ===== Gridarta can be retrieved from svn with: - svn co https://svn.sourceforge.net/svnroot/gridarta + http://gridarta.svn.sourceforge.net/viewvc/gridarta/ Also, there is the following 'unoffical' gridarta build: * [[http://www.eracc.com/files/crossfire/|Ragnor's Gridarta4Crossfire Build]] (usually updated when Ragnor makes user-visible changes) IP-Address : 69.92.59.77 Old Revision: http://wiki.metalforge.net/doku.php/gridarta?rev=1201947261 New Revision: http://wiki.metalforge.net/doku.php/gridarta -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 01:56:32 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 01:56:32 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: gridarta Message-ID: <1205996192.997689.25302.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 01:56 User : Edit Summary: @@ -13,13 +13,14 @@ | Lines in Gridarta4Crossfire that differ from Daimonin | 12366 | | Lines in Gridarta4Daimonin that differ from Crossfire | 16063 | ^ //Last updated 2007/01/22 18:45 (Gridarta rev 1667)//^^ See also: [[http://gridarta.sourceforge.net/dev/mergeStats|Gridarta Merge Statistics Page]] + ===== Getting Gridarta ===== Gridarta can be retrieved from svn with: - http://gridarta.svn.sourceforge.net/viewvc/gridarta/ + svn co http://gridarta.svn.sourceforge.net/viewvc/gridarta/trunk/ Also, there is the following 'unoffical' gridarta build: * [[http://www.eracc.com/files/crossfire/|Ragnor's Gridarta4Crossfire Build]] (usually updated when Ragnor makes user-visible changes) IP-Address : 69.92.59.77 Old Revision: http://wiki.metalforge.net/doku.php/gridarta?rev=1205996124 New Revision: http://wiki.metalforge.net/doku.php/gridarta -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 01:59:31 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 01:59:31 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: gridarta Message-ID: <1205996371.126302.25305.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 01:59 User : Edit Summary: updated link for the gridarta svn @@ -13,14 +13,15 @@ | Lines in Gridarta4Crossfire that differ from Daimonin | 12366 | | Lines in Gridarta4Daimonin that differ from Crossfire | 16063 | ^ //Last updated 2007/01/22 18:45 (Gridarta rev 1667)//^^ See also: [[http://gridarta.sourceforge.net/dev/mergeStats|Gridarta Merge Statistics Page]] + ===== Getting Gridarta ===== Gridarta can be retrieved from svn with: - svn co http://gridarta.svn.sourceforge.net/viewvc/gridarta/trunk/ + svn co https://gridarta.svn.sourceforge.net/svnroot/gridarta Also, there is the following 'unoffical' gridarta build: * [[http://www.eracc.com/files/crossfire/|Ragnor's Gridarta4Crossfire Build]] (usually updated when Ragnor makes user-visible changes) IP-Address : 69.92.59.77 Old Revision: http://wiki.metalforge.net/doku.php/gridarta?rev=1205996189 New Revision: http://wiki.metalforge.net/doku.php/gridarta -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 02:41:02 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 02:41:02 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page added: user:gxc:scripts:food_watch Message-ID: <1205998862.677423.26383.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 02:41 User : gxc Edit Summary: created ====== Introduction ====== This client-side [[wp>C++]] script monitors your food level and feeds your character when it falls below 250. ====== Requirements ====== * C++ ====== Code ====== //gxc's Food Monitor Ver 1.0 #include #include #include int main (){ //variable declaration char buf[200], checkFood[]="food"; int foodLVL; //tell client to watch all stats printf ("watch stats\n"); //flush stdout, necessary after all output fflush (stdout); //begin an infinite loop while(true){ //loops until buf = "food", which means //the next string is the amount food left while(strcmp(buf,checkFood)!=0){ scanf("%s",buf); } //get the amount of food scanf("%s",buf); //convert to an integer foodLVL = atoi(buf); //if it's less than the danger amount, //apply food of your choice if(foodLVL<250){ //Change "food" in this line to the //food of your choice printf("issue 1 1 apply food\n"); fflush (stdout); //flush as always } } return 0; } ====== Notes & Comments ====== Ver 1.0\\ Basic food watching script, nothing too cool. I've run it extensively with no problems. Coming:\\ -Database of food, maybe, that consumes food in some order ====== References ======= * [[:Client Side Scripting]] IP-Address : 76.210.35.252 Old Revision: none New Revision: http://wiki.metalforge.net/doku.php/user:gxc:scripts:food_watch -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 02:48:18 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 02:48:18 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: user:gxc:scripts:food_watch Message-ID: <1205999298.218049.26392.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 02:48 User : gxc Edit Summary: Added "how to" to code @@ -6,8 +6,13 @@ ====== Code ====== //gxc's Food Monitor Ver 1.0 + + //How to use: + //1. Save and compile + //2. Enter "scripts " in Crossfire + #include #include #include IP-Address : 76.210.35.252 Old Revision: http://wiki.metalforge.net/doku.php/user:gxc:scripts:food_watch?rev=1205998859 New Revision: http://wiki.metalforge.net/doku.php/user:gxc:scripts:food_watch -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 03:08:33 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 03:08:33 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: client_side_scripting:scripts Message-ID: <1206000513.767080.26538.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 03:08 User : gxc Edit Summary: Added "/C++" to C, common combination @@ -3,6 +3,6 @@ - [[client_side_scripting:scripts:c|C Scripts]] + [[client_side_scripting:scripts:c|C/C++ Scripts]] [[client_side_scripting:scripts:perl|Perl Scripts]] [[client_side_scripting:scripts:python|Python Scripts]] IP-Address : 76.210.35.252 Old Revision: http://wiki.metalforge.net/doku.php/client_side_scripting:scripts?rev=1155916432 New Revision: http://wiki.metalforge.net/doku.php/client_side_scripting:scripts -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 03:13:32 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 03:13:32 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: client_side_scripting:scripts:c Message-ID: <1206000812.948622.26556.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 03:13 User : gxc Edit Summary: @@ -1,4 +1,5 @@ ==== C Scripts ==== The scripts on this page or linked to from this page are working scripts that players have actually used. Feel free to contribute your own C script(s) here. If you do not have wiki edit access then send your script to (poof at eracc dot com) for consideration. === The Scripts === + *[[:user:gxc:scripts:food_watch]] -- Monitors your food and eats if it falls below a certain level. IP-Address : 76.210.35.252 Old Revision: http://wiki.metalforge.net/doku.php/client_side_scripting:scripts:c?rev=1155916327 New Revision: http://wiki.metalforge.net/doku.php/client_side_scripting:scripts:c -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 04:13:19 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 04:13:19 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page added: user:gxc:client_side_scripting:cplusplus-howto Message-ID: <1206004399.693591.26853.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 04:13 User : gxc Edit Summary: created ====== Client Scripting Interface - C++ How To ====== ===== 1. Using Client Commands ===== ===== 2. Writing to the Screen ===== To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf([output string])]] followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush(stdout)]]. For example, #include int main(){ printf("draw 4 Hello world\n"); fflush(stdout); return 0; } would return [color=#FF0000]Hello world[/color]. There are several ways to achieve this. ==== 2.1 draw ==== printf("draw [number] [string]"); * [number] - Integer between 1 and 12. See chart below for colors * [string] - String to output to client's window draw allows you to output data to the client's screen in several different colors. draw should almost be used when debugging or outputting script data to the user, as the majority of the other output options use the server's chat features. ^ draw Colors ^^^^^ ^ # ^ color ^ ^ # ^ color ^ | 1 | black | | 7 | light green | | 2 | dark blue | | 8 | very light green | | 3 | red | | 9 | grey | | 4 | light yellow | | 10 | brown | | 5 | light blue | | 11 | yellow | | 6 | dark yellow | | 12 | tan | ====== Notes & Comments ====== This was written on a Linux machine. I have yet to run Crossfire on Windows, but I assume the syntax for coding will be the same. Running the scripts, on the other hand, might not be. ====== References ======= * [[:Client Side Scripting]] IP-Address : 76.210.35.252 Old Revision: none New Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 04:41:54 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 04:41:54 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: user:gxc:client_side_scripting:cplusplus-howto Message-ID: <1206006114.113401.26904.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 04:41 User : gxc Edit Summary: Added basic 1. Using Client Commands; more to 2. Writing @@ -1,10 +1,25 @@ ====== Client Scripting Interface - C++ How To ====== ===== 1. Using Client Commands ===== + To use a command normally entered in the client, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("issue 1 1[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use)), readying it for more data. + + An explanation of "issue 1 1 " can be found [[:client_side_scripting:client_scripting_interface-basic_howto|here]], in an introduction to scripting overall. Essentially, the first integer is the number of times to repeat an action. For debugging and information purposes, it's generally a good idea to leave it as 1 and create a loop in C++. The second 1 should always be set as 1. + + Example: + + #include + + int main(){ + printf("issue 1 1 use_skill praying"); + fflush(stdout); + return 0; + } + + This would make the character pray once. ===== 2. Writing to the Screen ===== - To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf([output string])]] followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush(stdout)]]. + To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use)), readying it for more data. - For example, + Example: #include int main(){ @@ -12,9 +27,9 @@ fflush(stdout); return 0; } - would return [color=#FF0000]Hello world[/color]. + This would return [color=#FF0000]Hello world[/color]. There are several ways to achieve this. ==== 2.1 draw ==== IP-Address : 76.210.35.252 Old Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto?rev=1206004396 New Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 08:13:18 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 08:13:18 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: user:gxc:client_side_scripting:cplusplus-howto Message-ID: <1206018798.518176.29313.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 08:13 User : Edit Summary: @@ -14,8 +14,9 @@ return 0; } This would make the character pray once. + ===== 2. Writing to the Screen ===== To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use)), readying it for more data. Example: @@ -30,8 +31,9 @@ This would return [color=#FF0000]Hello world[/color]. There are several ways to achieve this. + ==== 2.1 draw ==== printf("draw [number] [string]"); IP-Address : 76.210.47.58 Old Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto?rev=1206006112 New Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 08:23:10 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 08:23:10 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: user:gxc:client_side_scripting:cplusplus-howto Message-ID: <1206019390.096135.29331.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 08:23 User : Edit Summary: @@ -31,8 +31,9 @@ This would return [color=#FF0000]Hello world[/color]. There are several ways to achieve this. + ==== 2.1 draw ==== printf("draw [number] [string]"); @@ -41,14 +42,14 @@ * [string] - String to output to client's window draw allows you to output data to the client's screen in several different colors. draw should almost be used when debugging or outputting script data to the user, as the majority of the other output options use the server's chat features. ^ draw Colors ^^^^^ ^ # ^ color ^ ^ # ^ color ^ - | 1 | black | | 7 | light green | - | 2 | dark blue | | 8 | very light green | - | 3 | red | | 9 | grey | - | 4 | light yellow | | 10 | brown | - | 5 | light blue | | 11 | yellow | - | 6 | dark yellow | | 12 | tan | + | 1 | black (#000000) | | 7 | light green (#2E8B57) | + | 2 | dark blue (#000080) | | 8 | very light green (#8FBC8F) | + | 3 | red (#FF0000) | | 9 | grey (#7F7F7F) | + | 4 | dark yellow (#FFA500) | | 10 | brown (#A0522D) | + | 5 | light blue (#1E90FF) | | 11 | yellow (#FFD700) | + | 6 | orange (#EE7600) | | 12 | tan (#F0E68C) | IP-Address : 76.210.47.58 Old Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto?rev=1206018796 New Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto -- This mail was generated by DokuWiki at http://wiki.metalforge.net/ From no-reply_wiki at metalforge.org Thu Mar 20 08:28:38 2008 From: no-reply_wiki at metalforge.org (no-reply_wiki at metalforge.org) Date: Thu, 20 Mar 2008 08:28:38 -0500 Subject: [Crossfire-wiki] [Crossfire DokuWiki] page changed: user:gxc:client_side_scripting:cplusplus-howto Message-ID: <1206019718.437853.29340.nullmailer@wiki.metalforge.net> A page in your DokuWiki was added or changed. Here are the details: Date : 2008/03/20 08:28 User : Edit Summary: @@ -1,7 +1,7 @@ ====== Client Scripting Interface - C++ How To ====== ===== 1. Using Client Commands ===== - To use a command normally entered in the client, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("issue 1 1[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use)), readying it for more data. + To use a command normally entered in the client, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("issue 1 1[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use. It ends the current output, akin to pushing enter on commands in the client.)), readying it for more data. An explanation of "issue 1 1 " can be found [[:client_side_scripting:client_scripting_interface-basic_howto|here]], in an introduction to scripting overall. Essentially, the first integer is the number of times to repeat an action. For debugging and information purposes, it's generally a good idea to leave it as 1 and create a loop in C++. The second 1 should always be set as 1. Example: @@ -16,9 +16,9 @@ This would make the character pray once. ===== 2. Writing to the Screen ===== - To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use)), readying it for more data. + To write to the screen, use [[http://www.cplusplus.com/reference/clibrary/cstdio/printf.html|printf]]("[output string]") followed by [[http://www.cplusplus.com/reference/clibrary/cstdio/fflush.html|fflush]](stdout). printf writes the output string in stdout, which is read by the client and interpreted. fflush(stdout) flushes or clears stdout((Normally, stdout doesn't need to be cleared this often, but when scripting for Crossfire, it's good practice to flush it after each use. It ends the current output, akin to pushing enter on commands in the client.)), readying it for more data. Example: #include IP-Address : 76.210.47.58 Old Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto?rev=1206019386 New Revision: http://wiki.metalforge.net/doku.php/user:gxc:client_side_scripting:cplusplus-howto -- This mail was generated by DokuWiki at http://wiki.metalforge.net/