Jump to content

[L2Net]Script help


H3llB0y

Recommended Posts

Hi all, can someone help me?

 

I'm trying to use this script for sell crops at manor:

 

//////////////////////////////////////////////////////////////////

 

 

 

DEFINE_GLOBAL int ID_Seda 6543

DEFINE_GLOBAL int Ilos 177

 

 

/////////////////////////////////////////////////////////////////////

///////////////////// Manor /////////////////////////////////////////

// 1 - gludio ///2 - dion // 3 - giran // 4 - oren // 5 -aden

// 6 - innadril // 7 -  goddard // 8 - rune // 9 - schuttgard

 

DEFINE_GLOBAL int Man_nr 7

 

////////////////////////////////////////////////////////////////////

//// Anti anti bot

define_global int AAB 0 // 1-on 0-off

define_global int aab_sleep 100

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

/////////////// Dont change anything below /////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

define int slep_ran 0

GET_RAND slep_ran 0 70

aab_sleep = aab_sleep + slep_ran

Define string Man_name "Manor Manager"

Define int temp_spr1 0

Define int dyst_man

PRINT_TEXT "-------------------------------------------------------------------"

PRINT_TEXT "AUTO Sell crops v1.1b EPILOGUE by AdiFenix"

PRINT_TEXT "-------------------------------------------------------------------"

IF target_name != Man_name

COMMAND "/Target <&Man_name&>"

ENDIF

sleep 500

IF target_name == Man_name

DISTANCE dyst_man CHAR_X CHAR_Y CHAR_Z TARGET_X TARGET_Y TARGET_Z

if dyst_man < 150

 

 

IF ID_Seda >= 5000

IF ID_Seda <= 6568

 

ITEM_COUNT temp_spr1 "<&ID_Seda&>"

sleep 500

if temp_spr1 < Ilos

PRINT_TEXT "You typed too much crops to sell =  <&Ilos&> in inv u have =  <&temp_spr1&>  - Script Stopped"

 

ELSE

PRINT_TEXT " Starting monitoring manor system .... "

DEFINE_GLOBAL int zaeve 0

call prepare_1

ENDIF

else

PRINT_TEXT " Are u sure its CROP ID ? Check it please ! - Script Stopped"

endif

else

PRINT_TEXT " Are u sure its CROP ID ? Check it please ! - Script Stopped"

endif

 

else

PRINT_TEXT " You need to be closer to Manor manager !! - Script Stopped"

endif

else

PRINT_TEXT " I dont see -  Manor manager - Script Stopped"

endif

END_SCRIPT

 

 

 

FUNCTION prepare_1

 

SET_EVENT "<&SCRIPTEVENT_SERVERPACKETEX&>" "<&SYSTEM_CURRENTFILE&>" Buy_fun 120

 

 

zaeve = 1

 

do

NPC_DIALOG "bypass -h manor_menu_select?ask=9&state=<&ID_Seda&>&time=0"

sleep 900

loop zaeve == 1

 

 

RETURN VOID

 

FUNCTION Buy_fun

 

Define int Man_ok 0

Define int temp_seed 0

Define int ile_man 0

Define int temp_manor 0

Define int ilo_sed 0

Define int price 0

Define int temp_uid 0

packet.READ_BYTE null

packet.READ_INT16 null

packet.READ_INT32 temp_seed

if temp_seed == ID_Seda

packet.READ_INT32 ile_man

for a 0 "<&ile_man&>" 1

packet.READ_INT32 temp_manor

if temp_manor == Man_nr

// 4 (32 bit)

packet.READ_INT64 ilo_sed

packet.READ_INT64 price

packet.READ_BYTE null

PRINT_TEXT " Slots available =  <&ilo_sed&> Price <&price&>"

Man_ok = 1

ELSE

packet.READ_INT64 null

packet.READ_INT64 null

packet.READ_BYTE null

ENDIF

NEXT

IF Man_ok == 1

IF ilo_sed < Ilos

Ilos = ilo_sed.clone

PRINT_TEXT "Matching ...  "

ENDIF

INVEN_GET_UID temp_uid "<&ID_Seda&>"

if aab == 1

sleep "<&aab_sleep&>"

endif

inject "D0 02 00 01 00 00 00 <&temp_uid.GET_HEX32&> <&ID_Seda.GET_HEX32&> <&Man_nr.GET_HEX32&> <&Ilos.GET_HEX32&> 00

 

00 00 00"

// 4 bits ?

PRINT_TEXT " Sended = you should get the mats now"

zaeve = 0

ENDIF

else

PRINT_TEXT " DEBUG:ERROR WITH PACKET??? TID <&temp_seed&> SID = <&ID_Seda&> "

endif

 

 

 

RETURN VOID

 

I use last version of L2Net with High Five client, but when i use the function Script Editor------->Run-------> "Run syntax check" i get this error:

 

* Error at line 19: an Int value was expected as parameter.*

Error at line 32: an Int value was expected as parameter.

 

Can someone tell me what's the problem with it plz?

Link to comment
Share on other sites

// Manor 1.6 by AdiFenix

//////////////////////////////////////////////////////////////////

DEFINE_GLOBAL Arraylist SED_ID 0

DEFINE_GLOBAL Arraylist ILO 0

DEFINE_GLOBAL Arraylist MAN 0

DEFINE_GLOBAL Arraylist u_id 0

/////////////////////////////////////////////////////////////////////

///////////////////// Manor /////////////////////////////////////////

// 1 - gludio ///2 - dion // 3 - giran // 4 - oren // 5 -aden

// 6 - innadril // 7 -  goddard // 8 - rune // 9 - schuttgard

///////////////////////////////////////////////////////////////////////

 

 

SED_ID.add #I6544 //Complete

ILO.add #I200 

MAN.add #I4 

 

SED_ID.add #I6543

ILO.add #I280

MAN.add #I4

 

SED_ID.add #I6543

ILO.add #I280

MAN.add #I3

 

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

/////////////// Dont change anything below /////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

DEFINE_GLOBAL int zaeve 0

DEFINE_GLOBAL int ok 0

DEFINE_GLOBAL int check_last 0

DEFINE_GLOBAL int Gmsg 0

Define int temp_spr1 0

Define string Man_name "Manor Manager"

Define int dyst_man 0

///////////////////////

if SED_ID.count != ILO.count

PRINT_TEXT " Data corrupt  ! - Script Stopped"

Jump_to_label koni

else

if SED_ID.count != MAN.count

PRINT_TEXT " Data corrupt  ! - Script Stopped "

Jump_to_label koni

endif

ENDIF

 

 

for a 0 "<&ILO.count&>" 1

ITEM_COUNT temp_spr1 "<&SED_ID.a&>"

sleep 250

if temp_spr1 < ILO.a

PRINT_TEXT "You typed too much crops to sell =  <&ILO.a&> in inv u have =  <&temp_spr1&>  - Script Stopped"

Jump_to_label koni

ENDIF

next

 

for a 0 "<&man.count&>" 1

if man.a < 1

PRINT_TEXT " manor nr ---??? - check data ! - Script Stopped"

jump_to_label koni

ENDIF

if man.a > 9

PRINT_TEXT " manor nr +++??? - check data ! - Script Stopped"

jump_to_label koni

ENDIF

next

 

IF target_name != Man_name

COMMAND "/Target <&Man_name&>"

ENDIF

sleep 500

IF target_name == Man_name

DISTANCE dyst_man CHAR_X CHAR_Y CHAR_Z TARGET_X TARGET_Y TARGET_Z

if dyst_man > 150

PRINT_TEXT " You need to be closer to Manor manager !! - Script Stopped"

jump_to_label koni

endif

ELSE

PRINT_TEXT " I dont see -  Manor manager - Script Stopped"

jump_to_label koni

ENDIF

/////////////////////////////////////////////

define int temmm 0

for a o "<&SED_ID.count&>" 1

INVEN_GET_UID temmm "<&SED_ID.a&>"

u_id.add temmm.clone

 

next

 

 

 

 

PRINT_TEXT "-------------------------------------------------------------------"

PRINT_TEXT "AUTO Sell crops v1.6 EPILOGUE by AdiFenix"

PRINT_TEXT "-------------------------------------------------------------------"

 

SET_EVENT "<&SCRIPTEVENT_SERVERPACKETEX&>" "<&SYSTEM_CURRENTFILE&>" Buy_fun 120

SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" sysmas 98

sleep 500

Call prepare_1

 

 

do

sleep 977

loop zaeve < SED_ID.count

 

 

Label koni

 

 

END_SCRIPT

 

 

 

FUNCTION prepare_1

define int zm1 0

ok = 1

do

Gmsg = 0

NPC_DIALOG "bypass -h manor_menu_select?ask=9&state=<&SED_ID.0&>&time=0"

do

sleep 5

loop Gmsg == 0

if ok == 1

sleep 542

endif

loop  ok != 0

 

if SED_ID.count > 1

sleep 542

for i 1 "<&SED_ID.count&>" 1

 

 

check_last = 1

NPC_DIALOG "bypass -h manor_menu_select?ask=9&state=<&SED_ID.i&>&time=0"

 

 

do

sleep 2

loop check_last == 1

sleep 542

NEXT

endif

 

 

 

RETURN VOID

 

FUNCTION Buy_fun

ok = 0

Gmsg = 1

Define int Man_ok 0

Define int temp_seed 0

Define int ile_man 0

Define int temp_manor 0

Define int ilo_sed 0

Define int price 0

Define int temp_uid 0

packet.READ_BYTE null

packet.READ_INT16 null

packet.READ_INT32 temp_seed

FOR b 0 "<&SED_ID.count&>" 1

if temp_seed == SED_ID.b

packet.READ_INT32 ile_man

IF ile_man == 0

PRINT_TEXT "Manor with this type of croops (<&temp_seed&>) = 0 "

endif

for a 0 "<&ile_man&>" 1

packet.READ_INT32 temp_manor

if temp_manor == man.b

packet.READ_INT64 ilo_sed

packet.READ_INT64 price

packet.READ_BYTE null

PRINT_TEXT " Slots available =  <&ilo_sed&> Price <&price&> ID = <&temp_seed&>"

IF ilo_sed < ILO.b

inject "D0 02 00 01 00 00 00 <&u_id.b.GET_HEX32&> <&temp_seed.GET_HEX32&> <&temp_manor.GET_HEX32&> <&ilo_sed.GET_HEX32&> 00 00 00 00"

ELSE

inject "D0 02 00 01 00 00 00 <&u_id.b.GET_HEX32&> <&temp_seed.GET_HEX32&> <&temp_manor.GET_HEX32&> <&ilo.b.GET_HEX32&> 00 00 00 00"

ENDIF

ELSE

packet.READ_INT64 null

packet.READ_INT64 null

packet.READ_BYTE null

PRINT_TEXT "Diferent man.: <&temp_manor&> for <&temp_seed&> "

ENDIF

NEXT

 

 

endif

next

 

if check_last == 1

check_last = 0

endif

zaeve = zaeve + 1

RETURN VOID

 

 

FUNCTION sysmas

define int man_mani 879

define int temp_id 0

packet.read_byte null

packet.read_int32 temp_id

if temp_id == man_mani

Gmsg = 1

endif

 

 

RETURN VOID

Link to comment
Share on other sites

I found this script and i tried to moify it, but i'm not so experienced in l2Net Scripts:

 

 

////////////////////////////////////////

 

////////////////////////////////////////

//

// MANOR SETTINGS

// Define the id of the seed

DEFINE INT SEEDID 6765

// Define the id of the harvester

DEFINE INT HARVID 5125

 

////////////////////////////////////////

//

// INTERNAL VARIABLES [DO NOT CHANGE]

DEFINE_GLOBAL INT ZERO 0

DEFINE_GLOBAL INT TARGET_SEEDED 0

DEFINE_GLOBAL INT TARGET_IN_RANGE 0

 

////////////////////////////////////////

 

LABEL START

 

////////////////////////////////////////

 

PRINT_TEXT "=================================="

PRINT_TEXT "        Seeding Script v1"

PRINT_TEXT "=================================="

PRINT_TEXT " Starting in 3 seconds..."

 

SLEEP 3000

 

DO

  PRINT_TEXT "Targetting mob..."

  TARGET_NEAREST

  CALLSUB ATTACK

  PRINT_TEXT "Harvesting mob..."

  USE_ITEM "<&HARVID&>"

  TARGET_SEEDED = 0

LOOP TRUE

 

////////////////////////////////////////

 

END_SCRIPT

 

////////////////////////////////////////

 

SUB ATTACK

 

PRINT_TEXT "Attacking mob..."

 

IF TARGET_CUR_HP > 0

  ATTACK_TARGET

ENDIF

 

DO

        PRINT_TEXT "Seeding mob..."

      USE_ITEM "<&SEEDID&>"

      TARGET_SEEDED = 1

  ELSE

      SLEEP 500

  ENDIF

LOOP TARGET_SEEDED == 0

 

RETURNSUB

 

////////////////////////////////////////

 

When i start this script, my character seed the mob, and then in Bot Chat i see this:

 

14.01.51 :[Harvesting mob...

14.01.51 :[seeding mob...

14.01.51 :[Attacking mob...

 

Written many many times, and suddenly my character doesn't obey at my commands.....

 

Can anyone tell me if, and where, i made a mistake?

Link to comment
Share on other sites

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

    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
    • Server Rates: » Xp 500x. » Sp 500x. » Aden 500x. » Drop 1x. » PartyXp 2x. » PartySp 2x. » Starting character level -61. Enchant rates: » Safe enchant +4. » Blessed and simple scrolls max enchant (+16). » Crystal scrolls max enchant (+20). » Simple enchant scrolls chance – 65%. » Blessed enchant scrolls chance – 100%. » Crystal enchant scrolls chance – 50% Augmentations: » Mid life stone skill chance – 5%. » High life stone skill chance – 10%. » Top life stone skill chance – 20%. » Augments 1+1 Unique features: » Main town – Giran » Automatic-Manual Potions. » Working 2 castle sieges. (Giran-Aden) » SPS cancel lasts 10 seconds and than buffs come back. » Stackable scrolls, lifestones, book of giants. » Unique pvp zone » More then 11 active raid bosses. » Wedding system. » Unique farming areas. » Npc skill enchanter. » Full npc buffer with auto buff. » Max count of buffs – 55. » Max subclasses – 4. » Free and no quest class change. » Free and no quest sub class. » Raid boss drop nobless item. » No weight limit. » Unique protection anti-hwy armor for archers/daggers etc. » Ingame password change. » Top pvp/pk/online ranks NPC. » Unique monsters & NPC. » Interlude retail skills. » Server up-time [24/7] [99]%. » Perfect class balance (all class can kill all class depending on players skill and setup knowledge,gear,augmentations). » Announcements on double kills triple kills etc. » Announcements on Grand Boss death , with the name of the killer as well as clan name of the player. » Information Npc in game with all servers infromations. Custom server gear : 1). Titanium Armor Lv.1 2). Epic Armor Lv.2 3). Epic Weapons-Kamikaze-Black S grade (Same Stats) 4). Demonic-Angelic Wings-Baium Hair-Custom Accessories (SameStats) 5). Custom Fighter/Mage tattoo Lv1-Lv2-Lv3 6). Shirt (STR,CON,INT +1) 7). Custom Shields Server Commands: .tvtjoin .tvtleave – Join or leave tvt event. .ctfjoin .ctfleave – Join or leave ctf event. .dmjoin .dmleave – Join of leave dm event. .online – current online players count. .repair – repairs stuck character in world. .menu – opens online menu panel. .exit – PVP zone exit in case you are bullied. .changepassword - Opens online menu then u can change ur password in game. .farm - Enable/disable autofarm Event system: » TVT event » CTF event » DM event » Tournament Event » Party Zone » Unique event shop. Olympiad game: » Retail olympiad game. » Competition period [1] week. » Olympiad start time [18:00] end [00:00] GMT+2. » New Heroes every Sunday.
    • Tomorrow grand opening lests go 🙂 
  • Topics

×
×
  • Create New...