Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/utils.h

Go to the documentation of this file.
00001   /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
00002     || NoX-Wizard UO Server Emulator (NXW) [http://noxwizard.sourceforge.net]  ||
00003     ||                                                                         ||
00004     || This software is free software released under GPL2 license.             ||
00005     || You can find detailed license information in nox-wizard.cpp file.       ||
00006     ||                                                                         ||
00007     || For any question post to NoX-Wizard forums.                             ||
00008     -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
00009 
00015 #ifndef __UTILS_H__
00016 #define __UTILS_H__
00017 
00018 #include "globals.h"
00019 
00020 class cScriptCommand {
00021 
00022         public:
00023 
00024                 std::string command;
00025                 std::string param;
00026 
00027                 cScriptCommand( );
00028                 cScriptCommand( std::string command, std::string param );
00029                 ~cScriptCommand();
00030 
00031                 void execute( NXWSOCKET s );
00032 
00033 };
00034 
00035 
00036 int calcSerFromChar(int ser);
00037 int checkBoundingBox(int xPos, int yPos, int fx1, int fy1, int fz1, int fx2, int fy2);
00038 int checkBoundingCircle(int xPos, int yPos, int fx1, int fy1, int fz1, int radius);
00039 int fielddir(int s, int x, int y, int z);
00040 void npcsimpleattacktarget(int target2, int target);
00041 
00042 // Day and Night related prototypes
00043 char indungeon(P_CHAR pc);
00044 void setabovelight(unsigned char);
00045 
00046 void scriptcommand (NXWSOCKET s, std::string script1, std::string script2);
00047 void endmessage();
00048 void delequan(int s, short id, int amount, int & not_deleted = dummy__);
00049 void donewithcall(int s, int type);
00050 void dooruse(NXWSOCKET s, P_ITEM pi/*int item*/);
00051 int calcValue(int i, int value);
00052 int calcGoodValue(int npcnum, int i, int value,int goodtype); // by Magius(CHE) for trade system
00053 
00054 int whichbit( int number, int bit );
00055 int numbitsset( int number );
00056 
00057 void getSextantCoords(SI32 x, SI32 y, LOGICAL t2a, char *sextant);
00058 void splitline();
00059 
00060 int hexnumber(int countx);
00061 
00062 void batchcheck(int s);
00063 void location2xyz(int loc, int& x, int& y, int& z);
00064 
00065 UI32 getclock();
00066 UI32 getsysclock();
00067 UI32 getclockday();
00068 void initclock();
00069 
00070 
00072 
00077 char *linestart(char *line);
00078 void strupr(std::string &str);
00079 void strlwr(std::string &str);
00080 
00081 int strtonum(int countx, int base= 0);
00082 
00084 
00085 #endif
SourceForge.net Logo