Jump to content


Photo

How to rotate event npcs?


  • Please log in to reply
4 replies to this topic

#1 Like it~*

Like it~*

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted 21 April 2017 - 03:44 AM

Hello, I would like to know if it is possible to do this since there are many npcs in different files. The events are all already assembled, but each one in its separate file. I would like that as soon as one event is over, another is started, then another, another, and so on ... So after the last event is over, start the event count again from 1.
Example:
Started: event 1
Finished: event 1
Started: event 2
Finished: event 2
Started: event 3
Finished: event 3
...
...
...
Started: event 20
Finished: event 20
Started: event 1
Finished: event 1
Started: event 2
Finished: event 2

 



#2 thanna

thanna

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 21 April 2017 - 05:51 AM

you can add donpcevent and set it up on your own liking.



#3 True Zeal

True Zeal

    Advanced Member

  • Members
  • PipPipPip
  • 411 posts
  • LocationAlberta
  • Emulator:Hercules

Posted 21 April 2017 - 06:20 AM

you can add donpcevent and set it up on your own liking.

 

Yup, basically this. You can use an arrangement of donpcevent() commands to activate events for your set times.

 

Example:

 
-     script     event 1     FAKE_NPC,{
 
OnAtCommand:
OnEventOne:
announce "Event 1 started.", bc_all;
initnpctimer;
end;
 
OnTimer10000:
announce "Event 1 ended." bc_all;
end;
 
OnTimer15000:
donpcevent("event 2::OnEventTwo");
stopnpctimer;
end;
 
OnInit:
bindatcmd("event1","event 1::OnAtCommand");
end;
 
}
 
-     script     event 2     FAKE_NPC,{
 
OnEventTwo:
announce "Event 2 started.", bc_all;
initnpctimer;
end;
 
OnTimer10000:
announce "Event 2 ended.", bc_all;
end;
 
OnTimer15000:
donpcevent("event 1::OnEventTwo");
stopnpctimer;
end;
 
}

 

You can start the loop by typing @event1, then it would loop the announcements every 10/15 seconds.


I ask a lot of questions. Prepare to be frustrated.


#4 Like it~*

Like it~*

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted 21 April 2017 - 07:42 PM

you can add donpcevent and set it up on your own liking.

 

 

you can add donpcevent and set it up on your own liking.

 

Yup, basically this. You can use an arrangement of donpcevent() commands to activate events for your set times.

 

Example:

 

 
-     script     event 1     FAKE_NPC,{
 
OnAtCommand:
OnEventOne:
announce "Event 1 started.", bc_all;
initnpctimer;
end;
 
OnTimer10000:
announce "Event 1 ended." bc_all;
end;
 
OnTimer15000:
donpcevent("event 2::OnEventTwo");
stopnpctimer;
end;
 
OnInit:
bindatcmd("event1","event 1::OnAtCommand");
end;
 
}
 
-     script     event 2     FAKE_NPC,{
 
OnEventTwo:
announce "Event 2 started.", bc_all;
initnpctimer;
end;
 
OnTimer10000:
announce "Event 2 ended.", bc_all;
end;
 
OnTimer15000:
donpcevent("event 1::OnEventTwo");
stopnpctimer;
end;
 
}

 

You can start the loop by typing @event1, then it would loop the announcements every 10/15 seconds.

 

Hello, gentlemen. Thank you very much for replying. I see that is a possibility. However, it is not yet fully effective, since events have varying times of duration. That is, it may be that one event ends sooner than expected and the other does not start because the interval between them has not yet been reached. So, is there any other way to be able to accomplish this in the best way?



#5 Like it~*

Like it~*

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted Yesterday, 11:46 PM

Someone? Please






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


This topic has been visited by 33 user(s)