Tu trúc ...I need help

  • Thread starter Thread starter idvalid
  • Ngày gửi Ngày gửi

idvalid

Mr & Ms Pac-Man
Tham gia ngày
29/6/05
Bài viết
120
Reaction score
0
Bác nào đã từng sở hữu idNPC của thằng đứng trong thành thì làm ơn post hộ lên cái.
Muốn làm cái script tu trúc mà ...

Mấy bác bên ser Hoàng Trung đâu rồi... help me plz. :-s :-s
 
Mod Heoconbeou đang online có biết ko dzi? Nếu biết thì nể tình anh Acay mà chỉ dum cái idNPC cái. Thx .:)
 
Ku Tep sao đi xin ngại thế :( Sao bảo bỏ TS rồi :)) Hố hố
Về thêu vá đi. =))
 
Anh viết cho đức béo. :))
Ngại quá, thấy rồi.

Đcm Ts... hê hê. Ku 7 đừng để bị cắt chym nhá. Đang bùn vcl ra. Ở HN thi kêu mấy đai ka đi uống rượu rùi.
 
Cái này hồi xưa xài...giờ ko biết còn được ko :D

Mã:
var state = "" 
var ghost_count = 0; 
var god_count = 0; 
var die_count = 0; 
var pet_die_count = 0; 
var battle_count = 0; 
var DisconnectFlag = 0.3; 
var HealingFlag = 0.5; 
var hpFraction = 0.9; 

//my vars
//EDIT THE BELOW !!!

var MyMapID = 14871; //map id dia 97
var mypos_x = 1202;   //toa do chien dau
var mypos_y = 695;
var myrestpos_x = 662;  //toa do an toa`n
var myrestpos_y = 855;

var myParty = new Array(74979, 365433); 
var id_chupt = myParty[0];   //id cua chu pt
var id_sena = myParty[1];  //id cua qs


var flee=1;
var pt_memcount=0;

function MyAttack(){ 
/*
m = SelectF1Target() 
if (ts.Character.SP > 15){ 
sk = SkillID("Fire Arrow"); 
}else{ 
debug("Defend",0xAA00AA) 
sk = SkillID("Defend"); 
*/

if (flee==0) {

	m = SelectF1Target();
	sk = SkillID("Attack"); 

	ts.SendAttack( 
	ts.Character.Row 
	, ts.Character.Col 
	, m.Row 
	, m.Col 
	, sk 
	)
} else {

	sk = SkillID("Flee"); 

	ts.SendAttack( 
	ts.Character.Row 
	, ts.Character.Col 
	, ts.Character.Row 
	, ts.Character.Col 
	, sk 
	)

}
} 


function MyPartnerAttack(){ 
m = SelectTarget() 
if (ts.CurrentPartner.SP > 15){ 
sk = SkillID("Attack"); 
}else{ 
debug("Defend",0xAA00AA) 
sk = SkillID("Defend"); 
} 

ts.SendAttack( 
ts.CurrentPartner.Row 
, ts.CurrentPartner.Col 
, m.Row 
, m.Col 
, sk 
) 
} 

function BattleStarted(){ 
battle_count++;
} 
function BattleStoped(){ 
/* Just safty first. for Warrior not leave you call function SaveWarrior() every end battle. */ 

SaveWarrior(); 
CheckDisconnect(); 
EatHP() 
ViewState() 
//ts.ClickOnNPC(1) 
} 

function EatHP(){ 
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction)){ 
doEatHP(0,(ts.Character.MAXHP * hpFraction)-ts.Character.HP) 
} 
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction)){ 
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP) 
} 
} 

function EatSP(){ 
if (ts.Character.SP < (ts.Character.MAXSP * spFraction)){ 
doEatSP(0,(ts.Character.MAXSP * spFraction)-ts.Character.SP) 
} 
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFraction)){ 
doEatSP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP) 
} 
} 

function ViewState(){ 
debug("************************************",0xFF0000) 
debug(" Battle Count : " + battle_count ,0xFF0000) 
debug(" Dead Count : " + die_count ,0xFF0000) 
debug(" Pet KO Count : " + pet_die_count, 0xFF0000) 
debug(" Lucky Count : " + god_count, 0xFF0000) 
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000) 
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000) 
debug("************************************",0xFF0000) 
} 

function SaveWarrior(){ 
if(ts.CurrentPartner.HP< ((0.20) * ts.CurrentPartner.MAXHP)){ 
//ts.Disconect(); 
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF); 
} 
} 
function onEvilGod(){ 
ghost_count++ 
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF) 
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")" 
WriteLog("Wrong.js",msg) 
} 
function onLuckyGod(){ 
debug("LUCKY G O D.",0xFF0000) 
if(!QA.Exists(ts.LastQuestion)){ 
QA.Add(ts.LastQuestion,ts.LastResponseAnswer) 
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")" 
WriteLog("QA.js",msg) 
} 
} 
function onNPCAppear( npcmapid , x , y ){ 
//debug(npcmapid,0) 
if(npcmapid == npcmapid){ 
ts.ClickOnNPC(npcmapid) 
ts.ClickOnNPC(npcmapid) 
} 
} 
function RemoveGhost(){ 
ErasingGhost = true 
ts.ClickOnNPC(21) 
} 

function NpcDialogMenu(DialogId){ 

   debug("Menu "+DialogId,0x0000FF) 

   if (DialogId==7) {
      ts.SelectChoice(1); 
      ts.SendEnd(); 
   } else {
      ts.SendEnd(); 
   }

} 

function NpcDialog(DialogId){ 
/*
debug("Dialog "+DialogId,0x0000FF) 
if(DialogId == 12077){ 
ts.ClickOnNPC(13) 
ts.ClickOnNPC(13) 
}else{ 
ts.SendEnd(); 
} 
*/
} 
function onAnswerWrong(q,a){ 
//ts.ClickOnNPC(21) 
//RemoveGhost() 
} 

function FinishAnswerFuckGod(){ 
god_count++; 
if(ghost_count>=3){ 
debug("3 ghost, disconnect now",0x00aaaa) 
ts.Disconect(); 
} 
ts.ClickOnNPC(1) 
} 

function doEatHP(order,difHp){ 
for(var i = 1;i<= 25 ;i++){ 
var oSlot = ts.MyItems.Item(i) 
var oItem = ITEMS.Item(oSlot.itemid) 
if (oSlot.itemid == 0){ continue; } 
if(oItem.isHPItem()){ 
if (oItem.itemvalue > difHp){ continue; } 
var eatHpAmt = (difHp - (difHp % oItem.itemvalue)) / oItem.itemvalue 
if (eatHpAmt> 0){ 
if (eatHpAmt > oSlot.num){eatHpAmt = oSlot.num; } 
ts.EatItem(i,eatHpAmt,order) 
debug( "?"+oItem.itemname+" HP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 ) 
difHp = difHp - eatHpAmt * oItem.itemvalue 
} 
} 
} 
} 

function doEatSP(order,difSp){ 
for(var i = 1;i<= 25 ;i++){ 
var oSlot = ts.MyItems.Item(i) 
var oItem = ITEMS.Item(oSlot.itemid) 
if (oSlot.itemid == 0){ continue; } 
if(oItem.isSPItem()){ 
if (oItem.itemvalue > difSp){ continue; } 
var eatSpAmt = (difSp - (difSp % oItem.itemvalue)) / oItem.itemvalue 
if (eatSpAmt> 0){ 
if (eatSpAmt > oSlot.num){eatSpAmt = oSlot.num; } 
ts.EatItem(i,eatSpAmt,order) 
debug( "?"+oItem.itemname+" SP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 ) 
difSp = difSp - eatSpAmt * oItem.itemvalue 
} 
} 
} 
} 


function Start(){ 
// no remove this function 
//fx = ts.Character.x 
//fy = ts.Character.y 
//state = "HoneyPill" 
//HoneyPill() 

ts.ClickOnNPC(13);


} 
function Stop(){ 
//state= "stop" 
// no remove this function 

flee=1;
moveto(myrestpos_x,myrestpos_y,600);


} 
function CheckDisconnect(){ 
if(ts.CurrentPartner.HP == 0){ 
pet_die_count++ 
} 
if(ts.Character.HP <= 0){ 
die_count++ 
} 
if(die_count>3){ 
//ts.Disconect(); 
} 

} 

function OnChat(PlayerName , Msg){ 
//debug(PlayerName + " " + Msg , 0 ) 
} 

function InitBot(){ 
ts.ClickOnNPC(13);
} 

function OnTimer(){ 
} 


function WaitAcceptParty(playerid){ 
  for(var i=0; i<myParty.length; i++){
    if(playerid == myParty[i]){
      ts.AcceptParty(playerid);
    }
  }
} 

function AcceptedParty(playerid){ 
   //pname = getPlayerName(playerid) 
   if(playerid == id_sena) 
   { 
      ts.sena(playerid) //set strategist 
   }
} 

function PartyStop( playerid ){ 
   if(playerid == id_chupt){ 
      ts.Disconect(); 
   } 
}
 
function onPlayerWalk( uid , x , y ){ 
if(uid == 129531 ){ 

}else{ 
//ts.Disconect() 
} 
} 

/*
function OnTimer(){ 
if(state=="autowarp"){ 
ts.Chat(3,"ok.",86269) 
} 
}
*/ 
function warpFinish(){ 
//state="autowarp" 
} 

//state="autowarp" 

InitBot() 
debug("Num of GHosts: " + ts.Character.Ghost,0x0000FF);
 
ông ờ server HoangTrung tên jì thế nhỉ cho đc biết bí danh!
Mã:
30 char 30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char30 char
 
...xài được ko nhỉ ??? ko còn chơi nên ko test được >.<
 
ặc tu trúc mà củng xài sript nữa . Pó tay luôn roài , tui tưởng bot thì mới xài thui ai ngờ giờ xài theo kiểu bot hóa hết luôn :D híc híc
 
Mới bít à ??? Hèn như Exca cũng có chức năng tu trúc mà, phải ko ???
 
có server nào đả nâng cấp được thành chưa nhở char r r r r r r r r r r r r
 
Hoàng Trung city Thành Lâm Vệ cấp 2 :D quảng cáo tí quảng cáo tí quảng cáo quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí quảng cáo tí :D
 
Back
Top