Lua Functions to Set and Retrieve the Look of NPCs
Lua Functions to Set and Retrieve the Look of NPCs
I would like to implement the quests "A Discerning Eye" for each of the three starting nations and need a Lua function that would allow me to set the look of an NPC prior to making that NPC appear and also a function to retrieve the current look of an NPC for comparisons. Given that I'm not very familiar with the source to the map server and C++ has never been one of my strong suits I'd appreciate any help I can get from anyone able to assist. Thanks.
Re: Lua Functions to Set and Retrieve the Look of NPCs
You're probably better off playing around and looking in the source how things work than us trying to explain stuff to you..
Start with basic stuff like:
Example: Look how a spell is learned
Example: How a weaponskill is done
Then look at a gate guard and read the script on how a player starts the first mission. Follow it along on the ffxiclopedia and see how each NPC works and interacts with the player
Start with basic stuff like:
Example: Look how a spell is learned
Example: How a weaponskill is done
Then look at a gate guard and read the script on how a player starts the first mission. Follow it along on the ffxiclopedia and see how each NPC works and interacts with the player
-- Whasf
Re: Lua Functions to Set and Retrieve the Look of NPCs
I have all of that pretty well figured out. I even have a good idea about how I want to implement the quest. I don't think my original post was as clear as it could have been. What I need is one or two functions that I can call in a Lua script to set the look of an npc and also to retrieve the look of an npc. I'm pretty sure that something like that has not been implemented yet. And my not being totally familiar with C++ and the map server source is going to slow me down if I try to implement it myself, which I do intend to do after finishing tweaking the strange apparatus stuff I've been working on. It would be great if anyone more familiar would be able to either implement those functions or to suggest a starting point for me. I plan to spend quite a bit of time this weekend familiarizing myself with c++ syntax and the map source so I may not need to much help in the end... Figured it wouldn't hurt to ask if anyone out there is bored and looking for something to do.
Re: Lua Functions to Set and Retrieve the Look of NPCs
If you ever need to see what is/isn't exposed to Lua, you can reference the following files:
https://github.com/DarkstarProject/dark ... rc/map/lua
For entity specific stuff, see:
https://github.com/DarkstarProject/dark ... seentity.h
https://github.com/DarkstarProject/dark ... rc/map/lua
For entity specific stuff, see:
https://github.com/DarkstarProject/dark ... seentity.h
Re: Lua Functions to Set and Retrieve the Look of NPCs
they're there, i just forget the name of them
setskin maybe
setskin maybe
Re: Lua Functions to Set and Retrieve the Look of NPCs
Thanks for the info guys. I appreciate it.
Re: Lua Functions to Set and Retrieve the Look of NPCs
ah, it was setModelId and getModelId
Re: Lua Functions to Set and Retrieve the Look of NPCs
Thanks for pointing me towards those functions , but after looking at the source in lua_baseentity.cpp it appears that they only work with mobs. Is there a similar function for NPCs?
Re: Lua Functions to Set and Retrieve the Look of NPCs
there's not, since their look data is like 10 16 bit numbers instead of one (one for each equip slot)