The Missing Piece (Teleport-Altep) Quest

Post Reply
User avatar
ssj4puar
Posts: 21
Joined: Tue May 26, 2015 12:02 am

The Missing Piece (Teleport-Altep) Quest

Post by ssj4puar » Thu Jul 09, 2015 12:22 pm

i started scripting this and realized i didnt know how to get the ???'s to appear for the KI in quicksand caves. So ive compiled a list of questions

question 1: Are the ???'s already created in the lua and/or npc_list table? if so which ones are they? is there a way to figure it out at all?

question 2: are there even 5 npc ???s or just 1 that we can move from one XYZ loc to another?

question 3: If they are not created, How would one go about creating/adding them to the game? where would i have to add scripts and table entries to get them to pop on the server?

question 4: is there any code at the moment that is a good example of how to get these ???'s to randomly appear? in the quest only 1 can be visible at a given time.

That all i can think of at the moment. Other than that i have the rest of the quest coded.

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by demolish » Thu Jul 09, 2015 6:34 pm

1) try to interact with the ???, if they dont have a script, you'll see an error in dsgame-server with the name of the missing npc's script, or just check npc_list for any qms near the coordinates where you'd find one in retail
2) check npc_list, you can also move their position using npc:setPos(x,y,z,rot);
3) see above
4) https://github.com/DarkstarProject/dark ... c%3AsetPos
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
ssj4puar
Posts: 21
Joined: Tue May 26, 2015 12:02 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by ssj4puar » Thu Jul 09, 2015 6:39 pm

demolish wrote:1) try to interact with the ???, if they dont have a script, you'll see an error in dsgame-server with the name of the missing npc's script, or just check npc_list for any qms near the coordinates where you'd find one in retail
Unfortunately i was unable to locate the point at any of the 5 locations. There are several ???'s for quicksand caves. does it matter which one i use or is it good as long as i dont use one that is already in use?

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by demolish » Thu Jul 09, 2015 6:45 pm

if it's not in use, just set its status to 0 in npc_list and it'll appear (gotta restart server though)
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: The Missing Piece (Teleport-Altep) Quest

Post by TeoTwawki » Fri Jul 10, 2015 11:32 am

It sounds like he needs the NPC's to appear and disappear, at various postilions. My memory is a bit fuzzy but I think that was the teleport altep quest, and the KI needed was at a random ??? NPC that could be one of several with not all of them up at once.

To appear:

Code: Select all

npc:setStatus(STATUS_NORMAL);
To disappear:

Code: Select all

npc:setStatus(STATUS_DISAPPEAR);
If you also need to change its position (which is prolly simpler than using retails multiple NPC's) or you can array the NPC IDs and switch which one is spawned:

Code: Select all

npc:setPos( X, Y, Z);
There are also time based command to set an npc spawned/hidden for specified durations. showNPC(time) and hideNPC(time) where time is the number of seconds.


See the files in this dir for every script-able command, mainly luabaseentity.cpp and luautils.cpp : https://github.com/DarkstarProject/dark ... rc/map/lua
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

User avatar
ssj4puar
Posts: 21
Joined: Tue May 26, 2015 12:02 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by ssj4puar » Fri Jul 10, 2015 11:35 am

Thank you all for the help.

Welp it took a bit but i finished scripting the quest. The random spawn points function. all the Key items goto the right places. Correct Rewards on completion. everything looks good to me. i imagine there is someone who has to review what ive done b4 it gets added. How do i go about commiting the code i've done?

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by demolish » Fri Jul 10, 2015 4:13 pm

commit your changes using appropriate labels for the commit (see https://github.com/DarkstarProject/dark ... l-requests )
fork the repo (see https://help.github.com/articles/fork-a-repo/)
push to your fork
create a pull request (see https://help.github.com/articles/creati ... l-request/ if you're not sure how to do so)
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
ssj4puar
Posts: 21
Joined: Tue May 26, 2015 12:02 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by ssj4puar » Fri Jul 10, 2015 5:16 pm

Not entirely familiar with creating forks/branches? with Source Control software. at the moment i think i have a branch called SSJ-Dev locally on my computer and there is an option to "Publish" which i think will push the fork/branch to the server.

However before i click something and over-write someone elses work on accident i'd like to make sure i've got the right idea.

Screen shot of current situation
http://gyazo.com/a49b17165ad38657944ba4cc678fdcb0

User avatar
ssj4puar
Posts: 21
Joined: Tue May 26, 2015 12:02 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by ssj4puar » Fri Jul 10, 2015 5:54 pm

skipped a few steps possibly when getting the files the 1st time. following the links you gave me to the letter now.

User avatar
ssj4puar
Posts: 21
Joined: Tue May 26, 2015 12:02 am

Re: The Missing Piece (Teleport-Altep) Quest

Post by ssj4puar » Fri Jul 10, 2015 11:09 pm

Ok i got it all figured out. Ill have to get the process i did down for the next change i make. kinda just fumbled around till it got committed to my fork. make a pull request to the master and i guess its a waiting game now.

Thank you everyone for all the help in getting me to understand how everything works!

Post Reply