|
|
| (44 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| − | {{PageHeaderChild|Content|Verify & Observe Live}} | + | {{PageHeaderChild|Admins|Content - Quest}} |
| | + | <br/> |
| | + | = LUA Functions: GetCurrentHP() = |
| | + | Returns the current '''current hit points''' of ''param''. The parameter can be either a player or the NPC currently being interacted with. |
| | | | |
| − | == Verify Locations ==
| + | [[LUA:GetFunctions|Back to LUA GetFunctions Index]] |
| − | Players familiar with Everquest II will expect to find their NPCs in the right place in our database because it is meant to mimick Live. Verifying an NPC is in the right place is a simple task, because 90% of the time, Collector found a static spawn standing where they belong. Most of the rest we have wanderers (NPCs that walk around), dead NPCs that got collected before they depopped, or situations where an NPC was chasing someone as you ran by with your collector going.
| |
| | | | |
| − | There is a very small percentage of spawns that are simply facing the wrong way due to a math glitch in the PacketParser being unable to determine heading.
| |
| | | | |
| | + | ==== Syntax ==== |
| | + | var = GetCurrentHP(param) |
| | | | |
| − | For these cases, we need to verify spawn locations. Below are two examples:
| + | Must be a reference to a player or NPC. |
| | | | |
| − | [[File:VerifyLocation1.jpg|500px]]
| |
| | | | |
| − | In this example, I moved a spawn completely to the wrong place just to show you that a Formidable Sparring Partner should not be standing by the tent. Since that guy is in the wrong place, you'll need to move him. Execute the command
| + | ==== Parameters ==== |
| − | /spawn move
| + | Required: ''param'' (int) |
| − | while you have the NPC targeted, and move to where you think he should go (by the other sparring partners in this case). Using the mouse-wheel, you can spin his heading too, just like placing furniture in your house!
| |
| | | | |
| | + | ''param'' must be one of the vars in the function params. In the example above, it would be either "NPC" or "Spawn" |
| | | | |
| − | [[File:VerifyLocation2.jpg|500px]]
| |
| | | | |
| − | The more common case are heading issues. NPCs, and other spawn types, can be facing the wrong way a bad parsing of data. The simple fix would be to grab the spawn, twirl it around and set it in the right place. But because we would like to be precise, it would be better to simply edit the spawns Heading parameter in the DB Editor->Spawns menu.
| + | ==== Usage ==== |
| | + | function hailed(NPC, Spawn) |
| | + | Say(NPC, "Your current hit points are " .. GetCurrentHP(Spawn) .. "!") |
| | + | end |
| | | | |
| − | [[File:VerifyLocation3.jpg|800px]]
| + | This makes the NPC respond to the player who hails it with the players current hit points. |
| | | | |
| − | Since you know the spawn is facing the wrong way, and you see his Heading is currently 0 (zero), simply type in 180 (for 180 degrees, 1/2 a circle) and save the row, then execute the
| |
| − | /reload spawns
| |
| − | command in-game and you'll see your sparring partner is now facing the right direction!
| |
| | | | |
| | + | == Notes == |
| | + | (optional) Additional notes or special instructions |
| | | | |
| − | == Verify Appearance ==
| |
| − | Recent changes to our Parsing process have resulted in much more dynamic Appearance options for our NPCs. Utilizing the EQ2Emulator's powerful ''randomize'' feature, we can spawn NPCs of many shapes and sizes '''and''' appearances (hair, beards, color of skin, shape of face/body, etc) all from a single spawn ID.
| |
| | | | |
| − | Check out the WIKI article on [[Database:Spawn#Randomize|Randomize]] for more information about this option. For the purpose of this discussion, we will assume all NPCs are spawned properly and their randomize options are '''not set'''.
| + | == Reference == |
| − | | + | (optional) Links to forum posts or other reference pertaining to this function |
| − | | |
| − | [[File:VerifyAppearance1.jpg|500px]]
| |
| − | | |
| − | Take our poor naked Sparring Partner for example. In EQ2 Live, he is definitely dressed in armor! If you check his '''npc_appearance_equip''' page in the DBEditor->Spawns menu, you'll see he has no entries, when he should. You can either dress him yourself, or return to the raw data to see what went wrong.
| |
| − | | |
| − | | |
| − | A more familiar Appearance problem would be bald heads, mis-shapen faces, incorrect races (evil races in good city areas), or missing skin (ewww!)
| |
| − | | |
| − | By missing skin, of course I just mean the color is lost. Spawns without skin_color settings are given 0,0,0 - or Black. They are pretty obvious to see, because no spawn should be 0,0,0 color - that is just too dark to even make out features.
| |
| − | | |
| − | | |
| − | Fixing these is important to the player's experience and the accuracy of our database.
| |
LUA Functions: GetCurrentHP()
Returns the current current hit points of param. The parameter can be either a player or the NPC currently being interacted with.
Back to LUA GetFunctions Index
Syntax
var = GetCurrentHP(param)
Must be a reference to a player or NPC.
Parameters
Required: param (int)
param must be one of the vars in the function params. In the example above, it would be either "NPC" or "Spawn"
Usage
function hailed(NPC, Spawn)
Say(NPC, "Your current hit points are " .. GetCurrentHP(Spawn) .. "!")
end
This makes the NPC respond to the player who hails it with the players current hit points.
Notes
(optional) Additional notes or special instructions
Reference
(optional) Links to forum posts or other reference pertaining to this function