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.

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

    • Greetings, dear friends.   Nice image, right? Bait title, too.   Now that I have your attention, please read.   ---   As a server admin since ~2010, I've seen the rise and fall of Lineage 2 like few others. Over the years, I've watched the popularity of this game decrease, and the decline in players is very noticeable. The data from platforms like Google Trends reflects this reality, with Lineage 2 losing about 10% of its search volume year after year. We are at an all time low of -97% from the peak. It's not just a statistic; it's the reality of the amount of new servers, developer innovation, and online players too.   We've long lost the battle on graphics to other games. What other things do we have an advantage over other games? The gameplay? Every game is unique, so that doesn't count. It's all about us, the community and it's ecosystem, how we interact with each other. There's no other point. Lineage 2 is in a dangerous spot because the community is constantly diminishing because of corruption and a lack of integrity from admins, developers, clan leaders, and big donators.   But this post isn't about giving you sad info; it's about creating the future for Lineage 2 with determination and hope. It's a call to action, a motivational post to all developers, administrators, and players who still care about Lineage 2. The time has come for us to step up, to be better individuals, to stop scamming one another, and to reignite our passion for this amazing game. The fate of Lineage 2 rests in our hands, and together, we can breathe new life into it. If you don't care about this game, please leave. Leave so we all can have more fun without you around.   Those of us who are all still here, are here because at some point in time, we saw greatness in Lineage 2 and were really impressed by that. Lineage 2 is more than a game, it has evolved into a whole ecosystem (and this forum is part of it) - and not only admins and developers are responsible for its growth or decline, influential players like big donators and clan leaders are responsible too.   The biggest problem I see is that players are tired of getting scammed, and servers are fucking booooooooooring, mind killers. The game is 20 years old, why are so many of you still hating on stuff that deviates from retail? Don't you want some innovation? It's always the same story. Hype a new server up, extract money, close shop, repeat. There's very few legit and innovative servers around, and you, as an Admin - could take advantage of that; and as a Player, why are you not protesting? Why do you keep playing shit servers? Why are you okay with getting scammed?   I don't need to put out specific examples and roast specific server admins for being absolute pieces of garbage for repeatedly scamming the community over and over again, never improving the server and making it all about advertising. Same goes to the supporters and promoters of such servers. We all know who those are, and I'm not interested in these people, they have damaged the community enough. I think it's best to just ignore them, don't give them any attention at all. In crypto this is called pump and dump. The same happens with the game's industry, overhyped, overpriced garbage gets pushed in front of illusioned people who then get scammed. Think Diablo 4.   ---   The power is yours. You have the power to change things. You have way more power than you think. As an Admin, stop scamming people, make truly unique servers people want to play and create a community around it. As a Player, demand more quality for your time, reject servers whose only intention is to get your money. They don't care about you, they just want your wallet. Stop getting scammed. And just as important, stop asking for corruption to admins. Yes, you are part of the problem if, as a player, you want an unfair server. As a gamer, stop eating shit from Blizzard and similar. Support independent studios and devs who truly care and give you tons of fun. Don't trust the big media, just like you wouldn't trust some voting sites (not naming any, but if you know, you know).   The way I think is most beneficial for Admins and Developers to see themselves is as Guardians of the community, not as exploiters. Gain your community's trust and give them what they want, you will be happier and richer. Develop truly useful stuff that will make everyone's life better. Infuse joy into everyone's life.   Scam servers do LESS money than you think, and damage the community MORE than you think, too. How many friends do you know that have quit L2 after donating when a server is closing? Long term servers give more value to players AND more money to admins. Who wants to constantly advertise new openings? Who wants to constantly wipe all the player's progress? It's extra work for less money. Outlast your competition and have fun with all the extra money for less work that you'll get. Players will also appreciate you for not deleting their donations every 2 weeks, which is what most servers seem to last. Shitty servers that wipe often and keep all the donation money make players donate LESS on your own and other servers as they are insecure that their donations will last a long time. Same happens with commitment and wipes. Players will reward you for your consistent updates, not for your consistent wipes.   ---   OKAY. PLEASE. If you want Lineage 2 to continue being on life-support and eventually die, continue as you are doing, that's where we'll go as a community. If you want L2 to get up and walk again, maybe even run - one could hope that one day it might even fly! - Go and change things. Do something better. Offer more value. Bring more fun.   Imagine a Lineage 2 ecosystem where players trust that servers will last a long time and where they will have tons of fun. Where innovation is fierce because there's SO many players loving the game and donating. Do you think we can do it? I'm doing my part, but it doesn't depend only on me, it's on the whole community.   ADMINS: Stop launching scam servers. Do what you believe is most fun, be passionate. Care for your community. Prioritize integrity, fairness, and transparency. Don't be a corrupt piece of crap. Don't pay clans to join your server. Make a server so good they'll accept stop getting paid to have fun.   PLAYERS: Stop joining scam servers. Support new, innovative, transparent servers, who care about you and don't have the sole objective of destroying your wallet. Stop asking for admins to be corrupted just for your special donation request - if you do this you are part of the problem. Demand your clan's leader to give you FUN, make them join the fun servers, not the servers where they are getting paid. Don't support Clan Leaders who use you as a number to get money from Admins when joining. Are you a sheep, blindly going to where your Clan Leader is paid more? Or do you respect your time and want to have fun in this amazing game?   I believe everyone reading this is 25+ years old. I'm 32, I've been doing this stuff for half my life. Isn't it time you set new standards for your life? We'll all be happier and enjoy L2, our own collective amazing game, more! I'd love to see new legit and fun servers pop up and be successful. We made this game into what it is today, I'm sure we can change its destiny into something we all benefit more from.   ---   I am doing EVERYTHING possible to change its destiny, and to change the gaming industry. I mean what I say. Be like me and create a better world. Reject scam servers, build fun and amazing servers. I'd like to be kept accountable for what I write. My server is https://l2aqua.net , and you'll never see me do any of that trash. Watch me tryhard to make a better world.   As a side note, I'm not only doing this for L2, I'm also doing this for another different MMORPG genre.   I hope you all step up your game. We will all benefit from it.   Thank you for coming to my ted talk.    
    • 2 Factor Authentication Code for 100% secure login.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock