Aller au contenu

Photo

Can anyone point me to a script or utility that removes/merges items from players on log in?


  • Veuillez vous connecter pour répondre
53 réponses à ce sujet

#51
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages

Lazarus Magni wrote...

I am glad I have not offended you Funky. Ok so I will give this a try as I described above in my last post. Just so I am clear, will this script then update all items (equiped, and in their inventory [including bags]) to the blueprints stored in the module (or hak, in my case as I had to move all items to the cep_custom.hak to get the mod size below the resource limit), the first time a player logs in, destroy any items it doesn't find a blueprint for, and then flag the PC so that it doesn't run again on subsequent loggins?


That's exactly what it will do, yes. As always, I would test it before it goes live, to make sure it works. It's possible, for example, that you no longer have a pwdata table, if your predecessors removed it in favor of another (though I don't think many people do that). In that case, it'd replace them every time, not just the first, which would be a fair amount of unneeded overhead.

Funky

#52
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
This:

// NOTE: this is code for trigger, trigers work better at clearing equiped gear.
// so I have found, then area event/scripts

Is just wrong. Triggers have no advantage over other events for this sort of thing. In fact, fast characters are able to miss them entirely, making it a good idea to place the trigger around the spot they're entering an area if you want to guarantee they hit it every time - at which point you might as well just use the onenter and save yourself an object. If you've had issues with onenter, it's likely because you were working from oncliententer and didn't check to make sure the pc was actually in an area first. That's why you see this check in the script I posted on page 1 of this thread:
    if (!GetIsObjectValid(oArea) || GetTag(oArea) == "voyage") {
        DelayCommand(5.0, main());
        return;
    } 

Funky

#53
Lazarus Magni

Lazarus Magni
  • Members
  • 1 134 messages
I am still struggling to get the server up and functioning correctly, and furthermore past that getting the mod to the point where I even want to allow other players into it, but once I do I will certainly try some of these solutions to see how they work. Thank you everyone for all your input!
Cheers, Laz

#54
Greyfort

Greyfort
  • Members
  • 234 messages
Thanks Funky I could not figure out why it was doing that [on client enter/area enter], I resorted to makeing an area 2x2 and trigger the size of the area. A simple delay and area check that great to know.

--------------------------------------------------------------------------------------------------------------------------------------------------------------
That's is fantastic Grey, thank you. Two questions though, will it then
flag the character as having had this done, so it doesn't run everytime
they log in? And Will it work if the items are stored in the
cep2_custom.hak?

--------------------------------------------------------------------------------------------------------------------------------------------------------------
yes to both questions, Q1) It stores var on data base [currently nwndb] Q2) It will update any module pallete item, so if its core nwn item or a hakitem if its in the pallete it will update it.

Modifié par Greyfort, 20 juin 2011 - 08:03 .