Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: LoSyl on May 07, 2012, 08:39:55 pm

Title: [QUESTION] Creating a Teleport Quest
Post by: LoSyl on May 07, 2012, 08:39:55 pm
Hey guys.

I was searching quite a bit on this thing via google but i didn't managed it to follow the tutorials or guides. They were either outdated or just to hard to follow.^^

Well, my question is pretty simple.

I want to add a quest which teleports you to a specific location like somewhere in the woods or in a hidden basement. And I want to add this quest to a gameobject or a NPC, so everyone can just open up the window where you can end this quest and just get teleported.

I hope that I'm in the right forum-part and you know what I'm talking about. ^^


Thank you,
LoSyl

Additional informations:
For DBC editing (i'm a noob in this thing^^),  I'm using SQLyog.
And I'm using a Trinity Core at 3.5.5a.
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: XxXGenesisXxX on May 13, 2012, 01:08:07 pm
You are going to need a C++ script. Sorry I can't be of more use, I'm not the strongest with my C++ skills (also an ArcEmu user). But I'll post this here anyway and perhaps someone who is a good scripter, will get a chance to read and convert this simple lua script by hypersniper (WoW-V) into a similar C++ script.

Code: [Select]
function YourQuestName_Complete()
local plr=YourQuestNameGiver:GetClosestPlayer()
if ((plr:GetPlayerRace() == 2) or (plr:GetPlayerRace() == 5) or (plr:GetPlayerRace() == 6) or (plr:GetPlayerRace() == 8) or (plr:GetPlayerRace() == 10)) then
plr:Teleport(1, 1473.42, 4417.83, 25.235788, 0) -- Teleports horde
else
plr:Teleport(1, -8966.28, 511.21, 96.353706, 0) -- Teleport alliance
end
end

function YourQuestName_giver_load(Unit, event)
YourQuestNameGiver = Unit
end

RegisterQuestEvent(50002, 2, "YourQuestName_Complete")
RegisterUnitEvent(ENTER QUEST COMPLETER ENTRY ID HERE, 18, "YourQuestName_giver_load")

If no one does it within the next few days, I'll give it a go. But atm, I'm too hung over to figure it out lol.
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: LoSyl on May 13, 2012, 03:01:43 pm
Thank you, Genesis. ^_-

If someone knows how to integrate this script for using it on gameobjects or NPCs in Trinity (3.5.5a) please tell me. Would be cool. ;)
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: Supora on May 13, 2012, 03:12:47 pm
sorry for a little off-top but Genessis can I change a race of player by quest?
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: XxXGenesisXxX on May 13, 2012, 03:34:24 pm
All good LoSyl.

You could Supora; but it would be a lot of work and highly tedious to get it to 100% change. Almost anything is possible. If you make a topic people might be able to help or point you in the right direction.
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: Steff on May 13, 2012, 08:47:07 pm
I think you dont need a c++ script. i also do portals that are pined to GOs without any line off code. I will try this the next days.
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: XxXGenesisXxX on May 13, 2012, 08:58:55 pm
I'm intrigued. Should be interesting to see.
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: nevadies on December 05, 2013, 10:44:11 am
you Could use a Portal and SmartScript's to do all this, I Did this on Eternion-WoW.
It is very easy, take a little time and learn smartScript
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: ayahne on December 05, 2013, 02:24:23 pm
I agree with Steff that you dont need any scripting all You need to do is:
-create a spell (copy actual one with is teleport and add new entry id) and modify cordinates (read spell.dbc on wiki http://www.pxr.dk/wowdev/wiki/index.php?title=Spell.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=Spell.dbc" onclick="window.open(this.href);return false;)) EDIT. You need to edit some other rows tho i cant really tell You with one because i got own core and table name is just tele_template
-when everything is ready go to Quest template (paste "quest template" in google and find for Your core)
http://collab.kpsn.org/display/tc/Quest+template+tc2 (http://collab.kpsn.org/display/tc/Quest+template+tc2" onclick="window.open(this.href);return false;)

(http://imageshack.us/a/img62/4703/ou5l.png)
 add a spell to req spell cast and rew quest spell cast and You got it

I making boses trash istances everything that i want without using an script language.
Only for Honor exchanger, Arena wiever etc i making C++ scripts.

Later maybe i will make a short TuT for it :)

Greetings Ayahne


Edit,
If You got an troubles with finding a quest that have cast spell on start and cast spell on end just go around the world in game and search for one :)
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: deep6ixed on December 05, 2013, 05:36:03 pm
Does your database have a Table called Quest_Start_Scripts or Quest_End_Scripts?

you can make a script to teleport either at the acceptance or finishing of the quest with these, I can show you how.  This method takes no DBC editing.
Title: Re: [QUESTION] Creating a Teleport Quest
Post by: Romzarah on February 12, 2014, 04:19:24 pm
Got this somewhere, thanks to whoever made it. It's for game object and uses event_scrips dbc
Just change the GPS numbers and game object ids for where you want to tel.


/*
Remember to always use dots instead of commas in your numbers or the query will not work and you will get errors!
123.123 = CORRECT!
123,123 = WRONG!
*/

SET
@Entry = 999999,
@EventID = 989898,
@Map = 1.616, -- Replace with your teleport location Map ID
@PosX = 1.616, -- 4611.47 X
@PosY = 1.616, -- -3863.7 Y
@PosZ = 1.616, -- 944.186 Z
@Orient = 1.616; -- 1.11542

INSERT INTO gameobject_template (entry, type, displayID, name, size, data2) VALUES (@999999, 10, 4751, 1, @989898);
INSERT INTO event_scripts (id, command, datalong, x, y, z, o) VALUES (@989898, 6, @1, @4611.47, @3863.7, @944.186, @1.11542);