Bác MC ơi em hỏi tí , đây la cai scsipt của acc thành viên , nhưng em dùng rất hay dis không hiểu do đâu , với bác loại bỏ cho script này ngắn lại cho em được không em chỉ cần tự động uống máu , SP va danh hoàng cung bình thường thôi , mong các bác giup em
script ( acc thành viên )
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.8;
var spFraction = 0.7;
var MyMapID = 15802;
var pt_count =0;
var battle_round;
function MyAttack(){
m = SelectF1Target();
// hoac:
// m = findMonster(); (nhu tdck thuo`ng)
battle_round++;
sk = SkillID("Fire Arrow"); //skill
ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, m.Row
, m.Col
, sk
);
}
function MyPartnerAttack(){
m = SelectF1Target();
sk = SkillID("Attack");
ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, m.Row
, m.Col
, sk
)
}
function BattleStarted(){
battle_count++;
battle_round=0;
}
function BattleStoped(){
EatHP();
EatSP();
ViewState();
}
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 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 FinishAnswerFuckGod(){
cdelay(3)
god_count++;
if(ghost_count>=3){
debug("3 ghost, disconnect now",0x00aaaa)
frm.mnuEnableReconnect.Checked = false;
ts.Disconect();
}
}
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 "+eatSpAmt+"?" ,0xC08008 );
difSp = difSp - eatSpAmt * oItem.itemvalue ;
}
}
}
}
function Start(){
debug("Moving to battlefield...",0);
state="autowarp";
var x = get_random(warp_pos_x_min,warp_pos_x_max)
ts.Walk(x,warp_pos_y);
WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
}
function NpcDialogMenu(DialogId){
//debug("DialogM1 "+DialogId,0x0000FF)
if(DialogId==1){
ts.SelectChoice(1);
ts.SendEnd();
} else { ts.SendEnd() }
}
function NpcDialog(DialogId){
//debug("DialogM "+DialogId,0x0000FF)
ts.SendEnd()
}
function Stop(){
}
function CheckDisconnect(){
if(ts.Character.HP < (DisconnectFlag * ts.Character.MAXHP)
|| ts.CurrentPartner.HP <(DisconnectFlag * ts.CurrentPartner.MAXHP)
){
frm.mnuEnableReconnect.Checked = false;
ts.Disconect();
}
}
function OnPrivateMsg(PlayerName , Msg){
debug(PlayerName + ": " + Msg,0);
}
function InitBot() {
debug("my bot" , 0x00FF00 );
EatHP();
EatSP();
Timer.Enabled=true;
}
function OnTimer(){
if (ts.CurrentParty==0) ts.RequestParty(pt_leader);
}
function WaitAcceptParty(playerid){
for (var i=0; i<myParty.length;i++) {
if (playerid ==myParty) { ts.AcceptParty(playerid); }
}
}
function AcceptedParty(playerid){
//pname = getPlayerName(playerid)
if(playerid == pt_sena)
{
ts.sena(playerid) //set strategist
}
pt_count++;
if (pt_count==3) {
Start();
}
}
function RequestPartyAcceptFrom(PlayerId ){
}
function PartyStop( playerid ){
for (var i=0; i<myParty.length;i++) {
if (playerid ==myParty) { ts.Disconect(); }
}
}
function onPlayerWalk( uid , x , y ){
//debug("uid = " + uid + " x = " + x + " y = " + y,0);
}
function warpFinish(){
if(state=="autowarp"){
if(ts.Character.mapid == mapid1){
ts.Walk(warp_pos_x_B,warp_pos_y_B);
ts.Delay(2000);
WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
}else if(ts.Character.mapid==mapid2){
var x = get_random(warp_pos_x_min,warp_pos_x_max)
ts.Walk(x,warp_pos_y);
ts.Delay(2000);
WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
}
}
}
InitBot()
debug(ts.Character.Ghost,0x0000FF)