Jump to content

Recommended Posts

Posted

HI guys. I have script for normal farm but character dont use soulshots S grade :( i found scripts but i dont know how joint it into one whole

 

Script farm:

//**** Fighter script v0.2 ****//

//Remember to set weapon ID at line 133 and 137 (in the killtarget sub)

//****** User Settings ******//
DEFINE INT MIN_ATTACKDELAY 1500
DEFINE INT MAX_ATTACKDELAY 2500
DEFINE INT LOOT_RANGE 100
DEFINE INT MIN_PICKUPDELAY 150
DEFINE INT MAX_PICKUPDELAY 300
DEFINE INT MIN_TARGETDELAY 500
DEFINE INT MAX_TARGETDELAY 1000
DEFINE INT MOVETO_DISTANCE 400

//***********************Kite Stuff*********************//
DEFINE INT KiteRange 450
DEFINE DOUBLE VX 0
DEFINE DOUBLE VY 0
DEFINE DOUBLE VX1 0
DEFINE DOUBLE VY1 0
DEFINE DOUBLE LEN 0
//*****************************************************//

//*******time*******//
DEFINE INT StartTime 0
DEFINE INT EndTime 0
DEFINE INT UsedTime 0
DEFINE INT MaxTime 100000000
DEFINE INT MaxPickTime 50000000

//******Rest Settings******//
//set here at what hp/mp to rest. (in %)
DEFINE INT RESTHPPERCENT 40
DEFINE INT RESTMPPERCENT 0

DEFINE INT TEMP 0
DEFINE INT i 0
DEFINE INT TEN 10
DEFINE INT FOUR 4
DEFINE INT HUNDRED 100
DEFINE INT COUNT 0
DEFINE INT Rest 0
DEFINE INT RESTHP 0
DEFINE INT RESTMP 0
DEFINE INT SKILLMP 0
DEFINE INT DISTANCE_TO_TARGET 0
DEFINE INT PICKUP_X 0
DEFINE INT PICKUP_Y 0
DEFINE INT TEMPX 3
DEFINE DOUBLE X 0
DEFINE DOUBLE Y 0
DEFINE DOUBLE Range 50


MATH RESTHP CHAR_MAX_HP MULTIPLY RESTHPPERCENT
MATH RESTHP RESTHP DIVIDE HUNDRED
MATH RESTMP CHAR_MAX_MP MULTIPLY RESTMPPERCENT
MATH RESTMP RESTMP DIVIDE HUNDRED

//****** MAIN ******//

//just a printout 
PRINT_TEXT "rest below <&RESTHP&> HP"
DO
TARGET_NEAREST
GET_RAND TEMP "<&MIN_TARGETDELAY&>" "<&MAX_TARGETDELAY&>"
SLEEP "<&TEMP&>"
IF TARGET_CUR_HP > ZERO
	CALLSUB MovetoTarget
	SLEEP 500
	CALLSUB KillTarget
ENDIF	

//Target is dead, pick up
GET_TIME StartTime
SET PICKUP_X "<&CHAR_X&>"
SET PICKUP_Y "<&CHAR_Y&>"
	WHILE NEAREST_ITEM_DISTANCE < LOOT_RANGE
		GET_TIME EndTime
		MATH UsedTime EndTime SUBTRACT StartTime
		IF UsedTime > MaxPickTime
			BREAK 2
		ENDIF
		DISTANCE TEMP CHAR_X CHAR_Y TEMP PICKUP_X PICKUP_Y TEMP
		IF TEMP > LOOT_RANGE
			BREAK 2
		ENDIF
		CALLSUB Pickup
	WEND

	IF COUNT_NPC_TARGETME == ZERO
		IF CHAR_CUR_HP < RESTHP
			CALLSUB Rest
		ENDIF
	ENDIF
LOOP ZERO == ZERO
SCRIPT_END

//***************** SUBS *****************//
SUB MovetoTarget
SET i 0
GET_TIME StartTime
DISTANCE DISTANCE_TO_TARGET CHAR_X CHAR_Y CHAR_Z TARGET_X TARGET_Y TARGET_Z
IF DISTANCE_TO_TARGET <= MOVETO_DISTANCE
	RETURNSUB
ENDIF
SET TEMPX "<&TARGET_X&>"
MOVE_TO "<&TARGET_X&>" "<&TARGET_Y&>" "<&TARGET_Z&>"
WHILE DISTANCE_TO_TARGET > MOVETO_DISTANCE
               GET_TIME EndTime
	MATH UsedTime EndTime SUBTRACT StartTime
	DISTANCE DISTANCE_TO_TARGET CHAR_X CHAR_Y CHAR_Z TARGET_X TARGET_Y TARGET_Z
	GET_RAND TEMP "<&MIN_TARGETDELAY&>" "<&MAX_TARGETDELAY&>"
	SLEEP "<&TEMP&>"
	IF UsedTime > MaxTime
		CALLSUB Stuck
		RETURNSUB
	ENDIF	
	IF TARGET_X != TEMPX
		MOVE_TO "<&TARGET_X&>" "<&TARGET_Y&>" "<&TARGET_Z&>"
	ENDIF	
WEND
RETURNSUB
//******************************************************************************//
SUB KillTarget
GET_TIME StartTime
DO
	MATH i i ADD ONE
	PRINT_TEXT "Entering loop <&i&>"		
	GET_TIME EndTime
	MATH UsedTime EndTime SUBTRACT StartTime
	IF i == FOUR
		IF TARGET_CUR_HP == TARGET_MAX_HP
			USE_ITEM 13 //Equip Short Bow
			SLEEP 1000
			ATTACK_TARGET
			SLEEP 3500
			USE_ITEM 2543 //Equip duals
			SET i 0
		ENDIF
	ENDIF	
	IF UsedTime > MaxTime
		IF TARGET_CUR_HP == TARGET_MAX_HP
			CALLSUB Stuck
			RETURNSUB
		ENDIF
	ENDIF	
	ATTACK_TARGET
	GET_RAND TEMP "<&MIN_ATTACKDELAY&>" "<&MAX_ATTACKDELAY&>"
	SLEEP "<&TEMP&>"
LOOP TARGET_CUR_HP > ZERO
RETURNSUB
//******************************************************************************//
SUB Pickup
CLICK_NEAREST_ITEM
GET_RAND TEMP "<&MIN_PICKUPDELAY&>" "<&MAX_PICKUPDELAY&>"
SLEEP "<&TEMP&>"
RETURNSUB
//******************************************************************************//
SUB Rest
PRINT_TEXT "starting to rest"
SLEEP 1000
COMMAND "/sit"
//USE_SKILL 226
WHILE CHAR_CUR_HP < CHAR_MAX_HP
	IF COUNT_NPC_TARGETME != ZERO
		COMMAND "/stand"
		RETURNSUB
	ENDIF
SLEEP 1000
WEND
//done resting lets stand
COMMAND "/stand"
SLEEP 200
RETURNSUB
//******************************************************************************//
SUB Stuck
//need to get a vector for from the monster to us
MATH VX CHAR_X SUBTRACT TARGET_X
MATH VY CHAR_Y SUBTRACT TARGET_Y
//now we have the vector from the target to us... lets normalize it now
DISTANCE LEN ZERO ZERO ZERO VX VY ZERO
MATH VX VX DIVIDE LEN
MATH VY VY DIVIDE LEN
//now lets scale back up to our range
MATH VX VX MULTIPLY KiteRange
MATH VY VY MULTIPLY KiteRange
SET VX1 "<&VX&>"
SET VY1 "<&VY&>"	
//then we add this offset to our location
MATH VX VX ADD CHAR_X
MATH VY VY ADD CHAR_Y
//and finally... we move
MOVE_TO "<&VX&>" "<&VY&>" "<&CHAR_Z&>" 
SLEEP 1500
//left turn
MATH VX CHAR_X SUBTRACT VY1
MATH VY CHAR_Y ADD VX1
MOVE_TO "<&VX&>" "<&VY&>" "<&CHAR_Z&>"
SLEEP 1500
MOVE_TO "<&TARGET_X&>" "<&TARGET_Y&>" "<&TARGET_Z&>"
SLEEP 1500
RETURNSUB


//**** Developed by Oddi 2007 ****//
//Thanks to Slothmo & Asmodin88 for providing useful pre-code

 

Script use SS:

DEFINE INT ITEMCOUNT 0

//Will count how SoulShot S
ITEM_COUNT ITEMCOUNT 1467 //Soulshot: S-grade

//While u have less then 200 soulshot S will stop the loop and will use Blessed Scroll of Escape: Clan Hall
WHILE ITEMCOUNT > i200

//To save Sss, i’ll use only if the mob’s HP more then 8000 ( u can Edit this if u wanna)
   IF TARGET_CUR_HP > i8000
       USE_ITEM 1467 //Soulshot: S-grade
   ENDIF

   ITEM_COUNT ITEMCOUNT 1467 //Soulshot: S-grade

WEND

USE_ITEM 5858 //BsoeCH

SCRIPT_END

 

sorry for my bad english xD

Plz for help

  • 3 months later...
Posted

i dont know how is in 231b version but in new if u want write function like that IF something > 200 u need add #i not only i

and u i that script write: IF moob have more hp then 8k then use soulshot, i dont know what u want to do but if u wan use soulshot all tie delete that function

 

 

here u have code:

DEFINE INT ITEMCOUNT 0

//Will count how SoulShot S
ITEM_COUNT ITEMCOUNT 1467 //Soulshot: S-grade

//While u have less then 200 soulshot S will stop the loop and will use Blessed Scroll of Escape: Clan Hall
WHILE ITEMCOUNT > #i200

//To save Sss, i’ll use only if the mob’s HP more then 8000 ( u can Edit this if u wanna)
    IF TARGET_CUR_HP > #i8000
        USE_ITEM 1467 //Soulshot: S-grade
    ENDIF

    ITEM_COUNT ITEMCOUNT 1467 //Soulshot: S-grade

WEND

USE_ITEM 5858 //BsoeCH

SCRIPT_END

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.

  • Posts

    • @Mobius I only asked you one question! All your previous versions are sh*t and the last version is the best ? Because this is what you said.
    • Close that LOLserver. And change name to L2Wipe&Money.
    • Open Beta January 17th & 21:00 UTC +2 Launch Date January 24th & 21:00 UTC +2 Click Here to Explore Vanilla Gracia Final Low-Rate Server. Join our Discord Community     Following the success of our Vanilla project, we decided to launch it again as Last PlayINERA’s Server! Core Settings *Vanilla will have Strict Botting & Client Limitation Rules and Chronicle Progression from Gracia Final to Gracia Epilogue to H5 in Long term! XP: x4 SP: x4 Adena: x2 Drop: x2 Spoil: x3 Manor: x0.4 (60% reduction) - Festive sweeper enabled! Seal Stones: x2 Herbs: x1 Safe Enchant: +3 Maximum Enchant: Retail Enchant Rate: Dynamic General Settings Auto-loot Can be toggled Buffs Adventurer Guide buffs are free, retail level limit removed. Buff Slots: 20 (+ 4) Summon buffs will remain on re-summoning & on death while Noblesse blessing is applied! (Olympiad excluded) Pet buffs will be saved on relog but not during summon/unsummon. Event Buffer [NEW] Event Buffer is enabled and will spawn randomly between 18:00 ~ 23:00 in Giran for 10 minutes, it will apply Farm Only buffs that are cancelled in PvP, Siege / Epic PvP zones & while in a chaotic state! Duration: 1-hour! Territory Wars every two weeks on Saturday. Castle sieges every two weeks on Sunday Class Transfer 1st Class Transfer: Available for purchase with either Adena or iCoin 2nd Class Transfer: Available for purchase with either Adena or iCoin 3rd Class Transfer: Quest or iCoin (the 3rd class transfer will become available for purchase with iCoin as soon as someone has entered the Hall of Fame for completing the 3rd class transfer quest for the class in question) Hellbound Hellbound Lv. 0-6: ATOD x1 Hellbound Lv. 7-12: ATOD x2 Tiat & Ekimus will become available at Stage 12 Hellbound can only be leveled up by killing monsters. No quests or raids are needed To open Hellbound, a party must kill Baylor in the Crystal Caverns The following items are now tradable: Ancient Tome of the Demon  Hidden First Page  Hidden Second Page  Demon Contract Fragment INERA Hub Library Clan Recruitment System Options Services Milestone Rewards Earn rewards for reaching various daily/one-time goals Client Limit: 1 (+1 with Standard Premium) Shift + Click Information on Monsters SP are required to learn new skills Offline shops Lasts for 15 days Olympiad Olympiad period: 1st and 15th day of the month (14th & Last day of month is the last day) 3 Vs. 3 match disabled Class-based matches will be held over the weekends One registration per HWID (PC) Minimum participants: 9 Party Matching System Earn bonuses for finding a group via the Party Matching system Vote Reward System World Chat No limits for first day! Available from level 20 Raid Bosses Epic Raid Boss zones will turn into a PvP zone while the Epic Raid Boss is alive ( + means Random) Server will start with all grand raids dead. Normal Raids: 12h (+6 hours random). Subclass raids, respawn 12h (+6 hours random). Noblesse Barakiel 12h (+6 hours random, PvP zone). Anakim & Lilith are static 24 hours respawn. Queen Ant: 24 hours (+2 hours random). Core: 40 hours (+2 hours random). Orfen: 32 hours (+2 hours random). Antharas Respawn: 8 Days. Randomly spawns at 19:00 ~ 21:00 Boosted to level 83 on Hellbound stage 7. Valakas Respawn: 10 Days. Randomly spawns at 19:00 ~ 21:00 Baium Respawn: 5 Days. Randomly spawns at 21:00 ~ 23:00 Boosted to level 83 on Hellbound stage 7. Frintezza Respawn: 2 Days. Randomly spawns at 21:00 ~ 23:00 Instanced Zaken Zaken (Day): Monday, Wednesday, Friday at 6:30. Zaken (Day): 9 players, LvL 55-65, 1hr max. Zaken (Night): Wednesday at 6:30 Zaken (Night): 18-45 players, LvL 55-65, 6hr max. Tiat: Saturday at 6:30, 18-36 players, 2 hrs max. Boosted to level 85. Ekimus: 24h at 6:30, 18-27 players, 1hr max. Tully’s Workshop (Darion & Tully): 24h +-1h. Tower of Naia (Beleth): 5 days, 18 min. & 36 max.
  • Topics

×
×
  • Create New...