Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Flash Multiplayer Virtual Worlds

You're reading from  Flash Multiplayer Virtual Worlds

Product type Book
Published in Aug 2010
Publisher Packt
ISBN-13 9781849690362
Pages 412 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Flash Multiplayer Virtual Worlds
Credits
About the Author
About the Reviewers
1. Preface
1. Developing Flash Virtual World 2. Installing the Servers 3. Getting Familiar with SmartFoxServer 4. Creating Map and Ground in Isometric View 5. Creating Avatars 6. Walking Around the World 7. Creating Buildings and Environments in the Virtual World 8. Creating an Inventory System 9. Communicating with Other Players 10. Interacting with NPC 11. Designing Quests 12. Social Community 13. Deploying and Maintaining Flash Virtual World

Completing quests


There are several ways to complete a quest. In the previous example, the player completes the quest by talking to the NPC or adding friends. We can complete a quest anywhere and dispatch a complete event to inform the monitoring quest daemon.

Another common method to complete a quest is to hand in an item that the NPC needs. A panel will pop up for the player to hand in some items. The panel is basically the same as the selling item panel that was discussed in the last chapter except that now we are giving a specific item to NPC instead of selling any items. Therefore, the only difference between this panel and the selling panel is that we need to check if the submit item is what NPC needs. The NPC's desired item type is stored in daemon manager as waitingItemType. In the following code, players are required to submit a duck item to the NPC:

private function handinItem(e:MouseEvent):void {
var itemList:Array = Myself.instance.itemList;
var targetItem:ItemData = itemList...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}