wpdev-commits Mailing List for Wolfpack Emu (Page 184)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
|
From: <as...@us...> - 2003-10-14 04:19:15
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv14718
Added Files:
setup.cf setup.sh
Log Message:
new setup script (currently just structure of it)
--- NEW FILE: setup.cf ---
# config file for setup.sh
--- NEW FILE: setup.sh ---
#!/bin/sh
CONFIG_FILE="setup.cf";
SETUP_BASEDIR="setup.d";
NECESSARY_COMMANDS="bash seq run-parts expr grep sed cut head tail chmod";
#
# old sh didn't support functions. so don't use them at first!
#
echo -e "\e[1;32mChecking for base dependencies:\e[m";
#
# check for base commands:
#
echo -e "\e[33m--> \e[1mAre necessary commands available?\e[m";
echo -en "\e[36m---->\e[m ";
for DEP in $NECESSARY_COMMANDS;
do
if [ ! "$(which $DEP)" ];
then
ERRORS="$ERRORS${ERRORS:+\n}\e[41m--EE> \e[1m\e[33m$DEP\e[m\e[1;41m is not in PATH!\e[m";
elif [ ! -x "$(which $DEP)" ];
then
ERRORS="$ERRORS${ERRORS:+\n}\e[41m--EE> \e[1m\e[33m$DEP\e[m\e[1;41m is not executable!\e[m";
fi;
echo -en "\e[1;36m$DEP\e[m ";
done;
echo -e '\b\e[36m.\e[m';
if [ "$ERRORS" ];
then
echo -e "$ERRORS" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
#
# check for permissions which are required by run-parts:
#
echo -e "\e[33m--> \e[1mPermissions correctly set?\e[m";
#
# does setup.d exist?
#
if [ -e "$SETUP_BASEDIR" ];
then
echo -e "\e[36m----> \e[1;35m$SETUP_BASEDIR\e[36m exists.\e[m";
else
echo -e "\e[41m--EE> \e[1m\e[33m$SETUP_BASEDIR\e[m\e[1;41m does not exist.\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
# is it a directory?
#
if [ -d "$SETUP_BASEDIR" ];
then
echo -e "\e[36m----> \e[1;35m$SETUP_BASEDIR\e[36m is a directory.\e[m";
else
echo -e "\e[41m--EE> \e[1m\e[33m$SETUP_BASEDIR\e[m\e[1;41m is NOT a directory.\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
# is the directory readable?
#
if [ -r "$SETUP_BASEDIR" ];
then
echo -e "\e[36m----> \e[1;35m$SETUP_BASEDIR\e[36m is readable.\e[m";
else
echo -e "\e[31m--WW> \e[1;35m$SETUP_BASEDIR\e[31m is not readable.\e[m";
#
# chmod +r if it's possible.
#
echo -e "\e[36m------> \e[1mSetting +r for \e[35m$SETUP_BASEDIR\e[36m.\e[m";
if chmod +r "$SETUP_BASEDIR" > /dev/null 2>&1;
then
echo -e "\e[36m------> \e[1mSuccessfully made \e[35m$SETUP_BASEDIR\e[36m readable.\e[m";
else
echo -e "\e[41m----EE> \e[1mCould not chmod +r on \e[33m$SETUP_BASEDIR\e[m\e[1;41m.\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
fi;
#
# is the directory executable?
#
if [ -x "$SETUP_BASEDIR" ];
then
echo -e "\e[36m----> \e[1;35m$SETUP_BASEDIR\e[36m is executable.\e[m";
else
echo -e "\e[31m--WW> \e[1;35m$SETUP_BASEDIR\e[31m is not executable.\e[m" >&2;
#
# chmod +x if it's possible.
#
echo -e "\e[36m------> \e[1mSetting +x for \e[35m$SETUP_BASEDIR\e[36m.\e[m";
if chmod +x "$SETUP_BASEDIR" > /dev/null 2>&1;
then
echo -e "\e[36m------> \e[1mSuccessfully made \e[35m$SETUP_BASEDIR\e[36m executable.\e[m";
else
echo -e "\e[41m----EE> \e[1mCould not chmod +x on \e[33m$SETUP_BASEDIR\e[m\e[1;41m.\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
fi;
#
# is at least one file in setup.d executable?
#
FILE_NUM=0;
for BASEDIR_FILE in ${SETUP_BASEDIR}/*;
do
if [ -e "$BASEDIR_FILE" ];
then
if [ -d "$BASEDIR_FILE" ];
then
echo -e "\e[31m--WW> \e[1;35m$BASEDIR_FILE\e[31m is a directory.\e[m" >&2;
elif [ -x "$BASEDIR_FILE" ];
then
echo -e "\e[36m----> \e[1;35m$BASEDIR_FILE\e[36m exists and is executable.\e[m";
FILE_NUM=$(expr $FILE_NUM + 1);
else
echo -e "\e[31m--WW> \e[1;35m$BASEDIR_FILE\e[31m exists, but is not executable.\e[m" >&2;
#
# chmod +x if it's possible.
#
echo -e "\e[36m------> \e[1mSetting +x for \e[35m$BASEDIR_FILE\e[36m.\e[m";
if chmod +x "$BASEDIR_FILE" > /dev/null 2>&1;
then
echo -e "\e[36m------> \e[1mSuccessfully made \e[35m$BASEDIR_FILE\e[36m executable.\e[m";
FILE_NUM=$(expr $FILE_NUM + 1);
else
echo -e "\e[31m----WW> \e[1mCould not chmod +x on \e[35m$BASEDIR_FILE\e[31m.\e[m" >&2;
fi;
#
fi;
fi;
done;
#
# Check the number of existing files
#
if [ $FILE_NUM -ge 1 ];
then
echo -e "\e[36m----> \e[1;35m$FILE_NUM\e[36m files available in \e[35m$SETUP_BASEDIR\e[36m.\e[m";
else
echo -e "\e[41m--EE> \e[1m\e[33m$SETUP_BASEDIR\e[m\e[1;41m is not usable.\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
#
# Check configuration file:
#
echo -e "\e[33m--> \e[1mIs configuration okay?\e[m";
#
# Does it exist?
#
if ! echo "$CONFIG_FILE"|grep '^/' > /dev/null 2>&1;
then
CONFIG_FILE="$PWD/$CONFIG_FILE";
fi
CONFIG_FILE="$(echo -n "$CONFIG_FILE"|sed -e 's|/\.*/|/|g')";
if [ -e "$CONFIG_FILE" ];
then
echo -e "\e[36m----> \e[1mFile is \e[35m$CONFIG_FILE\e[36m and exists.\e[m";
else
echo -e "\e[41m--EE> \e[1mWhere is \e[33m$CONFIG_FILE\e[m\e[1;41m?\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
# Regular file or symbolic link?
#
if [ -h "$CONFIG_FILE" ];
then
echo -en "\e[36m----> \e[1mIt is a symbolic link...\e[m ";
elif [ -f "$CONFIG_FILE" ]
then
echo -en "\e[36m----> \e[1mIt is a regular file...\e[m ";
else
echo -e "\e[41m--EE> \e[1mIt's not a symbolic link nor a regular file!\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi;
#
# Readable?
#
if [ -r "$CONFIG_FILE" ];
then
echo -e "\e[1;36mand readable.\e[m";
else
echo -e "\e[41;1mand is NOT READABLE.\e[m" >&2;
echo -e "\e[1;31mPlease correct the errors above and run again.\e[m" >&2;
exit 1;
fi
#
#
echo -e "\e[1;32mOkay, starting setup scripts:\e[m";
export CONFIG_FILE;
run-parts "$SETUP_BASEDIR";
|
|
From: <as...@us...> - 2003-10-14 04:17:50
|
Update of /cvsroot/wpdev/wolfpack/setup.d In directory sc8-pr-cvs1:/tmp/cvs-serv14616/setup.d Log Message: Directory /cvsroot/wpdev/wolfpack/setup.d added to the repository |
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv25857
Modified Files:
console.cpp console_win.cpp network.cpp network.h res.rc
resource.h wolfpack.cpp wolfpack.h
Log Message:
Final Changes to the GUI.
Index: console.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** console.cpp 8 Oct 2003 01:37:59 -0000 1.8
--- console.cpp 13 Oct 2003 00:11:47 -0000 1.9
***************
*** 215,219 ****
break;
case 'R':
! queueReload( RELOAD_SCRIPTS );
break;
case '?':
--- 215,219 ----
break;
case 'R':
! queueAction( RELOAD_SCRIPTS );
break;
case '?':
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** console_win.cpp 10 Oct 2003 21:13:44 -0000 1.16
--- console_win.cpp 13 Oct 2003 00:11:47 -0000 1.17
***************
*** 44,47 ****
--- 44,50 ----
#include "resource.h"
#include "globals.h"
+ #include "network.h"
+ #include "player.h"
+ #include "wolfpack.h"
/*
***************
*** 59,62 ****
--- 62,66 ----
HMENU hmMainMenu;
HBITMAP hLogo = 0;
+ HWND lblUptime = 0, bmpLogo;
HBRUSH hbSeparator = 0, hbBackground = 0;
HWND logWindow = 0; // Log Window
***************
*** 67,70 ****
--- 71,75 ----
unsigned int inputHeight = 0; // For measuring the height of the input field
unsigned int logLimit = 0; // How many characters fit into the log window
+ unsigned int uptimeTimer = 0;
bool canClose = false;
***************
*** 105,125 ****
RECT rect;
! GetClientRect( window, &rect );
- paintRect( dc, 0, 0, rect.right, 87, hbBackground );
paintRect( dc, 0, 87, rect.right, 1, hbSeparator );
- // Draw our Logo
- HDC tempdc = CreateCompatibleDC( dc );
- HGDIOBJ oldobj = SelectObject( tempdc, hLogo );
-
- BITMAP bm;
- GetObject( hLogo, sizeof(bm), &bm );
-
- BitBlt( dc, 0, 0, bm.bmWidth, bm.bmHeight, tempdc, 0, 0, SRCCOPY );
-
- SelectObject( tempdc, oldobj );
- DeleteDC( tempdc );
-
EndPaint( window, &paintInfo );
}
--- 110,117 ----
RECT rect;
! GetClientRect( window, &rect );
paintRect( dc, 0, 87, rect.right, 1, hbSeparator );
EndPaint( window, &paintInfo );
}
***************
*** 129,160 ****
bool result = true;
! switch( id )
{
! case IDC_EXIT:
! keeprun = 0;
! if( canClose )
! DestroyWindow( mainWindow );
! break;
! case ID_RELOAD_ACCOUNTS:
! Console::instance()->send( "RELOADING ACCOUNTS\n" );
! break;
! case ID_RELOAD_PYTHON:
! Console::instance()->send( "RELOADING PYTHON\n" );
! break;
! case ID_RELOAD_SCRIPTS:
! Console::instance()->send( "RELOADING SCRIPTS\n" );
! break;
! case ID_RELOAD_CONFIGURATION:
! Console::instance()->send( "RELOADING CONFIGURATION\n" );
! break;
! default:
! result = false;
}
--- 121,186 ----
bool result = true;
! if( serverState != RUNNING )
{
! result = false;
! }
! else
! {
! cUOSocket *mSock;
! unsigned int i;
! switch( id )
! {
! case IDC_EXIT:
! keeprun = 0;
! if( canClose )
! DestroyWindow( mainWindow );
! break;
! case ID_RELOAD_ACCOUNTS:
! queueAction( RELOAD_ACCOUNTS );
! break;
! case ID_RELOAD_PYTHON:
! queueAction( RELOAD_PYTHON );
! break;
! case ID_RELOAD_SCRIPTS:
! queueAction( RELOAD_SCRIPTS );
! break;
! case ID_RELOAD_CONFIGURATION:
! queueAction( RELOAD_CONFIGURATION );
! break;
!
! case ID_SERVER_SAVEWORLD:
! queueAction( SAVE_WORLD );
! break;
!
! case ID_SERVER_LISTUSERS:
! // We simply do our thread safety manually here
! cNetwork::instance()->lock();
!
! // Generate a list of Users
! mSock = cNetwork::instance()->first();
! i = 0;
!
! for( mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() )
! {
! if( mSock->player() )
! Console::instance()->send( QString("%1) %2 [%3]\n").arg(++i).arg(mSock->player()->name()).arg(QString::number( mSock->player()->serial(), 16) ) );
! }
!
! cNetwork::instance()->unlock();
!
! Console::instance()->send( QString( "Total Users Online: %1\n" ).arg( i ) );
!
! break;
!
! default:
! result = false;
! }
}
***************
*** 164,176 ****
LRESULT CALLBACK wpWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
- if( mainWindow && hwnd != mainWindow )
- return DefWindowProc( hwnd, msg, wparam, lparam );
-
CHARFORMAT cf;
LOGFONT lfont;
NMHDR *notify = (NMHDR*)lparam;
switch( msg )
{
case WM_COMMAND:
if( handleMenuSelect( wparam ) )
--- 190,214 ----
LRESULT CALLBACK wpWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
CHARFORMAT cf;
LOGFONT lfont;
NMHDR *notify = (NMHDR*)lparam;
+ HDC dc;
switch( msg )
{
+ case WM_CTLCOLORSTATIC:
+ if( (HWND)lparam == lblUptime )
+ {
+ dc = (HDC)wparam;
+
+ SelectObject( dc, GetStockObject(ANSI_VAR_FONT) );
+ SetTextColor( dc, RGB( 0xAF, 0xAF, 0xAF ) );
+
+ SetBkMode( dc, TRANSPARENT );
+ SelectObject( dc, GetStockObject( SYSTEM_FONT ) );
+ return (LRESULT)hbBackground;
+ }
+ return DefWindowProc( hwnd, msg, wparam, lparam );
+
case WM_COMMAND:
if( handleMenuSelect( wparam ) )
***************
*** 180,185 ****
case WM_CREATE:
hLogo = LoadBitmap( appInstance, MAKEINTRESOURCE( IDB_LOGO ) );
- hbSeparator = CreateSolidBrush( RGB( 0xAF, 0xAF, 0xAF ) );
- hbBackground = CreateSolidBrush( RGB( 0, 64, 38 ) );
// Create Richedit Box
--- 218,221 ----
***************
*** 224,229 ****
inputWindow = CreateWindow( "EDIT", 0, ES_LEFT|ES_AUTOHSCROLL|WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 0, 0, 10, 10, hwnd, (HMENU)CONTROL_INPUT, appInstance, 0 );
return 0;
!
// Autosize our Window Elements
case WM_SIZE:
--- 260,273 ----
inputWindow = CreateWindow( "EDIT", 0, ES_LEFT|ES_AUTOHSCROLL|WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 0, 0, 10, 10, hwnd, (HMENU)CONTROL_INPUT, appInstance, 0 );
+ bmpLogo = CreateWindow( "STATIC", 0, SS_BITMAP|WS_CHILD|WS_VISIBLE, 0, 0, 586, 87, hwnd, 0, appInstance, 0 );
+ SendMessage( bmpLogo, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hLogo );
+
+ lblUptime = CreateWindow( "STATIC", 0, WS_CHILD|WS_VISIBLE, 400, 15, 250, 25, hwnd, 0, appInstance, 0 );
+
+ // Set up our timer to refresh the nice Uptime Counter
+ uptimeTimer = SetTimer( NULL, 0, 500, 0 );
+
return 0;
!
// Autosize our Window Elements
case WM_SIZE:
***************
*** 255,261 ****
case WM_PAINT:
drawWindow( hwnd );
!
! case WM_ERASEBKGND:
! return 1;
case WM_NOTIFY:
--- 299,303 ----
case WM_PAINT:
drawWindow( hwnd );
! return DefWindowProc( hwnd, msg, wparam, lparam );
case WM_NOTIFY:
***************
*** 305,308 ****
--- 347,351 ----
case WM_DESTROY:
+ KillTimer( NULL, uptimeTimer );
DestroyMenu( hmMainMenu );
DeleteObject( hLogo );
***************
*** 409,412 ****
--- 452,458 ----
}
+ hbSeparator = CreateSolidBrush( RGB( 0xAF, 0xAF, 0xAF ) );
+ hbBackground = CreateSolidBrush( RGB( 0, 64, 38 ) );
+
// Create the WindowClass
WNDCLASS wpClass;
***************
*** 414,419 ****
wpClass.hInstance = hInstance;
wpClass.lpfnWndProc = wpWindowProc;
wpClass.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE( IDI_ICON1 ) );
! wpClass.hbrBackground = GetSysColorBrush( COLOR_BTNFACE );
wpClass.lpszClassName = WOLFPACK_CLASS;
wpClass.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;
--- 460,466 ----
wpClass.hInstance = hInstance;
wpClass.lpfnWndProc = wpWindowProc;
+ wpClass.hCursor = LoadCursor( NULL, MAKEINTRESOURCE( IDC_ARROW ) );
wpClass.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE( IDI_ICON1 ) );
! wpClass.hbrBackground = hbBackground;
wpClass.lpszClassName = WOLFPACK_CLASS;
wpClass.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;
***************
*** 458,461 ****
--- 505,514 ----
continue;
+ }
+ else if( msg.message == WM_TIMER )
+ {
+ char message[512];
+ sprintf( message, "Uptime: %02u:%02u:%02u", ( uiCurrentTime / 1000 / 3600 ), ( uiCurrentTime / 1000 / 60 ) % 60, ( uiCurrentTime / 1000 ) % 3600 );
+ SetWindowText( lblUptime, message );
}
Index: network.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network.cpp,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** network.cpp 14 Sep 2003 16:09:01 -0000 1.139
--- network.cpp 13 Oct 2003 00:11:47 -0000 1.140
***************
*** 46,60 ****
// Library Includes
! #include "qstringlist.h"
!
! #undef DBGFILE
! #define DBGFILE "Network.cpp"
!
! // Authenticate return codes
!
! #define LOGIN_NOT_FOUND -3
! #define BAD_PASSWORD -4
! #define ACCOUNT_BANNED -5
! #define ACCOUNT_WIPE -6
cNetwork *cNetwork::instance_;
--- 46,50 ----
// Library Includes
! #include <qstringlist.h>
cNetwork *cNetwork::instance_;
***************
*** 108,111 ****
--- 98,103 ----
void cNetwork::poll( void )
{
+ lock();
+
// Check for new Connections (LoginServer)
if( loginServer_ && loginServer_->haveNewConnection() )
***************
*** 133,177 ****
// fast return
! if( uoSockets.isEmpty() && loginSockets.isEmpty() )
! return;
!
! // Check for new Packets
! cUOSocket* uoSocket = 0;
! for ( uoSocket = uoSockets.first(); uoSocket; uoSocket = uoSockets.next() )
{
! // Check for disconnected sockets
! if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isWritable() || uoSocket->socket()->isInactive() || !uoSocket->socket()->isOpen() )
! {
! uoSocket->log( "Client disconnected.\n" );
! uoSocket->disconnect();
! netIo_->unregisterSocket( uoSocket->socket() );
! uoSockets.remove( uoSocket );
! }
! else
{
! uoSocket->recieve();
! if( uiCurrentTime % 500 == 0 ) // Once every 0.5 Seconds
! uoSocket->poll();
}
- }
! for ( uoSocket = loginSockets.first(); uoSocket; uoSocket = loginSockets.next())
! {
! if( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isOpen() )
{
! uoSocket->log( "Client disconnected.\n" );
! netIo_->unregisterSocket( uoSocket->socket() );
! loginSockets.remove();
! continue;
! }
! else
! uoSocket->recieve();
! if ( uoSocket->state() == cUOSocket::InGame )
! {
! uoSockets.append( loginSockets.take() );
}
}
}
--- 125,171 ----
// fast return
! if( !uoSockets.isEmpty() || !loginSockets.isEmpty() )
{
! // Check for new Packets
! cUOSocket* uoSocket = 0;
! for ( uoSocket = uoSockets.first(); uoSocket; uoSocket = uoSockets.next() )
{
! // Check for disconnected sockets
! if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isWritable() || uoSocket->socket()->isInactive() || !uoSocket->socket()->isOpen() )
! {
! uoSocket->log( "Client disconnected.\n" );
! uoSocket->disconnect();
! netIo_->unregisterSocket( uoSocket->socket() );
! uoSockets.remove( uoSocket );
! }
! else
! {
! uoSocket->recieve();
! if( uiCurrentTime % 500 == 0 ) // Once every 0.5 Seconds
! uoSocket->poll();
! }
}
! for ( uoSocket = loginSockets.first(); uoSocket; uoSocket = loginSockets.next())
{
! if( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isOpen() )
! {
! uoSocket->log( "Client disconnected.\n" );
! netIo_->unregisterSocket( uoSocket->socket() );
! loginSockets.remove();
! continue;
! }
! else
! uoSocket->recieve();
! if ( uoSocket->state() == cUOSocket::InGame )
! {
! uoSockets.append( loginSockets.take() );
! }
}
}
+
+ unlock();
}
***************
*** 196,199 ****
--- 190,195 ----
void cNetwork::broadcast( const QString &message, UINT16 color, UINT16 font )
{
+ lock();
+
cUOSocket *mSock = uoSockets.first();
while( mSock )
***************
*** 202,204 ****
--- 198,202 ----
mSock = uoSockets.next();
}
+
+ unlock();
}
Index: network.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** network.h 3 Sep 2003 20:58:17 -0000 1.27
--- network.h 13 Oct 2003 00:11:47 -0000 1.28
***************
*** 38,41 ****
--- 38,42 ----
// System Includes
+ #include <qmutex.h>
//Forward class Declaration
***************
*** 75,78 ****
--- 76,80 ----
cListener *loginServer_;
cListener *gameServer_;
+ QMutex mutex;
public:
***************
*** 90,93 ****
--- 92,97 ----
void poll( void ); // called by the main loop
+ void lock() { mutex.lock(); }
+ void unlock() { mutex.unlock(); }
cAsyncNetIO *netIo() { return netIo_; }
cUOSocket *first() { return uoSockets.first(); }
Index: res.rc
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/res.rc,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** res.rc 8 Oct 2003 01:37:59 -0000 1.18
--- res.rc 13 Oct 2003 00:11:47 -0000 1.19
***************
*** 14,17 ****
--- 14,22 ----
/////////////////////////////////////////////////////////////////////////////
+ // Deutsch (Deutschland) resources
+
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+
+ /////////////////////////////////////////////////////////////////////////////
//
// Icon
***************
*** 47,50 ****
--- 52,60 ----
MENUITEM "&Scripts", ID_RELOAD_SCRIPTS
END
+ POPUP "&Server"
+ BEGIN
+ MENUITEM "&Save World", ID_SERVER_SAVEWORLD
+ MENUITEM "&List Users", ID_SERVER_LISTUSERS
+ END
END
***************
*** 120,123 ****
--- 130,138 ----
#endif // APSTUDIO_INVOKED
+
+ #endif // Deutsch (Deutschland) resources
+ /////////////////////////////////////////////////////////////////////////////
+
+
#ifndef APSTUDIO_INVOKED
Index: resource.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/resource.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** resource.h 8 Oct 2003 01:37:59 -0000 1.10
--- resource.h 13 Oct 2003 00:11:47 -0000 1.11
***************
*** 11,14 ****
--- 11,16 ----
#define ID_RELOAD_PYTHON 40004
#define ID_RELOAD_SCRIPTS 40005
+ #define ID_SERVER_SAVEWORLD 40006
+ #define ID_SERVER_LISTUSERS 40007
// Next default values for new objects
***************
*** 17,21 ****
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
! #define _APS_NEXT_COMMAND_VALUE 40006
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
--- 19,23 ----
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
! #define _APS_NEXT_COMMAND_VALUE 40009
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.474
retrieving revision 1.475
diff -C2 -d -r1.474 -r1.475
*** wolfpack.cpp 8 Oct 2003 01:37:59 -0000 1.474
--- wolfpack.cpp 13 Oct 2003 00:11:47 -0000 1.475
***************
*** 249,259 ****
}
! QMutex reloadMutex;
! QValueVector< eReloadType > reloadQueue;
! void queueReload( eReloadType type )
{
! QMutexLocker lock( &reloadMutex );
! reloadQueue.push_back( type );
}
--- 249,260 ----
}
! QMutex actionMutex;
! QValueVector< eActionType > actionQueue;
! void queueAction( eActionType type )
{
! actionMutex.lock();
! actionQueue.push_back( type );
! actionMutex.unlock();
}
***************
*** 524,534 ****
uiCurrentTime = getNormalizedTime();
! // It is save to process any pending reloads now
! reloadMutex.lock();
! while( reloadQueue.count() > 0 )
{
! eReloadType type = reloadQueue[0];
! reloadQueue.erase( reloadQueue.begin() );
switch( type )
--- 525,535 ----
uiCurrentTime = getNormalizedTime();
! // Perform Threadsafe Actions
! actionMutex.lock();
! while( actionQueue.begin() != actionQueue.end() )
{
! eActionType type = *(actionQueue.begin());
! actionQueue.erase( actionQueue.begin() );
switch( type )
***************
*** 552,559 ****
ScriptManager::instance()->reload();
break;
}
}
! reloadMutex.unlock();
Console::instance()->poll();
--- 553,564 ----
ScriptManager::instance()->reload();
break;
+
+ case SAVE_WORLD:
+ World::instance()->save();
+ break;
}
}
! actionMutex.unlock();
Console::instance()->poll();
Index: wolfpack.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** wolfpack.h 8 Oct 2003 01:37:59 -0000 1.37
--- wolfpack.h 13 Oct 2003 00:11:47 -0000 1.38
***************
*** 33,45 ****
#define __WOLFPACK_H__
! enum eReloadType
{
RELOAD_SCRIPTS = 0,
RELOAD_PYTHON,
RELOAD_ACCOUNTS,
! RELOAD_CONFIGURATION
};
! void queueReload( eReloadType );
#endif
--- 33,46 ----
#define __WOLFPACK_H__
! enum eActionType
{
RELOAD_SCRIPTS = 0,
RELOAD_PYTHON,
RELOAD_ACCOUNTS,
! RELOAD_CONFIGURATION,
! SAVE_WORLD
};
! void queueAction( eActionType );
#endif
|
|
From: <dar...@us...> - 2003-10-13 00:11:54
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv25857/python
Modified Files:
global.cpp
Log Message:
Final Changes to the GUI.
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** global.cpp 8 Oct 2003 01:37:59 -0000 1.96
--- global.cpp 13 Oct 2003 00:11:47 -0000 1.97
***************
*** 1074,1078 ****
}
! static PyObject* wpQueueReload( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 1074,1078 ----
}
! static PyObject* wpQueueAction( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 1080,1087 ****
unsigned int type = 0;
! if( !PyArg_ParseTuple( args, "i:wolfpack.queuereload( type )", &type ) )
return 0;
! queueReload( (eReloadType)type );
return PyInt_FromLong( 1 );
--- 1080,1087 ----
unsigned int type = 0;
! if( !PyArg_ParseTuple( args, "i:wolfpack.queueaction( type )", &type ) )
return 0;
! queueAction( (eActionType)type );
return PyInt_FromLong( 1 );
***************
*** 1135,1139 ****
{ "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" },
{ "charbase", wpCharBase, METH_VARARGS, NULL },
! { "queuereload", wpQueueReload, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL } // Terminator
};
--- 1135,1139 ----
{ "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" },
{ "charbase", wpCharBase, METH_VARARGS, NULL },
! { "queueaction", wpQueueAction, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL } // Terminator
};
|
|
From: <thi...@us...> - 2003-10-10 21:13:53
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv14153
Modified Files:
console_win.cpp gumps.cpp npc.cpp player.cpp tmpeff.cpp
TmpEff.h
Log Message:
fixed some pragmas...
Fixed compile with Intel Compiler under windows.
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** console_win.cpp 8 Oct 2003 01:37:59 -0000 1.15
--- console_win.cpp 10 Oct 2003 21:13:44 -0000 1.16
***************
*** 396,400 ****
};
! int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
appInstance = hInstance;
--- 396,400 ----
};
! int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
appInstance = hInstance;
Index: gumps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v
retrieving revision 1.145
retrieving revision 1.146
diff -C2 -d -r1.145 -r1.146
*** gumps.cpp 23 Sep 2003 23:55:21 -0000 1.145
--- gumps.cpp 10 Oct 2003 21:13:45 -0000 1.146
***************
*** 121,125 ****
Q_UNUSED(socket);
Q_UNUSED(choice);
! #pragma message("This is a good candidate for pure virtual")
}
--- 121,125 ----
Q_UNUSED(socket);
Q_UNUSED(choice);
! #pragma message(__FILE__ Reminder "This is a good candidate for pure virtual")
}
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** npc.cpp 23 Sep 2003 23:55:23 -0000 1.49
--- npc.cpp 10 Oct 2003 21:13:46 -0000 1.50
***************
*** 498,502 ****
P_ITEM pi_backpack = getBackpack();
! #pragma message("Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
--- 498,502 ----
P_ITEM pi_backpack = getBackpack();
! #pragma message(__FILE__ Reminder "Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** player.cpp 23 Sep 2003 23:55:24 -0000 1.44
--- player.cpp 10 Oct 2003 21:13:46 -0000 1.45
***************
*** 493,497 ****
unmount();
! #pragma message("Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
--- 493,497 ----
unmount();
! #pragma message(__FILE__ Reminder "Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
Index: tmpeff.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tmpeff.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** tmpeff.cpp 15 Sep 2003 12:49:05 -0000 1.64
--- tmpeff.cpp 10 Oct 2003 21:13:46 -0000 1.65
***************
*** 191,194 ****
--- 191,199 ----
}
+ cTempEffects::cTempEffects()
+ {
+ std::make_heap( teffects.begin(), teffects.end(), cTempEffects::ComparePredicate() ); // No temp effects to start with
+ }
+
void cTempEffects::check()
{
***************
*** 315,318 ****
--- 320,338 ----
}
}
+
+ int cTempEffects::countSerializables()
+ {
+ int count = 0;
+
+ std::vector< cTempEffect* >::iterator it = teffects.begin();
+ std::vector< cTempEffect* >::iterator end = teffects.end();
+ for ( ; it != end; ++it )
+ {
+ if( (*it)->isSerializable() )
+ ++count;
+ }
+ return count;
+ }
+
// cDelayedHideChar
Index: TmpEff.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/TmpEff.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** TmpEff.h 15 Sep 2003 12:49:05 -0000 1.40
--- TmpEff.h 10 Oct 2003 21:13:46 -0000 1.41
***************
*** 153,157 ****
public:
! cTempEffects() { std::make_heap( teffects.begin(), teffects.end(), cTempEffects::ComparePredicate() ); } // No temp effects to start with
std::vector< cTempEffect* > teffects;
--- 153,157 ----
public:
! cTempEffects();
std::vector< cTempEffect* > teffects;
***************
*** 171,186 ****
}
! int countSerializables()
! {
! int count = 0;
! std::vector< cTempEffect* >::iterator it = teffects.begin();
! while( it != teffects.end() )
! {
! if( (*it)->isSerializable() )
! ++count;
! ++it;
! }
! return count;
! }
};
--- 171,176 ----
}
! int countSerializables();
!
};
|
|
From: <dar...@us...> - 2003-10-08 01:56:46
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv25331/wolfpack Modified Files: __init__.py Log Message: ActionQueue implementation. Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** __init__.py 8 Oct 2003 01:35:48 -0000 1.34 --- __init__.py 8 Oct 2003 01:56:41 -0000 1.35 *************** *** 178,180 **** return _wolfpack.packet( id, size ) ! queuereload = _wolfpack.queuereload --- 178,180 ---- return _wolfpack.packet( id, size ) ! queueaction = _wolfpack.queueaction |
|
From: <dar...@us...> - 2003-10-08 01:56:12
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv25279/wolfpack Modified Files: consts.py Log Message: ActionQueue implementation. Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** consts.py 8 Oct 2003 01:35:48 -0000 1.32 --- consts.py 8 Oct 2003 01:56:08 -0000 1.33 *************** *** 356,357 **** --- 356,358 ---- RELOAD_ACCOUNTS = 2 RELOAD_CONFIGURATION = 3 + SAVE_WORLD = 4 |
|
From: <dar...@us...> - 2003-10-08 01:55:42
|
Update of /cvsroot/wpdev/xmlscripts/web In directory sc8-pr-cvs1:/tmp/cvs-serv25207 Modified Files: account.py console.py Log Message: ActionQueue implementation. Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/web/account.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** account.py 9 Aug 2003 03:14:05 -0000 1.3 --- account.py 8 Oct 2003 01:55:36 -0000 1.4 *************** *** 15,22 **** --- 15,24 ---- letter = form.getvalue( 'letter', '#' ) account = form.getvalue( 'username', '' ) + try: save = int( form.getvalue( 'save', '0' ) ) except: pass + message = None Index: console.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/web/console.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** console.py 24 Mar 2003 13:02:44 -0000 1.2 --- console.py 8 Oct 2003 01:55:36 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- import sys import wolfpack.console + from wolfpack.consts import * import re *************** *** 29,33 **** print "Content-type: text/html\n\n" print "Server is reloading, you will have to re-login after reloading is done" ! wolfpack.console.reloadScripts() sys.exit() --- 30,34 ---- print "Content-type: text/html\n\n" print "Server is reloading, you will have to re-login after reloading is done" ! wolfpack.queueaction( RELOAD_SCRIPTS ) sys.exit() |
|
From: <dar...@us...> - 2003-10-08 01:47:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv24041
Modified Files:
webadmin.py
Log Message:
This should fix the annoying webadmin startup problems.
Index: webadmin.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/webadmin.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** webadmin.py 8 Oct 2003 01:42:07 -0000 1.11
--- webadmin.py 8 Oct 2003 01:47:41 -0000 1.12
***************
*** 20,23 ****
--- 20,24 ----
import web.sessions
import wolfpack
+ import wolfpack.console
# Just override handle_error for nicer error handling
***************
*** 230,259 ****
def cancel( self ):
! self.stopped.set()
! self.httpd.server_close()
def run( self ):
! # Wait with binding the webserver for 5 Seconds
! server_address = ( '', self.port )
! time.sleep( 5 )
!
! # Starting up
! print "Remote Admin running on port %u\n" % self.port
! try:
! filepath = os.path.normpath( os.path.abspath( 'web/' ) )
! self.httpd = Webserver( ( '', self.port ), filepath )
! except:
! traceback.print_exc()
! return
! while 1:
! self.httpd.handle_request()
! self.stopped.wait( 0.05 )
! if self.stopped.isSet():
! break
! print "Shutting down the Remote Admin.\n"
thread = None
--- 231,260 ----
def cancel( self ):
! self.stopped.set()
! self.httpd.server_close()
def run( self ):
! # Wait with binding the webserver for 5 Seconds
! server_address = ( '', self.port )
! # Starting up
! if not wolfpack.isreloading():
! wolfpack.console.send( "Remote Admin running on port %u\n" % self.port )
! try:
! filepath = os.path.normpath( os.path.abspath( 'web/' ) )
! self.httpd = Webserver( ( '', self.port ), filepath )
! except:
! traceback.print_exc()
! return
! while 1:
! self.httpd.handle_request()
! self.stopped.wait( 0.05 )
!
! if self.stopped.isSet():
! break
! wolfpack.console.send( "Shutting down the Remote Admin.\n" )
thread = None
|
|
From: <dar...@us...> - 2003-10-08 01:42:12
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv23429 Modified Files: webadmin.py Added Files: lock.py Log Message: This should fix the annoying webadmin startup problems. --- NEW FILE: lock.py --- # # Event for Locking Items # def onUse( char, item ): events = item.events if not item.hastag( 'lock' ): return 0 lock = item.gettag( 'lock' ) if lock != 'magic': lock = int( lock ) if item.hastag( 'locked' ): locked = int( item.gettag( 'locked' ) ) else: locked = 0 if locked == 0: return 0 # Search for a key in the users backpack backpack = char.getbackpack() if searchkey( backpack, lock ): if 'door' in events: char.message( 501282 ) # quickly open / relock return 0 char.message( 502503 ) # Thats locked return 1 Index: webadmin.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/webadmin.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** webadmin.py 13 Sep 2003 02:03:03 -0000 1.10 --- webadmin.py 8 Oct 2003 01:42:07 -0000 1.11 *************** *** 19,22 **** --- 19,23 ---- import traceback import web.sessions + import wolfpack # Just override handle_error for nicer error handling *************** *** 258,276 **** thread = None ! def onLoad(): web.sessions.clear_sessions() - # Start the Thread global thread thread = WebserverThread( REMOTEADMIN_PORT ) thread.start() def onUnload(): # Stop the Thread global thread if thread: - thread.cancel() ! time.sleep( 1 ) thread.join() # Join with the thread --- 259,285 ---- thread = None ! def onServerStart(): web.sessions.clear_sessions() global thread thread = WebserverThread( REMOTEADMIN_PORT ) thread.start() + def onLoad(): + # Not on ServerStart + if not wolfpack.isstarting(): + web.sessions.clear_sessions() + + # Start the Thread + global thread + thread = WebserverThread( REMOTEADMIN_PORT ) + thread.start() + def onUnload(): # Stop the Thread global thread if thread: thread.cancel() ! time.sleep( 1 ) # This is needed to allow the thread to sync (Remember => global interpreter lock) thread.join() # Join with the thread |
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv22805
Modified Files:
console.cpp console_win.cpp res.rc resource.h wolf.dsp
wolfpack.cpp wolfpack.h wpdefmanager.cpp
Log Message:
Misc. Updates to the GUI
Index: console.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** console.cpp 24 Sep 2003 21:19:48 -0000 1.7
--- console.cpp 8 Oct 2003 01:37:59 -0000 1.8
***************
*** 215,219 ****
break;
case 'R':
! reloadScripts();
break;
case '?':
--- 215,219 ----
break;
case 'R':
! queueReload( RELOAD_SCRIPTS );
break;
case '?':
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** console_win.cpp 8 Oct 2003 00:45:11 -0000 1.14
--- console_win.cpp 8 Oct 2003 01:37:59 -0000 1.15
***************
*** 57,60 ****
--- 57,61 ----
#define CONTROL_INPUT 0x11
+ HMENU hmMainMenu;
HBITMAP hLogo = 0;
HBRUSH hbSeparator = 0, hbBackground = 0;
***************
*** 124,127 ****
--- 125,165 ----
}
+ bool handleMenuSelect( unsigned int id )
+ {
+ bool result = true;
+
+ switch( id )
+ {
+ case IDC_EXIT:
+ keeprun = 0;
+
+ if( canClose )
+ DestroyWindow( mainWindow );
+
+ break;
+
+ case ID_RELOAD_ACCOUNTS:
+ Console::instance()->send( "RELOADING ACCOUNTS\n" );
+ break;
+
+ case ID_RELOAD_PYTHON:
+ Console::instance()->send( "RELOADING PYTHON\n" );
+ break;
+
+ case ID_RELOAD_SCRIPTS:
+ Console::instance()->send( "RELOADING SCRIPTS\n" );
+ break;
+
+ case ID_RELOAD_CONFIGURATION:
+ Console::instance()->send( "RELOADING CONFIGURATION\n" );
+ break;
+
+ default:
+ result = false;
+ }
+
+ return result;
+ }
+
LRESULT CALLBACK wpWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
***************
*** 135,138 ****
--- 173,181 ----
switch( msg )
{
+ case WM_COMMAND:
+ if( handleMenuSelect( wparam ) )
+ return 0;
+ break;
+
case WM_CREATE:
hLogo = LoadBitmap( appInstance, MAKEINTRESOURCE( IDB_LOGO ) );
***************
*** 262,265 ****
--- 305,309 ----
case WM_DESTROY:
+ DestroyMenu( hmMainMenu );
DeleteObject( hLogo );
DeleteObject( hbSeparator );
***************
*** 268,275 ****
PostQuitMessage( 0 );
return 0;
-
- default:
- return DefWindowProc( hwnd, msg, wparam, lparam );
}
}
--- 312,318 ----
PostQuitMessage( 0 );
return 0;
}
+
+ return DefWindowProc( hwnd, msg, wparam, lparam );
}
***************
*** 383,387 ****
// Create the Window itself
! mainWindow = CreateWindow( WOLFPACK_CLASS, "Wolfpack", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, NULL, 0, hInstance, NULL );
if( mainWindow == 0 )
--- 426,432 ----
// Create the Window itself
! hmMainMenu = LoadMenu( appInstance, MAKEINTRESOURCE( IDR_MAINMENU ) );
!
! mainWindow = CreateWindow( WOLFPACK_CLASS, "Wolfpack", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, NULL, hmMainMenu, hInstance, NULL );
if( mainWindow == 0 )
Index: res.rc
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/res.rc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** res.rc 7 Oct 2003 23:57:24 -0000 1.17
--- res.rc 8 Oct 2003 01:37:59 -0000 1.18
***************
*** 1,4 ****
--- 1,5 ----
//Microsoft Developer Studio generated resource script.
//
+ #include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
***************
*** 7,11 ****
// Generated from the TEXTINCLUDE 2 resource.
//
! #include "resource.h"
/////////////////////////////////////////////////////////////////////////////
--- 8,12 ----
// Generated from the TEXTINCLUDE 2 resource.
//
!
/////////////////////////////////////////////////////////////////////////////
***************
*** 14,17 ****
--- 15,56 ----
/////////////////////////////////////////////////////////////////////////////
//
+ // Icon
+ //
+
+ // Icon with lowest ID value placed first to ensure application icon
+ // remains consistent on all systems.
+ IDI_ICON1 ICON DISCARDABLE "icon2.ico"
+
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Bitmap
+ //
+
+ IDB_LOGO BITMAP DISCARDABLE "logo.bmp"
+
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Menu
+ //
+
+ IDR_MAINMENU MENU DISCARDABLE
+ BEGIN
+ POPUP "&File"
+ BEGIN
+ MENUITEM "E&xit", IDC_EXIT
+ END
+ POPUP "&Reload"
+ BEGIN
+ MENUITEM "&Accounts", ID_RELOAD_ACCOUNTS
+ MENUITEM "&Configuration", ID_RELOAD_CONFIGURATION
+ MENUITEM "&Python", ID_RELOAD_PYTHON
+ MENUITEM "&Scripts", ID_RELOAD_SCRIPTS
+ END
+ END
+
+
+ #ifndef _MAC
+ /////////////////////////////////////////////////////////////////////////////
+ //
// Version
//
***************
*** 54,67 ****
END
! /////////////////////////////////////////////////////////////////////////////
! //
! // Icon
! //
!
! // Icon with lowest ID value placed first to ensure application icon
! // remains consistent on all systems.
! IDI_ICON1 ICON DISCARDABLE "icon2.ico"
- IDB_LOGO BITMAP DISCARDABLE "logo.bmp"
#ifdef APSTUDIO_INVOKED
--- 93,98 ----
END
! #endif // !_MAC
#ifdef APSTUDIO_INVOKED
***************
*** 73,82 ****
1 TEXTINCLUDE DISCARDABLE
BEGIN
! "resrc1.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
! "#include ""resource.h""\r\n"
"\0"
END
--- 104,113 ----
1 TEXTINCLUDE DISCARDABLE
BEGIN
! "resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
! "\r\n"
"\0"
END
***************
*** 89,96 ****
#endif // APSTUDIO_INVOKED
-
- ////////////////////////////////////////////////////////////////////////////
-
-
#ifndef APSTUDIO_INVOKED
--- 120,123 ----
Index: resource.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/resource.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** resource.h 7 Oct 2003 23:57:24 -0000 1.9
--- resource.h 8 Oct 2003 01:37:59 -0000 1.10
***************
*** 4,8 ****
//
#define IDI_ICON1 101
! #define IDB_LOGO 102
// Next default values for new objects
--- 4,14 ----
//
#define IDI_ICON1 101
! #define IDB_LOGO 102
! #define IDR_MAINMENU 102
! #define IDC_EXIT 40001
! #define ID_RELOAD_ACCOUNTS 40002
! #define ID_RELOAD_CONFIGURATION 40003
! #define ID_RELOAD_PYTHON 40004
! #define ID_RELOAD_SCRIPTS 40005
// Next default values for new objects
***************
*** 11,15 ****
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
! #define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
--- 17,21 ----
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
! #define _APS_NEXT_COMMAND_VALUE 40006
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.241
retrieving revision 1.242
diff -C2 -d -r1.241 -r1.242
*** wolf.dsp 7 Oct 2003 23:58:04 -0000 1.241
--- wolf.dsp 8 Oct 2003 01:37:59 -0000 1.242
***************
*** 673,680 ****
# Begin Source File
- SOURCE=.\resource.h
- # End Source File
- # Begin Source File
-
SOURCE=.\resources.h
--- 673,676 ----
***************
*** 948,951 ****
--- 944,951 ----
SOURCE=.\icon2.ico
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\logo.bmp
# End Source File
# Begin Source File
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.473
retrieving revision 1.474
diff -C2 -d -r1.473 -r1.474
*** wolfpack.cpp 1 Oct 2003 00:35:31 -0000 1.473
--- wolfpack.cpp 8 Oct 2003 01:37:59 -0000 1.474
***************
*** 59,62 ****
--- 59,63 ----
#include "Timing.h"
#include "verinfo.h"
+ #include "wolfpack.h"
#include "world.h"
#include "wpdefmanager.h"
***************
*** 134,167 ****
#endif
- void reloadScripts()
- {
- Console::instance()->send( "Reloading scripts...\n" );
-
- SrvParams->reload(); // Reload wolfpack.xml
-
- QStringList oldAISections = DefManager->getSections( WPDT_AI );
- DefManager->reload(); //Reload Definitions
- AIFactory::instance()->checkScriptAI( oldAISections, DefManager->getSections( WPDT_AI ) );
-
- Accounts::instance()->reload();
- SpawnRegions::instance()->reload();
- AllTerritories::instance()->reload();
- Resources::instance()->reload();
- MakeMenus::instance()->reload();
- ScriptManager::instance()->reload(); // Reload Scripts
- ContextMenus::instance()->reload();
- Skills->reload();
-
- // Update the Regions
- cCharIterator iter;
- for( P_CHAR pChar = iter.first(); pChar; pChar = iter.next() )
- {
- cTerritory *region = AllTerritories::instance()->region( pChar->pos().x, pChar->pos().y, pChar->pos().map );
- pChar->setRegion( region );
- }
-
- cNetwork::instance()->reload(); // This will be integrated into the normal definition system soon
- }
-
static bool parseParameter( const QString ¶m )
{
--- 135,138 ----
***************
*** 278,281 ****
--- 249,261 ----
}
+ QMutex reloadMutex;
+ QValueVector< eReloadType > reloadQueue;
+
+ void queueReload( eReloadType type )
+ {
+ QMutexLocker lock( &reloadMutex );
+ reloadQueue.push_back( type );
+ }
+
//#if defined(_DEBUG)
//#include <crash.h>
***************
*** 543,546 ****
--- 523,559 ----
// Update our currenttime
uiCurrentTime = getNormalizedTime();
+
+ // It is save to process any pending reloads now
+ reloadMutex.lock();
+
+ while( reloadQueue.count() > 0 )
+ {
+ eReloadType type = reloadQueue[0];
+ reloadQueue.erase( reloadQueue.begin() );
+
+ switch( type )
+ {
+ case RELOAD_ACCOUNTS:
+ Console::instance()->PrepareProgress( "Reloading Accounts" );
+ Accounts::instance()->reload();
+ Console::instance()->ProgressDone();
+ break;
+
+ case RELOAD_CONFIGURATION:
+ Console::instance()->PrepareProgress( "Reloading Configuration" );
+ SrvParams->reload();
+ Console::instance()->ProgressDone();
+ break;
+
+ case RELOAD_SCRIPTS:
+ DefManager->reload();
+
+ case RELOAD_PYTHON:
+ ScriptManager::instance()->reload();
+ break;
+ }
+ }
+
+ reloadMutex.unlock();
Console::instance()->poll();
Index: wolfpack.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** wolfpack.h 11 Sep 2003 16:19:50 -0000 1.36
--- wolfpack.h 8 Oct 2003 01:37:59 -0000 1.37
***************
*** 33,37 ****
#define __WOLFPACK_H__
! void reloadScripts();
#endif
--- 33,45 ----
#define __WOLFPACK_H__
! enum eReloadType
! {
! RELOAD_SCRIPTS = 0,
! RELOAD_PYTHON,
! RELOAD_ACCOUNTS,
! RELOAD_CONFIGURATION
! };
!
! void queueReload( eReloadType );
#endif
Index: wpdefmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** wpdefmanager.cpp 20 Sep 2003 12:01:44 -0000 1.67
--- wpdefmanager.cpp 8 Oct 2003 01:37:59 -0000 1.68
***************
*** 39,42 ****
--- 39,55 ----
#include <qvaluevector.h>
+ // Reloading
+ #include "ai.h"
+ #include "spawnregions.h"
+ #include "territories.h"
+ #include "resources.h"
+ #include "makemenus.h"
+ #include "contextmenu.h"
+ #include "skills.h"
+ #include "world.h"
+ #include "skills.h"
+ #include "basechar.h"
+ #include "network.h"
+
#include "wpdefmanager.h"
#include "globals.h"
***************
*** 274,280 ****
--- 287,315 ----
void WPDefManager::reload( void )
{
+ QStringList oldAISections = DefManager->getSections( WPDT_AI );
+
unload();
load();
+
+ // Update all SubSystems associated with this Definition Manager
KeyManager::instance()->load();
+ AIFactory::instance()->checkScriptAI( oldAISections, DefManager->getSections( WPDT_AI ) );
+
+ SpawnRegions::instance()->reload();
+ AllTerritories::instance()->reload();
+ Resources::instance()->reload();
+ MakeMenus::instance()->reload();
+ ContextMenus::instance()->reload();
+ Skills->reload();
+
+ // Update the Regions
+ cCharIterator iter;
+ for( P_CHAR pChar = iter.first(); pChar; pChar = iter.next() )
+ {
+ cTerritory *region = AllTerritories::instance()->region( pChar->pos().x, pChar->pos().y, pChar->pos().map );
+ pChar->setRegion( region );
+ }
+
+ cNetwork::instance()->reload(); // This will be integrated into the normal definition system soon
}
|
|
From: <dar...@us...> - 2003-10-08 01:38:05
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv22805/python
Modified Files:
global.cpp
Log Message:
Misc. Updates to the GUI
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** global.cpp 24 Sep 2003 00:13:21 -0000 1.95
--- global.cpp 8 Oct 2003 01:37:59 -0000 1.96
***************
*** 239,252 ****
}
- static PyObject* wpConsole_reloadScripts( PyObject* self, PyObject* args )
- {
- Q_UNUSED(self);
- Q_UNUSED(args);
-
- reloadScripts();
-
- return PyInt_FromLong( 1 );
- }
-
/*!
wolfpack.console
--- 239,242 ----
***************
*** 261,265 ****
{ "progressSkip", wpConsole_progressSkip, METH_NOARGS, "Prints a [skip] block" },
{ "getbuffer", wpConsole_getbuffer, METH_NOARGS, "Gets the linebuffer of the console" },
- { "reloadScripts", wpConsole_reloadScripts, METH_NOARGS, "Reloads Scripts and Definitions" },
{ "log", wpConsole_log, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL } // Terminator
--- 251,254 ----
***************
*** 1085,1088 ****
--- 1074,1091 ----
}
+ static PyObject* wpQueueReload( PyObject* self, PyObject* args )
+ {
+ Q_UNUSED(self);
+
+ unsigned int type = 0;
+
+ if( !PyArg_ParseTuple( args, "i:wolfpack.queuereload( type )", &type ) )
+ return 0;
+
+ queueReload( (eReloadType)type );
+
+ return PyInt_FromLong( 1 );
+ }
+
/*!
wolfpack
***************
*** 1132,1135 ****
--- 1135,1139 ----
{ "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" },
{ "charbase", wpCharBase, METH_VARARGS, NULL },
+ { "queuereload", wpQueueReload, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL } // Terminator
};
|
|
From: <dar...@us...> - 2003-10-08 01:36:49
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1:/tmp/cvs-serv22690 Modified Files: scripts.xml Log Message: Updated reloading of scripts Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** scripts.xml 1 Oct 2003 10:10:33 -0000 1.67 --- scripts.xml 8 Oct 2003 01:36:40 -0000 1.68 *************** *** 29,32 **** --- 29,33 ---- <script>environment</script> <script>door</script> + <script>lock</script> <script>book</script> <script>equipment</script> *************** *** 54,59 **** --- 55,68 ---- <script>wolfpack.magic</script> <script>wolfpack.magic.reactivearmor</script> + <script>wolfpack.magic.trap</script> + <script>wolfpack.magic.firefield</script> <script>wolfpack.magic.circle1</script> <script>wolfpack.magic.circle2</script> + <script>wolfpack.magic.circle3</script> + <script>wolfpack.magic.circle4</script> + <script>wolfpack.magic.circle5</script> + <script>wolfpack.magic.circle6</script> + <script>wolfpack.magic.circle7</script> + <script>wolfpack.magic.circle8</script> <!-- Multis --> |
|
From: <dar...@us...> - 2003-10-08 01:35:53
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/magic
In directory sc8-pr-cvs1:/tmp/cvs-serv22545/wolfpack/magic
Modified Files:
circle1.py circle3.py reactivearmor.py utilities.py
Log Message:
Updated reloading of scripts
Index: circle1.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/magic/circle1.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** circle1.py 25 Sep 2003 23:44:42 -0000 1.3
--- circle1.py 8 Oct 2003 01:35:48 -0000 1.4
***************
*** 60,68 ****
item = wolfpack.additem( random.choice( food ) )
! id = item.id
if not tobackpack( item, char ):
item.update()
! char.message( 1042695, "", " " + item.getname() )
char.soundeffect( 0x1e2 )
--- 60,68 ----
item = wolfpack.additem( random.choice( food ) )
! foodname = " " + item.getname()
if not tobackpack( item, char ):
item.update()
! char.message( 1042695, "", foodname )
char.soundeffect( 0x1e2 )
Index: circle3.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/magic/circle3.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** circle3.py 25 Sep 2003 23:44:42 -0000 1.1
--- circle3.py 8 Oct 2003 01:35:48 -0000 1.2
***************
*** 16,25 ****
statmodifier( char, target, 3, 0 )
! target.effect( 0x373a, 10, 15 )
! target.soundeffect( 0x1ea )
class Fireball ( DelayedDamageSpell ):
def __init__( self ):
! DelayedDamageSpell.__init__( self, 2 )
self.reagents = { REAGENT_BLACKPEARL: 1 }
self.mantra = 'Vas Flam'
--- 16,25 ----
statmodifier( char, target, 3, 0 )
! target.effect( 0x374a, 10, 15 )
! target.soundeffect( 0x1ea )
class Fireball ( DelayedDamageSpell ):
def __init__( self ):
! DelayedDamageSpell.__init__( self, 3 )
self.reagents = { REAGENT_BLACKPEARL: 1 }
self.mantra = 'Vas Flam'
***************
*** 31,41 ****
target.damage( DAMAGE_MAGICAL, damage, char )
def onLoad():
Bless().register( 17 )
Fireball().register( 18 )
! #MagicLock().register( 19 )
#Poison().register( 20 )
#Telekinesis().register( 21 )
! #Teleport().register( 22 )
! #Unlock().register( 23 )
! #WallOfStone().register( 24 )
--- 31,194 ----
target.damage( DAMAGE_MAGICAL, damage, char )
+ # Until containers are implemented in python,
+ # this spell is a security risk
+ #class Telekinesis( Spell ):
+ # def __init__( self ):
+ # Spell.__init__( self, 3 )
+ # self.reagents = { REAGENT_GARLIC: 1, REAGENT_SPIDERSILK: 1, REAGENT_SULFURASH: 1 }
+ # self.mantra = 'Ort Por Ylem'
+ # self.validtarget = TARGET_ITEM
+ #
+ # def target( self, char, mode, targettype, target ):
+
+ class WallOfStone( Spell ):
+ def __init__( self ):
+ Spell.__init__( self, 3 )
+ self.reagents = { REAGENT_BLOODMOSS: 1, REAGENT_GARLIC: 1 }
+ self.mantra = 'In Sanct Ylem'
+ self.validtarget = TARGET_GROUND
+
+ def target( self, char, mode, targettype, target ):
+ char.turnto( target )
+
+ if not char.cansee( target ) and not char.gm:
+ char.message( 500237 )
+ return
+
+ if not self.consumerequirements( char, mode ):
+ return
+
+ xdiff = abs( target.x - char.pos.x )
+ ydiff = abs( target.y - char.pos.y )
+
+ if xdiff > ydiff:
+ positions = [ wolfpack.coord( target.x, target.y - 1, target.z, target.map ), wolfpack.coord( target.x, target.y, target.z, target.map ), wolfpack.coord( target.x, target.y + 1, target.z, target.map ) ]
+ else:
+ positions = [ wolfpack.coord( target.x - 1, target.y, target.z, target.map ), wolfpack.coord( target.x, target.y, target.z, target.map ), wolfpack.coord( target.x + 1, target.y, target.z, target.map ) ]
+
+ # At least one spell should look fancy
+ # Calculate the Angle here
+ serials = []
+
+ char.soundeffect( 0x1f6 )
+
+ for pos in positions:
+ newitem = wolfpack.newitem( 1 )
+ newitem.id = 0x80
+ newitem.moveto( pos )
+ newitem.decay = 0 # Dont decay. TempEffect will take care of them
+ newitem.update()
+ newitem.settag( 'dispellable_field', 1 )
+ serials.append( newitem.serial )
+ wolfpack.effect( 0x376a, pos, 9, 10 )
+
+ wolfpack.addtimer( 10000, "wolfpack.magic.utilities.field_expire", serials, 1 )
+
+ class Teleport( Spell ):
+ def __init__( self ):
+ Spell.__init__( self, 3 )
+ self.reagents = { REAGENT_BLOODMOSS: 1, REAGENT_MANDRAKE: 1 }
+ self.mantra = 'Rel Por'
+ self.validtarget = TARGET_GROUND
+
+ def target( self, char, mode, targettype, target ):
+ char.turnto( target )
+
+ # Line of Sight (touch!! or else we can teleport trough windows)
+ if not char.cansee( target, 1 ) and not char.gm:
+ char.message( 500237 )
+ return
+
+ # Check if the target tile is blocked or in a multi
+ if ( not target.validspawnspot() or target.findmulti( target ) )and not char.gm:
+ char.message( 501942 )
+ return
+
+ if not self.consumerequirements( char, mode ):
+ return
+
+ source = char.pos
+
+ char.removefromview()
+ char.moveto( target )
+ char.update()
+
+ wolfpack.effect( 0x3728, source, 10, 15 )
+ wolfpack.effect( 0x3728, target, 10, 15 )
+
+ char.soundeffect( 0x1fe )
+
+
+ class MagicLock( Spell ):
+ def __init__( self ):
+ Spell.__init__( self, 3 )
+ self.reagents = { REAGENT_BLOODMOSS: 1, REAGENT_SULFURASH: 1, REAGENT_GARLIC: 1 }
+ self.mantra = 'An Por'
+ self.validtarget = TARGET_ITEM
+
+ def target( self, char, mode, targettype, target ):
+ char.turnto( target )
+
+ # We can only lock unlocked chests
+ if target.type != 1 or 'lock' in target.events or target.container:
+ char.message( 501762 )
+ return
+
+ # We cannot use this on locked down chests
+ if target.magic == 4:
+ char.message( 501761 )
+ return
+
+ if not self.consumerequirements( char, mode ):
+ return
+
+ events = target.events
+ events.append( 'lock' )
+ target.events = events
+
+ target.settag( 'lock', 'magic' )
+
+ char.message( 501763 )
+ wolfpack.effect( 0x376a, target.pos, 9, 32 )
+ target.soundeffect( 0x1fa )
+
+ class Unlock( Spell ):
+ def __init__( self ):
+ Spell.__init__( self, 3 )
+ self.reagents = { REAGENT_BLOODMOSS: 1, REAGENT_SULFURASH: 1 }
+ self.mantra = 'Ex Por'
+ self.validtarget = TARGET_ITEM
+
+ def target( self, char, mode, targettype, target ):
+ char.turnto( target )
+
+ # We can only lock unlocked chests
+ if not 'lock' in target.events:
+ char.message( 503101 )
+ return
+
+ if target.gettag( 'lock' ) != 'magic':
+ char.message( 503099 )
+ return
+
+ if not self.consumerequirements( char, mode ):
+ return
+
+ events = target.events
+ events.remove( 'lock' )
+ target.events = events
+
+ target.deltag( 'lock', 'magic' )
+
+ wolfpack.effect( 0x376a, target.pos, 9, 32 )
+ target.soundeffect( 0x1ff )
+
def onLoad():
Bless().register( 17 )
Fireball().register( 18 )
! MagicLock().register( 19 )
#Poison().register( 20 )
#Telekinesis().register( 21 )
! Teleport().register( 22 )
! Unlock().register( 23 )
! WallOfStone().register( 24 )
Index: reactivearmor.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/magic/reactivearmor.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** reactivearmor.py 25 Sep 2003 14:28:43 -0000 1.1
--- reactivearmor.py 8 Oct 2003 01:35:48 -0000 1.2
***************
*** 4,8 ****
# ReactiveArmor EventSet
# This is basically a helper to override onDamage
- # and reduce the physical damage by up to 75% and
# probably throw back damage
def onDamage( char, type, damage, source ):
--- 4,7 ----
Index: utilities.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/magic/utilities.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** utilities.py 25 Sep 2003 23:44:42 -0000 1.3
--- utilities.py 8 Oct 2003 01:35:48 -0000 1.4
***************
*** 143,144 ****
--- 143,152 ----
# Save the values in a tempeffect to remove them later
target.addtimer( duration, "wolfpack.magic.utilities.statmodifier_expire", [ stat, amount ], 1, 1, "magic_statmodifier", "wolfpack.magic.utilities.statmodifier_dispel" )
+
+ def field_expire( object, args ):
+ for serial in args:
+ item = wolfpack.finditem( serial )
+
+ if item:
+ item.delete()
+
|
|
From: <dar...@us...> - 2003-10-08 01:35:53
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv22545/wolfpack Modified Files: __init__.py consts.py Log Message: Updated reloading of scripts Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** __init__.py 23 Sep 2003 12:17:39 -0000 1.33 --- __init__.py 8 Oct 2003 01:35:48 -0000 1.34 *************** *** 177,178 **** --- 177,180 ---- def packet( id, size ): return _wolfpack.packet( id, size ) + + queuereload = _wolfpack.queuereload Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** consts.py 3 Oct 2003 16:21:11 -0000 1.31 --- consts.py 8 Oct 2003 01:35:48 -0000 1.32 *************** *** 352,353 **** --- 352,357 ---- STATGAINDELAY = 900 + RELOAD_SCRIPTS = 0 + RELOAD_PYTHON = 1 + RELOAD_ACCOUNTS = 2 + RELOAD_CONFIGURATION = 3 |
|
From: <dar...@us...> - 2003-10-08 01:35:53
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv22545 Modified Files: door.py Log Message: Updated reloading of scripts Index: door.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/door.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** door.py 13 Sep 2003 15:29:16 -0000 1.2 --- door.py 8 Oct 2003 01:35:48 -0000 1.3 *************** *** 295,319 **** return 1 ! # The Door has no lock ! if not item.hastag( 'lock' ) or char.gm: ! return opendoor( char, item ) ! ! lock = int( item.gettag( 'lock' ) ) ! ! if item.hastag( 'locked' ): ! locked = int( item.gettag( 'locked' ) ) ! else: ! locked = 0 ! ! if locked == 0: ! return opendoor( char, item ) ! ! # Search for a key in the users backpack ! backpack = char.getbackpack() ! ! if searchkey( backpack, lock ): ! char.message( 'You quickly unlock, use, and then relock the door.' ) ! return opendoor( char, item ) ! ! char.message( 'This door is locked.' ) ! return 1 \ No newline at end of file --- 295,297 ---- return 1 ! return opendoor( char, item ) |
|
From: <dar...@us...> - 2003-10-08 00:45:16
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv16019
Modified Files:
console_win.cpp
Log Message:
New Stuff for the Windows Console.
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** console_win.cpp 7 Oct 2003 23:57:24 -0000 1.13
--- console_win.cpp 8 Oct 2003 00:45:11 -0000 1.14
***************
*** 57,60 ****
--- 57,62 ----
#define CONTROL_INPUT 0x11
+ HBITMAP hLogo = 0;
+ HBRUSH hbSeparator = 0, hbBackground = 0;
HWND logWindow = 0; // Log Window
HWND inputWindow = 0; // Input Textfield
***************
*** 84,87 ****
--- 86,127 ----
}
+ // Fill a rectangular on a specific context
+ void paintRect( HDC dc, INT32 x, INT32 y, INT32 width, INT32 height, HBRUSH brush )
+ {
+ RECT rect;
+ rect.bottom = y + height;
+ rect.right = x + width;
+ rect.top = y;
+ rect.left = x;
+
+ FillRect( dc, &rect, brush );
+ }
+
+ void drawWindow( HWND window )
+ {
+ PAINTSTRUCT paintInfo;
+ HDC dc = BeginPaint( window, &paintInfo );
+
+ RECT rect;
+ GetClientRect( window, &rect );
+
+ paintRect( dc, 0, 0, rect.right, 87, hbBackground );
+ paintRect( dc, 0, 87, rect.right, 1, hbSeparator );
+
+ // Draw our Logo
+ HDC tempdc = CreateCompatibleDC( dc );
+ HGDIOBJ oldobj = SelectObject( tempdc, hLogo );
+
+ BITMAP bm;
+ GetObject( hLogo, sizeof(bm), &bm );
+
+ BitBlt( dc, 0, 0, bm.bmWidth, bm.bmHeight, tempdc, 0, 0, SRCCOPY );
+
+ SelectObject( tempdc, oldobj );
+ DeleteDC( tempdc );
+
+ EndPaint( window, &paintInfo );
+ }
+
LRESULT CALLBACK wpWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
***************
*** 96,99 ****
--- 136,143 ----
{
case WM_CREATE:
+ hLogo = LoadBitmap( appInstance, MAKEINTRESOURCE( IDB_LOGO ) );
+ hbSeparator = CreateSolidBrush( RGB( 0xAF, 0xAF, 0xAF ) );
+ hbBackground = CreateSolidBrush( RGB( 0, 64, 38 ) );
+
// Create Richedit Box
logWindow = CreateWindow( RICHEDIT_CLASS, 0, ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL|ES_READONLY|WS_CHILD|WS_VISIBLE|WS_VSCROLL, 0, 0, 10, 10, hwnd, (HMENU)CONTROL_LOGWINDOW, appInstance, 0 );
***************
*** 159,163 ****
}
! MoveWindow( logWindow, 0, 0, width, height - inputHeight, TRUE );
MoveWindow( inputWindow, 0, height - inputHeight, width, inputHeight, TRUE );
}
--- 203,208 ----
}
! // Note: 88 pixel spacer are always on top
! MoveWindow( logWindow, 0, 88, width, height - inputHeight - 88, TRUE );
MoveWindow( inputWindow, 0, height - inputHeight, width, inputHeight, TRUE );
}
***************
*** 165,168 ****
--- 210,216 ----
return 0;
+ case WM_PAINT:
+ drawWindow( hwnd );
+
case WM_ERASEBKGND:
return 1;
***************
*** 214,217 ****
--- 262,268 ----
case WM_DESTROY:
+ DeleteObject( hLogo );
+ DeleteObject( hbSeparator );
+ DeleteObject( hbBackground );
keeprun = 0;
PostQuitMessage( 0 );
|
|
From: <dar...@us...> - 2003-10-07 23:58:08
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv9608 Modified Files: wolf.dsp Added Files: logo.bmp Log Message: Resource Changes. --- NEW FILE: logo.bmp --- (This appears to be a binary file; contents omitted.) Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.240 retrieving revision 1.241 diff -C2 -d -r1.240 -r1.241 *** wolf.dsp 1 Oct 2003 00:35:31 -0000 1.240 --- wolf.dsp 7 Oct 2003 23:58:04 -0000 1.241 *************** *** 1,23 **** # Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=wolf - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "wolf.mak". !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug" !MESSAGE ! !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "wolf - Win32 Release" (based on "Win32 (x86) Console Application") ! !MESSAGE "wolf - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE --- 1,23 ---- # Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=wolf - Win32 Debug ! !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE ! !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "wolf.mak". !MESSAGE ! !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben ! !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug" !MESSAGE ! !MESSAGE Für die Konfiguration stehen zur Auswahl: !MESSAGE ! !MESSAGE "wolf - Win32 Release" (basierend auf "Win32 (x86) Console Application") ! !MESSAGE "wolf - Win32 Debug" (basierend auf "Win32 (x86) Console Application") !MESSAGE *************** *** 26,30 **** # PROP Scc_ProjName "wolf" # PROP Scc_LocalPath "." ! CPP=xicl6.exe RSC=rc.exe --- 26,30 ---- # PROP Scc_ProjName "wolf" # PROP Scc_LocalPath "." ! CPP=cl.exe RSC=rc.exe *************** *** 50,56 **** # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib shell32.lib /nologo /subsystem:windows /map /machine:I386 /out:"..\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98 # SUBTRACT LINK32 /pdb:none --- 50,56 ---- # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib ole32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib shell32.lib /nologo /subsystem:windows /map /machine:I386 /out:"..\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98 # SUBTRACT LINK32 /pdb:none *************** *** 75,81 **** # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib shell32.lib /nologo /version:12.9 /subsystem:windows /incremental:no /map /debug /machine:I386 /out:"..\wolfpack.exe" /pdbtype:sept # SUBTRACT LINK32 /pdb:none --- 75,81 ---- # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib ole32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib shell32.lib /nologo /version:12.9 /subsystem:windows /incremental:no /map /debug /machine:I386 /out:"..\wolfpack.exe" /pdbtype:sept # SUBTRACT LINK32 /pdb:none |
|
From: <dar...@us...> - 2003-10-07 23:57:30
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv9537 Modified Files: console_win.cpp res.rc resource.h Log Message: Resource Changes. Index: console_win.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** console_win.cpp 25 Sep 2003 03:05:58 -0000 1.12 --- console_win.cpp 7 Oct 2003 23:57:24 -0000 1.13 *************** *** 320,324 **** wpClass.hInstance = hInstance; wpClass.lpfnWndProc = wpWindowProc; ! wpClass.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE( IDI_ICON2 ) ); wpClass.hbrBackground = GetSysColorBrush( COLOR_BTNFACE ); wpClass.lpszClassName = WOLFPACK_CLASS; --- 320,324 ---- wpClass.hInstance = hInstance; wpClass.lpfnWndProc = wpWindowProc; ! wpClass.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE( IDI_ICON1 ) ); wpClass.hbrBackground = GetSysColorBrush( COLOR_BTNFACE ); wpClass.lpszClassName = WOLFPACK_CLASS; Index: res.rc =================================================================== RCS file: /cvsroot/wpdev/wolfpack/res.rc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** res.rc 15 Sep 2003 19:56:23 -0000 1.16 --- res.rc 7 Oct 2003 23:57:24 -0000 1.17 *************** *** 61,65 **** // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! IDI_ICON2 ICON DISCARDABLE "icon2.ico" #ifdef APSTUDIO_INVOKED --- 61,67 ---- // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! IDI_ICON1 ICON DISCARDABLE "icon2.ico" ! ! IDB_LOGO BITMAP DISCARDABLE "logo.bmp" #ifdef APSTUDIO_INVOKED Index: resource.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/resource.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** resource.h 6 Feb 2003 09:27:24 -0000 1.8 --- resource.h 7 Oct 2003 23:57:24 -0000 1.9 *************** *** 4,8 **** // #define IDI_ICON1 101 ! #define IDI_ICON2 103 // Next default values for new objects --- 4,8 ---- // #define IDI_ICON1 101 ! #define IDB_LOGO 102 // Next default values for new objects |
|
From: <co...@us...> - 2003-10-06 06:08:59
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1:/tmp/cvs-serv2511/scripts/skills Modified Files: anatomy.py Log Message: priv fix Index: anatomy.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/anatomy.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** anatomy.py 23 Sep 2003 12:17:39 -0000 1.8 --- anatomy.py 6 Oct 2003 06:08:53 -0000 1.9 *************** *** 58,62 **** # Invulnerable Characters cannot be examined ! if target.char.priv & 0x04 or target.char.dead: socket.clilocmessage( 0x7A266, "", 0x3b2, 3, target.char ) # That cannot be inspected. return --- 58,62 ---- # Invulnerable Characters cannot be examined ! if target.char.dead: socket.clilocmessage( 0x7A266, "", 0x3b2, 3, target.char ) # That cannot be inspected. return |
|
From: <dr...@us...> - 2003-10-04 21:35:31
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands
In directory sc8-pr-cvs1:/tmp/cvs-serv8822
Modified Files:
export.py
Log Message:
Export now works again, def wolfpack twice broke it hehe
Index: export.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/export.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** export.py 23 Sep 2003 12:17:39 -0000 1.2
--- export.py 4 Oct 2003 21:35:26 -0000 1.3
***************
*** 11,20 ****
from wolfpack.gumps import cGump
! def export( socket, command, arguments ):
socket.sysmessage( "Target the upper left corner of the area you want to export." )
socket.attachtarget( "wolfpack.commands.export.callback", [] )
def onLoad():
! wolfpack.registercommand( "export", export )
def callback( char, args, target ):
--- 11,21 ----
from wolfpack.gumps import cGump
! def exportcmd( socket, command, arguments ):
!
socket.sysmessage( "Target the upper left corner of the area you want to export." )
socket.attachtarget( "wolfpack.commands.export.callback", [] )
def onLoad():
! wolfpack.registercommand( "export", exportcmd )
def callback( char, args, target ):
***************
*** 26,33 ****
socket.sysmessage( "This is an invalid target." )
return
!
socket.sysmessage( "Target the lower right corner of the area you want to export." )
socket.attachtarget( "wolfpack.commands.export.callback", [ target.pos.x, target.pos.y ] )
!
# Lower Right Corner
elif len( args ) == 2:
--- 27,34 ----
socket.sysmessage( "This is an invalid target." )
return
!
socket.sysmessage( "Target the lower right corner of the area you want to export." )
socket.attachtarget( "wolfpack.commands.export.callback", [ target.pos.x, target.pos.y ] )
!
# Lower Right Corner
elif len( args ) == 2:
***************
*** 41,45 ****
y1 = min( args[1], target.pos.y )
y2 = max( args[1], target.pos.y )
!
gump = cGump( x=100, y=100, callback="wolfpack.commands.export.export", args=[ x1, y1, x2, y2 ] )
--- 42,46 ----
y1 = min( args[1], target.pos.y )
y2 = max( args[1], target.pos.y )
!
gump = cGump( x=100, y=100, callback="wolfpack.commands.export.export", args=[ x1, y1, x2, y2 ] )
***************
*** 54,66 ****
gump.addRadioButton( x=20, y=160, off=0x25f8, on=0x25fb, id=1 )
gump.addText( x=55, y=165, text='Sphere 51a', hue=0x835 )
!
gump.addRadioButton( x=150, y=160, off=0x25f8, on=0x25fb, id=2, selected=1 )
gump.addText( x=185, y=165, text='WSC', hue=0x835 )
!
gump.addRadioButton( x=250, y=160, off=0x25f8, on=0x25fb, id=3 )
gump.addText( x=285, y=165, text='Text', hue=0x835 )
# InputField
! gump.addResizeGump( x=20, y=210, id=0xBB8, width=310, height=25 )
gump.addInputField( x=25, y=212, width=295, height=20, hue=0x834, id=1, starttext="export.wsc" )
--- 55,67 ----
gump.addRadioButton( x=20, y=160, off=0x25f8, on=0x25fb, id=1 )
gump.addText( x=55, y=165, text='Sphere 51a', hue=0x835 )
!
gump.addRadioButton( x=150, y=160, off=0x25f8, on=0x25fb, id=2, selected=1 )
gump.addText( x=185, y=165, text='WSC', hue=0x835 )
!
gump.addRadioButton( x=250, y=160, off=0x25f8, on=0x25fb, id=3 )
gump.addText( x=285, y=165, text='Text', hue=0x835 )
# InputField
! gump.addResizeGump( x=20, y=210, id=0xBB8, width=310, height=25 )
gump.addInputField( x=25, y=212, width=295, height=20, hue=0x834, id=1, starttext="export.wsc" )
***************
*** 69,89 ****
gump.send( char )
!
def export( char, args, choice ):
if choice.button != 1 or len( args ) != 4:
! return
!
filename = choice.text[1]
!
if len( choice.switches ) != 1:
char.socket.sysmessage( "Error: len(choice.switches) != 1." )
! return
!
format = choice.switches[0]
if len( filename ) == 0:
char.socket.sysmessage( "Error: You need to provide a valid filename." )
! return
!
# Open the output file
output = open( filename, "wb" ) # Note that we *force* the output to have lines terminated with \n\r
--- 70,90 ----
gump.send( char )
!
def export( char, args, choice ):
if choice.button != 1 or len( args ) != 4:
! return 1
!
filename = choice.text[1]
!
if len( choice.switches ) != 1:
char.socket.sysmessage( "Error: len(choice.switches) != 1." )
! return 1
!
format = choice.switches[0]
if len( filename ) == 0:
char.socket.sysmessage( "Error: You need to provide a valid filename." )
! return 1
!
# Open the output file
output = open( filename, "wb" ) # Note that we *force* the output to have lines terminated with \n\r
***************
*** 104,108 ****
output.write( "COLOR=0%x\r\n" % item.color )
output.write( "P=%d,%d,%i\r\n\r\n" % ( item.pos.x, item.pos.y, item.pos.z ) )
!
elif format == 2: # WSC
output.write( "SECTION WORLDITEM %d\r\n{\r\n" % i )
--- 105,109 ----
output.write( "COLOR=0%x\r\n" % item.color )
output.write( "P=%d,%d,%i\r\n\r\n" % ( item.pos.x, item.pos.y, item.pos.z ) )
!
elif format == 2: # WSC
output.write( "SECTION WORLDITEM %d\r\n{\r\n" % i )
***************
*** 115,122 ****
output.write( "Z %i\r\n" % item.pos.z )
output.write( "CONT -1\r\nTYPE 0\r\n" )
! output.write( "AMOUNT %d\r\n" % item.amount )
output.write( "COLOR %d\r\n" % item.color )
! output.write( "}\r\n\r\n" )
!
else: # Text
output.write( "0x%x %d %d %i 0x%x\r\n" % ( item.id, item.pos.x, item.pos.y, item.pos.z, item.color ) )
--- 116,123 ----
output.write( "Z %i\r\n" % item.pos.z )
output.write( "CONT -1\r\nTYPE 0\r\n" )
! output.write( "AMOUNT %d\r\n" % item.amount )
output.write( "COLOR %d\r\n" % item.color )
! output.write( "}\r\n\r\n" )
!
else: # Text
output.write( "0x%x %d %d %i 0x%x\r\n" % ( item.id, item.pos.x, item.pos.y, item.pos.z, item.color ) )
***************
*** 142,146 ****
gump = cGump( x=100, y=100 )
! gump.addBackground( id=0x2436, width=350, height=300 )
#gump.addCheckerTrans( 15, 15, 320, 270 )
--- 143,147 ----
gump = cGump( x=100, y=100 )
! gump.addBackground( id=0x2436, width=350, height=300 )
#gump.addCheckerTrans( 15, 15, 320, 270 )
|
|
From: <dr...@us...> - 2003-10-03 21:03:15
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/misc
In directory sc8-pr-cvs1:/tmp/cvs-serv5844
Modified Files:
misc.xml siegeweapons.xml
Log Message:
Just adding nodecay for custom building stuff...
Index: misc.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/misc/misc.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** misc.xml 20 Sep 2003 01:07:50 -0000 1.6
--- misc.xml 3 Oct 2003 17:54:22 -0000 1.7
***************
*** 297,628 ****
<!-- Telescope -->
-
<item id="1459">
! <id>0x1459</id>
<category>Misc\Telescope\Telescope (1/66)</category>
</item>
<item id="145a">
! <id>0x145a</id>
[...2502 lines suppressed...]
<item id="2349">
! <id>0x2349</id> <nodecay />
<category>Misc\Serpent Pillar\Serpent Pillar (14/15)</category>
</item>
<item id="234a">
! <id>0x234a</id> <nodecay />
<category>Misc\Serpent Pillar\Serpent Pillar (15/15)</category>
</item>
***************
*** 1811,1813 ****
<category>Misc\Plant Growing\Plant Bowl</category>
</item>
! </definitions>
\ No newline at end of file
--- 1810,1812 ----
<category>Misc\Plant Growing\Plant Bowl</category>
</item>
! </definitions>
Index: siegeweapons.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/misc/siegeweapons.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** siegeweapons.xml 25 Dec 2002 23:51:10 -0000 1.3
--- siegeweapons.xml 3 Oct 2003 17:54:22 -0000 1.4
***************
*** 12,71 ****
<!-- Cannon -->
<item id="e8b">
! <id>0xE8B</id>
<category>Misc\Cannon\Long Cannon (S/N) (1/3)</category>
</item>
<item id="e8c">
! <id>0xE8C</id>
<category>Misc\Cannon\Long Cannon (S/N) (2/3)</category>
</item>
[...4046 lines suppressed...]
</item>
<item id="e74">
! <id>0x0e74</id>
<category>Misc\Cannon\Cannon Balls</category>
</item>
! </definitions>
\ No newline at end of file
--- 2036,2046 ----
<!-- Ammunition -->
<item id="e73">
! <id>0x0e73</id> <nodecay />
<category>Misc\Cannon\Cannon Ball</category>
</item>
<item id="e74">
! <id>0x0e74</id> <nodecay />
<category>Misc\Cannon\Cannon Balls</category>
</item>
! </definitions>
|
|
From: <dr...@us...> - 2003-10-03 20:03:23
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/vegetation
In directory sc8-pr-cvs1:/tmp/cvs-serv3533
Modified Files:
dried.xml fruits.xml mushrooms.xml plants.xml trees.xml
wood.xml
Log Message:
Adding trees that chop themself down could be annoying :) Just adding nodecay for custom building stuff...
Index: dried.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/vegetation/dried.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dried.xml 25 Dec 2002 23:51:10 -0000 1.2
--- dried.xml 3 Oct 2003 17:42:54 -0000 1.3
***************
*** 11,51 ****
<definitions>
<item id="c3b">
! <id>0xC3B</id>
<category>Vegetation\Dried Vegetation\Dried Flowers 1</category>
</item>
<item id="c3c">
! <id>0xC3C</id>
<category>Vegetation\Dried Vegetation\Dried Flowers 2</category>
</item>
<item id="c3d">
! <id>0xC3D</id>
<category>Vegetation\Dried Vegetation\Dried Flowers 3</category>
</item>
<item id="c3e">
! <id>0xC3E</id>
<category>Vegetation\Dried Vegetation\Dried Flowers 4</category>
</item>
<item id="c3f">
! <id>0xC3F</id>
<category>Vegetation\Dried Vegetation\Dried Onions 1</category>
</item>
<item id="c40">
! <id>0xC40</id>
<category>Vegetation\Dried Vegetation\Dried Onions 2</category>
</item>
<item id="c41">
! <id>0xC41</id>
<category>Vegetation\Dried Vegetation\Dried Herbs 1</category>
</item>
<item id="c42">
! <id>0xC42</id>
<category>Vegetation\Dried Vegetation\Dried Herbs 2</category>
</item>
! </definitions>
\ No newline at end of file
--- 11,51 ----
<definitions>
<item id="c3b">
! <id>0xC3B</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Flowers 1</category>
</item>
<item id="c3c">
! <id>0xC3C</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Flowers 2</category>
</item>
<item id="c3d">
! <id>0xC3D</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Flowers 3</category>
</item>
<item id="c3e">
! <id>0xC3E</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Flowers 4</category>
</item>
<item id="c3f">
! <id>0xC3F</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Onions 1</category>
</item>
<item id="c40">
! <id>0xC40</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Onions 2</category>
</item>
<item id="c41">
! <id>0xC41</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Herbs 1</category>
</item>
<item id="c42">
! <id>0xC42</id> <nodecay />
<category>Vegetation\Dried Vegetation\Dried Herbs 2</category>
</item>
! </definitions>
Index: fruits.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/vegetation/fruits.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fruits.xml 25 Dec 2002 23:51:10 -0000 1.3
--- fruits.xml 3 Oct 2003 17:42:54 -0000 1.4
***************
*** 11,66 ****
<definitions>
<item id="d1b">
! <id>0xD1B</id>
<category>Vegetation\Fruits\Grapevines 1</category>
</item>
<item id="d1c">
! <id>0xD1C</id>
<category>Vegetation\Fruits\Grapevines 2</category>
</item>
<item id="d1d">
! <id>0xD1D</id>
<category>Vegetation\Fruits\Grapevines 3</category>
</item>
<item id="d1e">
! <id>0xD1E</id>
<category>Vegetation\Fruits\Grapevines 4</category>
</item>
<item id="d1f">
! <id>0xD1F</id>
<category>Vegetation\Fruits\Grapevines 5</category>
</item>
<item id="d20">
! <id>0xD20</id>
<category>Vegetation\Fruits\Grapevines 6</category>
</item>
<item id="d21">
! <id>0xD21</id>
<category>Vegetation\Fruits\Grapevines 7</category>
</item>
<item id="d22">
! <id>0xD22</id>
<category>Vegetation\Fruits\Grapevines 8</category>
</item>
<item id="d23">
! <id>0xD23</id>
<category>Vegetation\Fruits\Grapevines 9</category>
</item>
<item id="d24">
! <id>0xD24</id>
<category>Vegetation\Fruits\Grapevines 10</category>
</item>
<item id="3d12">
! <id>0x3d12</id>
<category>Vegetation\Fruits\Grapevines 11</category>
</item>
! </definitions>
\ No newline at end of file
--- 11,66 ----
<definitions>
<item id="d1b">
! <id>0xD1B</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 1</category>
</item>
<item id="d1c">
! <id>0xD1C</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 2</category>
</item>
<item id="d1d">
! <id>0xD1D</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 3</category>
</item>
<item id="d1e">
! <id>0xD1E</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 4</category>
</item>
<item id="d1f">
! <id>0xD1F</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 5</category>
</item>
<item id="d20">
! <id>0xD20</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 6</category>
</item>
<item id="d21">
! <id>0xD21</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 7</category>
</item>
<item id="d22">
! <id>0xD22</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 8</category>
</item>
<item id="d23">
! <id>0xD23</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 9</category>
</item>
<item id="d24">
! <id>0xD24</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 10</category>
</item>
<item id="3d12">
! <id>0x3d12</id> <nodecay />
<category>Vegetation\Fruits\Grapevines 11</category>
</item>
! </definitions>
Index: mushrooms.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/vegetation/mushrooms.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mushrooms.xml 20 Sep 2003 01:07:50 -0000 1.3
--- mushrooms.xml 3 Oct 2003 17:42:54 -0000 1.4
***************
*** 11,81 ****
<definitions>
<item id="d0c">
! <id>0xD0C</id>
<category>Vegetation\Mushrooms\Mushrooms 1</category>
</item>
<item id="d0d">
! <id>0xD0D</id>
<category>Vegetation\Mushrooms\Mushrooms 2</category>
</item>
<item id="d0e">
! <id>0xD0E</id>
<category>Vegetation\Mushrooms\Mushrooms 3</category>
</item>
<item id="d0f">
! <id>0xD0F</id>
<category>Vegetation\Mushrooms\Mushrooms 4</category>
</item>
<item id="d10">
! <id>0xD10</id>
<category>Vegetation\Mushrooms\Mushrooms 5</category>
</item>
<item id="d11">
! <id>0xD11</id>
<category>Vegetation\Mushrooms\Mushrooms 6</category>
</item>
<item id="d12">
! <id>0xD12</id>
<category>Vegetation\Mushrooms\Mushrooms 7</category>
</item>
<item id="d13">
! <id>0xD13</id>
<category>Vegetation\Mushrooms\Mushrooms 8</category>
</item>
<item id="d14">
! <id>0xD14</id>
<category>Vegetation\Mushrooms\Mushrooms 9</category>
</item>
<item id="d15">
! <id>0xD15</id>
<category>Vegetation\Mushrooms\Mushrooms 10</category>
</item>
<item id="d16">
! <id>0xD16</id>
<category>Vegetation\Mushrooms\Mushrooms 11</category>
</item>
<item id="d17">
! <id>0xD17</id>
<category>Vegetation\Mushrooms\Mushrooms 12</category>
</item>
<item id="d18">
! <id>0xD18</id>
<category>Vegetation\Mushrooms\Mushrooms 13</category>
</item>
<item id="d19">
! <id>0xD19</id>
<category>Vegetation\Mushrooms\Mushrooms 14</category>
</item>
! </definitions>
\ No newline at end of file
--- 11,81 ----
<definitions>
<item id="d0c">
! <id>0xD0C</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 1</category>
</item>
<item id="d0d">
! <id>0xD0D</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 2</category>
</item>
<item id="d0e">
! <id>0xD0E</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 3</category>
</item>
<item id="d0f">
! <id>0xD0F</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 4</category>
</item>
<item id="d10">
! <id>0xD10</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 5</category>
</item>
<item id="d11">
! <id>0xD11</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 6</category>
</item>
<item id="d12">
! <id>0xD12</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 7</category>
</item>
<item id="d13">
! <id>0xD13</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 8</category>
</item>
<item id="d14">
! <id>0xD14</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 9</category>
</item>
<item id="d15">
! <id>0xD15</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 10</category>
</item>
<item id="d16">
! <id>0xD16</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 11</category>
</item>
<item id="d17">
! <id>0xD17</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 12</category>
</item>
<item id="d18">
! <id>0xD18</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 13</category>
</item>
<item id="d19">
! <id>0xD19</id> <nodecay />
<category>Vegetation\Mushrooms\Mushrooms 14</category>
</item>
! </definitions>
Index: plants.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/vegetation/plants.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** plants.xml 20 Aug 2003 16:01:04 -0000 1.8
--- plants.xml 3 Oct 2003 17:42:54 -0000 1.9
***************
*** 12,186 ****
<!-- Flowers -->
<item id="c37">
! <id>0xC37</id>
<category>Vegetation\Flowers\Flower 1</category>
</item>
<item id="c38">
! <id>0xC38</id>
<category>Vegetation\Flowers\Flower 2</category>
</item>
[...1891 lines suppressed...]
<item id="1e11">
! <id>0x1e11</id> <nodecay />
<category>Vegetation\Flowers\Potted Cactus 3</category>
</item>
<item id="1e12">
! <id>0x1e12</id> <nodecay />
<category>Vegetation\Flowers\Potted Cactus 4</category>
</item>
<item id="1e13">
! <id>0x1e13</id> <nodecay />
<category>Vegetation\Flowers\Potted Cactus 5</category>
</item>
<item id="1e14">
! <id>0x1e14</id> <nodecay />
<category>Vegetation\Flowers\Potted Cactus 6</category>
</item>
! </definitions>
Index: trees.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/vegetation/trees.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** trees.xml 25 Dec 2002 23:51:10 -0000 1.4
--- trees.xml 3 Oct 2003 17:42:54 -0000 1.5
***************
*** 12,51 ****
<!-- Palms -->
<item id="c95">
! <id>0xC95</id>
<category>Vegetation\Palms\Coconut Palm</category>
</item>
<item id="c96">
! <id>0xC96</id>
<category>Vegetation\Palms\Date Palm</category>
</item>
[...2083 lines suppressed...]
<item id="d3c">
! <id>0x0d3c</id> <nodecay />
<category>Vegetation\Trees\Fallen Branch 2</category>
</item>
<item id="d3d">
! <id>0x0d3d</id> <nodecay />
<category>Vegetation\Trees\Fallen Branch 3</category>
</item>
<item id="11c8">
! <id>0x11C8</id> <nodecay />
<category>Vegetation\Trees\Potted Tree 1</category>
</item>
<item id="11c9">
! <id>0x11C9</id> <nodecay />
<category>Vegetation\Trees\Potted Tree 2</category>
</item>
! </definitions>
Index: wood.xml
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/vegetation/wood.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wood.xml 20 Sep 2003 01:07:50 -0000 1.3
--- wood.xml 3 Oct 2003 17:42:54 -0000 1.4
***************
*** 12,141 ****
<!-- Wood -->
<item id="1b81">
! <id>0x1B81</id>
<category>Vegetation\Wood\Wood 1</category>
</item>
<item id="1b82">
! <id>0x1B82</id>
<category>Vegetation\Wood\Wood 2</category>
</item>
<item id="1b83">
! <id>0x1B83</id>
<category>Vegetation\Wood\Wood 3</category>
</item>
<item id="1b84">
! <id>0x1B84</id>
<category>Vegetation\Wood\Wood 4</category>
</item>
<item id="1b85">
! <id>0x1B85</id>
<category>Vegetation\Wood\Wood 5</category>
</item>
<item id="1b86">
! <id>0x1B86</id>
<category>Vegetation\Wood\Wood 6</category>
</item>
<item id="1b87">
! <id>0x1B87</id>
<category>Vegetation\Wood\Wood 7</category>
</item>
<item id="1b88">
! <id>0x1B88</id>
<category>Vegetation\Wood\Wood 8</category>
</item>
<item id="1b89">
! <id>0x1B89</id>
<category>Vegetation\Wood\Wood 9</category>
</item>
<item id="1b8a">
! <id>0x1B8A</id>
<category>Vegetation\Wood\Wood 10</category>
</item>
<item id="1b8b">
! <id>0x1B8B</id>
<category>Vegetation\Wood\Wood 11</category>
</item>
<item id="1b8c">
! <id>0x1B8C</id>
<category>Vegetation\Wood\Wood 12</category>
</item>
<item id="1b8d">
! <id>0x1B8D</id>
<category>Vegetation\Wood\Wood 13</category>
</item>
<item id="1b8e">
! <id>0x1B8E</id>
<category>Vegetation\Wood\Wood 14</category>
</item>
<item id="1b8f">
! <id>0x1B8F</id>
<category>Vegetation\Wood\Wood 15</category>
</item>
<item id="1b90">
! <id>0x1B90</id>
<category>Vegetation\Wood\Wood 16</category>
</item>
<item id="1b91">
! <id>0x1B91</id>
<category>Vegetation\Wood\Wood 17</category>
</item>
<item id="1b92">
! <id>0x1B92</id>
<category>Vegetation\Wood\Wood 18</category>
</item>
<item id="1b93">
! <id>0x1B93</id>
<category>Vegetation\Wood\Wood 19</category>
</item>
<item id="1b94">
! <id>0x1B94</id>
<category>Vegetation\Wood\Wood 20</category>
</item>
<item id="1b95">
! <id>0x1B95</id>
<category>Vegetation\Wood\Wood 21</category>
</item>
<item id="1b96">
! <id>0x1B96</id>
<category>Vegetation\Wood\Wood 22</category>
</item>
<item id="1b97">
! <id>0x1B97</id>
<category>Vegetation\Wood\Wood 23</category>
</item>
<item id="1b98">
! <id>0x1B98</id>
<category>Vegetation\Wood\Wood 24</category>
</item>
<item id="1b99">
! <id>0x1B99</id>
<category>Vegetation\Wood\Wood 25</category>
</item>
<item id="1b9a">
! <id>0x1B9A</id>
<category>Vegetation\Wood\Wood 26</category>
</item>
--- 12,141 ----
<!-- Wood -->
<item id="1b81">
! <id>0x1B81</id> <nodecay />
<category>Vegetation\Wood\Wood 1</category>
</item>
<item id="1b82">
! <id>0x1B82</id> <nodecay />
<category>Vegetation\Wood\Wood 2</category>
</item>
<item id="1b83">
! <id>0x1B83</id> <nodecay />
<category>Vegetation\Wood\Wood 3</category>
</item>
<item id="1b84">
! <id>0x1B84</id> <nodecay />
<category>Vegetation\Wood\Wood 4</category>
</item>
<item id="1b85">
! <id>0x1B85</id> <nodecay />
<category>Vegetation\Wood\Wood 5</category>
</item>
<item id="1b86">
! <id>0x1B86</id> <nodecay />
<category>Vegetation\Wood\Wood 6</category>
</item>
<item id="1b87">
! <id>0x1B87</id> <nodecay />
<category>Vegetation\Wood\Wood 7</category>
</item>
<item id="1b88">
! <id>0x1B88</id> <nodecay />
<category>Vegetation\Wood\Wood 8</category>
</item>
<item id="1b89">
! <id>0x1B89</id> <nodecay />
<category>Vegetation\Wood\Wood 9</category>
</item>
<item id="1b8a">
! <id>0x1B8A</id> <nodecay />
<category>Vegetation\Wood\Wood 10</category>
</item>
<item id="1b8b">
! <id>0x1B8B</id> <nodecay />
<category>Vegetation\Wood\Wood 11</category>
</item>
<item id="1b8c">
! <id>0x1B8C</id> <nodecay />
<category>Vegetation\Wood\Wood 12</category>
</item>
<item id="1b8d">
! <id>0x1B8D</id> <nodecay />
<category>Vegetation\Wood\Wood 13</category>
</item>
<item id="1b8e">
! <id>0x1B8E</id> <nodecay />
<category>Vegetation\Wood\Wood 14</category>
</item>
<item id="1b8f">
! <id>0x1B8F</id> <nodecay />
<category>Vegetation\Wood\Wood 15</category>
</item>
<item id="1b90">
! <id>0x1B90</id> <nodecay />
<category>Vegetation\Wood\Wood 16</category>
</item>
<item id="1b91">
! <id>0x1B91</id> <nodecay />
<category>Vegetation\Wood\Wood 17</category>
</item>
<item id="1b92">
! <id>0x1B92</id> <nodecay />
<category>Vegetation\Wood\Wood 18</category>
</item>
<item id="1b93">
! <id>0x1B93</id> <nodecay />
<category>Vegetation\Wood\Wood 19</category>
</item>
<item id="1b94">
! <id>0x1B94</id> <nodecay />
<category>Vegetation\Wood\Wood 20</category>
</item>
<item id="1b95">
! <id>0x1B95</id> <nodecay />
<category>Vegetation\Wood\Wood 21</category>
</item>
<item id="1b96">
! <id>0x1B96</id> <nodecay />
<category>Vegetation\Wood\Wood 22</category>
</item>
<item id="1b97">
! <id>0x1B97</id> <nodecay />
<category>Vegetation\Wood\Wood 23</category>
</item>
<item id="1b98">
! <id>0x1B98</id> <nodecay />
<category>Vegetation\Wood\Wood 24</category>
</item>
<item id="1b99">
! <id>0x1B99</id> <nodecay />
<category>Vegetation\Wood\Wood 25</category>
</item>
<item id="1b9a">
! <id>0x1B9A</id> <nodecay />
<category>Vegetation\Wood\Wood 26</category>
</item>
***************
*** 143,147 ****
<!-- Sticks -->
<item id="1b9b">
! <id>0x1B9B</id>
<category>Vegetation\Wood\Sticks </category>
</item>
--- 143,147 ----
<!-- Sticks -->
<item id="1b9b">
! <id>0x1B9B</id> <nodecay />
<category>Vegetation\Wood\Sticks </category>
</item>
***************
*** 149,164 ****
<!-- Twigs -->
<item id="1b9c">
! <id>0x1B9C</id>
<category>Vegetation\Wood\Twigs 1</category>
</item>
<item id="1b9d">
! <id>0x1B9D</id>
<category>Vegetation\Wood\Twigs 2</category>
</item>
<item id="1b9e">
! <id>0x1B9E</id>
<category>Vegetation\Wood\Twigs 3</category>
</item>
! </definitions>
\ No newline at end of file
--- 149,164 ----
<!-- Twigs -->
<item id="1b9c">
! <id>0x1B9C</id> <nodecay />
<category>Vegetation\Wood\Twigs 1</category>
</item>
<item id="1b9d">
! <id>0x1B9D</id> <nodecay />
<category>Vegetation\Wood\Twigs 2</category>
</item>
<item id="1b9e">
! <id>0x1B9E</id> <nodecay />
<category>Vegetation\Wood\Twigs 3</category>
</item>
! </definitions>
|
|
From: <co...@us...> - 2003-10-03 16:21:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv18209/scripts/wolfpack Modified Files: consts.py Log Message: little work on global skill checking and mining Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** consts.py 1 Oct 2003 22:23:06 -0000 1.30 --- consts.py 3 Oct 2003 16:21:11 -0000 1.31 *************** *** 122,126 **** MANA = 0 STAMINA = 1 ! HITPOINTS = 2 DEXTERITY = 3 INTELLIGENCE = 4 --- 122,126 ---- MANA = 0 STAMINA = 1 ! HEALTH = 2 DEXTERITY = 3 INTELLIGENCE = 4 *************** *** 315,320 **** # Colors ! YELLOW = 0x37 ! GRAY = 0x3b2 # Fonts --- 315,328 ---- # Colors ! BLACK = 1 ! DARKBLUE = 2 ! BLUE = 3 ! RED = 38 ! DARDRED = 37 ! PINK = 19 ! DARKGREEN = 67 ! GREEN = 68 ! YELLOW = 55 ! GRAY = 999 # Fonts *************** *** 335,336 **** --- 343,353 ---- MUTATECHANCE = 6 FALLBACKCHANCE = 7 + + #SKILLS GROW LOCKS + GROWUP = 0 + GROWDOWN = 1 + GROWLOCK = 2 + + #Stat gain delay = 15 minutes ( 900 seconds ) + STATGAINDELAY = 900 + |
|
From: <co...@us...> - 2003-10-03 16:21:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv18209/scripts/tools
Modified Files:
pickaxe.py
Log Message:
little work on global skill checking and mining
Index: pickaxe.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/tools/pickaxe.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pickaxe.py 30 Sep 2003 16:41:30 -0000 1.4
--- pickaxe.py 3 Oct 2003 16:21:11 -0000 1.5
***************
*** 17,31 ****
def onUse( char, tool ):
#Already digging ?
! if char.hastag( 'is_mining' ) and char.gettag( 'is_mining' ) > servertime():
! char.socket.clilocmessage( 503029, "", YELLOW, NORMAL ) # You are already digging.
# Can't mine on horses
if char.itemonlayer( LAYER_MOUNT ):
! char.socket.clilocmessage( 501864, "", YELLOW, NORMAL ) # You can't mine while riding.
return OK
# Who is tool owner ?
if tool.getoutmostchar() != char:
! char.socket.clilocmessage( 500364, "", YELLOW, NORMAL ) # You can't use that, it belongs to someone else
return OK
--- 17,32 ----
def onUse( char, tool ):
#Already digging ?
! if char.hastag( 'is_mining' ) and ( char.gettag( 'is_mining' ) > servertime() ):
! char.socket.clilocmessage( 503029, "", GRAY, NORMAL ) # You are already digging.
! return OK
# Can't mine on horses
if char.itemonlayer( LAYER_MOUNT ):
! char.socket.clilocmessage( 501864, "", RED, NORMAL ) # You can't mine while riding.
return OK
# Who is tool owner ?
if tool.getoutmostchar() != char:
! char.socket.clilocmessage( 500364, "", RED, NORMAL ) # You can't use that, it belongs to someone else
return OK
***************
*** 35,39 ****
char.socket.attachtarget( "skills.mining.response", [tool] )
else:
! char.socket.clilocmessage( 500735, "", YELLOW, NORMAL ) # Don't play with things you don't know about. :)
return OK
--- 36,40 ----
char.socket.attachtarget( "skills.mining.response", [tool] )
else:
! char.socket.clilocmessage( 500735, "", RED, NORMAL ) # Don't play with things you don't know about. :)
return OK
|