wpdev-commits Mailing List for Wolfpack Emu (Page 82)
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: Richard M. <dr...@us...> - 2004-07-09 09:59:05
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27479 Modified Files: commands.cpp Log Message: Removed kill Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.245 retrieving revision 1.246 diff -C2 -d -r1.245 -r1.246 *** commands.cpp 9 Jul 2004 08:58:54 -0000 1.245 --- commands.cpp 9 Jul 2004 09:58:56 -0000 1.246 *************** *** 195,211 **** /* - \command kill - \description Kills the selected character. - \notes You cannot kill invulnerable characters this way. - */ - void commandKill( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( args ); - Q_UNUSED( command ); - socket->sysMessage( tr( "Please select a target to kill" ) ); - socket->attachTarget( new cKillTarget ); - } - - /* \command fix \description Resend the player information. --- 195,198 ---- *************** *** 765,790 **** /* - \command invis - \description Toggle invisibility. - */ - void commandInvis( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( command ); - socket->player()->removeFromView(); - - if ( socket->player()->isInvisible() || ( args.count() > 0 && args[0].toInt() == 0 ) ) - { - socket->player()->setInvisible( false ); - socket->sysMessage( tr( "Invisible is now '0'." ) ); - } - else if ( !socket->player()->isInvisible() || ( args.count() > 0 && args[0].toInt() == 1 ) ) - { - socket->player()->setInvisible( true ); - socket->sysMessage( tr( "Invisible is now '1'." ) ); - } - - socket->player()->resend( false ); - } - /* \command pagenotify \description Toggle notification about new support tickets. --- 752,755 ---- *************** *** 1076,1081 **** { "FIX", commandFix }, { "GMTALK", commandGmtalk }, - { "INVIS", commandInvis }, - { "KILL", commandKill }, { "MOVE", commandMove }, { "PAGES", commandPages }, --- 1041,1044 ---- |
From: Richard M. <dr...@us...> - 2004-07-09 09:58:31
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27216 Modified Files: account.py invul.py Added Files: kill.py Log Message: Cleanups Also added the kill command to python. WARNING: char.kill() IS BROKEN! TypeError: onDeath() takes exactly 3 arguments (0 given) Program received signal SIGSEGV, Segmentation fault. cBaseChar::onDeath (this=0x91eb3e8, source=0x0, corpse=0x0) at basechar.cpp:2611 2611 Py_DECREF( args ); (gdb) bt #0 cBaseChar::onDeath (this=0x91eb3e8, source=0x0, corpse=0x0) at basechar.cpp:2611 #1 0x0806d859 in cBaseChar::kill (this=0x91eb3e8, source=0x0) at basechar.cpp:2891 #2 0x0806be25 in cBaseChar::damage (this=0x91eb3e8, type=DAMAGE_GODLY, amount=67, source=0x0) at basechar.cpp:2287 #3 0x081836bb in wpChar_kill (self=0x0, args=0x41cbf7c4) at basechar.h:976 #4 0x400b365c in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0 #5 0x41d2a0e0 in ?? () #6 0x41cbf7c4 in ?? () #7 0xbfffea6c in ?? () #8 0x400f0b22 in PyEval_GetFuncDesc () from /usr/lib/libpython2.3.so.1.0 #9 0x00000000 in ?? () #10 0x0823d500 in wpTooltipMethods () #11 0x08183670 in wpChar_resurrect () at utilities.h:61 Previous frame inner to this frame (corrupt stack?) --- NEW FILE: kill.py --- #===============================================================# # ) (\_ | WOLFPACK 13.0.0 Scripts # (( _/{ "-; | Created by: Dreoth # )).-' {{ ;'` | Revised by: # ( ( ;._ \\ ctr | Last Modification: Created #===============================================================# """ \command kill \description Kills the selected character. \notes You cannot kill invulnerable characters this way. """ import wolfpack def onLoad(): wolfpack.registercommand( "kill", commandKill ) return def commandKill(socket, cmd, args): socket.sysmessage( "Please select the target to kill." ) socket.attachtarget( "commands.kill.dokill", [] ) return True def dokill( char, args, target ): if target.char and not target.char.dead: if target.char.invulnerable: socket.sysmessage( "This target is invulnerable!" ) return False else: target.char.lightning() target.char.kill() return True Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** account.py 9 Jul 2004 09:00:09 -0000 1.6 --- account.py 9 Jul 2004 09:58:21 -0000 1.7 *************** *** 1,2 **** --- 1,8 ---- + #===============================================================# + # ) (\_ | WOLFPACK 13.0.0 Scripts + # (( _/{ "-; | Created by: Dreoth + # )).-' {{ ;'` | Revised by: + # ( ( ;._ \\ ctr | Last Modification: Created + #===============================================================# """ \command account *************** *** 42,46 **** import wolfpack.settings import string - from wolfpack.consts import * from wolfpack.utilities import hex2dec --- 48,51 ---- Index: invul.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/invul.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** invul.py 26 May 2004 13:07:21 -0000 1.3 --- invul.py 9 Jul 2004 09:58:21 -0000 1.4 *************** *** 1,5 **** ! ! import wolfpack ! """ \command invul --- 1,8 ---- ! #===============================================================# ! # ) (\_ | WOLFPACK 13.0.0 Scripts ! # (( _/{ "-; | Created by: ??? ! # )).-' {{ ;'` | Revised by: Dreoth ! # ( ( ;._ \\ ctr | Last Modification: Tweaks ! #===============================================================# """ \command invul *************** *** 15,29 **** """ def invul(socket, command, arguments): ! arguments = arguments.lower() ! if len(arguments) and arguments == '1' or arguments == 'on' or arguments == 'true': ! socket.player.invulnerable = 1 ! elif len(arguments) and arguments == '0' or arguments == 'off' or arguments == 'false': ! socket.player.invulnerable = 0 ! else: ! socket.player.invulnerable = not socket.player.invulnerable ! socket.sysmessage("'invul' is now '%u'" % socket.player.invulnerable) socket.player.resendtooltip() def onLoad(): ! wolfpack.registercommand('invul', invul) --- 18,31 ---- """ + import wolfpack + from wolfpack.utilities import booleantoggle + def invul(socket, command, arguments): ! socket.player.invulnerable = booleantoggle( socket.player.invulnerable ) ! socket.sysmessage( "Invulnerable is now '%i'." % socket.player.invulnerable ) socket.player.resendtooltip() + return True def onLoad(): ! wolfpack.registercommand( 'invul', invul ) ! return |
From: Richard M. <dr...@us...> - 2004-07-09 09:57:14
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27191/definitions Modified Files: scripts.xml Log Message: Kill Command Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** scripts.xml 9 Jul 2004 08:59:21 -0000 1.140 --- scripts.xml 9 Jul 2004 09:56:25 -0000 1.141 *************** *** 96,100 **** --- 96,102 ---- <script>commands.import</script> <script>commands.info</script> + <script>commands.invis</script> <script>commands.invul</script> + <script>commands.kill</script> <script>commands.password</script> <script>commands.restore</script> |
From: Richard M. <dr...@us...> - 2004-07-09 09:00:34
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17742 Modified Files: account.py Added Files: tele.py Log Message: Updates --- NEW FILE: tele.py --- """ \command tele \description Transports you directly to the targetted location. """ import wolfpack from wolfpack.consts import * def onLoad(): wolfpack.registercommand( "tele", commandTele ) return def commandTele( socket, cmd, args ): socket.sysmessage( 'Select your teleport destination.' ) socket.attachtarget( "commands.tele.teleport", [] ) return True def teleport( char, args, target ): source = char.pos # Keeps you from teleporting to weird places. if target.item and target.item.container: target = char.pos else: target = target.pos char.removefromview() char.moveto( target ) char.update() if char.socket: char.socket.resendworld() wolfpack.effect(0x3728, source, 10, 15) wolfpack.effect(0x3728, target, 10, 15) char.soundeffect(0x1fe) return True Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** account.py 9 Jul 2004 03:29:18 -0000 1.5 --- account.py 9 Jul 2004 09:00:09 -0000 1.6 *************** *** 1,3 **** - """ \command account --- 1,2 ---- |
From: Richard M. <dr...@us...> - 2004-07-09 08:59:30
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17610 Modified Files: scripts.xml Log Message: teleport Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** scripts.xml 9 Jul 2004 08:38:26 -0000 1.139 --- scripts.xml 9 Jul 2004 08:59:21 -0000 1.140 *************** *** 106,109 **** --- 106,110 ---- <script>commands.stat</script> <script>commands.tags</script> + <script>commands.tele</script> <script>commands.testlos</script> <script>commands.tile</script> |
From: Richard M. <dr...@us...> - 2004-07-09 08:59:03
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17519 Modified Files: commands.cpp Log Message: Teleport moved as well. Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.244 retrieving revision 1.245 diff -C2 -d -r1.244 -r1.245 *** commands.cpp 9 Jul 2004 08:37:45 -0000 1.244 --- commands.cpp 9 Jul 2004 08:58:54 -0000 1.245 *************** *** 301,316 **** /* - \command tele - \description Transports you directly to the targetted location. - */ - void commandTele( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( socket ); - Q_UNUSED( command ); - Q_UNUSED( args ); - socket->attachTarget( new cTeleTarget ); - } - - /* \command save \description Forces the world to be saved. --- 301,304 ---- *************** *** 1104,1108 **** { "STAFF", commandStaff }, { "SPAWNREGION", commandSpawnRegion }, - { "TELE", commandTele }, { "WHO", commandWho }, { NULL, NULL } --- 1092,1095 ---- |
From: Richard M. <dr...@us...> - 2004-07-09 08:39:50
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14744/webroot Modified Files: ChangeLog.wolfpack Log Message: Updates Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ChangeLog.wolfpack 9 Jul 2004 03:33:01 -0000 1.10 --- ChangeLog.wolfpack 9 Jul 2004 08:39:42 -0000 1.11 *************** *** 11,14 **** --- 11,15 ---- - Removed command: account - Removed command: resurrect + - Removed command: password * Definition Changes: - Fixed Sheep definitions *************** *** 23,26 **** --- 24,28 ---- - New command: account - New command: resurrect + - New command: password - Fixed carving - Fixed sheering of sheeps and wool regrowing |
From: Richard M. <dr...@us...> - 2004-07-09 08:38:34
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14515/definitions Modified Files: scripts.xml Log Message: Password moved to Python. Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** scripts.xml 8 Jul 2004 22:17:12 -0000 1.138 --- scripts.xml 9 Jul 2004 08:38:26 -0000 1.139 *************** *** 97,100 **** --- 97,101 ---- <script>commands.info</script> <script>commands.invul</script> + <script>commands.password</script> <script>commands.restore</script> <script>commands.resurrect</script> |
From: Richard M. <dr...@us...> - 2004-07-09 08:38:34
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14515/d/d Added Files: password.py Log Message: Password moved to Python. --- NEW FILE: password.py --- """ \command password \description Change your current password. \usage - <code>password [value]</code> Value is the new password for your account. Its length is limited to 16 characters. """ import wolfpack import wolfpack.accounts import string from wolfpack.consts import * # Loads the command def onLoad(): wolfpack.registercommand( 'password', commandPassword ) return # Handles the password command def commandPassword( socket, cmd, args ): char = socket.player args = args.strip() account = wolfpack.accounts.find( char.account.name ) if len(args) == 0: socket.sysmessage( "Usage: password <newpassword>" ) return False elif len( args ) > 0: password = args[0] if len( password ) > 16: socket.sysmessage( "Your password can have a maximum of 16 characters." ) return False else: account.password = password socket.sysmessage( "Your password has been changed." ) char.log( LOG_MESSAGE, "Account %s changed their password.\n" % char.serial ) return True else: socket.sysmessage( "Usage: password <newpassword>" ) return False |
From: Richard M. <dr...@us...> - 2004-07-09 08:37:54
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14368 Modified Files: commands.cpp Log Message: Password ported as well. Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.243 retrieving revision 1.244 diff -C2 -d -r1.243 -r1.244 *** commands.cpp 9 Jul 2004 08:24:28 -0000 1.243 --- commands.cpp 9 Jul 2004 08:37:45 -0000 1.244 *************** *** 819,849 **** /* - \command password - \description Change your current password. - \usage - <code>password [value]</code> - Value is the new password for your account. Its length is - limited to 30 characters. - */ - void commandPassword( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( command ); - if ( args.count() < 1 ) - { - socket->sysMessage( tr( "Usage: password <newpassword>" ) ); - return; - } - - QString password = args.join( " " ); - if ( password.length() > 30 ) - { - socket->sysMessage( tr( "Your password can have a maximum of 30 characters." ) ); - return; - } - - socket->account()->setPassword( password ); - socket->sysMessage( tr( "Your password has been changed." ) ); - } - - /* \command gmtalk \description Broadcast a message to connected gamemasters. --- 819,822 ---- *************** *** 884,888 **** enum DoorFacing { ! WestCW = 0, EastCCW, WestCCW, --- 857,861 ---- enum DoorFacing { ! WestCW = 0, EastCCW, WestCCW, *************** *** 1120,1124 **** { "PAGES", commandPages }, { "PAGENOTIFY", commandPageNotify }, - { "PASSWORD", commandPassword }, { "RELOAD", commandReload }, { "REMOVE", commandRemove }, --- 1093,1096 ---- |
From: Richard M. <dr...@us...> - 2004-07-09 08:24:37
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10954 Modified Files: commands.cpp Log Message: Removed the account command, now in Python! Yay! Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.242 retrieving revision 1.243 diff -C2 -d -r1.242 -r1.243 *** commands.cpp 9 Jul 2004 07:40:59 -0000 1.242 --- commands.cpp 9 Jul 2004 08:24:28 -0000 1.243 *************** *** 301,529 **** /* - \command account - \usage - <code>account create username password</code> - - <code>account remove username</code> - - <code>account set username key value</code> - - <code>account show username key</code> - Use the create subcommand to create a new account with the given username and password. - To remove an account along with all player characters on that account, use the remove - subcommand and pass the username to it. - To change properties of a given account, use the set subcommand and pass the username, - the property key and the new property value to it. See the notes for a list of valid property keys. - To view properties of an account, use the show subcommand and pass the property key to it. - - \notes The following properties can be set for accounts: - <i>password</i> - The account password. - - <i>acl</i> - The name of the access control list. - - <i>block</i> - Block status of the account. - - In addition to the writeable properties, the following properties can be shown: - - <i>loginattempts</i> - How many failed login attempts have been made since the last successful login. - - <i>lastlogin</i> - When was the last successful login made. - - <i>chars</i> - Prints a list of player characters on this account. - - Valid values for the block property are either on, off or for how long the account should be blocked. - - If you have enabled MD5 passwords, you can only view the hashed password when showing the password property. - */ - void commandAccount( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( command ); - // Account Create User Pass - // Account Remove User - // Account Set User Pass - // Account Show User Pass - if ( args.count() == 0 ) - { - socket->sysMessage( tr( "Usage: account <create|remove|set|show>" ) ); - return; - } - - QString subCommand = args[0].lower(); - - // Create Accounts - if ( subCommand == "create" ) - { - // Create a new account - if ( args.count() < 3 ) - { - socket->sysMessage( tr( "Usage: account create <username> <password>" ) ); - } - else if ( Accounts::instance()->getRecord( args[1].left( 30 ) ) ) - { - socket->sysMessage( tr( "Account '%1' already exists" ).arg( args[1].left( 30 ) ) ); - } - else - { - Accounts::instance()->createAccount( args[1].left( 30 ), args[2].left( 30 ) ); - socket->sysMessage( tr( "Account '%1' with password '%2' has been created" ).arg( args[1].left( 30 ) ).arg( args[2].left( 30 ) ) ); - } - } - - // Remove an Account and all associated characters - else if ( subCommand == "remove" ) - { - if ( args.count() < 2 ) - { - socket->sysMessage( tr( "Usage: account remove <username>" ) ); - } - else if ( !Accounts::instance()->getRecord( args[1].left( 30 ) ) ) - { - socket->sysMessage( tr( "Account '%1' does not exist" ).arg( args[1].left( 30 ) ) ); - } - else - { - cAccount* account = Accounts::instance()->getRecord( args[1].left( 30 ) ); - QValueVector<P_PLAYER> characters = account->caracterList(); - Accounts::instance()->remove( account ); - UINT32 i = 0; - for ( ; i < characters.size(); ++i ) - if ( characters[i] ) - characters[i]->remove(); - - socket->sysMessage( tr( "Account '%1' and %2 characters have been removed" ).arg( args[1].left( 30 ) ).arg( i + 1 ) ); - } - } - - // Set properties of accounts - else if ( subCommand == "set" ) - { - if ( args.count() < 4 ) - { - socket->sysMessage( tr( "Usage: account set <username> <key> <value>" ) ); - } - else if ( !Accounts::instance()->getRecord( args[1].left( 30 ) ) ) - { - socket->sysMessage( tr( "Account '%1' does not exist" ).arg( args[1].left( 30 ) ) ); - } - else - { - cAccount* account = Accounts::instance()->getRecord( args[1].left( 30 ) ); - QString key = args[2]; - QString value = args[3]; - - if ( key == "password" ) - { - account->setPassword( value.left( 30 ) ); // Maximum of 30 Chars allowed - socket->sysMessage( tr( "The password of account '%1' has been set to '%2'" ).arg( account->login() ).arg( value.left( 30 ) ) ); - } - else if ( key == "block" ) - { - if ( value.lower() == "on" ) - { - account->setBlocked( true ); - socket->sysMessage( tr( "Account '%1' has been blocked" ).arg( account->login() ) ); - } - else if ( value.lower() == "off" ) - { - account->setBlocked( false ); - socket->sysMessage( tr( "Account '%1' has been unblocked" ).arg( account->login() ) ); - } - else - { - bool ok = false; - UINT32 blockTime = hex2dec( value ).toUInt( &ok ); - - if ( ok ) - { - account->block( blockTime ); - socket->sysMessage( tr( "Account '%1' will be blocked for %2 seconds" ).arg( account->login() ).arg( blockTime ) ); - } - else - { - socket->sysMessage( tr( "Usage: account set <username> block <on|off>" ) ); - } - } - } - else if ( key == "acl" ) - { - if ( !Commands::instance()->getACL( value.latin1() ) ) - { - socket->sysMessage( tr( "You tried to specify an unknown acl '%1'" ).arg( value ) ); - } - else - { - account->setAcl( value ); - account->refreshAcl(); - } - } - else - { - socket->sysMessage( tr( "Unknown field '%1' for account '%2'" ).arg( args[2] ).arg( account->login() ) ); - } - } - } - // Show properties of accounts - else if ( subCommand == "show" ) - { - if ( args.count() < 3 ) - { - socket->sysMessage( tr( "Usage: account show <username> <key>" ) ); - } - else if ( !Accounts::instance()->getRecord( args[1].left( 30 ) ) ) - { - socket->sysMessage( tr( "Account '%1' does not exist" ).arg( args[1].left( 30 ) ) ); - } - else - { - cAccount* account = Accounts::instance()->getRecord( args[1].left( 30 ) ); - QString key = args[2]; - - if ( key == "password" ) - { - socket->sysMessage( tr( "The password of account '%1' is '%2'" ).arg( account->login() ).arg( account->password() ) ); - } - else if ( key == "block" ) - { - if ( account->isBlocked() ) - socket->sysMessage( tr( "Account '%1' is currently blocked" ).arg( account->login() ) ); - else if ( account->secsToUnblock() ) - socket->sysMessage( tr( "Account '%1' will be unblocked in %2 seconds" ).arg( account->login() ).arg( account->secsToUnblock() ) ); - else - socket->sysMessage( tr( "Account '%1' is currently not blocked" ).arg( account->login() ) ); - } - else if ( key == "loginattempts" ) - { - socket->sysMessage( tr( "There were %1 unsuccesul login attempts for account '%2'" ).arg( account->loginAttempts() ).arg( account->login() ) ); - } - else if ( key == "lastlogin" ) - { - socket->sysMessage( tr( "The last login of account '%1' was on %2" ).arg( account->login() ).arg( account->lastLogin().toString( Qt::ISODate ) ) ); - } - else if ( key == "acl" ) - { - socket->sysMessage( tr( "The acl of account '%1' is %2" ).arg( account->login() ).arg( account->acl() ) ); - } - else if ( key == "chars" ) - { - QStringList sCharList; - QValueVector<P_PLAYER> pCharList = account->caracterList(); - - for ( UINT32 i = 0; i < pCharList.size(); ++i ) - if ( pCharList[i] ) - sCharList.push_back( QString( "0x%1" ).arg( pCharList[i]->serial(), 8, 16 ) ); - - socket->sysMessage( tr( "Account '%1' has the following characters: %2" ).arg( account->login() ).arg( sCharList.join( ", " ) ) ); - } - else - { - socket->sysMessage( tr( "Unknown field '%1' for account '%2'" ).arg( args[2] ).arg( account->login() ) ); - } - } - } - } - - /* \command tele \description Transports you directly to the targetted location. --- 301,304 ---- *************** *** 1333,1355 **** stCommand cCommands::commands[] = { - { "ACCOUNT", commandAccount }, { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, { "SET", commandSet }, --- 1108,1129 ---- stCommand cCommands::commands[] = { { "ALLMOVE", commandAllMove }, ! { "ALLSHOW", commandAllShow }, ! { "ALLSKILLS", commandAllSkills }, ! { "BROADCAST", commandBroadcast }, ! { "DOORGEN", commandDoorGenerator }, ! { "FIX", commandFix }, ! { "GMTALK", commandGmtalk }, ! { "INVIS", commandInvis }, ! { "KILL", commandKill }, ! { "MOVE", commandMove }, ! { "PAGES", commandPages }, ! { "PAGENOTIFY", commandPageNotify }, ! { "PASSWORD", commandPassword }, ! { "RELOAD", commandReload }, ! { "REMOVE", commandRemove }, ! { "RESEND", commandResend }, ! { "RESTOCK", commandRestock }, ! { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, { "SET", commandSet }, |
From: Sebastian H. <dar...@us...> - 2004-07-09 07:41:10
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1534/commands Modified Files: resurrect.py Log Message: Fixes Index: resurrect.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/resurrect.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** resurrect.py 8 Jul 2004 22:14:04 -0000 1.1 --- resurrect.py 9 Jul 2004 07:41:02 -0000 1.2 *************** *** 3,8 **** \command resurrect \description Resurrects a character. ! \notes If the character is standing on his corpse he will regain<br /> ! all his posessions and equipment. """ --- 3,8 ---- \command resurrect \description Resurrects a character. ! \notes If the character is standing on his corpse he will regain ! all his posessions and equipment. """ *************** *** 33,37 **** target.char.soundeffect( 0x215 ) target.char.resurrect() ! char.log(LOG_MESSAGE, "0x%x resurrects character 0x%x.\n" % ( char.serial, target.char.serial ) ) # Restore the character as well, added bonus. target.char.hitpoints = target.char.maxhitpoints --- 33,37 ---- target.char.soundeffect( 0x215 ) target.char.resurrect() ! char.log(LOG_MESSAGE, "Resurrects character 0x%x.\n" % target.char.serial) # Restore the character as well, added bonus. target.char.hitpoints = target.char.maxhitpoints |
From: Sebastian H. <dar...@us...> - 2004-07-09 07:41:09
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1502 Modified Files: commands.cpp targetrequests.h Log Message: Removed resurrect from core. Index: targetrequests.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** targetrequests.h 6 Jul 2004 13:04:07 -0000 1.70 --- targetrequests.h 9 Jul 2004 07:40:59 -0000 1.71 *************** *** 147,169 **** }; - class cResurectTarget : public cTargetRequest - { - public: - virtual bool responsed( cUOSocket* socket, cUORxTarget* target ) - { - P_CHAR pChar = FindCharBySerial( target->serial() ); - - if ( !pChar ) - { - socket->sysMessage( tr( "This is not a living being." ) ); - return true; - } - - pChar->resurrect(); - return true; - } - }; - - class cKillTarget : public cTargetRequest { --- 147,150 ---- Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.241 retrieving revision 1.242 diff -C2 -d -r1.241 -r1.242 *** commands.cpp 6 Jul 2004 13:04:06 -0000 1.241 --- commands.cpp 9 Jul 2004 07:40:59 -0000 1.242 *************** *** 195,212 **** /* - \command resurrect - \description Resurrects a character. - \notes If the character is standing on his corpse he will regain - all his posessions and equipment. - */ - void commandResurrect( cUOSocket* socket, const QString& command, const QStringList& args ) throw() - { - Q_UNUSED( args ); - Q_UNUSED( command ); - socket->sysMessage( tr( "Select the being you want to resurrect" ) ); - socket->attachTarget( new cResurectTarget ); - } - - /* \command kill \description Kills the selected character. --- 195,198 ---- *************** *** 1365,1369 **** { "RESEND", commandResend }, { "RESTOCK", commandRestock }, - { "RESURRECT", commandResurrect }, { "SAVE", commandSave }, { "SERVERTIME", commandServerTime }, --- 1351,1354 ---- |
From: Richard M. <dr...@us...> - 2004-07-09 03:33:15
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7080/webroot Modified Files: ChangeLog.wolfpack Log Message: Updates Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChangeLog.wolfpack 8 Jul 2004 20:19:02 -0000 1.9 --- ChangeLog.wolfpack 9 Jul 2004 03:33:01 -0000 1.10 *************** *** 9,12 **** --- 9,14 ---- - Removed command: addevent - Removed command: removeevent + - Removed command: account + - Removed command: resurrect * Definition Changes: - Fixed Sheep definitions *************** *** 19,22 **** --- 21,26 ---- - New command: addevent - New command: removeevent + - New command: account + - New command: resurrect - Fixed carving - Fixed sheering of sheeps and wool regrowing *************** *** 31,34 **** --- 35,39 ---- - Reloading python too many times crashes the server. - There are still some memory leaks. + - Healers do not resurrect. Wolfpack 12.9.7 Beta |
From: Richard M. <dr...@us...> - 2004-07-09 03:29:31
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6056 Modified Files: account.py Log Message: Works a LOT better now, please remove from core! :D Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** account.py 8 Jul 2004 23:48:27 -0000 1.4 --- account.py 9 Jul 2004 03:29:18 -0000 1.5 *************** *** 41,49 **** import wolfpack import wolfpack.accounts import string from wolfpack.consts import * ! usage1 = "Usage: account [save,reload]" ! usage2 = "Usage: account [create,remove,set,show] username [(key,pass), value]" # Loads the command --- 41,54 ---- import wolfpack import wolfpack.accounts + import wolfpack.settings import string from wolfpack.consts import * + from wolfpack.utilities import hex2dec ! usage0 = "Account Command Usage:" ! usage1 = "- account create username password" ! usage2 = "- account remove username" ! usage3 = "- account set username key value" ! usage4 = "- account show username key" # Loads the command *************** *** 56,121 **** char = socket.player args = args.strip() ! # Command with arguments ! if len( args ) > 0: ! args = args.split( ' ' ) ! # Error Check ! if len( args ) >= 5: ! return False ! # One Argument ! if len( args ) == 1: ! ( action ) = args ! action = action.lower() ! # Reload Accounts ! if action == 'reload': ! char.log( LOG_MESSAGE, "0x%x reloaded accounts." % char.serial ) ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "0x%x saved accounts." % char.serial ) ! wolfpack.accounts.save() ! return True ! else: ! return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args ! action = action.lower() ! username = username.lower() ! # Remove Accounts ! if action == 'remove': ! accountRemove( socket, username ) ! return True ! # Three Arguments ! elif len( args ) == 3: ! ( action, username, key ) = args ! action = action.lower() ! username = username.lower() ! # Create Accounts ! if action == 'create': ! accountCreate( socket, username, key ) ! return True ! # Show Accounts ! elif action == 'show': ! accountShow( socket, username, key ) ! return True ! else: return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args ! action = action.lower() ! username = username.lower() ! key = key.lower() ! # Set Accounts ! if action.lower() == 'set': ! accountSet( socket, username, key, value ) ! return True else: return False ! # Error ! else: socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) return False --- 61,145 ---- char = socket.player args = args.strip() ! if len(args) == 0: ! socket.sysmessage( usage0 ) ! socket.sysmessage( usage1 ) ! socket.sysmessage( usage2 ) ! socket.sysmessage( usage3 ) ! socket.sysmessage( usage4 ) ! return False ! elif len( args ) > 0: ! # Command with arguments ! try: ! args = args.split( ' ' ) ! # Error Check ! if len( args ) >= 5: return False ! # One Argument ! if len( args ) == 1: ! action = args[0] ! action = action.lower() ! # Reload Accounts ! if action == 'reload': ! char.log( LOG_MESSAGE, "0x%x reloaded accounts.\n" % char.serial ) ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "0x%x saved accounts.\n" % char.serial ) ! wolfpack.accounts.save() ! return True ! else: ! return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args ! action = action.lower() ! username = username.lower() ! # Remove Accounts ! if action == 'remove': ! accountRemove( socket, username ) ! return True ! else: ! return False ! # Three Arguments ! elif len( args ) == 3: ! ( action, username, key ) = args ! action = action.lower() ! username = username.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: ! return False ! # Create Accounts ! if action == 'create': ! accountCreate( socket, username, key ) ! return True ! # Show Accounts ! elif action == 'show': ! accountShow( socket, username, key ) ! return True ! else: ! return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args ! action = action.lower() ! username = username.lower() ! key = key.lower() ! if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: ! return False ! # Set Accounts ! if action.lower() == 'set': ! accountSet( socket, username, key, value ) ! return True ! else: ! return False ! # Error else: return False ! except: ! socket.sysmessage( usage0 ) socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) + socket.sysmessage( usage3 ) + socket.sysmessage( usage4 ) return False *************** *** 153,156 **** --- 177,181 ---- char = socket.player characcount = wolfpack.accounts.find( char.account.name ) + account = wolfpack.accounts.find( username ) # Usernames and passwords are limited to 16 characters in length if len( username ) > 16 or len( password ) > 16: *************** *** 159,163 **** if len( password ) > 16: socket.sysmessage( "Error: Password exceeds the 16 character limit!" ) ! return True elif len( username ) == 0 or len( password ) == 0: if len( username ) == 0: --- 184,188 ---- if len( password ) > 16: socket.sysmessage( "Error: Password exceeds the 16 character limit!" ) ! return False elif len( username ) == 0 or len( password ) == 0: if len( username ) == 0: *************** *** 165,172 **** if len( password ) == 0: socket.sysmessage( "Error: Password is NULL!" ) ! return True # Check if the account exists else: - account = wolfpack.accounts.find( username ) if account: socket.sysmessage( "Error: Account %s exists!" % username ) --- 190,196 ---- if len( password ) == 0: socket.sysmessage( "Error: Password is NULL!" ) ! return False # Check if the account exists else: if account: socket.sysmessage( "Error: Account %s exists!" % username ) *************** *** 188,191 **** --- 212,216 ---- char = socket.player characcount = wolfpack.accounts.find( char.account.name ) + account = wolfpack.accounts.find( username ) # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username ) == 0: *************** *** 197,235 **** # Find the account else: - account = wolfpack.accounts.find( username ) if account: # Rank Checking ! if account.rank >= characcount.rank: socket.sysmessage( "Error: Your account rank does not permit this!" ) return False if key == 'acl': socket.sysmessage( "%s.acl = %s" % ( account.name, account.acl ) ) return True elif key == 'characters': socket.sysmessage( "%s.characters = %s" % ( account.name, account.characters ) ) return True elif key == 'flags': socket.sysmessage( "%s.flags = %s" % ( account.name, account.flags ) ) return True elif key == 'inuse': socket.sysmessage( "%s.inuse = %s" % ( account.name, account.inuse ) ) return True elif key == 'lastlogin': socket.sysmessage( "%s.lastlogin = %s" % ( account.name, account.lastlogin ) ) return True elif key == 'multigems': socket.sysmessage( "%s.multigems = %s" % ( account.name, account.multigems ) ) return True elif key == 'name': socket.sysmessage( "%s.name = %s" % ( account.name, account.name ) ) return True ! elif key == 'password': socket.sysmessage( "%s.password = %s" % ( account.name, account.password ) ) return True elif key == 'rank': socket.sysmessage( "%s.rank = %i" % ( account.name, account.rank ) ) return True else: ! socket.sysmessage( "Unknown account key!" ) return True # Failure to find the account --- 222,268 ---- # Find the account else: if account: # Rank Checking ! if account.rank >= characcount.rank and account.name != characcount.name: socket.sysmessage( "Error: Your account rank does not permit this!" ) return False if key == 'acl': socket.sysmessage( "%s.acl = %s" % ( account.name, account.acl ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.acl.\n" % ( char.serial, account.name ) ) return True elif key == 'characters': socket.sysmessage( "%s.characters = %s" % ( account.name, account.characters ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.characters.\n" % ( char.serial, account.name ) ) return True elif key == 'flags': socket.sysmessage( "%s.flags = %s" % ( account.name, account.flags ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.flags.\n" % ( char.serial, account.name ) ) return True elif key == 'inuse': socket.sysmessage( "%s.inuse = %s" % ( account.name, account.inuse ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.inuse.\n" % ( char.serial, account.name ) ) return True elif key == 'lastlogin': socket.sysmessage( "%s.lastlogin = %s" % ( account.name, account.lastlogin ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.lastlogin.\n" % ( char.serial, account.name ) ) return True elif key == 'multigems': socket.sysmessage( "%s.multigems = %s" % ( account.name, account.multigems ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.multigems.\n" % ( char.serial, account.name ) ) return True elif key == 'name': socket.sysmessage( "%s.name = %s" % ( account.name, account.name ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.name.\n" % ( char.serial, account.name ) ) return True ! elif key == 'password' and ( account.name == characcount.name or characcount.rank == 100 ): socket.sysmessage( "%s.password = %s" % ( account.name, account.password ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.password.\n" % ( char.serial, account.name ) ) return True elif key == 'rank': socket.sysmessage( "%s.rank = %i" % ( account.name, account.rank ) ) + char.log( LOG_MESSAGE, "0x%x requested %s.rank.\n" % ( char.serial, account.name ) ) return True else: ! socket.sysmessage( "Error: Unknown account key!" ) return True # Failure to find the account *************** *** 242,245 **** --- 275,279 ---- char = socket.player characcount = wolfpack.accounts.find( char.account.name ) + account = wolfpack.accounts.find( username ) # Usernames are limited to 16 characters in length if len( username ) > 16 or len( username ) == 0: *************** *** 251,261 **** # Find the account else: - account = wolfpack.accounts.find( username ) if account: ! if account.rank >= characcount.rank: socket.sysmessage( "Error: Your account rank does not permit this!" ) return False else: ! return True # Failure to find the account else: --- 285,351 ---- # Find the account else: if account: ! if account.rank >= characcount.rank and account.name != characcount.name: socket.sysmessage( "Error: Your account rank does not permit this!" ) return False else: ! # ACL ! if key == 'acl': ! if value in wolfpack.accounts.acls(): ! oldvalue = account.acl ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.acl ) ) ! account.acl == value ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) ! char.log( LOG_MESSAGE, "0x%x modified %s.acl.\n" % ( char.serial, account.name ) ) ! char.log( LOG_MESSAGE, "%s.acl = %s :: %s.flags = %s\n" % ( account.name, oldvalue, account.name, value ) ) ! return True ! else: ! socket.sysmessage( "Error: %s is not a valid account.acl!" % value ) ! return False ! # Flags ! elif key == 'flags': ! oldvalue = account.flags ! socket.sysmessage( "Previous: %s.flags = %s" % ( account.name, account.flags ) ) ! account.flags = hex2dec(value) ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.flags ) ) ! char.log( LOG_MESSAGE, "0x%x modified %s.flags.\n" % ( char.serial, account.name ) ) ! char.log( LOG_MESSAGE, "%s.flags = 0x%x :: %s.flags = 0x%x\n" % ( account.name, oldvalue, account.name, value ) ) ! return True ! # MultiGems ! elif key == 'multigems': ! if value.lower() == "true" or value.lower() == "false" or value == 1 or value == 0: ! oldvalue = value ! socket.sysmessage( "Previous: %s.acl = %s" % ( account.name, account.acl ) ) ! account.multigems == value ! socket.sysmessage( "Changed: %s.acl = %s" % ( account.name, account.acl ) ) ! char.log( LOG_MESSAGE, "0x%x modified %s.multigems.\n" % ( char.serial, account.name ) ) ! char.log( LOG_MESSAGE, "%s.multigems = %s :: %s.multigems = %s\n" % ( account.name, oldvalue, account.name, value ) ) ! return True ! else: ! socket.sysmessage( "Error: The account.multigems property must be boolean!" ) ! return False ! # Password ! elif key == 'password': ! if len( key ) > 16 or len( key ) == 0: ! if len( key ) > 16: ! socket.sysmessage( "Error: Password exceeds the 16 character limit!" ) ! if len( key ) == 0: ! socket.sysmessage( "Error: Password is NULL!" ) ! return False ! else: ! oldvalue = key ! account.password = key ! socket.sysmessage( "Changed: %s.password" % ( account.name, account.password ) ) ! char.log( LOG_MESSAGE, "0x%x modified %s.password.\n" % ( char.serial, account.name ) ) ! return True ! # READ ONLY VALUES ! elif key == 'name' or key == 'lastlogin' or key == 'inuse' or key == 'characters' or key == 'rank': ! char.log( LOG_MESSAGE, "0x%x attempted modification of read only value %s.%s.\n" % ( char.serial, account.name, key ) ) ! socket.sysmessage( "Error: The account.%s property is read only!" % key ) ! return False ! # Unknown ! else: ! socket.sysmessage( "Error: Unknown account property given!" ) ! return False # Failure to find the account else: |
From: Richard M. <dr...@us...> - 2004-07-08 23:48:36
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14966 Modified Files: account.py Log Message: More updates, documentation. All that is left to be done is setting information. I'll do that after my Karate class. :D Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** account.py 8 Jul 2004 23:24:16 -0000 1.3 --- account.py 8 Jul 2004 23:48:27 -0000 1.4 *************** *** 1,3 **** --- 1,42 ---- + """ + \command account + \description This command will modify account information. + \usage - <code>account create username password</code> + - <code>account remove username</code> + - <code>account set username key value</code> + - <code>account show username key</code> + Use the create subcommand to create a new account with the given username and password. + To remove an account along with all player characters on that account, use the remove + subcommand and pass the username to it. + To change properties of a given account, use the set subcommand and pass the username, + the property key and the new property value to it. See the notes for a list of valid property keys. + To view properties of an account, use the show subcommand and pass the property key to it. + \notes The following properties can be set for accounts: + <i>password</i> + The account password. + <br /> + <i>acl</i> + The name of the access control list. + <br /> + <i>block</i> + Block status of the account. + <br /> + In addition to the writeable properties, the following properties can be shown: + <br /> + <i>loginattempts</i> + How many failed login attempts have been made since the last successful login. + <br /> + <i>lastlogin</i> + When was the last successful login made. + <br /> + <i>chars</i> + Prints a list of player characters on this account. + <br /> + Valid values for the block property are either on, off or for how long the account should be blocked. + <br /> + If you have enabled MD5 passwords, you can only view the hashed password when showing the password property. + """ + import wolfpack import wolfpack.accounts *************** *** 162,165 **** --- 201,205 ---- # Rank Checking if account.rank >= characcount.rank: + socket.sysmessage( "Error: Your account rank does not permit this!" ) return False if key == 'acl': *************** *** 195,214 **** # Failure to find the account else: ! socket.sysmessage( "Failed to locate the given account!" ) ! return True # Sets account properties def accountSet( socket, username, key, value ): # Usernames are limited to 16 characters in length ! if len( username ) > 16: ! socket.sysmessage( "The given username exceeds the 16 character limit!" ) ! return True # Find the account else: account = wolfpack.accounts.find( username ) if account: ! return True # Failure to find the account else: ! socket.sysmessage( "Failed to locate the given account!" ) return True --- 235,263 ---- # Failure to find the account else: ! socket.sysmessage( "Error: Account %s could not be located!" % username ) ! return False # Sets account properties def accountSet( socket, username, key, value ): + char = socket.player + characcount = wolfpack.accounts.find( char.account.name ) # Usernames are limited to 16 characters in length ! if len( username ) > 16 or len( username ) == 0: ! if len( username ) > 16: ! socket.sysmessage( "Error: Username exceeds the 16 character limit!" ) ! if len( username ) == 0: ! socket.sysmessage( "Error: Username is NULL!" ) ! return False # Find the account else: account = wolfpack.accounts.find( username ) if account: ! if account.rank >= characcount.rank: ! socket.sysmessage( "Error: Your account rank does not permit this!" ) ! return False ! else: ! return True # Failure to find the account else: ! socket.sysmessage( "Error: Account %s could not be located!" % username ) return True |
From: Richard M. <dr...@us...> - 2004-07-08 23:32:40
|
Update of /cvsroot/wpdev/xmlscripts/definitions/regions/ilshenar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10384/ilshenar Modified Files: index.xml Log Message: Fix Index: index.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/regions/ilshenar/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.xml 8 Jul 2004 20:06:28 -0000 1.1 --- index.xml 8 Jul 2004 23:32:31 -0000 1.2 *************** *** 15,19 **** <include file="definitions/regions/ilshenar/towns/montor.xml" /> <include file="definitions/regions/ilshenar/towns/reg_volon.xml" /> ! <include file="definitions/regions/ilshenar/towns/savage_camps.xml" /> <include file="definitions/regions/ilshenar/towns/terort_skitas.xml" /> <!-- Dungeons --> --- 15,19 ---- <include file="definitions/regions/ilshenar/towns/montor.xml" /> <include file="definitions/regions/ilshenar/towns/reg_volon.xml" /> ! <include file="definitions/regions/ilshenar/towns/savage_camp.xml" /> <include file="definitions/regions/ilshenar/towns/terort_skitas.xml" /> <!-- Dungeons --> *************** *** 35,39 **** <include file="definitions/regions/ilshenar/dungeons/spider_forest.xml" /> <include file="definitions/regions/ilshenar/dungeons/spider_valley.xml" /> ! <include file="definitions/regions/ilshenar/dungeons/volanic_lair.xml" /> <include file="definitions/regions/ilshenar/dungeons/wisp_dungeon.xml" /> <!-- Misc. --> --- 35,39 ---- <include file="definitions/regions/ilshenar/dungeons/spider_forest.xml" /> <include file="definitions/regions/ilshenar/dungeons/spider_valley.xml" /> ! <include file="definitions/regions/ilshenar/dungeons/volcanic_lair.xml" /> <include file="definitions/regions/ilshenar/dungeons/wisp_dungeon.xml" /> <!-- Misc. --> |
From: Richard M. <dr...@us...> - 2004-07-08 23:31:34
|
Update of /cvsroot/wpdev/xmlscripts/definitions/regions/felucca/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/d/misc Added Files: moongates.xml Log Message: Forgot these. --- NEW FILE: moongates.xml --- <definitions> </definitions> |
From: Richard M. <dr...@us...> - 2004-07-08 23:31:34
|
Update of /cvsroot/wpdev/xmlscripts/definitions/regions/trammel/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/trammel/misc Added Files: moongates.xml Log Message: Forgot these. --- NEW FILE: moongates.xml --- <definitions> </definitions> |
From: Richard M. <dr...@us...> - 2004-07-08 23:29:05
|
Update of /cvsroot/wpdev/xmlscripts/definitions/regions/trammel/towns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9124/trammel/towns Modified Files: skara_brae.xml Log Message: Fix Index: skara_brae.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/regions/trammel/towns/skara_brae.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** skara_brae.xml 8 Jul 2004 19:14:50 -0000 1.1 --- skara_brae.xml 8 Jul 2004 23:28:26 -0000 1.2 *************** *** 22,24 **** </region> ! </definitions --- 22,24 ---- </region> ! </definitions> |
From: Richard M. <dr...@us...> - 2004-07-08 23:28:41
|
Update of /cvsroot/wpdev/xmlscripts/definitions/regions/felucca/towns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9124/d/towns Modified Files: skara_brae.xml Log Message: Fix Index: skara_brae.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/regions/felucca/towns/skara_brae.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** skara_brae.xml 8 Jul 2004 19:14:49 -0000 1.1 --- skara_brae.xml 8 Jul 2004 23:28:25 -0000 1.2 *************** *** 22,24 **** </region> ! </definitions --- 22,24 ---- </region> ! </definitions> |
From: Richard M. <dr...@us...> - 2004-07-08 23:24:25
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8092 Modified Files: account.py Log Message: Fix Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** account.py 8 Jul 2004 23:11:51 -0000 1.2 --- account.py 8 Jul 2004 23:24:16 -0000 1.3 *************** *** 131,139 **** account = wolfpack.accounts.find( username ) if account: ! socket.sysmessage( "An account with this name already exists!" ) return False # Create the Account elif not account: ! wolfpack.accounts.add( username, password ) socket.sysmessage( "You created the account successfully!" ) char.log( LOG_MESSAGE, "0x%x created account: %s\n" % ( char.serial, username ) ) --- 131,140 ---- account = wolfpack.accounts.find( username ) if account: ! socket.sysmessage( "Error: Account %s exists!" % username ) return False # Create the Account elif not account: ! newaccount = wolfpack.accounts.add( username, password ) ! newaccount.acl = 'player' socket.sysmessage( "You created the account successfully!" ) char.log( LOG_MESSAGE, "0x%x created account: %s\n" % ( char.serial, username ) ) *************** *** 141,145 **** # Failure else: ! socket.sysmessage( "Account creation failed!" ) return True --- 142,146 ---- # Failure else: ! socket.sysmessage( "Error: Account creation failed!" ) return True *************** *** 147,161 **** def accountShow( socket, username, key ): char = socket.player ! characcount = wolfpack.accounts.find( char.account ) ! key = key.lower() # Usernames are limited to 16 characters in length ! if len( username ) > 16: ! socket.sysmessage( "The given username exceeds the 16 character limit!" ) ! return True # Find the account else: account = wolfpack.accounts.find( username ) if account: ! # if account.rank >= characcount.rank: return False --- 148,164 ---- def accountShow( socket, username, key ): char = socket.player ! characcount = wolfpack.accounts.find( char.account.name ) # Usernames are limited to 16 characters in length ! if len( username ) > 16 or len( username ) == 0: ! if len( username ) > 16: ! socket.sysmessage( "Error: Username exceeds the 16 character limit!" ) ! if len( username ) == 0: ! socket.sysmessage( "Error: Username is NULL!" ) ! return False # Find the account else: account = wolfpack.accounts.find( username ) if account: ! # Rank Checking if account.rank >= characcount.rank: return False |
From: Richard M. <dr...@us...> - 2004-07-08 23:12:00
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4426 Modified Files: account.py Log Message: Updates, not finished. creating = segfault :X Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** account.py 3 Jul 2004 21:53:13 -0000 1.1 --- account.py 8 Jul 2004 23:11:51 -0000 1.2 *************** *** 11,93 **** def onLoad(): wolfpack.registercommand( 'account', commandAccount ) # Handles the account command def commandAccount( socket, cmd, args ): args = args.strip() ! if len(args) == 0: ! socket.sysmessage( usage1 ) ! socket.sysmessage( usage2 ) ! return True ! elif len( args ) > 0: ! try: ! args = args.split( ' ' ) ! if len( args ) == 1: ! ( action ) = args ! if action.lower() == 'reload': ! wolfpack.accounts.reload() ! return True ! elif action.lower() == 'save': ! wolfpack.accounts.save() ! return True ! elif len( args ) == 2: ! ( action, username ) = args ! if action.lower() == 'remove': ! accountRemove( socket, username ) ! return True ! elif len( args ) == 3: ! ( action, username, key ) = args ! if action.lower() == 'create': ! if len( key ) == 0: ! socket.sysmessage( "Error: Empty password!" ) ! return True ! else: ! accountCreate( socket, username.lower(), key ) ! return True ! elif action.lower() == 'show': ! accountShow( socket, username.lower(), key ) ! return True ! elif len( args ) == 4: ! ( action, username, key, value ) = args ! if action.lower() == 'set': ! accountSet( socket, username.lower(), key.lower(), value ) ! return True else: ! socket.sysmessage( usage1 ) ! socket.sysmessage( usage2 ) return True ! except: socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) ! return True # Removes an account def accountRemove( socket, username ): ! # Make sure username stays lowercased ! username = username.lower() # Usernames are limited to 16 characters in length ! if len( username ) > 16: ! socket.sysmessage( "The given username exceeds the 16 character limit!" ) ! return True # Check if the account exists/Delete else: account = wolfpack.accounts.find( username ) if account: ! account.delete() ! socket.sysmessage( "Removed account: %s" % username ) ! return True # Failure else: ! socket.sysmessage( "The given account name could not be found for removal!" ) ! return True # Creates a new account def accountCreate( socket, username, password ): ! username = username.lower() # Usernames and passwords are limited to 16 characters in length if len( username ) > 16 or len( password ) > 16: if len( username ) > 16: ! socket.sysmessage( "The given username exceeds the 16 character limit!" ) if len( password ) > 16: ! socket.sysmessage( "The given password exceeds the 16 character limit!" ) return True # Check if the account exists --- 11,129 ---- def onLoad(): wolfpack.registercommand( 'account', commandAccount ) + return # Handles the account command def commandAccount( socket, cmd, args ): + char = socket.player args = args.strip() ! # Command with arguments ! if len( args ) > 0: ! args = args.split( ' ' ) ! # Error Check ! if len( args ) >= 5: ! return False ! # One Argument ! if len( args ) == 1: ! ( action ) = args ! action = action.lower() ! # Reload Accounts ! if action == 'reload': ! char.log( LOG_MESSAGE, "0x%x reloaded accounts." % char.serial ) ! wolfpack.accounts.reload() ! return True ! # Save Accounts ! elif action == 'save': ! char.log( LOG_MESSAGE, "0x%x saved accounts." % char.serial ) ! wolfpack.accounts.save() ! return True else: ! return False ! # Two Arguments ! elif len( args ) == 2: ! ( action, username ) = args ! action = action.lower() ! username = username.lower() ! # Remove Accounts ! if action == 'remove': ! accountRemove( socket, username ) return True ! # Three Arguments ! elif len( args ) == 3: ! ( action, username, key ) = args ! action = action.lower() ! username = username.lower() ! # Create Accounts ! if action == 'create': ! accountCreate( socket, username, key ) ! return True ! # Show Accounts ! elif action == 'show': ! accountShow( socket, username, key ) ! return True ! else: ! return False ! # Four Arguments ! elif len( args ) == 4: ! ( action, username, key, value ) = args ! action = action.lower() ! username = username.lower() ! key = key.lower() ! # Set Accounts ! if action.lower() == 'set': ! accountSet( socket, username, key, value ) ! return True ! else: ! return False ! # Error ! else: socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) ! return False # Removes an account def accountRemove( socket, username ): ! char = socket.player ! characcount = wolfpack.accounts.find( char.account.name ) # Usernames are limited to 16 characters in length ! if len( username ) > 16 or len( username ) == 0: ! if len( username ) > 16: ! socket.sysmessage( "Error: Username exceeds the 16 character limit!" ) ! elif len( username ) == 0: ! socket.sysmessage( "Error: Username is NULL!" ) ! return False # Check if the account exists/Delete else: account = wolfpack.accounts.find( username ) if account: ! # Rank Protection ! if account.rank >= characcount.rank: ! socket.sysmessage( "Error: Your account rank does not permit this!" ) ! return False ! else: ! account.delete() ! socket.sysmessage( "Success: Account %s removed!" % username ) ! char.log( LOG_MESSAGE, "0x%x removed account: %s\n" % ( char.serial, username ) ) ! return True # Failure else: ! socket.sysmessage( "Error: Account %s does not exist for removal!" % username ) ! return False # Creates a new account def accountCreate( socket, username, password ): ! char = socket.player ! characcount = wolfpack.accounts.find( char.account.name ) # Usernames and passwords are limited to 16 characters in length if len( username ) > 16 or len( password ) > 16: if len( username ) > 16: ! socket.sysmessage( "Error: Username exceeds the 16 character limit!" ) if len( password ) > 16: ! socket.sysmessage( "Error: Password exceeds the 16 character limit!" ) ! return True ! elif len( username ) == 0 or len( password ) == 0: ! if len( username ) == 0: ! socket.sysmessage( "Error: Username is NULL!" ) ! if len( password ) == 0: ! socket.sysmessage( "Error: Password is NULL!" ) return True # Check if the account exists *************** *** 96,104 **** if account: socket.sysmessage( "An account with this name already exists!" ) ! return True # Create the Account elif not account: wolfpack.accounts.add( username, password ) socket.sysmessage( "You created the account successfully!" ) return True # Failure --- 132,141 ---- if account: socket.sysmessage( "An account with this name already exists!" ) ! return False # Create the Account elif not account: wolfpack.accounts.add( username, password ) socket.sysmessage( "You created the account successfully!" ) + char.log( LOG_MESSAGE, "0x%x created account: %s\n" % ( char.serial, username ) ) return True # Failure *************** *** 109,113 **** # Shows account properties def accountShow( socket, username, key ): ! username = username.lower() key = key.lower() # Usernames are limited to 16 characters in length --- 146,151 ---- # Shows account properties def accountShow( socket, username, key ): ! char = socket.player ! characcount = wolfpack.accounts.find( char.account ) key = key.lower() # Usernames are limited to 16 characters in length *************** *** 119,122 **** --- 157,163 ---- account = wolfpack.accounts.find( username ) if account: + # + if account.rank >= characcount.rank: + return False if key == 'acl': socket.sysmessage( "%s.acl = %s" % ( account.name, account.acl ) ) *************** *** 156,160 **** # Sets account properties def accountSet( socket, username, key, value ): - username = username.lower() # Usernames are limited to 16 characters in length if len( username ) > 16: --- 197,200 ---- |
From: Richard M. <dr...@us...> - 2004-07-08 22:17:20
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20694 Modified Files: scripts.xml Log Message: Update Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** scripts.xml 7 Jul 2004 21:54:17 -0000 1.137 --- scripts.xml 8 Jul 2004 22:17:12 -0000 1.138 *************** *** 77,80 **** --- 77,81 ---- <!-- Commands --> <script>commands</script> + <script>commands.account</script> <script>commands.action</script> <script>commands.add</script> *************** *** 97,100 **** --- 98,102 ---- <script>commands.invul</script> <script>commands.restore</script> + <script>commands.resurrect</script> <script>commands.serverinfo</script> <script>commands.skillinfo</script> |
From: Richard M. <dr...@us...> - 2004-07-08 22:14:13
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19737 Added Files: resurrect.py Log Message: Resurrect command moved to Python. --- NEW FILE: resurrect.py --- """ \command resurrect \description Resurrects a character. \notes If the character is standing on his corpse he will regain<br /> all his posessions and equipment. """ import wolfpack from wolfpack.consts import * def onLoad(): wolfpack.registercommand( "resurrect", resurrect ) return def resurrect( socket, command, arguments ): socket.sysmessage( "Whom do you wish to resurrect?" ) socket.attachtarget( "commands.resurrect.response", [] ) return def response( char, args, target ): if not target.char: char.socket.clilocmessage(503348) return False if not target.char.dead: char.socket.clilocmessage(501041) return False if target.char and target.char.dead: if target.char.serial != char.serial: char.turnto( target.char ) target.char.soundeffect( 0x215 ) target.char.resurrect() char.log(LOG_MESSAGE, "0x%x resurrects character 0x%x.\n" % ( char.serial, target.char.serial ) ) # Restore the character as well, added bonus. target.char.hitpoints = target.char.maxhitpoints target.char.mana = target.char.maxmana target.char.stamina = target.char.maxstamina target.char.update() return True else: char.socket.sysmessage( 'This object can not be resurrected!', GRAY ) return False return True |