PDA

View Full Version : Custom gameobject and how to make them spawn (ALSO HOW TO MAKE A WORKING GATE)


kolklik
12-05-2007, 04:41 PM
Credits go to me, for doing this. ok.

First of, i would surgest you download my custom gate. Its two files since its the game object it self, and the spawn table.

Your Download-Link #1: http://rapidshare.de/files/37980430/gameobject_names.sql.html


Your Download-Link #1: http://rapidshare.de/files/37980622/gameobject_spawns.sql.html

Ok, your done yet? Great!


Now lets get this over with shall we?

1. Open the "gameobject_names.sql" you just downloaded.
Once open you will see this

/*
MySQL Data Transfer
Source Host: localhost
Source Database: ascent
Target Host: localhost
Target Database: ascent
Date: 12/5/2007 6:01:14 PM
*/

SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for gameobject_names
-- ----------------------------
CREATE TABLE `gameobject_names` (
`entry` int(10) unsigned NOT NULL default '0',
`Type` int(10) unsigned NOT NULL default '0',
`DisplayID` int(10) unsigned NOT NULL default '0',
`Name` varchar(100) character set utf8 collate utf8_unicode_ci NOT NULL,
`spellfocus` int(10) unsigned NOT NULL default '0',
`sound1` int(10) unsigned NOT NULL default '0',
`sound2` int(10) unsigned NOT NULL default '0',
`sound3` int(10) unsigned NOT NULL default '0',
`sound4` int(10) unsigned NOT NULL default '0',
`sound5` int(10) unsigned NOT NULL default '0',
`sound6` int(10) unsigned NOT NULL default '0',
`sound7` int(10) unsigned NOT NULL default '0',
`sound8` int(10) unsigned NOT NULL default '0',
`sound9` int(10) unsigned NOT NULL default '0',
`unknown1` int(10) unsigned NOT NULL default '0',
`unknown2` int(10) unsigned NOT NULL default '0',
`unknown3` int(10) unsigned NOT NULL default '0',
`unknown4` int(10) unsigned NOT NULL default '0',
`unknown5` int(10) unsigned NOT NULL default '0',
`unknown6` int(10) unsigned NOT NULL default '0',
`unknown7` int(10) unsigned NOT NULL default '0',
`unknown8` int(10) unsigned NOT NULL default '0',
`unknown9` int(10) unsigned NOT NULL default '0',
`unknown10` int(10) unsigned NOT NULL default '0',
`unknown11` int(10) unsigned NOT NULL default '0',
`unknown12` int(10) unsigned NOT NULL default '0',
`unknown13` int(10) unsigned NOT NULL default '0',
`unknown14` int(10) unsigned NOT NULL default '0',
UNIQUE KEY `entry` (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Gameobject System';

-- ----------------------------
-- Records
-- ----------------------------

INSERT INTO `gameobject_names` VALUES ('12345678', '0', '411', 'Gm Gate', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');

It seems like a lot, i know. But its not that bad. We'll be focusing at the Record(s).

ill explain what the diffrent values is for.

'12345678' is the entry id. Make this what ever you would like. I highly recommand a high number like 12345678 since theres already a lot of game objects in the database.

'0' is type. Im not sure what the diffrent types is actually, but you can always look in your database. For example, if you want to make a custom spring (dunno why, but lets say you want to (wierdo)) You look for a already made spring in the gameobject_names table and find the "type" it says. But leave as 0 for a gate.

'411' is the displayid, theres TONS of displayids and you can find them by typing .go select .go info ingame, or look in the database.

'Gm gate' is the name of your custom game object. put what ever you want.

'0' is spellfocus i suppose this is if you want your game object to do somethign on click. fx cast chain lightning or something els. Like, make a tomb that cast 32111 (finger of death that does 20000damage) when its clicked on. ANYWAY.

'0' is sound1

'0' is sound2

'0' is sound3

'0' is sound4

'0' is sound5

'0' is sound6

'0' is sound7

'0' is sound8

'0' is sound9

'0' is unknown1

'0' is unknown2

'0' is unknown3

'0' is unknown4

'0' is unknown5

'0' is unknown6

'0' is unknown7

'0' is unknown8

'0' is unknown9

'0' is unknown10

'0' is unknown11

'0' is unknown12

'0' is unknown13

'0' is unknown14

I wouldnt recommand changing those unknown if you dunno what they do (and i dont tbh) . The sounds is used for making your game object say some strange sound when its used.


-------------------------------------------------------------------------------


THE GAMEOBJECT_SPAWN.sql

Open the file.

inside it you'll see /*
MySQL Data Transfer
Source Host: localhost
Source Database: ascent
Target Host: localhost
Target Database: ascent
Date: 12/5/2007 6:01:33 PM
*/

SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for gameobject_spawns
-- ----------------------------
CREATE TABLE `gameobject_spawns` (
`id` int(11) unsigned NOT NULL auto_increment,
`Entry` int(10) unsigned NOT NULL default '0',
`map` int(10) unsigned NOT NULL default '0',
`position_x` float NOT NULL default '0',
`position_y` float NOT NULL default '0',
`position_z` float NOT NULL default '0',
`Facing` float NOT NULL default '0',
`orientation1` float NOT NULL default '0',
`orientation2` float NOT NULL default '0',
`orientation3` float NOT NULL default '0',
`orientation4` float NOT NULL default '0',
`State` int(10) unsigned NOT NULL default '0',
`Flags` int(10) unsigned NOT NULL default '0',
`Faction` int(10) unsigned NOT NULL default '0',
`Scale` float NOT NULL default '0',
`stateNpcLink` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `Map` (`map`)
) ENGINE=MyISAM AUTO_INCREMENT=33875 DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs PACK_KEYS=0 ROW_FORMAT=FIXED COMMENT='Spawn System';

-- ----------------------------
-- Records
-- ----------------------------

INSERT INTO `gameobject_spawns` VALUES ('12345678', '12345678', '0', '-9253.08', '-3404.9', '104.348', '0.547548', '0.014522', '-0.044873', '0.27015', '0.961662', '1', '0', '0', '1', '0');

The '12345678' is the id. This is just a random number you pick, make sure its high tho.

The secound '12345678' is the entry id. This HAS to be the one you used in the gameobject_names els it wont work.

the '0' is mapid. 0 is kalimdor 1 is easter kingdom, and 530 is outland (and the dranei and blood elf place if i remember correctly!)

'-9253.08' is x cordinate.

'-3404.9' is y cordinate.

'104.348' is z cordinate.

'0.547548' is facing (the way its facing. You will also see this in the .gps. So make sure you are facing the way you want your object to.

'0.014522' is orientation1
'-0.044873' is orientation2
'0.27015' is orientation3
'0.961662' is orientation4

im not 100% sure what these does, but just put it as something like they are. Dont think they will matter much. Maybe change the direction your item is facing by half a degree.

Change these to where you want your custom game object spawned. (find the cordinates by typeing .gps ingame when you stand where you want the object to spawn.)

'1' is state leave this to 1.

'0' is flags. Leave it to 0.

'0' is faction. just leave it to 0 if you want your gameobject to be friendly towards everybody (i dunno how it works if you make it alliance only. TRY that at OWN risk)

'1' is the scale of your item, i wouldnt surgest going higher than 10 since it can cause a bit of lag. 1 = the standart scale of the displayid. this is normaly ok.

the last '0' is statenpclink is dont have any clue what so ever about this, so leave it 0.

hope this was any help at all. And if you just want a damn gate, you are more than welcome to use my default onces. You do need to change cordinates and map id tho.

If you think this is hard to understand, you are more than welcome to rewrite it so its easier to figure out, just give credit where credit is due.

Golepa
12-05-2007, 04:59 PM
This guide needs to be cleaned up. :P

Tables structures nor their downloads are not needed and text can be a little bit more clear. (Some people asks for help anyway)

kolklik
12-05-2007, 05:02 PM
haha as it states in the buttom "If you think this is hard to understand, you are more than welcome to rewrite it so its easier to figure out, just give credit where credit is due." gogo mate ;)


btw, the download links is for people who just want a standard custom gate for there server :) and to show people how it looks really :)

Golepa
12-05-2007, 05:11 PM
If they want your gate, they are stupid enough to execute whole query, including the table structure and wonder why nothing works. xD

doublehex
12-05-2007, 05:13 PM
lol hes right, you need to fix up your guide

kolklik
12-05-2007, 05:13 PM
Nah mate, theres only the "gate records" in the files. so what ever they do, they cant fuck it up tbh :) lol hes right, you need to fix up your guide
You are more than welcome to do it. I dont have time at the moment, some of us got homework /bah :(

doublehex
12-05-2007, 05:16 PM
the
'0' is sound1

'0' is sound2

'0' is sound3

'0' is sound4

'0' is sound5

'0' is sound6

'0' is sound7

'0' is sound8

'0' is sound9

'0' is unknown1

'0' is unknown2

'0' is unknown3

'0' is unknown4

'0' is unknown5

'0' is unknown6

'0' is unknown7

'0' is unknown8

'0' is unknown9

'0' is unknown10

'0' is unknown11

'0' is unknown12

'0' is unknown13

'0' is unknown14 is not really needed, it will just end up confusing some people, just tell them to leave the rest at '0' and only change it if they know how to


ok ill work on fixing it but imkinda busy too but ill try

kolklik
12-05-2007, 05:18 PM
your right. But for some people, (like me) its even more confusing when people just say "leave it be unless you know what it is" 0o how am i suppose to know if you dont tell me 0o ?? so thats the reason really :P

ggace
12-05-2007, 05:43 PM
guides are meant to be in depth.. It's fine. Good work. +rep

kolklik
12-05-2007, 06:15 PM
Thank you ggace.

LanceDH
12-05-2007, 08:58 PM
Just scrolled trough it fast and didn't see annything about making a key for the gate, am I right ?

kolklik
12-06-2007, 01:03 PM
hm actually ye, :O i must've forgot it :O anyway, ill try look for it .

that part is propaly going to be included in a little while, :P

Terrorblade
12-06-2007, 01:09 PM
Why dont you just put the guide in the download?

kolklik
12-06-2007, 02:10 PM
Because its not for download, if you want it downloaded, copy past it to a txt document.. its not a gift shop tbh. anyway, the key part isnt that easy to figure out. Ive been messing a bit with keys, and the only link between the gate and the key i can see, is that the key uses a spell called 3366 (opening) 0o i cant seem to find anything els.... ?? so... guess there wont be any key. Never the less. I cannot bother anymore with this guide since i got my own server to fix, and a public server to make sure is running.