Jump to content
  • 0

room usage npc


joelolopez

Question


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

i would like to request a npc that warp players into my gold room lets say for example in the ordeal map,

 

after the usage of the room the npc will give the character a delay for room usage

 

delay usage of room determined by how long the character is in the ordeal map

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

map,x,y,dir	script	GoldRoom	909, {
	set .@goldroomtime, 3600000; //in milliseconds
	warp ordeal,x,y;
	announce "You have 1 hour to stay in this Gold Room. The timer starts from NOW", bc_self;
	addtimer .@goldroomtime, "GoldRoom::OnTimeUp";
	end;
	
OnTimeUP:
	announce "Time's up!", bc_self;
	warp map,x,y; //returns the player back to the town
	end;

OnPcLoginEvent:
	if (strcharinfo(3) == "ordeal") warp map,x,y; //returns the player back to the town
	end;
}

this is just like.... purchasing credit to cell phone. then, the player uses it. BUT, if he logged out while he's inside the room, then his time will vanish away.

once he's logged back in, he's assumed he has no credit left. so, he'll teleported somewhere.

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