Forum > Serverside Modding

[QUESTION] Creating a Teleport Quest

(1/3) > >>

LoSyl:
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.

XxXGenesisXxX:
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: ---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")
--- End code ---

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.

LoSyl:
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. ;)

Supora:
sorry for a little off-top but Genessis can I change a race of player by quest?

XxXGenesisXxX:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version