355844 Write 12 Perl utility scripts

En curso Publicado Oct 3, 2009 Pagado a la entrega
En curso Pagado a la entrega

You must sign agreement transferring all rights to me

All Perls scripts related to manipulating characters data to backup/change/copy works on data which is in in /usr/games/[gamename]/var/[gamename-server/players directory.

Each player has separate directory under "players" dir.

To make it easy for you so you do not have to waist time on server installation configuration WMware image is prepared for you.

So all you have to do is to download free VMPlayer and run the file with it (after you download, it takes maybe 5 minutes to have it running.

You have all information about running server using VMPlayer here and to download server file here.

[url removed, login to view]

Utility Perl Scripts to write. Where below it says PHP you can either do it in Perl or PHP (for those it is your choice)

1. Write Perl script to parse the below file and copy all that information to MySQL database. For all items/objects which has images those images must be saved in DB.

Information copied to MySQL DB must have the same category tree structure like it is directory structure to have categories tree (category, sub-category etc)

This script is meant to be run each time after change to that file. It will take amount of time to process all files so make sure that information is saved first to temporary database and only after parse has finished successfully, main DB should be replaced with temporary.

Link to file

[url removed, login to view]

For purpose of later description let call this MySQL file Archetypes DB (ARCH DB)

2. Write separate Perl script which will allows adding/deleting any inventory item into/from game character inventory.

There must be a way to call this script from web with data in POST.

POST data sent to script must have all information needed to indentify item and character (to which inventory it must be added.

For security all calls must have hashed password which must match password stored in config file for this script.

Also Perl script must accept those post only from IP addressed listed in config file (maybe more than 1 allowed IP address). If post to add item is sent from unauthorized IP it should be ignored.

Script must reply with confirmation code that adding successful or with error code. Item must be added direct to character data on server.

3. Develop admin script for administration of in-game item. Script may be written in PHP

Must be 2 levels of admins. Main admin and sub-admin. Sub-admin can only browse and add items but can't delete them. Should be regular log for all actions done by admin and sub-admin (2 separate .txt logs)

Admin script must allow browse items from ARCH DB using category tree structure (categories and sub-categories), search for item by name, add/delete item to game character.

This script will be located on separate physical server so all actions operating on character inventory data must be performed through Perl script described in point 2

Connection to DB to browser item can be direct to MySQL connection.

4. Create separate character DB (maybe just separate table would enough).

Character record in this table must have following fields: character name, extra experience status (YES/NO), extra experience expiry date, extra coins (YES/NO), extra coins expiry date.

Create separate script accessing this database and storing data into this character DB (PHP or Perl)

There must be a way to call this script from web with data in POST.

POST data sent to script must have all information needed to indentify item and character (to which inventory it must be added.

For security all calls must have hashed password which must match password stored in config file for this script.

Also script must accept those post only from IP addressed listed in config file (maybe more than 1 allowed IP address). If command to add item is sent from unauthorized IP it should be ignored.

5. Create Perl backup script which will be run once per day from cron and backup all characters data from the server.

This backup script should perform 2 function:

- pack all data from $var directory (all characters data) and FTP it to backup server

6. Create restore script reading from FTP and then restoring date in that $var dir.

7. Create separate version of Perl backup script working only 1 character.

Script must be able to perform following functions:

- Read character data and send the date to external script. Must return data or error if character does not exists.

- Receive call to create character and create that character using data. If character already exist on server should just return error character_exist and do nothing else. If character successful crated must return success message. If other error should return other_error message.

- Remove character from server must return success or errir.

There must be a way to call this script from web with data in POST.

POST data sent to script must have all information needed to indentify item and character (to which inventory it must be added.

For security all calls must have hashed password which must match password stored in config file for this script.

Also script must accept those post only from IP addressed listed in config file (maybe more than 1 allowed IP address). If command to add item is sent from unauthorized IP it should be ignored.

8. Create separate version of Perl script from point 7 which will have only read function and will NOT read character password at all.

There must be a way to call this script from web with data in POST.

POST data sent to script must have all information needed to indentify item and character (to which inventory it must be added.

For security all calls must have hashed password which must match password stored in config file for this script.

Also script must accept those post only from IP addressed listed in config file (maybe more than 1 allowed IP address). If command to add item is sent from unauthorized IP it should be ignored.

9. Create separate PHP script which will display character info on webpage

Simple form with 2 fields: server name, character name. After submit PHP script will contact script from point 8 and display all character data on webpage.

Purpose of this script is that anybody can check character stat (do not display character password)

10. Separate character moving script (PHP or Perl) which will reside on separate physical server.

Purpose – move character from server to server.

Character moving script must get as parameters server1,server2,character name as input.

After that character data must be moved from server 1 to server 2 using several calls to Perl script described in Point 7 and for security reason should store all moved character data in movedcharacter MySQL database for 1 year.

Characters must be successfully created on target server2 before character is deleted from server 1

There must be a way to call this script from web with data in POST.

POST data sent to script must have all information needed to indentify item and character (to which inventory it must be added.

For security all calls must have hashed password which must match password stored in config file for this script.

Also script must accept those post only from IP addressed listed in config file (maybe more than 1 allowed IP address). If command to add item is sent from unauthorized IP it should be ignored.

11. Create simple PHP or Perl script which makes it possible for admin to transfer character from server 1 to server 2.

Basically this script will be front end to script from point 10. This script may be on totally different server so this is why it must use POST to execute script

12. Perl script checking how many players are currently playing. Basically script will return list of characters currently playing. For each player following info: location (name of them map on which character is currently playing), race, current in-game status ([peaceful, hosting), AFK (away from keyboard status)

here you can see information current available for character which you need to parse

[url removed, login to view]

There must be a way to call this script from web with data in POST.

POST data sent to script must have all information needed to indentify item and character (to which inventory it must be added.

For security all calls must have hashed password which must match password stored in config file for this script.

Also script must accept those post only from IP addressed listed in config file (maybe more than 1 allowed IP address). If command to add item is sent from unauthorized IP it should be ignored.

MySQL Odd Jobs Perl

Nº del proyecto: #2101677

Sobre el proyecto

Proyecto remoto Activo Jul 11, 2012