notice Command (TitanMS 0.2.0)

Newbie Spellweaver
Joined
Aug 10, 2008
Messages
10
Reaction score
0
EDIT: I just found out this only shows up to the player using !notice, at the moment, so yeah. :|

I haven't seen anyone release this anywhere, so I thought I'd release it. (I'm sure it could be cleaned up or something but it gets the job done...)

In ChatHandler.cpp, find:
Code:
		else if(command == "horntail"){
				player->getMap()->getMobs()->spawnMob(8810000, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810001, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810002, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810003, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810004, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810005, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810006, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810007, player->getPosition().x, player->getPosition().y, -1, false);
				player->getMap()->getMobs()->spawnMob(8810008, player->getPosition().x, player->getPosition().y, -1, false);
		}

Add this after it:
Code:
	     else if(command == "notice"){
		     string notice;
		     notice = msg.substr(msg.find(" "));
		     player->send(PacketCreator().showMessage(notice, 0, true));
	     }
Change the 0 for different effects.
0 = Default "[Notice] " blue.
1 = Box message.
2 = White "GM" notice. (NAME : MESSAGE)
5 = Red notice.
EDIT: and 3 = Smega (NAME : MESSAGE)
 
Last edited:
Re: [Release] !notice Command (TitanMS 0.2.0)

wow!I have completely no idea on how to code the newer on the newest titan lol!Thanks for this!

Edit:So that means we can code the super mega just using this?
 
Re: [Release] !notice Command (TitanMS 0.2.0)

I get illegal else without matching IF and 'showMessage is not a memeber of PacketCreator'

*edit
Fixed it myself.
Thanks
 
Re: [Release] !notice Command (TitanMS 0.2.0)

wow!I have completely no idea on how to code the newer on the newest titan lol!Thanks for this!

Edit:So that means we can code the super mega just using this?

Yeppers :]
EDIT: Er, kinda? o.O

I get illegal else without matching IF and 'showMessage is not a memeber of PacketCreator'

*edit
Fixed it myself.
Thanks
What was wrong? :o
 
Re: [Release] !notice Command (TitanMS 0.2.0)

1>------ Build started: Project: TitanMS, Configuration: Debug Win32 ------
1>Compiling...
1>ChatHandler.cpp
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(181) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(186) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(191) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(196) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(201) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>Build log was saved at "file://c:\Users\Oscar\Desktop\TitanMS2.0.0\TitanMS2.0.0\trunk\src\TitanMS\Debug\BuildLog.htm"
1>TitanMS - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
 
Re: [Release] !notice Command (TitanMS 0.2.0)

1>------ Build started: Project: TitanMS, Configuration: Debug Win32 ------
1>Compiling...
1>ChatHandler.cpp
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(181) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(186) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(191) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(196) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\chathandler.cpp(201) : error C2039: 'showMessage' : is not a member of 'PacketCreator'
1> c:\users\oscar\desktop\titanms2.0.0\titanms2.0.0\trunk\src\titanms\packetcreator.h(53) : see declaration of 'PacketCreator'
1>Build log was saved at "file://c:\Users\Oscar\Desktop\TitanMS2.0.0\TitanMS2.0.0\trunk\src\TitanMS\Debug\BuildLog.htm"
1>TitanMS - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

update SVN, koolk changed showmassage to showmessage after I pointed it out several times ^-^
 
Back