Jump to content
  • 0

NPC Presence with shop


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

 

Hi community, I would like to create a simple presence NPC to be able to register the presence every 12h and gain 30 points of presence for each vote, being thus every 24h (1 day) being possible to acquire a maximum of 60 points of presence ... and in the even NPC have a shop with configurable items with those points.

Thanks for listening.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

since this is not an hourly point script which require player has to constantly online
you only want it 'presence' every 12 hours, so just do it with static timer

prontera,155,185,5	script	kjdhfkshfj	1_F_MARIA,{
	if ( presence_online + .delay <= gettimetick(2) ) {
		presence_points += 30;
		presence_online = gettimetick(2);
		mes "30 points given";
		next;
	}
	mes "come back again on";
	mes gettimestr( "%A, %I:%M:%S%p", 40, presence_online + .delay );
	next;
	select "Presence Shop";
	close2;
	callshop "presence_shop", 1;
	end;
OnInit:
	.delay = 12*60*60;
	end;
}

-	pointshop	presence_shop	FAKE_NPC,presence_points,501:10,502:20,503:30

 

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...