• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SQL][Release] Custom Portal

Seraphim

Noble Member
Hey, Emudevs!

So this is a unique form of SQL that someone taught me a while ago. Whoever they learned it from must have been a genius. That, or I'm just horrible at SQL!

Basically, what this portal does, is teleport a user to a secret zone within Ahn'Qiraj. But you're still outside the instance. It's a great place for a mall, and you can really change it as you see fit. :)

All you have to do is copy and paste it into a .txt document, change the file extension to .sql, and load it into your chosen software. I tend to use HeidiSQL.

Code:
SET

@GOB_Entry := 200000,
@GOB_Name := "Mall",
@GOB_Display := 6956,
@Event_scriptID := 200000,
@MAP := 1,
@X := -11840.558594,
@Y := -4757.416504,
@Z := 6.223837,
@O := 4.675663;

INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `size`, `data2`) 
VALUES (@GOB_Entry, 10, @GOB_Display, @GOB_Name, 1, @Event_scriptID);

INSERT INTO `event_scripts` (`id`, `command`, `datalong`, `x`, `y`, `z`, `o`) 
VALUES (@Event_scriptID, 6, @MAP, @X, @Y, @Z, @O);
 

Tommy

Founder
Hey, Emudevs!

So this is a unique form of SQL that someone taught me a while ago. Whoever they learned it from must have been a genius. That, or I'm just horrible at SQL!

Basically, what this portal does, is teleport a user to a secret zone within Ahn'Qiraj. But you're still outside the instance. It's a great place for a mall, and you can really change it as you see fit. :)

All you have to do is copy and paste it into a .txt document, change the file extension to .sql, and load it into your chosen software. I tend to use HeidiSQL.

Code:
SET

@GOB_Entry := 200000,
@GOB_Name := "Mall",
@GOB_Display := 6956,
@Event_scriptID := 200000,
@MAP := 1,
@X := -11840.558594,
@Y := -4757.416504,
@Z := 6.223837,
@O := 4.675663;

INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `size`, `data2`) 
VALUES (@GOB_Entry, 10, @GOB_Display, @GOB_Name, 1, @Event_scriptID);

INSERT INTO `event_scripts` (`id`, `command`, `datalong`, `x`, `y`, `z`, `o`) 
VALUES (@Event_scriptID, 6, @MAP, @X, @Y, @Z, @O);

Great release, thanks for sharing!

Whoever they learned it from must have been a genius.

To be honest, nobody is a genius when it comes to SQL. It is a simple language that too many people exaggerate about knowing, when it isn't THAT big of a deal.

Variables should only be used when you're using them in more than one query; otherwise, it is just a messy SQL query. Regardless, it is great to learn more about something you didn't know about in a certain language. :p
 

Seraphim

Noble Member
Well, that's good to hear. I think it's intimidating me because it's so simple. My first language was C++. And the amount of effort I had to put in to learn it deters me from learning something so simplistic.
 

Ladrek

Enthusiast
Great release, thanks for sharing!



To be honest, nobody is a genius when it comes to SQL. It is a simple language that too many people exaggerate about knowing, when it isn't THAT big of a deal.

Variables should only be used when you're using them in more than one query; otherwise, it is just a messy SQL query. Regardless, it is great to learn more about something you didn't know about in a certain language. :p

so i used this and good work but when i click it teleports me to my area i want it to be at but, a sec or 2 it sends me to a different lotion
 

Rochet2

Moderator / Eluna Dev
so i used this and good work but when i click it teleports me to my area i want it to be at but, a sec or 2 it sends me to a different lotion

make sure there are no other event scripts in event_scripts with the same ID
 
Top