This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Creating a Teleport Quest  (Read 3713 times)

LoSyl

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 2
    • View Profile
[QUESTION] Creating a Teleport Quest
« 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #1 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

LoSyl

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 2
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #2 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. ;)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #3 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?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #4 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #5 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #6 on: May 13, 2012, 08:58:55 pm »
I'm intrigued. Should be interesting to see.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

nevadies

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 2
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #7 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ayahne

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 88
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #8 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.wowdev.wiki/index.php?title=Spell.dbc) 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


 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 :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

deep6ixed

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 189
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #9 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Romzarah

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 62
    • View Profile
Re: [QUESTION] Creating a Teleport Quest
« Reply #10 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);
« Last Edit: January 01, 1970, 01:00:00 am by Admin »