Jump to content
  • 0
OmarAcero

Help: Script Invasor

Question

Hello friends, good day,
Can  someone with a good heart help me with this console error please?, I'm stuck there.

Spoiler

yE0EggR.jpg

The script only requires editing:
-In ./src/map/map.h, configure the following text line to avoid reaching the event queue limit:

Quote
#define MAX_EVENTQUEUE 12   //  [Ivion]

Attached this is the example script for hercules: The_Invasor.txt

Note1: GMs can enter to the Control Panel whispering to NPC:invasor . The Control Panel allows GMs to start a new custom invasion event or end the current one. Example: [NPC:invasor] [ open ] , whispear open or start to npc:invasor.

Note2: At the end I will share the script without errors for all.

Edited by OmarAcero

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

you need to have 12 monsters:

First 9 would be normal mob and other 3 as boss monster, but.you specified only 11 id

Onc1,"Aqua",1001,1002,1002,1002,1002,1001,1002,1001,1002,1001,1002;

 

Share this post


Link to post
Share on other sites
  • 0

@Dastgir  Thank you very much brother, the console error is no longer displayed.

I can ask you another question, please, now apparently the script works, I can start an invasion, but I have a problem with the monsters.
When the invasion begins the monsters appear, but they are instantly destroyed. I do not understand why, I'm stuck.

Spoiler

lhrmYZA.jpg

- Could you please guide me? Maybe something I need to edit ... 

-  Original Files: HERE

Edited by OmarAcero

Share this post


Link to post
Share on other sites
  • 0

your profile said you are using Hercules
but when I test the script all kinds of errors pop up

[Error]: script_add_str: detected possible use of wrong case in a script. Found
'setBattleFlag', probably meant to be 'setbattleflag' (in 'npc/zzz.txt').
[Error]: script error in file 'npc/zzz.txt' line 158 column 3
    parse_line: expect command, missing function name or calling undeclared func
tion
   155:
   156:         // Restore experience rates:
   157:         if(checkcell("prontera",0,0,cell_water)) {
*  158:                 setBattleFlag "base_exp_rate",getBattleFlag("base_exp_rate") - $TIbr;
        ~~~~~~~~~~~~~~~~^
   159:                 setBattleFlag "job_exp_rate",getBattleFlag("job_exp_rate") - $TIjr;
   160:                 set $TIbr,0;
   161:                 set $TIjr,0;
[Error]: script error in file 'npc/zzz.txt' line 158 column 46
    parse_line: need ';'
   155:
   156:         // Restore experience rates:
   157:         if(checkcell("prontera",0,0,cell_water)) {
*  158:                 setbattleflag "base_exp_rate",getBattleFlag("base_exp_rate") - $TIbr;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   159:                 setbattleflag "job_exp_rate",getBattleFlag("job_exp_rate") - $TIjr;
   160:                 set $TIbr,0;
   161:                 set $TIjr,0;
[Error]: script error in file 'npc/zzz.txt' line 332 column 48
    parse_line: expect command, missing function name or calling undeclared funtion
   329:         end;
   330:
   331: OnPCDieEvent:
*  332:         if((.a > 0) && (getsavepoint(0) == .c2$[.b])) save .s$,.sx,.sy;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   333:         end;
   334:
   335: OnWhisperGlobal:

this script is not meant for Hercules


ok the script loads fine in rathena

[Warning]: buildin_monster: Attempted to spawn non-existing monster class 2503
[Debug]: Source (NPC): invasor (invisible/not on a map)
[Warning]: buildin_monster: Attempted to spawn non-existing monster class 1228
[Debug]: Source (NPC): invasor (invisible/not on a map)

can you just read the map-server.exe for all the errors ?

this is a bad ... script ... unreadable ...
why I have to refer to what the t1 c1 c2 t2 means ...
why not just make a proper variable name like .t1 = .min_time , .t3 = .duration

I cannot read this script, I'm out

Share this post


Link to post
Share on other sites
  • 0

@AnnieRuru  hmmm I do not get any error!! 

Spoiler

bY3pG3f.jpg

 My Emulator is Hercules update 15-04-2018
Use my file, I'm attaching it in .zip....

Note: I have disabled all the columns of types of monsters for the invasions, only the column of aqua is enabled, therefore, please try only to activating the invasion of monster type aqua. Until we can solve this problem.

The_Invasor.zip

Edited by OmarAcero

Share this post


Link to post
Share on other sites
  • 0

remember, the sleep type timer can run multiple times,
and when *awake, will cancel ALL running timer

prontera,155,185,5	script	dhskfshfd	1_F_MARIA,{
	sleep 30000;
	announce .t++ +" times", bc_all;
	end;
OnInit:
	bindatcmd "ev", strnpcinfo(0)+"::Onaaa";
	end;
Onaaa:
	awake strnpcinfo(0);
	end;
}

click on the npc as many times as possible to queue up the timer
and when type @ev, all gets execute at once

my guess is you make the sleep for auto-invasion and the time remaining in the same npc
so when you do a *awake, instead of you want only the timer for next invasion gets awaken, but the event in-progress timer also gets cancel
since you have the "inv_msg" npc, make use of that to run another kind of npc timer

yup, 1 npc, 1 timer

@OmarAcero

and, yeah, VERY bad script,
should make the script read in linear form, not jump here and there

Share this post


Link to post
Share on other sites
  • 0

@AnnieRuru I did not understand very well, but could you improve that script and make it work?....
The original script was made for eathena, maybe with some small adjustments the script can work on hercules too.

it's a good script just need to adjust the small details...  lf you can get the script to work, I'd appreciate it for the rest of your life. ty.

Edited by OmarAcero

Share this post


Link to post
Share on other sites
  • 0

Sorry, I cannot fix this unreadable script, when there are so many other invasion script release out there

just by do a simple search, I have gather so many topics ...

hercules
http://herc.ws/board/topic/10885-help-fix-this-script-other-one-town-invasion/
http://herc.ws/board/topic/14708-help-with-npc-of-invasion/
http://herc.ws/board/topic/9487-invasion-event/#comment-55883
http://herc.ws/board/topic/1900-hercules-invasion/
http://herc.ws/board/topic/10865-help-fix-this-script-debug-town-invasion/

rathena
https://github.com/llchrisll/rAthena-Scripts/blob/master/released/Entertainment/mob_inva.txt
https://rathena.org/board/topic/114255-monster-invasion/
https://rathena.org/board/topic/82384-simple-town-invasion/
https://rathena.org/board/topic/101254-requesting-real-monster-invasion-script/?do=findComment&comment=282088
https://rathena.org/board/topic/69063-request-invasion-cash/

because everyone has different views on this script and everyone requesting all kinds of different features
its very hard to just make a single script to satisfy everyone on the board

how about you make another request topic and request exactly what want ?

Edited by AnnieRuru
sorry I worded a little harsh previously

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.