Version 1.3.4
+* Added VLife as a new supported ircd - Kain (thanks bernardocr)
* Fixed a new bug that crashed gameserv when someone attempted to register a nickname - Kain
* SET [playername] HP # now also sets the Max HP for a player if it's lower than what you're
setting the hp to. If you type /msg gameserv set player hp 1000, but their maxhp was
4. ircd-hybrid, ircd-ratbox, or csircd
5. UltimateIRCD 2.8.x
6. PTLink
+7. VLife
++
printf "Make your selection: "
echo "#undef P10" >> options.h
echo "#undef HYBRID" >> options.h
echo "#undef ULTIMATE2" >> options.h
- echo "#undef PTLINK" >> options.h;;
+ echo "#undef PTLINK" >> options.h
+ echo "#undef VLIFE" >> options.h;;
2)
echo "#undef UNREAL" > options.h
echo "#define BAHAMUT" >> options.h
echo "#undef P10" >> options.h
echo "#undef HYBRID" >> options.h
echo "#undef ULTIMATE2" >> options.h
- echo "#undef PTLINK" >> options.h;;
+ echo "#undef PTLINK" >> options.h
+ echo "#undef VLIFE" >> options.h;;
3)
echo "#undef UNREAL" > options.h
echo "#undef BAHAMUT" >> options.h
echo "#define P10" >> options.h
echo "#undef HYBRID" >> options.h
echo "#undef ULTIMATE2" >> options.h
- echo "#undef PTLINK" >> options.h;;
+ echo "#undef PTLINK" >> options.h
+ echo "#undef VLIFE" >> options.h;;
4)
echo "#undef UNREAL" > options.h
echo "#undef BAHAMUT" >> options.h
echo "#undef P10" >> options.h
echo "#define HYBRID" >> options.h
echo "#undef ULTIMATE2" >> options.h
- echo "#undef PTLINK" >> options.h;;
+ echo "#undef PTLINK" >> options.h
+ echo "#undef VLIFE" >> options.h;;
5)
echo "#undef UNREAL" > options.h
echo "#undef BAHAMUT" >> options.h
echo "#undef P10" >> options.h
echo "#undef HYBRID" >> options.h
echo "#define ULTIMATE2" >> options.h
- echo "#undef PTLINK" >> options.h;;
+ echo "#undef PTLINK" >> options.h
+ echo "#undef VLIFE" >> options.h;;
6)
echo "#undef UNREAL" > options.h
echo "#undef BAHAMUT" >> options.h
echo "#undef P10" >> options.h
echo "#undef HYBRID" >> options.h
echo "#undef ULTIMATE2" >> options.h
- echo "#define PTLINK" >> options.h;;
+ echo "#define PTLINK" >> options.h
+ echo "#undef VLIFE" >> options.h;;
+ 7)
+ echo "#undef UNREAL" > options.h
+ echo "#undef BAHAMUT" >> options.h
+ echo "#undef P10" >> options.h
+ echo "#undef HYBRID" >> options.h
+ echo "#undef ULTIMATE2" >> options.h
+ echo "#undef PTLINK" >> options.h
+ echo "#define VLIFE" >> options.h;;
*)
echo
echo "Improper selection"
{
if (is_playing(battle))
{
- if (!isYourTurn(ni->stats))
+ if (!isYourTurn(ni->stats) && isYourTurn(battle->stats))
{
notice(s_GameServ, u, "Please wait until %s decides what to do!",
battle->stats->getName().c_str());
return;
}
- if (hit > 0)
+ else if (!isYourTurn(ni->stats) && !isYourTurn(battle->stats))
+ {
+ // If somehow the player vs. player fight hangs, give the turn to the first attacker
+ setYourTurn(ni->stats);
+ }
+ if (hit > 0)
{
notice(s_GameServ, u, "You attack \1f%s\1f for \ 2%d\ 2 points!", battle->stats->getName().c_str(), hit);
class armor; // forward declaration
class potion; // forward declaration
class pouch; // forward declaration
+class script; // forward declaration
class Player {
public:
void setData(Player *);
void reset();
+ friend script;
long int getFlags() { return flags; }; // Returns the Client's current flags
// Functions also return the flags after modifying them
+
#include "script.h"
#include "extern.h"
#include <fstream>
string line;
string::size_type begin = 0;
string::size_type end = scriptstr.find("\n", 0);
+ char *left, *op, *right, *buffer;
+ void *leftptr;
while (end != string::npos)
{
line = scriptstr.substr(begin, end - begin);
log("Line: %s", line.c_str());
-
+
+ if (line.c_str()[0] != '#')
+ {
+ // Not a comment
+ buffer = new char[line.length()];
+
+ left = strtok(buffer, " ");
+ op = strtok(NULL, " ");
+ right = strtok(NULL, " ");
+
+ if (stricmp(left, "GOLD") == 0)
+ {
+ (int*)leftptr = p->gold;
+ }
+ else if (stricmp(left, "STRENGTH") == 0)
+ {
+ (int*)leftptr = p->strength;
+ }
+ }
+
// Find the next line
begin = end + 1;
end = scriptstr.find("\n", begin);
raw("SERVER %s 1 :%s", servername, servername);
raw("NICK %S 1 %d %s%s %s %s %s :GameServ", time(NULL), (isBOper() ? "+iow " : ""), gsident, gshost, gshost, servername);
raw(":%s SJOIN %d %s +nt :@%S", servername, time(NULL), c_Forest);
+#elif defined(VLIFE)
+ raw("PASS %s :TS", remotepass);
+ raw("SERVER %s 1 %d :%s", servername, time(NULL), servername);
+ //NNICK Kain 1 1161359175 +G kain 209.204.118.242 virtualife.1413884c.bf6674e.IP PTlink6.server.net :Kain
+ //NNICK Kainazzzo 1 1161359234 +G kain 209.204.118.242 virtualife.1413884c.bf6674e.IP PTlink6.server.net :Kain
+
+ raw("NNICK %S 1 %d +w%s %s %s %s %s :GameServ", time(NULL),(isBOper() ? "o" : ""), gsident, gshost, gshost, servername);
+ raw(":%s SJOIN %d %s +nt :@%S", servername, time(NULL), c_Forest);
#elif defined(P10)
// Server numeric is: [] <-- must be unique
raw("PASS :%s", remotepass);
}
// Code indenting is clean up until here!
#if !defined(P10)
- else if (strncmp(cmd, "NICK", 4) == 0)
+ else if (strncmp(cmd, "NICK", 4) == 0
+ #ifdef VLIFE
+ || strncmp(cmd, "NNICK", 5) == 0
+ #endif
+ )
{
if (buffer[0] == ':')
{