kinos
Mr & Ms Pac-Man
- 17/2/06
- 172
- 1
Sau nhìu ngày chỉnh sửa lỗi thì tui đã hoàn thành cái scipt này :whew:
giờ share cho anh em chơi
Start with scipt chủ pt :
double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%
double hpFractionEat = 0.8; //Eat HP when current HP<= 80%
double spFractionEat = 0.8;
double hpFraction = 0.95; //Eat until current HP >= 95 %
double spFraction = 0.95;
byte DisconFai = 00; // Faith of warrior to disconnect
byte turnchar = 0;
byte turnpet = 0;
byte pt_count = 0;
string state="";
uint tv1 = 01620957; // la QS luon
uint tv2 = 0;
uint tv3 = 0;
uint tv4 = 0;
uint maxpt = 1; //So thanh vien
public override void MyAttack()
{
turnchar++;
if (turnchar == 1)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 0, 10000);
}
if (turnchar >=2)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 10000);
}
}
public override void MyPartnerAttack()
{
turnpet++;
if (turnpet == 1)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
}
if (turnpet >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}
public override void BattleStarted()
{
turnchar=0;
turnpet=0;
ts.SetTimerOnOff(false);
}
public override void BattleStopped()
{
AutoEatFood();
ProcessInventoryAction();
}
public override void doRecvQuestion()
{
state="BTQ";
}
public override void ResponseAnswer()
{
int dtime=get_random(1,5);
debug("Delay "+dtime.ToString()+" before answer.");
string tmp=ts.LastQuestion.Replace("=?","");
int ans=ts.Eval(tmp);
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
debug("Answer choice:"+ans_index.ToString());
ts.Answer(ans_index);
}
public override void PartyStop(uint playerid)
{
if (playerid == tv1 || playerid == tv2 || playerid == tv3 || playerid == tv4) { ts.Disconnect(); }
}
public override void warpFinish()
{ if(ts.Character.mapid == 12441){ts.delay(1000);ts.Warp(1);}
else
if(ts.Character.mapid == 12000 && pt_count==maxpt){ ts.delay(1000);ts.Warp(16); }
}
public override void Start()
{
warpFinish();
}
public override void FinishAnswer()
{
Start();
}
public override void OnTimer()
{
ts.AcceptParty(tv1);
ts.AcceptParty(tv2);
ts.AcceptParty(tv3);
ts.AcceptParty(tv4);
}
public override void AcceptedParty(uint playerid)
{
if(playerid == tv1)
{
ts.Sena(playerid);
}
pt_count++;
if(pt_count==maxpt){
debug(" So thanh vien la : " + pt_count ,0x0000FF);
Start();
}
else{
debug(" So thanh vien la : " + pt_count ,0x0000FF);
}
}
public override void InitBot()
{
if (ts.Character.mapid==12441){ ts.Warp(1); ts.Disconnect();}
ts.delay(1000);
ts.SetTimerOnOff(true);
ts.SetReconnectTime(1);
ts.SetMaxIdleTime(20);
AddDropItemList("viênongmật");
AddDropItemList("Dâu đỏ");
AddDropItemList("Táo nhỏ");
AddDropItemList("Bành Bột Mì");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
}
Then scipt mem
:
double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%
double hpFractionEat = 0.8; //Eat HP when current HP<= 80%
double spFractionEat = 0.8;
double hpFraction = 0.95; //Eat until current HP >= 95 %
double spFraction = 0.95;
byte DisconFai = 00; // Faith of warrior to disconnect
byte turnchar = 0;
byte turnpet = 0;
string state="";
uint chupt = 1131834; //id chu pt
public override void MyAttack()
{ ts.SetTimerOnOff(false);
turnchar++;
if (turnchar == 1)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 12003);
}
if (turnchar >=2)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 10000);
}
}
public override void MyPartnerAttack()
{
turnpet++;
if (turnpet == 1)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 12003);
}
if (turnpet >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}
public override void BattleStarted()
{
turnchar=0;
turnpet=0;
}
public override void BattleStopped()
{
AutoEatFood();
ProcessInventoryAction();
}
public override void doRecvQuestion()
{
state="BTQ";
}
public override void ResponseAnswer()
{
int dtime=get_random(1,5);
debug("Delay "+dtime.ToString()+" before answer.");
string tmp=ts.LastQuestion.Replace("=?","");
int ans=ts.Eval(tmp);
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
debug("Answer choice:"+ans_index.ToString());
ts.Answer(ans_index);
}
public override void onPlayerWalk(uint uid, ushort x, ushort y)
{
if (uid > 1 && uid < 501) {
debug("GM den roi chay thoi",0xFF0000);
ts.Disconnect(false);
}
}
public override void PartyStop(uint playerid)
{
if (playerid == chupt) { InitBot(); }
}
public override void InitBot()
{
if (ts.Character.mapid==12441){ ts.Warp(1);}
ts.SetReconnectTime(1);
ts.SetMaxIdleTime(20);
ts.RequestParty(chupt);
AddDropItemList("viênongmật");
AddDropItemList("Dâu đỏ");
AddDropItemList("Táo nhỏ");
AddDropItemList("Bành Bột Mì");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
}
Đã test và chạy an toàn , các bác cứ sài tự nhiên
Xin ít MP #
giờ share cho anh em chơi
Start with scipt chủ pt :
double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%
double hpFractionEat = 0.8; //Eat HP when current HP<= 80%
double spFractionEat = 0.8;
double hpFraction = 0.95; //Eat until current HP >= 95 %
double spFraction = 0.95;
byte DisconFai = 00; // Faith of warrior to disconnect
byte turnchar = 0;
byte turnpet = 0;
byte pt_count = 0;
string state="";
uint tv1 = 01620957; // la QS luon
uint tv2 = 0;
uint tv3 = 0;
uint tv4 = 0;
uint maxpt = 1; //So thanh vien
public override void MyAttack()
{
turnchar++;
if (turnchar == 1)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 0, 10000);
}
if (turnchar >=2)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 10000);
}
}
public override void MyPartnerAttack()
{
turnpet++;
if (turnpet == 1)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
}
if (turnpet >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}
public override void BattleStarted()
{
turnchar=0;
turnpet=0;
ts.SetTimerOnOff(false);
}
public override void BattleStopped()
{
AutoEatFood();
ProcessInventoryAction();
}
public override void doRecvQuestion()
{
state="BTQ";
}
public override void ResponseAnswer()
{
int dtime=get_random(1,5);
debug("Delay "+dtime.ToString()+" before answer.");
string tmp=ts.LastQuestion.Replace("=?","");
int ans=ts.Eval(tmp);
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
debug("Answer choice:"+ans_index.ToString());
ts.Answer(ans_index);
}
public override void PartyStop(uint playerid)
{
if (playerid == tv1 || playerid == tv2 || playerid == tv3 || playerid == tv4) { ts.Disconnect(); }
}
public override void warpFinish()
{ if(ts.Character.mapid == 12441){ts.delay(1000);ts.Warp(1);}
else
if(ts.Character.mapid == 12000 && pt_count==maxpt){ ts.delay(1000);ts.Warp(16); }
}
public override void Start()
{
warpFinish();
}
public override void FinishAnswer()
{
Start();
}
public override void OnTimer()
{
ts.AcceptParty(tv1);
ts.AcceptParty(tv2);
ts.AcceptParty(tv3);
ts.AcceptParty(tv4);
}
public override void AcceptedParty(uint playerid)
{
if(playerid == tv1)
{
ts.Sena(playerid);
}
pt_count++;
if(pt_count==maxpt){
debug(" So thanh vien la : " + pt_count ,0x0000FF);
Start();
}
else{
debug(" So thanh vien la : " + pt_count ,0x0000FF);
}
}
public override void InitBot()
{
if (ts.Character.mapid==12441){ ts.Warp(1); ts.Disconnect();}
ts.delay(1000);
ts.SetTimerOnOff(true);
ts.SetReconnectTime(1);
ts.SetMaxIdleTime(20);
AddDropItemList("viênongmật");
AddDropItemList("Dâu đỏ");
AddDropItemList("Táo nhỏ");
AddDropItemList("Bành Bột Mì");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
}
Then scipt mem
:double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%
double hpFractionEat = 0.8; //Eat HP when current HP<= 80%
double spFractionEat = 0.8;
double hpFraction = 0.95; //Eat until current HP >= 95 %
double spFraction = 0.95;
byte DisconFai = 00; // Faith of warrior to disconnect
byte turnchar = 0;
byte turnpet = 0;
string state="";
uint chupt = 1131834; //id chu pt
public override void MyAttack()
{ ts.SetTimerOnOff(false);
turnchar++;
if (turnchar == 1)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 12003);
}
if (turnchar >=2)
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 10000);
}
}
public override void MyPartnerAttack()
{
turnpet++;
if (turnpet == 1)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 12003);
}
if (turnpet >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}
public override void BattleStarted()
{
turnchar=0;
turnpet=0;
}
public override void BattleStopped()
{
AutoEatFood();
ProcessInventoryAction();
}
public override void doRecvQuestion()
{
state="BTQ";
}
public override void ResponseAnswer()
{
int dtime=get_random(1,5);
debug("Delay "+dtime.ToString()+" before answer.");
string tmp=ts.LastQuestion.Replace("=?","");
int ans=ts.Eval(tmp);
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
debug("Answer choice:"+ans_index.ToString());
ts.Answer(ans_index);
}
public override void onPlayerWalk(uint uid, ushort x, ushort y)
{
if (uid > 1 && uid < 501) {
debug("GM den roi chay thoi",0xFF0000);
ts.Disconnect(false);
}
}
public override void PartyStop(uint playerid)
{
if (playerid == chupt) { InitBot(); }
}
public override void InitBot()
{
if (ts.Character.mapid==12441){ ts.Warp(1);}
ts.SetReconnectTime(1);
ts.SetMaxIdleTime(20);
ts.RequestParty(chupt);
AddDropItemList("viênongmật");
AddDropItemList("Dâu đỏ");
AddDropItemList("Táo nhỏ");
AddDropItemList("Bành Bột Mì");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
}
Đã test và chạy an toàn , các bác cứ sài tự nhiên
Xin ít MP #



