![]() |
|
|
#1 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
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;
}
}
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Nov 2005
Posts: 85
|
to let it work, you mast chage all hendlers and func calls in the compiled ai
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: May 2005
Posts: 2,033
|
maybe some prob with your html files...
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
no problem in html file.
and cool santino i know that, it's not the problem neither. |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Sep 2005
Posts: 455
|
Hami, in retail, when you walk back you either get BUFFED or DEBUFFED depending on your side that wins/loose.
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: May 2005
Posts: 2,033
|
i think the prob is that the code doesnt work. no matter if it deviates from retail...
|
|
|
|
|
#7 | ||
|
Архивный участник
Join Date: Nov 2005
Posts: 85
|
If all ok in handlers and func calls, then look at this
this is a part of original source: Quote:
Quote:
sry for my bad english) |
||
|
|
|
|
#8 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
cool_santino, thks i got it now.
|
|
|
|
|