Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 16.02.2006, 14:33   #1
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default [HELP] Oracle of Revelations AI

i copied sauron ai for noobie buffer and modded it for ssq.
but atm it doesn't work,
it compile without errors, but when clicking on the reply bypass it just doesn't work

can someone help?

Code:
//***********************************************************************************************Oracle of Dusk
class dusk_orator : default_npc
{ 
parameter:
    string fnHi = "dusk_orator.htm";
    string fnWait = "dusk_orator_wait.htm";
    string fnNobuff = "dusk_orator_no.htm";    

    
handler: 
EventHandler TALKED(talker)
	{
			ShowPage(talker, fnHi);
	}

   EventHandler CREATED() 
   { 
      myself.i_ai0 = 0; 
   } 
    
   EventHandler MENU_SELECTED(talker, ask ,reply) 
   { 
      if(ask == 2 && reply == 2 && myself.i_ai0 == 0) 
      { 
         if(IsInCategory(@fighter_group, talker.occupation) && OwnItemCount(talker, @ssq_dusk) && OwnItemCount(talker, @ssq_winner)) 
         { 
            if(talker.level >= 40 && talker.level <= 60) 
            { 
               myself.i_ai1 = 1; 
               AddTimerEx(1, 1); 
            } 
            else if(talker.level >= 61 && talker.level <= 70) 
            { 
               myself.i_ai1 = 1; 
               AddTimerEx(2, 1); 
            } 
            else if(talker.level >= 71 && talker.level <= 80) 
            { 
               myself.i_ai1 = 1; 
               AddTimerEx(3, 1); 
            } 
            else 
            { 
               ShowPage(talker, fnNobuff); 
            } 
         } 
         else if(IsInCategory(@mage_group, talker.occupation) && OwnItemCount(talker, @ssq_dusk) && OwnItemCount(talker, @ssq_winner)) 
         { 
            if(talker.level >= 40 && talker.level <= 60) 
            { 
               myself.i_ai1 = 1; 
               AddTimerEx(10, 1); 
            } 
            else if(talker.level >= 61 && talker.level <= 70) 
            { 
               myself.i_ai1 = 1; 
               AddTimerEx(20, 1); 
            } 
            else if(talker.level >= 71 && talker.level <= 80) 
            { 
               myself.i_ai1 = 1; 
               AddTimerEx(30, 1); 
            } 
            else 
            { 
               ShowPage(talker, fnNobuff); 
            } 
         } 
      } 
      else 
      { 
         ShowPage(talker, fnWait); 
      }       
   }    
   EventHandler TIMER_FIRED_EX(timer_id, talker, creature) 
   { 
      myself.i_ai0 = 1; // casting 
      creature = talker; 
       
// FIGHTER CLASS BEGIN!!! 

      if (timer_id == 1) // todos los buff 
      { 
         if(myself.i_ai1 == 1) 
         { 
            AddUseSkillDesire(creature, 1106433, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); /// 
            myself.i_ai1 = 2; 
            AddTimerEx(1, 1000); 
         } 
         else if(myself.i_ai1 == 2) 
         { 
            AddUseSkillDesire(talker, 1106689, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 3; 
            AddTimerEx(1, 1000); 
         } 
         else if(myself.i_ai1 == 3) 
         { 
            AddUseSkillDesire(creature, 1106945, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 4; 
            AddTimerEx(1, 1000); 
         } 
         else if(myself.i_ai1 == 4) 
         { 
            AddUseSkillDesire(creature, 1107201, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 5; 
            AddTimerEx(1, 1000); 
         } 
         else if(myself.i_ai1 == 5) 
         { 
            AddUseSkillDesire(creature, 1107457, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 6; 
            AddTimerEx(1, 1000); 
         } 
         else if(myself.i_ai1 == 6) 
         { 
            AddUseSkillDesire(creature, 1107713, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 7; 
            AddTimerEx(1, 1000); 
         } 
         else if(myself.i_ai1 == 7) 
         { 
            AddUseSkillDesire(creature, 1108993, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); ///// 
         } 
      }       
      else if (timer_id == 2) 
      { 
         if(myself.i_ai1 == 1) 
         { 
            AddUseSkillDesire(creature, 1106433, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 2; 
            AddTimerEx(2, 1000); 
         } 
         else if(myself.i_ai1 == 2) 
         { 
            AddUseSkillDesire(creature, 1106689, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 3; 
            AddTimerEx(2, 1000); 
         } 
         else if(myself.i_ai1 == 3) 
         { 
            AddUseSkillDesire(creature, 1106945, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 4; 
            AddTimerEx(2, 1000); 
         } 
         else if(myself.i_ai1 == 4) 
         { 
            AddUseSkillDesire(creature, 1107201, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 5; 
            AddTimerEx(2, 1000); 
         } 
         else if(myself.i_ai1 == 5) 
         { 
            AddUseSkillDesire(creature, 1107457, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 6; 
            AddTimerEx(2, 1000); 
         } 
         else if(myself.i_ai1 == 6) 
         { 
            AddUseSkillDesire(creature, 1107713, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
         } 
      }          
      else if (timer_id == 3) 
      { 
         if(myself.i_ai1 == 1) 
         { 
            AddUseSkillDesire(creature, 1106433, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 2; 
            AddTimerEx(3, 1000); 
         } 
         else if(myself.i_ai1 == 2) 
         { 
            AddUseSkillDesire(creature, 1106689, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); ///// 
            myself.i_ai1 = 3; 
            AddTimerEx(3, 1000); 
         } 
         else if(myself.i_ai1 == 3) 
         { 
            AddUseSkillDesire(creature, 1106945, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); ///// 
            myself.i_ai1 = 4; 
            AddTimerEx(3, 1000); 
         } 
         else if(myself.i_ai1 == 4) 
         { 
            AddUseSkillDesire(creature, 1107201, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 5; 
            AddTimerEx(3, 1000); 
         } 
         else if(myself.i_ai1 == 5) 
         { 
            AddUseSkillDesire(creature, 1107457, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
         } 
      }    
//MAGE CLASS BEGIN!! 

      else if (timer_id == 10) // todos los buff 
      { 
         if(myself.i_ai1 == 1) 
         { 
            AddUseSkillDesire(creature, 1106433, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); ///// 
            myself.i_ai1 = 2; 
            AddTimerEx(10, 1000); 
         } 
         else if(myself.i_ai1 == 2) 
         { 
            AddUseSkillDesire(creature, 1106689, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); ///// 
            myself.i_ai1 = 3; 
            AddTimerEx(10, 1000); 
         } 
         else if(myself.i_ai1 == 3) 
         { 
            AddUseSkillDesire(creature, 1107969, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); /// 
            myself.i_ai1 = 4; 
            AddTimerEx(10, 1000); 
         } 
         else if(myself.i_ai1 == 4) 
         { 
            AddUseSkillDesire(creature, 1108225, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   ///// 
            myself.i_ai1 = 5; 
            AddTimerEx(10, 1000); 
         } 
         else if(myself.i_ai1 == 5) 
         { 
            AddUseSkillDesire(creature, 1108481, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   ///// 
            myself.i_ai1 = 6; 
            AddTimerEx(10, 1000); 
         } 
         else if(myself.i_ai1 == 6) 
         { 
            AddUseSkillDesire(creature, 1108737, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   //// 
            myself.i_ai1 = 7; 
            AddTimerEx(10, 1000); 
         } 
         else if(myself.i_ai1 == 7) 
         { 
            AddUseSkillDesire(creature, 1108993, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   ///// 
         } 
      }    
       
      else if (timer_id == 20) 
      { 
         if(myself.i_ai1 == 1) 
         { 
            AddUseSkillDesire(creature, 1106433, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 2; 
            AddTimerEx(20, 1000); 
         } 
         else if(myself.i_ai1 == 2) 
         { 
            AddUseSkillDesire(creature, 1106689, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); //// 
            myself.i_ai1 = 3; 
            AddTimerEx(20, 1000); 
         } 
         else if(myself.i_ai1 == 3) 
         { 
            AddUseSkillDesire(creature, 1107969, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   //// 
            myself.i_ai1 = 4; 
            AddTimerEx(20, 1000); 
         } 
         else if(myself.i_ai1 == 4) 
         { 
            AddUseSkillDesire(creature, 1108225, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   //// 
            myself.i_ai1 = 5; 
            AddTimerEx(20, 1000); 
         } 
         else if(myself.i_ai1 == 5) 
         { 
            AddUseSkillDesire(creature, 1108481, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   ///// 
            myself.i_ai1 = 6; 
            AddTimerEx(20, 1000); 
         } 
         else if(myself.i_ai1 == 6) 
         { 
            AddUseSkillDesire(creature, 1108737, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   //// 
         } 
      }          
       

      else if (timer_id == 30) 
      { 
         if(myself.i_ai1 == 1) 
         { 
            AddUseSkillDesire(creature, 1106433, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);  ///// 
            myself.i_ai1 = 2; 
            AddTimerEx(30, 1000); 
         } 
         else if(myself.i_ai1 == 2) 
         { 
            AddUseSkillDesire(creature, 1106689, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000); ///// 
            myself.i_ai1 = 3; 
            AddTimerEx(30, 1000); 
         } 
         else if(myself.i_ai1 == 3) 
         { 
            AddUseSkillDesire(creature, 1107969, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);    //// 
            myself.i_ai1 = 4; 
            AddTimerEx(30, 1000); 
         } 
         else if(myself.i_ai1 == 4) 
         { 
            AddUseSkillDesire(creature, 1108225, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   ///// 
            myself.i_ai1 = 5; 
            AddTimerEx(30, 1000); 
         } 
         else if(myself.i_ai1 == 5) 
         { 
            AddUseSkillDesire(creature, 1108481, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000);   ///// 
         } 
      }       
    
      myself.i_ai0 = 0; 
   } 
}
hamidouch is offline  
Old 16.02.2006, 14:54   #2
cool_santino
Архивный участник
 
Join Date: Nov 2005
Posts: 85
Default

to let it work, you mast chage all hendlers and func calls in the compiled ai
cool_santino is offline  
Old 16.02.2006, 15:32   #3
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

maybe some prob with your html files...
toolpunk is offline  
Old 16.02.2006, 15:43   #4
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

no problem in html file.
and cool santino i know that, it's not the problem neither.
hamidouch is offline  
Old 16.02.2006, 18:00   #5
Kenster
Архивный участник
 
Join Date: Sep 2005
Posts: 455
Default

Hami, in retail, when you walk back you either get BUFFED or DEBUFFED depending on your side that wins/loose.
Kenster is offline  
Old 16.02.2006, 19:26   #6
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

i think the prob is that the code doesnt work. no matter if it deviates from retail...
toolpunk is offline  
Old 16.02.2006, 20:36   #7
cool_santino
Архивный участник
 
Join Date: Nov 2005
Posts: 85
Default

If all ok in handlers and func calls, then look at this

this is a part of original source:

Quote:
EventHandler MENU_SELECTED(talker, ask ,reply)
{
if(ask == 2 && reply == 2 && myself.i_ai0 == 0)
{
if(talker.level < 10 || talker.level > 25)
ShowPage(talker, "nobuff.htm");
else
{
ShowPage(talker, "wait.htm");
myself.i_ai2 = talker;
if(IsInCategory(@fighter_group, talker.occupation))
{
if(talker.level >= 15 && talker.level <= 19)
{
myself.i_ai1 = 1;
AddTimerEx(1, 1);
}
......
and in the handler EventHandler TIMER_FIRED_EX(timer_id, creature):

Quote:
EventHandler TIMER_FIRED_EX(timer_id, creature)
{
myself.i_ai0 = 1;
creature = myself.i_ai2;
....
in you source you try cast spells on creature, but not on talker...

sry for my bad english)
cool_santino is offline  
Old 16.02.2006, 21:58   #8
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

cool_santino, thks i got it now.
hamidouch is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 21:12.