View previous topic :: View next topic |
Author |
Message |
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sat Mar 10, 2007 22:28 Post subject: |
|
|
wmbc9040op wrote: | I cannot seem to get the function plugin working right. Server version is 1.68 (build 8099)
With the demo module included the SetLockUnlockDC and SetStolenFlag_ do not change the values. I haven't checked any of the functions beyond what is in the demo module.
I notice in the code there is a DebugMe and ObjDump. I do not know how to use them, can someone explain to me what I need to do to use these from a nwn script?
Thanks for any help you can give. Also thank you for all the work you have done on getting these working for linux. I am using the chat, resman, and odbc and am very happy with them. I have the reset installed but have not used it yet. Great work. | SetLockUnlockDC and SetStolenFlag were removed because the same functions had been added in NWN 1.67.
DebugMe and ObjDump are for debugging. They may be useful only to NWNX developers. |
|
Back to top |
|
|
wmbc9040op
Joined: 10 Mar 2007 Posts: 6
|
Posted: Mon Mar 12, 2007 4:02 Post subject: |
|
|
Ahh, good to know that. Thank you. I noticed the faction functions weren't available in 1.68 build 8099. I changed a few addresses to to get the GetFactionID and SetFactionID. I'm not sure these are correct but the demo and GetFactionID and SetFactionID seem to be working ...
build = 0x08309C83
GetObjByOID = 0x080B99C0
RetObjByOID = 0x080B0C8C
GetFaction = 0x080B1404
GetFactionEntry = 0x080B9094
ChangeFaction = 0x081D41AC
GetObjectFactionEntry = 0x08111658
GetFactionLeader = 0x081D53C0
ppServer = 0x08329BD4 |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Mon Mar 12, 2007 9:29 Post subject: |
|
|
New function suggestion. After a fairly thorough search I came to the realization that you cannot AssignCommand a pc or npc to use an item, because there is no ActionUseItem. WTH?!?
Funky |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Mar 12, 2007 9:38 Post subject: |
|
|
FunkySwerve wrote: | New function suggestion. After a fairly thorough search I came to the realization that you cannot AssignCommand a pc or npc to use an item, because there is no ActionUseItem. WTH?!?
Funky | I'm afraid that actions are too hard to implement. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Wed Mar 14, 2007 13:53 Post subject: |
|
|
Yes i would very grateful, if you will convert at least this function to windows.
SetDescription
Set/GetArmorAC
Get/SetItemWeight
thx a lot
ShaDoOoW |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Mar 30, 2007 0:05 Post subject: |
|
|
Seems like I've found GetGroundHeight function, but haven't tested it yet. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sat Mar 31, 2007 0:16 Post subject: |
|
|
It works.
Found GetIsWalkable as well. |
|
Back to top |
|
|
dumbo
Joined: 21 Aug 2005 Posts: 21
|
Posted: Sat Mar 31, 2007 3:00 Post subject: |
|
|
dont forget eat something.
dont stay close to window - bioware has hired a killer. you know too much to be live.
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sat Mar 31, 2007 19:13 Post subject: |
|
|
dumbo wrote: | dont forget eat something.
dont stay close to window - bioware has hired a killer. you know too much to be live.
|
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Apr 08, 2007 1:21 Post subject: |
|
|
NWNX Functions 1.8 (Linux)
http://data.virusman.ru/nwn/nwnx_functions-1.8.rar
Code: | //Returns ground height of the location
float GetGroundHeight(location lLocation);
//Returns TRUE if the position is walkable
int GetIsWalkable(location lLocation); |
Ported faction functions to 1.68
|
|
Back to top |
|
|
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Wed Apr 11, 2007 4:41 Post subject: |
|
|
Was wondering about the SetGoldPieceValue function. Last time i checked this (a while back for the original windows only nwnx_functions), this merely changed the gold value temporarily and when the character would come back into the server, the value would be reset.
The reason for this, I assume, was because part of the item's value is "hard coded" based on 2das which determined base item price and property multiplayers. So i made my own nwnx sql statements which merely changed the Additional Cost field. Is this how your function works? Has it worked after you log back in? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Apr 11, 2007 9:20 Post subject: |
|
|
Kosmous wrote: | Was wondering about the SetGoldPieceValue function. Last time i checked this (a while back for the original windows only nwnx_functions), this merely changed the gold value temporarily and when the character would come back into the server, the value would be reset.
The reason for this, I assume, was because part of the item's value is "hard coded" based on 2das which determined base item price and property multiplayers. So i made my own nwnx sql statements which merely changed the Additional Cost field. Is this how your function works? Has it worked after you log back in? | You're right: item costs are recalculated on login.
I didn't touch the original SetGoldPieceValue function, but I can modify it to make it change AddCost field accordingly.
There is also a hak on NWVault that adds new item properties. Using these properties you can modify item cost permanently. |
|
Back to top |
|
|
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Wed Apr 11, 2007 12:06 Post subject: |
|
|
Ya i think its best to just alter the additional cost field. A GetAdditionalItemCost function would also be necessary though, otherwise it won't be quite as useful.
People can easily workaround the cost of the items by either inflating gold prices or editing the 2das to change the item property and base item costs to whatever the PW server admins want. |
|
Back to top |
|
|
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Wed Apr 11, 2007 12:16 Post subject: |
|
|
Also i dont think SetArmorAC works anymore. Just checked it and basicly, when i examine, it shows a blank page, and bugs my character if I try to wear the armor. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
|