Jump to content
  • 0

OnPCStatCalcEvent and recalculatestat; Loop


Kinkykids

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  05/16/18
  • Last Seen:  

How to make it so that the npc does not loop?

 

-	script	CardCollection	-1,{
	
OnPCStatCalcEvent:
	recalculatestat;
	dispbottom "Loop Check.";
	disablenpc "CardCollection";
	sleep2 100;
	enablenpc "CardCollection";
	end;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

 

---------------------------------------

*recalculatestat;

This command will force a stat recalculation for the attached player.

---------------------------------------
OnPCStatCalcEvent:

This special label triggers when a player's stats are recalculated, such as when
changing stats, equipment, or maps, as well as when logging in, leveling up, and
mounting a job mount. This can be used to grant additional item bonuses to certain
player groups, for instance.

technically , you are asking for loop

I would suggest to not use OnPCStatCalcEvent unless you are forced too

 

also I don't understand why disable/enable a npc like that , let's say the script works , the npc would be always disabled depending on the number of players in the server , also I am not sure that you know what you are doing.

 

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   260
  • Joined:  04/25/12
  • Last Seen:  

OnPCStatCalcEvent  should never exist

  • MVP 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...