Jump to content

Recommended Posts

Posted

Works best with stormscreamer. Simply gear up your bot, enchant your passive skills and damage attack skills helps a lot. Skills like Arcane power, hurricane,vamp claw, surrender to wind, curse fear, robe mastery, sigil mastery, wisdom, etc. Setup in the Botting options -> Combat (your attacks, Hurricane, Surrender to wind, Curse fear, Vamp claw), Buffs/Heals (self buffs) like empowering echo etc. In Items tab activate your spiritshots. Get your .reward . Go to the solo zone and start this script. It will automatically get buffs, re-enable your weapon (if disarmed) if you see the script detect your weapon being used when you start it (only have 1 weapon on the bot). It will use hp/mp pots, and toggle skills you put in the script after it respawns. I made 10000's of FA with these bots and script. It is NOT advised to have your main or alts logged on from the same ip while running these bots.

 

If it errors when you run it, on your l2.net window click File->Setup , and put a check mark on Script Compatibility Mode v386. The script will target the nearest flagged player, You may need to in Botting options -> targetting -> select Players

 

target_flagged_v7(mage).l2s

/* This Scipt was created with JingJing IDE. 
* Author: Phear3d
* @ 2012.March.09 at 05:40 PM 
*/
INCLUDE StdLib\Player.l2c
INCLUDE StdLib\inventory.l2c
INCLUDE \char_buffs.l2c
DEFINE_GLOBAL SORTEDLIST DoNotAttack 0

//Chars to not target and not attack (add as many as you like)
DoNotAttack.ADD 1 "SexySophia"
DoNotAttack.ADD 1 "Atari130xe"

//Leave blank, "" , if not using toggle1 or toggle2
DEFINE_GLOBAL STRING Toggle1 "Arcane Power"
DEFINE_GLOBAL STRING Toggle2 ""

//Buff Type: 1=Warrior, 2=Tanker , 3=Mage
DEFINE_GLOBAL INT BuffType 3
//Rebuff if char has under # of buffs (toggles/self buffs are counted as buffs)
DEFINE_GLOBAL INT Buff_If_Under 10
//Skill and Attack Range
DEFINE_GLOBAL INT Range 1800
//Click To Village Delay/Sleep(ms), 12000 ms = 12 seconds (increase delay if you get ported to nearest village)
DEFINE_GLOBAL INT To_Village_Delay 11000


//--**--**--**--**--**--**--**--**--**--**--**--**--**--**
//DO NOT CHANGE ANYTHING BELOW!!!!!!!
DEFINE_GLOBAL STRING Nearest_Player ""
DEFINE_GLOBAL ARRAYLIST FlagList 0
DEFINE_GLOBAL SORTEDLIST MyBuffs 0
DEFINE_GLOBAL STRING NoName ""
DEFINE_GLOBAL INT NeedBuffs 0
DEFINE_GLOBAL INT Toggle_1 0
DEFINE_GLOBAL INT Toggle_2 0

SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" SystemMessage 98
SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" AbnormalStatusUpdate 133
PRINT_TEXT " Started <&SYSTEM_CURRENTFILE&> ] "

SKILL_GET_ID Toggle_1 "<&Toggle1&>"
SKILL_GET_ID Toggle_2 "<&Toggle2&>"

THREAD CheckEQ
THREAD Get_Target
THREAD Check_Dead
THREAD Check_Buffs

THREAD Spam_HP
THREAD Spam_MP
//THREAD Spam_CP

DEFINE ARRAYLIST PlayerList 0
DEFINE INT dist 0

DO
  FlagList.CLEAR
  GET_PLAYERS PlayerList
  SLEEP 500
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF dist <= 9
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 9 ) && ( dist <= 99 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 99 ) && ( dist <= 499 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 499 ) && ( dist <= 999 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 999 ) && ( dist <= 1499 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 1499 ) && ( dist <= 1999 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 1999 ) && ( dist <= 2499 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 2499 ) && ( dist <= 2999 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 2999 ) && ( dist <= 3499 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 3499 ) && ( dist <= 3999 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH
  FOREACH P PLAYER PlayerList
     IF ( PlayerList.P.PVPFLAG == 1 ) && ( PlayerList.P.LOOKS_DEAD == 0 )
          DISTANCE dist PlayerList.P.X PlayerList.P.Y PlayerList.P.Z CHAR_X CHAR_Y CHAR_Z
          IF ( dist > 3999 ) && ( dist <= 4999 )
               CALL ADD_LIST VOID 1 PlayerList.P.NAME
          ENDIF
     ENDIF
  NEXTEACH

SLEEP 2000
LOOP 1 == 1
END_SCRIPT



//---------------------------------------------------------------------------------------
FUNCTION Get_Target
DEFINE INT _dist 0
DEFINE INT F 0

DO
IF NeedBuffs != 1
F = 0
Nearest_Player = ""
FOREACH F STRING FlagList
     IF F == 0
          Nearest_Player = FlagList.F
     ENDIF
NEXTEACH

     IF ( TARGET_NAME == NULL ) || ( TARGET_NAME == "#$<&NoName&>" )
          IF ("DoNotAttack.CONTAINS_KEY <&Nearest_Player&>" == FALSE)
               COMMAND "/target <&Nearest_Player&>"
          ENDIF
     ELSE
          DISTANCE _dist TARGET_X TARGET_Y TARGET_Z CHAR_X CHAR_Y CHAR_Z
          IF ( TARGET_LOOKS_DEAD == 1 ) || ( TARGET_NAME == CHAR_NAME ) || ( _dist > Range )
               CANCEL_TARGET
          ENDIF
     ENDIF

SLEEP 1300
ENDIF
LOOP 1 == 1
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION Check_Dead
DEFINE INT randSleep 0
DEFINE INT t_max 0
DEFINE INT t_min 0
t_min = To_Village_Delay - 1500
t_max = To_Village_Delay + 3500

DO
    IF CHAR_CUR_HP <= 0
     CALL To_Village
    ENDIF
SLEEP 1000
LOOP 1 == 1
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION To_Village
LOCK TV
DEFINE INT randSleep 0
DEFINE INT t_max 0
DEFINE INT t_min 0
t_min = To_Village_Delay - 1500
t_max = To_Village_Delay + 3500


     CANCEL_TARGET
     GET_RAND randSleep "<&t_min&>" "<&t_max&>"
     SLEEP "<&randSleep&>"
     TAP_TO TOWN
     SLEEP 2500
     //toggle1
     IF Toggle_1 > 0
          USE_SKILL "<&Toggle_1&>"
     ENDIF
     SLEEP 1000
     //toggle2
     IF Toggle_2 > 0
          USE_SKILL "<&Toggle_2&>"
     ENDIF


SLEEP 1000
UNLOCK TV
RETURN VOID


//---------------------------------------------
FUNCTION ADD_LIST 1 _name
LOCK ADDL

IF ("DoNotAttack.CONTAINS_KEY <&_name&>" == FALSE)
     FlagList.ADD _name
     //PRINT_TEXT " Added FlagList List:  <&_name&> ]"
ELSE
     //PRINT_TEXT " Found _name on DoNotAttack List: <&_name&> ]"
ENDIF

UNLOCK ADDL
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION SPAM_CP
DEFINE INT CPOT 1
ITEM_GET_ID CPOT "Greater CP Potion"
DO
    IF CHAR_CUR_CP < CHAR_MAX_CP
        USE_ITEM "<&CPOT&>"
    ENDIF
SLEEP 500
LOOP 1 == 1
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION Spam_MP
DEFINE INT MPOT 1
DEFINE INT Half_MP
Half_MP = CHAR_MAX_MP / 2
ITEM_GET_ID MPOT "Mana Potion"

DO
    IF CHAR_CUR_MP < Half_MP
            USE_ITEM "<&MPOT&>"
            SLEEP 500
    ENDIF
SLEEP 500
LOOP 1 == 1
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION Spam_HP
DEFINE INT HPOT 1
ITEM_GET_ID HPOT "Greater Healing Potion"
DO
    IF CHAR_CUR_HP < CHAR_MAX_HP
        USE_ITEM "<&HPOT&>"
        SLEEP 11000
    ENDIF
SLEEP 500
LOOP 1 == 1
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION Check_Buffs

DO
IF NeedBuffs == 1
     COMMAND "/target Jack Sage"
     SLEEP 1000
     COMMAND "/target Jack Sage"
     SLEEP 1000
     IF BuffType == 1
          NPC_DIALOG "bypass -h npc_<&TARGET_ID&>_Buff 1501 1499 1504 1500 1502 1519 825 829 4699 1363 1461 1364 1416 1238 914 271 272 274 275 309 310 915 530 264 265 266 267 268 269 304 305 349 364 529 1035 1397 1259 1542 1062 1388 1191 1182 1189 1354 1392 1393 1352 1307 1044 1323"
     ENDIF
     IF BuffType == 2
          NPC_DIALOG "bypass -h npc_<&TARGET_ID&>_Buff 1501 1499 1504 1500 1502 1519 1503 825 828 4699 1363 1461 1364 1416 1238 914 271 272 274 275 309 310 530 264 266 267 268 269 265 304 305 349 364 529 1035 1397 1259 1542 1389 1191 1182 1189 1354 1392 1393 1352 1307 1044 1323"
     ENDIF
     IF BuffType == 3
          NPC_DIALOG "bypass -h npc_<&TARGET_ID&>_Buff 1501 1499 1504 1500 1503 830 4703 1363 1461 1364 1416 1238 914 273 276 309 365 915 530 264 266 267 268 265 304 305 349 529 1035 1078 1085 1397 1303 1259 1542 1062 1389 1191 1182 1189 1354 1392 1393 1352 1307 1044 1323"
     ENDIF
     SLEEP 2000
ENDIF
IF ( NeedBuffs == 0 ) && ( TARGET_NAME == "#$Jack Sage" )
     CANCEL_TARGET
     SLEEP 1000
ENDIF
SLEEP 2000
LOOP 1 == 1
RETURN VOID


//---------------------------------------------
FUNCTION AbnormalStatusUpdate
LOCK ASU
MyBuffs.CLEAR

  DEFINE INT PacketType 0
  DEFINE INT ListSize 0
  DEFINE INT SkillId 0
  DEFINE INT SkillLevel 0
  DEFINE INT Duration 0

  PACKET.READ_BYTE PacketType
  PACKET.READ_INT16 ListSize

  //PRINT_TEXT " Received AbnormalStatusUpdate packet: Size: <&ListSize&> ]"

  DEFINE char_buffs my_buff

  FOR MyBuffsEntryIDX 0 "<&ListSize&>" 1
     PACKET.READ_INT32 SkillId
     PACKET.READ_INT16 SkillLevel
     PACKET.READ_INT32 Duration
     Duration = ( ( Duration * TICKS_PER_S ) + NOW )

     my_buff.cha_id = CHAR_ID
     my_buff.sk_id = SkillId
     my_buff.sk_level = SkillLevel
     my_buff.sk_dur = Duration

     IF SkillId != 0
         IF ("MyBuffs.CONTAINS_KEY <&SkillId&>" == FALSE)
               MyBuffs.ADD my_buff.clone "<&SkillId&>"
          ENDIF
     ENDIF
  NEXT

  IF MyBuffs.COUNT < Buff_If_Under
     NeedBuffs = 1
  ELSE
     NeedBuffs = 0
  ENDIF

UNLOCK ASU
RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION SystemMessage

  DEFINE INT PacketType 0
  DEFINE INT MsgID 0
  DEFINE INT typesCount 0
  DEFINE INT Unk1 0
  DEFINE INT TypeID 0
  DEFINE STRING SName " "

  PACKET.READ_BYTE PacketType
  PACKET.READ_INT32 MsgID
  PACKET.READ_INT32 typesCount
  PACKET.READ_INT32 Unk1
  //PACKET.READ_STRING SName
  PACKET.READ_INT32 TypeID

     IF MsgID == 113
          IF TypeID == 1539
               CANCEL_TARGET
               PRINT_TEXT " MsgID=<&MsgID&> | TypeID: <&TypeID&> (cannot be used due to unsuitable terms.) ]"
               //PRINT_TEXT " MsgID=<&MsgID&> | TypeID: <&TypeID&> | Packet: <&PACKET.GET_HEX&> ]"
               SLEEP 1000
               CALL To_Village
          ENDIF
     ENDIF

     IF MsgID == 144
          PRINT_TEXT " MsgID=<&MsgID&> | Cancelling Target! (That is an incorrect target.) ]"
           FOREACH F STRING FlagList
               IF ( F == 0 ) && ( TARGET_NAME == FlagList.F )
                  FlagList.REMOVE F
                  SLEEP 500
                  CANCEL_TARGET
               ENDIF
           NEXTEACH
     ENDIF

     IF MsgID == 1996
          CANCEL_TARGET
          PRINT_TEXT " MsgID=<&MsgID&> | Cancelling Target! (The attack has been blocked) ]"
          SLEEP 1000
     ENDIF

     IF MsgID == 181
          CANCEL_TARGET
          PRINT_TEXT " MsgID=<&MsgID&> | Cancelling Target! (Cannot see target.)]"
          SLEEP 1000
     ENDIF

     IF MsgID == 748
          CANCEL_TARGET
          PRINT_TEXT " MsgID=<&MsgID&> | Cancelling Target! (The distance is too far and so the casting has been stopped.) ]"
          SLEEP 1000
     ENDIF

     IF MsgID == 2187
          CANCEL_TARGET
          PRINT_TEXT " MsgID=<&MsgID&> | Cancelling Target! (The target is located where you cannot charge.) ]"
          SLEEP 1000
     ENDIF

RETURN VOID


//---------------------------------------------------------------------------------------
FUNCTION CheckEQ
DEFINE STRING WEAPON ""
DEFINE STRING USE_ME ""
DEFINE STRING TEMP ""
DEFINE ARRAYLIST INV_LIST 0

GET_INVENTORY INV_LIST
SLEEP 1000
  FOREACH I Inventory INV_LIST
     IF ( ( INV_LIST.I.EQUIPPED == 1 ) ) && ( ( INV_LIST.I.SLOT == 16384 ) || ( INV_LIST.I.SLOT == 128 ) )
          WEAPON = INV_LIST.I.NAME
          PRINT_TEXT " Detected Weapon Being Used: <&WEAPON&> ]"
          TEMP = INV_LIST.I.ID.GET_HEX32
          USE_ME = "#$19 <&TEMP&> 00 00 00 00"
     ENDIF
  NEXTEACH

DO
GET_INVENTORY INV_LIST
SLEEP 500
  FOREACH I Inventory INV_LIST
    IF INV_LIST.I.NAME == "#$<&WEAPON&>"
        IF INV_LIST.I.EQUIPPED == #i0
          PRINT_TEXT " Equipping <&WEAPON&> ]"
          INJECT "<&USE_ME&>"
        ENDIF
    ENDIF
  NEXTEACH
SLEEP 1000
LOOP 1 == 1
RETURN VOID

 

You will also need to put this script in your scripts folder

and name it

char_buffs.l2c

class char_buffs null
VAR_START
PUBLIC int cha_id 0
PUBLIC int sk_id 0
PUBLIC int sk_level 0
PUBLIC int sk_dur 0

VAR_END


END_CLASS

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...