Jump to content
  • 0

how to attach player in a loop while on a specific map?


Erebos

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  65
  • Reputation:   4
  • Joined:  10/25/18
  • Last Seen:  

Hello guys, I want to make a script that affects every player in one map every X seconds, for example, everyone in the map gets healed/damaged/gets an item, every 3 seconds while on that map. I tried several ways but i  always get player not attached errors.

Also, how can i damage a player and show damage numbers animation?(without using atcommand "@heal -1000"?)
I know we can manipulate a player's hp with "heal", "itemheal" and "percentheal" but this doesn't show any damage animation.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

Use OnPCLoadMapEvent and addtimer

-	script	asdfjkl	-1,{
end;

OnTick:
	getitem itm,itm_qty;
	dispbottom .sec+" second(s) has passed.";
	addtimer .time,"asdfjkl::OnTick";
end;

OnPCLoadMapEvent:
	dispbottom "You have entered a special zone.";
	addtimer .time,"asdfjkl::OnTick";
end;	
OnInit:
	.time = 3000;
	.sec = .time/1000;
	.itm = 501;
	.itm_qty = 1;
end;
}

prontera	mapflag	loadevent

Untested.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

you could use addtimer when they entered the map ^_~

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  65
  • Reputation:   4
  • Joined:  10/25/18
  • Last Seen:  

19 hours ago, Hijirikawa said:

Use OnPCLoadMapEvent and addtimer


-	script	asdfjkl	-1,{
end;

OnTick:
	getitem itm,itm_qty;
	dispbottom .sec+" second(s) has passed.";
	addtimer .time,"asdfjkl::OnTick";
end;

OnPCLoadMapEvent:
	dispbottom "You have entered a special zone.";
	addtimer .time,"asdfjkl::OnTick";
end;	
OnInit:
	.time = 3000;
	.sec = .time/1000;
	.itm = 501;
	.itm_qty = 1;
end;
}

prontera	mapflag	loadevent

Untested.

Thank you both for the addtimer idea. and thanks for the script although I did it in other way.

Edited by Brizyous
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...