Planeshift
|
00001 /* 00002 * tutorialmanager.h 00003 * 00004 * Copyright (C) 2006 Atomic Blue ([email protected], http://www.atomicblue.org) 00005 * 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation (version 2 of the License) 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 */ 00019 #ifndef __TUTORIALMANAGER_H__ 00020 #define __TUTORIALMANAGER_H__ 00021 00022 //============================================================================= 00023 // Crystal Space Includes 00024 //============================================================================= 00025 #include <iutil/document.h> 00026 00027 //============================================================================= 00028 // Project Includes 00029 //============================================================================= 00030 00031 //============================================================================= 00032 // Local Includes 00033 //============================================================================= 00034 #include "msgmanager.h" // Parent class 00035 00041 class TutorialManager : public MessageManager<TutorialManager> 00042 { 00043 public: 00044 00045 enum TutorEventType 00046 { 00047 CONNECT = 0, // First welcome to the game. 00048 MOVEMENT = 1, // Sentence on arrow keys and pan up/down. Tell to find npc in front and click on him. 00049 NPC_SELECT = 2, // You found our npc. Right-click to select any target, and it shows up in your target window. 00050 NPC_TALK = 3, // Whenever you have an intelligent npc targeted, you can talk to it and he will try to respond. Say hello to him now. 00051 QUEST_ASSIGN = 4, // You have now been assigned a task by the npc. Click the Q button to see your list of active quests. Now find a rat to your right. 00052 DAMAGE_SELF = 5, // You just got attacked and hit by a monster. Your percent of health (hit points) is shown in the red bar in your info window. 00053 DAMAGE_FALL = 6, // You just fell too far and hurt yourself. Don't take too much damage or you can die just from falling. 00054 DEATH_SELF = 7, // You have just died. In a few seconds, you will be transported to the Death Realm and you will have to escape it to come back to Yliakum. 00055 SPAWN_MOVE = 8, // gives various informations about the server like general rules for rp 00056 // ENEMY_SELECT = 9, // Now that you have a monster selected, you can attack it by pressing 'A' and watching it die. 00057 // ENEMY_DEATH = 10, // When you kill a monster, it is often carrying things you can use. Right-click and select the Hand to loot the monster. 00058 // LOOT_COMPLETE = 11 // Now that you picked up your loot, check your inventory by pressing 'I' and see that you have those items now. 00059 TUTOREVENTTYPE_COUNT 00060 }; 00061 00062 TutorialManager(ClientConnectionSet* pCCS); 00063 virtual ~TutorialManager(); 00064 00071 void HandleScriptMessage(uint32_t client, unsigned int which); 00072 00073 protected: 00075 void HandleConnect(MsgEntry* pMsg, Client* client); 00076 00078 void HandleMovement(MsgEntry* pMsg, Client* client); 00079 00081 void HandleTarget(MsgEntry* pMsg, Client* client); 00082 00084 void HandleDamage(MsgEntry* pMsg, Client* client); 00085 00087 void HandleDeath(MsgEntry* pMsg, Client* client); 00088 00090 void HandleGeneric(MsgEntry* pMsg, Client* client); 00091 00093 bool LoadTutorialStrings(); 00094 00096 void SendTutorialMessage(int which, Client* client, const char* instrs); 00097 void SendTutorialMessage(int which, uint32_t clientnum, const char* instrs); 00098 00099 ClientConnectionSet* clients; 00100 00107 csArray<csString> tutorialMsg; 00108 }; 00109 00110 #endif 00111