- Joined
- Nov 30, 2007
- Messages
- 511
- Reaction score
- 0
Status:
Tested and retested. The current version works flawlessly, along with the commands posted to update the event's type, town, and status (on or off).
Tested and retested. The current version works flawlessly, along with the commands posted to update the event's type, town, and status (on or off).
Downloads:
You must be registered to see links
[FIXED]Download that & place it into your GameServer folder within the Solution Explorer. Place these into your NPCsScripts.h:
Code:
case 9000011: npc_9000011(npc); break;
case 9000000: npc_9000000(npc); break;
case 9000013: npc_9000013(npc); break;
case 9000001: npc_9000001(npc); break;
Code:
static void npc_9000011(NPC* npc);
static void npc_9000000(NPC* npc);
static void npc_9000013(NPC* npc);
static void npc_9000001(NPC* npc);
I finally figured out how to fetch information from the database, so things will be A LOT easier now. :]
I'm here to offer support if you need it. I haven't actually compiled the scripts yet so you may experience a few errors, but I'll get right on it.
Anyway, here they are. The event NPCs Paul, Andy, and Martin in Lith Harbour, Orbis, and Maple Island. (If there are more, PLEASE tell me, I can't think of any at the moment).
First, let's cover the database part.
Run this query in your database manager (SQLYog, Navicat, whatever):
Code:
DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
`type` int(1) NOT NULL,
`ID` int(1) NOT NULL,
`start` int(1) NOT NULL,
`town` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `events` VALUES ('0', '1', '0', '0');
Note: If you wish to have an NPC fetch anything new you might add, use the MySQL::getString,Int,etc. functions.
type = What type of event you're shooting for. You can set the event types to tell the NPC(s) what map to teleport the player wishing to enter the event to. The map can be set within the source, but I might just change this later on. (By default, there are 3 types set in the source, but you can increase it).
Values (so far): 0, 1, 2
ID = Nothing really. Just used to identify which record to target.
start = Indicates whether or not an event is on or not. I'm working on creating a command for GMs to be able to set do this so it can be controlled by people other than the server administrator.
Values: 0, 1
town = This indicates which town an event will take place in.
Values: 0, 1, 2, 3
0: All towns
1: Lith Harbour
2: Orbis
3: Maple
Basically, if you set the value to 0, 1, 2, or 3 the event NPC in that town or all towns will be activated.
Now, on to the source itself:
NOTE: WHEREVER IT SAYS TO PLACE A VALUE OTHER THAN WHAT'S ALREADY THERE, DO IT OR YOU'RE IN FOR A SERVER CRASH.
Downloads:
You must be registered to see links
[FIXED]Download that & place it into your GameServer folder within the Solution Explorer. Place these into your NPCsScripts.h:
Code:
case 9000011: npc_9000011(npc); break;
case 9000000: npc_9000000(npc); break;
case 9000013: npc_9000013(npc); break;
case 9000001: npc_9000001(npc); break;
Code:
static void npc_9000011(NPC* npc);
static void npc_9000000(NPC* npc);
static void npc_9000013(NPC* npc);
static void npc_9000001(NPC* npc);
Images:
With the 'town' field set to '0':
'town' field set to '1' (Lith):
Selection menu:
Choice 'Gotta go':
Choice 'I'd like to know more about the events.':
Being teleported to an event map specified in my own source:
Last edited: