User Tag List

Results 1 to 6 of 6

Thread: Waypoints question

  1. #1
    Member
    Join Date
    Jul 2016
    Posts
    15
    XP
    176
    Level
    2
    Thanks
    0
    Thanked 1 Time in 1 Post

    Waypoints question

    So i'm looking into custom npc and waypoints.
    So i know how to load a waypoint for a npc and set it to be used.

    But for now i'm using the npc id as waypoint id but how do you do this if you want like different waypoints that a certain npc could use.

    More then one waypoint for a certain npc in the database.
    Kinda like all the diffrent guards have each a different waypoint but yet the npcid is the same for those guards? right? Or does every guard have a npc database entry?

  2. #2
    Exalted Member Syphex's Avatar
    Join Date
    Dec 2014
    Location
    Sweden GMT + 1
    Posts
    297
    XP
    169,093
    Level
    105
    Thanks
    50
    Thanked 37 Times in 29 Posts
    From what i have realized is that the npc has a speific id. so lets say you got 2 creatures "1" & "2"

    You create waypoint 3 and 4 on creature 1. then do the same on 2 then they will be 2 totally different way points.

    As they contain different ids but the points are the same.

    it works like this in the database.
    You have the tables Waypoints > Waypoint_Data

    In Waypoints you have the entry of the creature and the pointid.
    Pointid is linked to waypoint_data which define the the points which tells the npc where to go.

    Im really bad at explaining and im sorry for that but i hope you understand it, otherwise, you can go to trinitycore's website and read about this.
    Link - https://trinitycore.atlassian.net/wi...y/tc/waypoints

    Anyway, i'd suggest you try this out by yourself, as thats the best way you can learn it and understand it.

  3. #3
    Original Poster
    Member
    Join Date
    Jul 2016
    Posts
    15
    XP
    176
    Level
    2
    Thanks
    0
    Thanked 1 Time in 1 Post
    Is there a way to add waypoints to the database without reloading the table?

    I need some custom wp generated at the spot and then load those. But for now when i add the db entries i first have to do .reload waypoint_data for them to work.

  4. #4
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,859
    XP
    13,487
    Level
    35
    Thanks
    95
    Thanked 591 Times in 418 Posts
    if you cannot use MoveTo or was it MovePoint, then there is no way currently to create waypoints on the fly.
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

  5. #5
    Original Poster
    Member
    Join Date
    Jul 2016
    Posts
    15
    XP
    176
    Level
    2
    Thanks
    0
    Thanked 1 Time in 1 Post
    Is there a way for MoveTo to launch an event? or hook when they arrive at the spot?

  6. #6
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,859
    XP
    13,487
    Level
    35
    Thanks
    95
    Thanked 591 Times in 418 Posts
    Quote Originally Posted by LordSeaworth View Post
    Is there a way for MoveTo to launch an event? or hook when they arrive at the spot?
    Try using CREATURE_EVENT_ON_REACH_WP
    http://eluna.emudevs.com/Global/Regi...tureEvent.html
    ID from moveto is passed to the hook.
    Also the type in the hook is 6 or 8 or something for the moveto movement.
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •