Quick Question - Rune / NPC Game Object

Go down

Quick Question - Rune / NPC Game Object

Post by Slaphappy on Mon Jun 13, 2011 2:36 pm

Hello. First of all thanks for offering this up to the public. It is going to be nice on my server. I have a question about the two checkbox options:

Rune Spawns
Npc / gameobect spawns

What are they? I just want my teleporters to be located in different places around the world. I don't want players to have the option to open their bag and teleport whenever they want. They should have to run to the nearest teleporter and do it that way.

Is this how it already works? Should I check our uncheck those boxes?

Thanks again

P.S. Should I just leave all the values as default if I have a brand new fresh trinity core and database compiled yesterday? Should I change the "entry" field from 19000 to something else? Same for textid, gossip menu. Thanks!

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Mon Jun 13, 2011 7:20 pm

Good questions.

If you check Rune Spawns, you get the purple object on the ground to all main menu teleports, which include capital cities and gurubashi arena. (You always teleport to the center of it)
Seen in this pic:


Npc / gameobject spawns are just that if you selected your teleporter to be an NPC, you get the NPC spawned in all main city teleport locations, just like in the above picture (when you teleport, you will be facing the next location's teleporter)

You can check this video about the spawn locations in the end .. and some information about the teleporter:
https://youtu.be/SOKq1EAmV-k

Everything is not on all cores though. (that one was on mangos if I remember right)


Last edited by Rochet2 on Tue Jun 14, 2011 11:06 am; edited 1 time in total
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Mon Jun 13, 2011 7:24 pm

Ill test the DB values in a bit. .. just need to make sure by installing the DB first :3

Edit:
Trinity -> safe
Mangos with UDB -> safe


Last edited by Rochet2 on Mon Jun 13, 2011 8:17 pm; edited 1 time in total
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Mon Jun 13, 2011 7:54 pm

Excellent, thanks so much Rochet!

Right now I have my download like this:

Deleting Code (unchecked)
Options and scripts (checked)
Custom text (checked)

NPC Button selected

Entry 190000

Textid 300000
Gossip 50000

Summon Aura selected

NPC /Game Object spawns (checked)

Everything else is blank or unchecked.

So that should be fine, right?

I am going to try it right now on my development server.

And lets say I want to remove it because it stops working some day, with a new trinity revision, I just download the .sql with only 'delete code" checked?

Should I have anything else checked or just "delete code" when I want to get a file that will remove everything?

Thanks so much again! AWESOME JOB.

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Mon Jun 13, 2011 8:27 pm

So you dont want the aura on the ground eh?
Well anyways, those should be ok values if you have UDB or trinityDB.

Slaphappy wrote:
And lets say I want to remove it because it stops working some day, with a new trinity revision, I just download the .sql with only 'delete code" checked?

Should I have anything else checked or just "delete code" when I want to get a file that will remove everything?

You should now when you download check the Delete code, so it will be included in the SQL.
Then later you can just comment out or remove the insert into statements from the SQL and then run it. Or you can just take the delete from statements from the SQL and store them somewhere for deleting purpose.

This is cause I can change the creator at any time if the cores change something.

Here is an example on a deleting script taken from the SQL:
(basically remove ONLY the insert into statements)
Code:
DELETE FROM creature_template WHERE entry='190000';
DELETE FROM creature_template_addon WHERE Entry = '190000' ;
DELETE FROM gossip_menu WHERE entry>'50000'-1 AND entry<'50000'+9;
DELETE FROM npc_text WHERE ID>'300000'-1 AND ID<'300000'+5;
DELETE FROM gossip_menu_option WHERE menu_id>'50000'-1 AND menu_id<'50000'+9;
DELETE FROM gossip_scripts WHERE id>'50000'-1 AND id<'50000'+135;
delete from creature WHERE ID = '190000';
ALTER TABLE creature AUTO_INCREMENT=200000;
SET @RUNE := 194394;
delete from gameobject WHERE ID=@RUNE and guid>199999;
ALTER TABLE gameobject AUTO_INCREMENT=200000;
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Mon Jun 13, 2011 8:28 pm

A bit complicated eh?

Well .. I am not really good in organizing stuff :3
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Mon Jun 13, 2011 8:31 pm

Well no, it actually makes sense now that you explain it.

I will have the delete code that I need, because you could be changing it in the future, and it might not work on my old version.

So as long as I have it I can just comment the insert and run just the delete on mine and everything will go back to normal. It actually works just fine and makes good sense.

Thanks again. I really appreciate your hard work and also your willingness to answer questions.

THANKS!

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Tue Jun 14, 2011 10:53 am

Ut oh, I've got another question. Razz

How can I change the actual teleport NPC from the big human guy to that little circular disc I saw in the video?

It was just a little circle with some stuff shooting up from it. Smile

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Tue Jun 14, 2011 11:06 am

If you have trinity, then you need a C++ teleporter as it does not support GO gossip.
On mangos and Arcemu it is possible without c++.
(mangos = SQL, Arcemu = SQL + LUA)
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Tue Jun 14, 2011 11:14 am

Oh I'm on Trinity, so the only option is that human npc?

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Tue Jun 14, 2011 12:16 pm

Hmm, maybe I should rephrase that. Razz

I am willing to put some effort in finding another NPC that I would rather have, but just confused about what in the SQL code determines what NPC is displayed for the teleport guy. I would think I would be able to pick someone different since it is all SQL? But maybe I'm wrong. Hmmph.

Thanks. Smile

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Tue Jun 14, 2011 2:22 pm

Ugh never mind. Figured out I just have to replace the modelid.

But now I'm wondering if I can use modelid's that are used for something else, or do I have to find one that isn't used?

I don't think it matters right? Its just a model.

Awesome.

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Tue Jun 14, 2011 7:22 pm

You can use any NPC model ID.

All you need to do is to go to the database creature_template and replace the model, you dont need to download it again or modify the SQL code itself, although you can do that too..
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Tue Jun 14, 2011 7:42 pm

Thanks Rochet!

I got one more question but I don't want to bother you with it!



But unfortunately I cant figure it out. Ive tried it with the most recent TDB without any of my changes, and in my more up to date DB.

I am getting the 1048 id column cannot be null error when trying to put my on locations in.

I download the portal master with the "options and scripts" unchecked so I just get the blank slate.

Then I use the creator to make my own locations. I am getting the 1048 error whenever I try to put them into world db using heidisql.

THANKS! Laughing Laughing Laughing Laughing

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Tue Jun 14, 2011 8:41 pm

The teleport option creator is "designed" to add teleports if there already are some.

I have not been looking for any weird sql stuff to check if there are no teleports at all yet or anything like that, so it will just error out as it determines the ID field from the exsisting teleports.

You should now use the custom ID set to 1 if you want to create a new teleport to an empty portal master.


Last edited by Rochet2 on Tue Jun 14, 2011 9:13 pm; edited 1 time in total
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Tue Jun 14, 2011 8:42 pm

.. oh, so basically, if you selected "at the top" or "at the bottom" it will error.
Try selecting the custom and leave it to 1

Also, try changing the SQL
SET @SID := (SELECT id FROM smart_scripts WHERE entryorguid = '190000' ORDER BY id DESC LIMIT 1)+1;

to

SET @SID := 1;

Fixed the overlined part, it should now just set it to 1 if the thing is null.
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Wed Jun 15, 2011 7:12 am

Awesome Rochet!

Thanks so much - I am going to try it out in a couple of hours and I will let you know what happens!

Thanks a lot for all of your help and hard work. Smile Smile

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Wed Jun 15, 2011 5:09 pm

Okay... Smile

So I think I got it figured out.

For the first one I create I'm going to set the custom id to 1.

Then for all the rest just pick "add to bottom of list"

And I think it is working. Smile

Thanks so much! Going to double check in a second. Again I really appreciate all of your help and the hard work on this project. Smile

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Wed Jun 15, 2011 5:42 pm

OMG! One final question. /slaps self. Razz

So sorry. lmao.

Is it safe to delete everything I paste here if I want the portal master to start with no locations, and I want to add them myself?

ALTER TABLE creature AUTO_INCREMENT=200000;
INSERT INTO creature (id, map, spawnMask, phaseMask, modelid, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, curhealth, curmana) VALUES
('190000', 0, 1, 1, 0, -13180.5, 342.503, 43.1936, 4.32977, 25, 0, 13700, 6540),
('190000', 530, 1, 1, 0, -3862.69, -11645.8, -137.629, 2.38273, 25, 0, 13700, 6540),
('190000', 0, 1, 1, 0, -4898.37, -965.118, 501.447, 2.25986, 25, 0, 13700, 6540),
('190000', 0, 1, 1, 0, -8845.09, 624.828, 94.2999, 0.44062, 25, 0, 13700, 6540),
('190000', 1, 1, 1, 0, 1599.25, -4375.85, 10.0872, 5.23641, 25, 0, 13700, 6540),
('190000', 1, 1, 1, 0, -1277.65, 72.9751, 128.742, 5.95567, 25, 0, 13700, 6540),
('190000', 0, 1, 1, 0, 1637.21, 240.132, -43.1034, 3.13147, 25, 0, 13700, 6540),
('190000', 530, 1, 1, 0, 9741.67, -7454.19, 13.5572, 3.14231, 25, 0, 13700, 6540),
('190000', 571, 1, 1, 0, 5807.06, 506.244, 657.576, 5.54461, 25, 0, 13700, 6540),
('190000', 1, 1, 1, 0, 9866.83, 2494.66, 1315.88, 5.9462, 25, 0, 13700, 6540),
('190000', 0, 1, 1, 0, -14279.8, 555.014, 8.90011, 3.97606, 25, 0, 13700, 6540),
('190000', 530, 1, 1, 0, -1888.65, 5355.88, -12.4279, 1.25883, 25, 0, 13700, 6540);





Okay, lets say I download the portal master script with no options, etc, and I delete that part out of it. That should just delete all the places where it is going to spawn a portal master right? So I can just go put my own where I want.

Also, I am going to leave the line right above that which is:

delete from creature WHERE ID = '190000';

So lets say I do put my own in custom locations, then I want to remove them all someday, thats all I have to run right?

I really can't believe I'm asking you more questions. Maybe just IP ban me here on your forum. Smile

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Rochet2 on Wed Jun 15, 2011 7:30 pm

Lol, its so quiet here always anyways .. no one asks anything like this, they just have core and database problems or nothing like this.

This is simple, really has something to do with the downloads and so on.

So. This
Deleting all the insert into creature things like you say you would do is ok, but leave this part to the scripts, dont delete it:
ALTER TABLE creature AUTO_INCREMENT=200000;

So the deletion script actually looks like this:
delete from creature WHERE ID = '190000';
ALTER TABLE creature AUTO_INCREMENT=200000;

This is cause the GUID value is auto incremented and on all spawns it gets 1 bigger, but if you delete something, it wont. If you have not spawned anything after running the portal master, this should bring the guid back to it's original value.

So basically what you wrote is ok, but this is just a little bonus, which is not that important.
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Slaphappy on Thu Jun 16, 2011 5:22 pm

Thanks again Rochet. Smile

Slaphappy

Viestien lukumäärä : 12
Join date : 2011-06-13

Back to top Go down

Re: Quick Question - Rune / NPC Game Object

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum