Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 25.04.2006, 23:00   #1
nitromaxboi
Архивный участник
 
Join Date: Feb 2005
Posts: 62
Default how can i let npc remember the number of players it teleport

how can i let npc rememebr the number of players it teleported so that when it reaches a limit , it will not teleport the players till it is respawned
nitromaxboi is offline  
Old 26.04.2006, 05:23   #2
Xelat
Архивный участник
 
Join Date: Apr 2006
Posts: 70
Default Re: how can i let npc remember the number of players it tele

Quote:
Originally Posted by nitromaxboi
how can i let npc rememebr the number of players it teleported so that when it reaches a limit , it will not teleport the players till it is respawned
Try this.
Code:
parameter:
 int limit = 20;
handler:
 EventHandler CREATED()
 {
  myself.sm.flag = 0;
 }

 EventHandler MENU_SELECTED(talker, ask ,reply)
 {
  if(ask == -8 && myself.sm.flag < limit)
  {
   if(reply == 1)
   {
    InstantTeleport(talker, x, y ,z);
    myself.sm.flag = myself.sm.flag + 1;
   }
   else if(reply == 2)
   {
    InstantTeleport(talker, x ,y ,z);
    myself.sm.flag = myself.sm.flag + 1;
   }
   else if(reply == 3)
   {
    InstantTeleport(talker, x, y, z);
    myself.sm.flag = myself.sm.flag + 1;
   }
  }
 }
or this
Code:
parameter:
 int limit = 20;
property:		
 TelPosList Position = {{1010002;46890;51531;-2976;3700}	
  ;{1010003;9716;15502;-4500;4300}
  ;{1010004;-80826;149775;-3043;2900}
  ;{1010006;15744;142928;-2704;4200}
  ;{1010008;-45186;-112459;-236;6000}
  ;{1010009;115120;-178112;-916;6000}};
handler:
 EventHandler CREATED()
 {
  myself.sm.flag = 0;
 }

 EventHandler TELEPORT_REQUESTED(talker)  
 {
  if(myself.sm.flag < limit) {
   Teleport(talker, Position, ShopName, "", "", fnUnderAdena);
   myself.sm.flag = myself.sm.flag + 1;
  }
 }
Xelat is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 16:52.