Thac mac nho ve Legna

dieorlive

Mr & Ms Pac-Man
Tham gia ngày
18/11/05
Bài viết
104
Reaction score
0
cac huynh cho tieu de hoi ve cai legna la cai "scipt.cs" tai sao ko mo? dc.
 
Bạn phải mở nó ra bằng chương trình notepad mới đc.Nhấp chuột phải vào nó,chọn open with-->chọn notepad thế là mở đc.
 
tui cũng làm vậy nhưng sửa xong lag không vào được luôn là sao hả ông chỉ zùm cái đê
 
tui cũng làm vậy nhưng sửa xong lag không vào được luôn là sao hả ông chỉ zùm cái đê
 
thế thi` chiul raoi
tat ca toan lam nhu the
neu ma ban lam ko dc thi toi cung chiu thua thoi biet lam sao dc
 
Khi log vào nó báo là < expected > ! Có ai biết tại sao kô !!!!!
 
co' ai bit' sua scrip ko chi gium` minh` voi'
 
khi log vào nó báo expected là do sc của bạn bị lỗi, sửa lại sc là được thôi mà
have fun
 
Vậy sửa dùm cái script này đi anh Linh, bị lỗi} đó ngồi cả buổi sáng mà sửa chả được
Mã:
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 = 90;        //    Faith of warrior to disconnect  
string state="";  
byte pt_count = 0;  

uint tv1 = 0; //là QS luôn  
uint tv2 = 0;  
uint tv3 = 0;  
uint tv4 = 0;  

uint maxpt = 0; //so thanh vien   


public override void MyAttack()  
{         
    CharacterInfo MyChar = ts.Character;   
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);      
}  
public override void MyPartnerAttack()  
{  
    CharacterInfo MyWarrior = ts.CurrentPartner;   
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);  
}  

public override void BattleStarted()  
{  
   ts.SetTimerOnOff(false);  
}  

public override void BattleStoped()  
{      
ProcessInventoryAction();  
    AutoEatFood();  
ts.ClickOnNPC(1);  
Start();  
}  

public override void doRecvQuestion()  
{   
state="BTQ";  
}  
public override void ResponseAnswer()  
{  
int dtime=get_random(1,5);  
debug("Delay "+dtime.ToString()+" before answer.");  
ts.delay(dtime*1000);  
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 == tv1 || playerid == tv2 || playerid == tv3 || playerid == tv4) {ts.Disconnect();}  
}  


public override void Start()  
{  
ts.ClickOnNPC(1);  
}  

public override void FinishAnswer()  
{  
ts.delay(2000);  
Start();  
}  

public override void NpcDialogMenu(ushort DialogId)  
{   
debug("Menu ID="+DialogId.ToString());   
if(DialogId==5){ ts.SelectChoice(1); ts.SendEnd(); }  
}   

public override void NpcDialog(ushort DialogId)   
{       
    debug("Dialog ID="+DialogId.ToString());  
if(DialogId==15657){ 
ts.ClickOnNPC(1) 
ts.delay(2000) 
ts.ClickOnNPC(1) 
}else{ 
ts.SendEnd();  
}   

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()  
{      
   ts.SetTimerOnOff(true);      
ts.SetReconnectTime(1);  
ts.SetMaxIdleTime(20);  
debug(" Số con ma : " + ts.Character.ghost ,0xFF0000) ;   
}
Script bot Giản Dung đó
 
đây, sc sửa rồi nè
hic, có phải lỗi mỗi } đâu :(
sửa xong } lại ra 1 đống lỗi nữa :(
copy ở đây về ko được thì ra Y!M nhá :D
sợ copy lên no bi lỗi ;;)
Mã:
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 = 90;        //    Faith of warrior to disconnect  
string state="";  
byte pt_count = 0;  

uint tv1 = 0; //là QS luôn  
uint tv2 = 0;  
uint tv3 = 0;  
uint tv4 = 0;  

uint maxpt = 0; //so thanh vien   


public override void MyAttack()  
{         
    CharacterInfo MyChar = ts.Character;   
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);      
}  
public override void MyPartnerAttack()  
{  
    CharacterInfo MyWarrior = ts.CurrentPartner;   
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);  
}  

public override void BattleStarted()  
{  
   ts.SetTimerOnOff(false);  
}  

public override void BattleStoped()  
{      
ProcessInventoryAction();  
    AutoEatFood();  
ts.ClickOnNPC(1);  
Start();  
}  

public override void doRecvQuestion()  
{   
state="BTQ";  
}  
public override void ResponseAnswer()  
{  
int dtime=get_random(1,5);  
debug("Delay "+dtime.ToString()+" before answer.");  
ts.delay(dtime*1000);  
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 == tv1 || playerid == tv2 || playerid == tv3 || playerid == tv4) {ts.Disconnect();}  
}  


public override void Start()  
{  
ts.ClickOnNPC(1);  
}  

public override void FinishAnswer()  
{  
ts.delay(2000);  
Start();  
}  

public override void NpcDialogMenu(ushort DialogId)  
{   
debug("Menu ID="+DialogId.ToString());   
if(DialogId==5){ ts.SelectChoice(1); ts.SendEnd(); }  
}   

public override void NpcDialog(ushort DialogId)   
{       
    debug("Dialog ID="+DialogId.ToString());  
if(DialogId==15657){ 
ts.ClickOnNPC(1); 
ts.delay(2000); 
ts.ClickOnNPC(1); 
}
else{ 
ts.SendEnd();  
}   
}
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()  
{      
   ts.SetTimerOnOff(true);      
debug(" Số con ma : " + ts.Character.ghost ,0xFF0000);   
}
 
Back
Top