logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
nwnx_funcs for windows
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 27, 28, 29  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Tue Aug 17, 2010 14:33    Post subject: Reply with quote

Moneo - standalone application using letoscript which can perform actions for whole module. Can be download from sourceforge with leto.
The usage is a little different, first you must make letoscript script in text editor and save it as something.ls Then you must run this script with Moneo via commandline.

Btw I used this for my Door System on vault, the Moneo is included in the package same as batch file and one or two templates which will change all door's scripts in module.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Sag



Joined: 24 Sep 2009
Posts: 8

PostPosted: Sun Aug 22, 2010 17:26    Post subject: Reply with quote

NWNXFuncs_SetItemValue

Used the above function and it changed the item appearance to one that did not exist. It was for a small misc. item and my limit of appearances is 255. It only did so upon second log in. Thanks for these funcs by the way. They are awesome.
Back to top
View user's profile Send private message
doxic



Joined: 07 Oct 2008
Posts: 13

PostPosted: Wed Aug 25, 2010 20:52    Post subject: Reply with quote

NWNXFuncs_SetTag always crashes my server.. anyone knows why?
I'm using the latest version of nwnx_funcs, nwnx works fine with my NWN (1.69) and Windows 7 x64 and the nwnx_funcs log doesn't say anything weird, just the new tag my item should get.

Is there anything missing in the nwnx.ini? Currently mine looks like this:
Code:
[FUNCS]
;Number_of_Skills, the amount of skills from skills.2da (last row+1)
Number_of_Skills=29

;debugLevel: 1 should only show basic information, 2 should include errors and 3 should log pretty much everything
debugLevel=3

;Set this to 1 to use the CustomTrapGeometry functions
HOOK_CustomTrapGeometry=1


Number of Skills is 29 because i added one in a hakpak.
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Thu Aug 26, 2010 21:46    Post subject: Reply with quote

Can you post an example of how you use SetTag?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Thu Aug 26, 2010 21:52    Post subject: Reply with quote

Time for another update (at last): v0.84

This should fix NWNXFuncs_SetItemCharges, NWNXFuncs_SetItemValue, NWNXFuncs_GetItemValue and NWNXFuncs_SetItemWeight.

The major new function is NWNXFuncs_EffectCustomEffect which lets you specify effect creator and spellid right away, instead of changing it afterwards.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Fri Aug 27, 2010 6:15    Post subject: Reply with quote

this update still at the same link or diffrent? *looking for link...*
Back to top
View user's profile Send private message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Sat Aug 28, 2010 20:05    Post subject: Reply with quote

Awesome!
Back to top
View user's profile Send private message
werehound



Joined: 17 Aug 2010
Posts: 41

PostPosted: Tue Aug 31, 2010 14:11    Post subject: Reply with quote

Any chance we could get a NWNXFuncs_SetLootable?

The in-game one won't work for PCs. Would be nice to finish up a Legendary leveler I'm working on that doesn't boot players to make changes.

As it is, I'm having to use age, and having to put some age-resetters in my coding in the module's OnEnter event.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
werehound



Joined: 17 Aug 2010
Posts: 41

PostPosted: Mon Oct 25, 2010 7:01    Post subject: Reply with quote

Can someone explain to me how to use the immunity override functions?

I want to make a curse effect that bypasses immunity to ability decrease/negative levels.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Thu Nov 18, 2010 4:30    Post subject: Reply with quote

int RestoreReadySpells (object oCreature, string sSpells);

Virus man or mad did you by anychance make this function from linux to windows functions? I will check my funtion make sure, if its not there is there a link for the most up 2 date, forgive my asking again I think I have a old one and I have dial up so downloads are a heart ache

I found the windows function:
// Sets all spells for the given spell levels to be ready to cast (as if the creature had rested)
void NWNXFuncs_RestoreMemorizedSpells(object oCreature, int iClass, int iFromSpellLevel = 0, int iToSpellLevel = 9)

I just need the newest link to download the newest version of nwnx_functs
Thankyou all you have really done a great thing
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Thu Nov 18, 2010 22:09    Post subject: Reply with quote

// apply nwnxfunc
// Sets all spells for the given spell levels to be ready to cast (as if the creature had rested)
// void NWNXFuncs_RestoreMemorizedSpells(object oCreature, int iClass, int iFromSpellLevel = 0, int iToSpellLevel = 9)
NWNXFuncs_RestoreMemorizedSpells(oPC,iClass,iFromSpellLevel,iToSpellLevel);

OK now that I'm working with it is there a way for me to limit the amount given back. I understand its like forced rest or a rest. can I now perhaps take some away like a magic field that drains caster the ability to cast.

So question would be is there a function that takes a Numbered amout away Example Funtion:
RemoveMemorizedSpells(object Ocreature, int iClass, int iRemoveAmount, ifromspelllevel=0, itospelllevel=9);

Other then the Removespell funtion,wich doesn't do what I want lol
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Nov 19, 2010 1:09    Post subject: Reply with quote

Greyfort wrote:
// apply nwnxfunc
// Sets all spells for the given spell levels to be ready to cast (as if the creature had rested)
// void NWNXFuncs_RestoreMemorizedSpells(object oCreature, int iClass, int iFromSpellLevel = 0, int iToSpellLevel = 9)
NWNXFuncs_RestoreMemorizedSpells(oPC,iClass,iFromSpellLevel,iToSpellLevel);

OK now that I'm working with it is there a way for me to limit the amount given back. I understand its like forced rest or a rest. can I now perhaps take some away like a magic field that drains caster the ability to cast.

So question would be is there a function that takes a Numbered amout away Example Funtion:
RemoveMemorizedSpells(object Ocreature, int iClass, int iRemoveAmount, ifromspelllevel=0, itospelllevel=9);

Other then the Removespell funtion,wich doesn't do what I want lol
what about default nwn functions DecrementRemainingSpellUses ?
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Fri Nov 26, 2010 23:51    Post subject: Reply with quote

what about default nwn functions DecrementRemainingSpellUses ? from shadow...

That nwn function worked but you have to run a loop to remove uses and I some times get errors, when I have something execute script and a loop not sure why im getting error will look into that more.

Over all the nicest thing would be to get a number of spell uses then set the number. also get number of spell slots and set slots.

wishful thinking huh, thanks for the help all
Back to top
View user's profile Send private message
Q



Joined: 01 Aug 2009
Posts: 3

PostPosted: Thu Dec 09, 2010 14:23    Post subject: Reply with quote

Anyone else having problems with SetEventScript? My server crashes any time I try to use them in a script, and the log doesn't have any indication as to why. I've tried reverting to previous versions, but all the ones that I've located seem to have this problem. I can use GetEventScript fine; it's only crashing when I attempt to set it. Doesn't seem to matter which object I target with the function; I get the same result.

If I recall correctly, a prior version that was only capable of setting creature scripts worked for me without error. It's something within the past few revisions that's causing the crash. I've also grabbed the latest source code, and can tell where the crash occurs, but I don't have a functioning source revision for comparison or the ability to fix it otherwise.
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Dec 29, 2010 20:15    Post subject: BootPCWithMessage Reply with quote

Code:

void Func_BootPCWithMessage (CGameObject *ob, char *value) {
    CNWSPlayer *pl;

   CServerExoApp* app_server = (*NWN_AppManager)->app_server;
   uint32_t objid = ob->id;
   __asm { mov ecx, app_server }
    pl = CServerExoApp__GetClientObjectByObjectId(objid);
    if (pl != NULL)
   {
      CNetLayer* netlayer = (*NWN_AppManager)->app_server->srv_internal->srv_network;
      uint32_t pl_id = pl->pl_id;
      int iVal = atoi(value);
      __asm { mov ecx, netlayer }
        CNetLayer__DisconnectPlayer(pl_id, iVal, 1);
   }
}

This is from the old functions for nwnx.

I was wondering if someone might be able to update it to be part of nwnx_funcs?

It 'should' allow the server admin to boot a player, with an int value for a tlk file reference.

Allowing for players to be booted with messages appearing on screen, such as
'Die!!' or something like that. - If an int value was provided for that tlk ref.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 27, 28, 29  Next
Page 18 of 29

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group