I have an on client enter, to strip them of all gear then give them two things (player widget and a tunic). But when they log out and back in again, the script strips them again. How can I get around this?
OnClient Enter - Do something only on first enter.
Débuté par
Buddywarrior
, avril 08 2012 12:23
#1
Posté 08 avril 2012 - 12:23
#2
Posté 08 avril 2012 - 12:44
<pondering...>
Strip them only if they don't posses the player widget and tunic...?
<...imponderables>
Strip them only if they don't posses the player widget and tunic...?
<...imponderables>
#3
Posté 08 avril 2012 - 12:48
have you tried it as a once per pc only? such as:
void main()
{
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Only fire once per PC.
if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
void main()
{
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Only fire once per PC.
if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
#4
Posté 08 avril 2012 - 01:02
New PC will not have any XP, For any PC that has 0 xp, strip them, give them your widgets and give them one xp.
Rolo's method will work if you never remove the Widget and tunic from the player.
Players will lose local Vars when the server resets so oOKyeOo nethod will not work.
Player characters also do not have a Tag, unless one has been added by NWNx or Other Bic edit.
Rolo's method will work if you never remove the Widget and tunic from the player.
Players will lose local Vars when the server resets so oOKyeOo nethod will not work.
Player characters also do not have a Tag, unless one has been added by NWNx or Other Bic edit.
#5
Posté 08 avril 2012 - 01:16
LOL.. I knew I was over thinking this trying to add variables to objects etc. This is a forever level 1 world so the xp and other options wouldn't work either. Simple and perfect solution, thanks Rolo!Rolo Kipp wrote...
<pondering...>
Strip them only if they don't posses the player widget and tunic...?
<...imponderables>
#6
Posté 08 avril 2012 - 03:03
We use the method suggested by Lightfoot8 on Diablo- The Dark Wanderer. After the toon is stripped and re-equipped with the default starting equipment, the toon is given 1 experience point which acts as a signal to never initialise that toon again.
Since 1 point won't bump a toon up a level, you could use that method instead of looking for a particular item of equipment.
It's just another option, is what I'm saying.
Since 1 point won't bump a toon up a level, you could use that method instead of looking for a particular item of equipment.
It's just another option, is what I'm saying.





Retour en haut







