Jump to content
  • 0

Server side doesnt read certain scripts. Why?


Santafe

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

AS the topic denotes for some reason it doesnt sense? or read the custom scripts. i use rAmod which supports 2013 clients. i kept trying different things like making a new folder inside npc/custom but nothing worked. i even searchd in forums here but still nothing so please help me.

 

Basically it reads all the builtin scripts like the healer /warper/ reseter /woe controller.

IF i use a custom like Broadcaster.txt , nomatter wat i do it doesnt appear ingame. the server side doesnt show any kind of warning too. ive tried so hard i almost gave up :( PLZ somebody help me with this :/

Link to comment
Share on other sites

22 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

Did you edit your trunk/npc/scripts_custom.conf ?

// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

//npc: npc/location/to/script.txt

You can also use the '@loadnpc' command in-game if you don't want to load all of your NPCs automatically.

It would look like

@loadnpc npc/location/to/script.txt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

 

Did you edit your trunk/npc/scripts_custom.conf ?

// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

//npc: npc/location/to/script.txt

You can also use the '@loadnpc' command in-game if you don't want to load all of your NPCs automatically.

It would look like

@loadnpc npc/location/to/script.txt

 

Hey Kuro ! Bonjour :P ur @loadnpc worked like a charm! but can u tell me why i should do this manually instead of server autoreading it? i have tons of custom scripts and this is a pain everytime i start the server :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

No idea ^^

 

Does at least one of your custom scripts works? Maybe it's because you have too many of them?

Try to put your custom scripts at the begining of your scripts_custom.conf we never know.

 

Are the other scripts in scripts_custom.conf working? maybe it's because the whole file isn't loaded.

Try to put them in other .conf

Edited by Kurofly
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

Tried Everything , Doesnt work :/

 

No idea ^^

 

Does at least one of your custom scripts works? Maybe it's because you have too many of them?

Try to put your custom scripts at the begining of your scripts_custom.conf we never know.

 

Are the other scripts in scripts_custom.conf working? maybe it's because the whole file isn't loaded.

Try to put them in other .conf

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

Well if this is the only solution...

-	script	ScriptLoader	-1,{
OnInit:
	setarray .script_locations$ ,	"npc/path/to/script1" ,
									"npc/path/to/script2";
	end;

OnPCLoginEvent:
if (!.set) {
	for (.@i = 0 ; .@i < getarraysize(.script_locations$) ; .@i++)
		atcommand "@loadnpc "+.script_locations[.@i];
	.set = 1;
}
}

Still it's really weird

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

Well if this is the only solution...

-	script	ScriptLoader	-1,{
OnInit:
	setarray .script_locations$ ,	"npc/path/to/script1" ,
									"npc/path/to/script2";
	end;

OnPCLoginEvent:
if (!.set) {
	for (.@i = 0 ; .@i < getarraysize(.script_locations$) ; .@i++)
		atcommand "@loadnpc "+.script_locations[.@i];
	.set = 1;
}
}

Still it's really weird

thanks ill try this but y is there such a huge gap between scrip 1 and script 2? :D should i do that to continue for rest of the scripts? thanks in advance <3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

no it's just to see them better than if they were one after another.

from my script editor it was aligned but when i CPed it it went wrong ^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

no it's just to see them better than if they were one after another.

from my script editor it was aligned but when i CPed it it went wrong ^^

 

Hey kuro could u fix this? i used ur script and whenever i logged in it said failed to load script. But if i use @loadnpc manually it works :( (ur script almost works but it fails to load the npc :/ )

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

-	script	ScriptLoader	-1,{
OnInit:
	setarray .script_locations$ ,	"npc/path/to/script1" ,
									"npc/path/to/script2";
	end;

OnPCLoginEvent:
if (!.set) {
	for (.@i = 0 ; .@i < getarraysize(.script_locations$) ; .@i++)
		atcommand "@loadnpc "+.script_locations$[.@i];
	.set = 1;
}
}

My bad I just forgot a '$'.

 

Never forget the $$ xD

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

-	script	ScriptLoader	-1,{
OnInit:
	setarray .script_locations$ ,	"npc/path/to/script1" ,
									"npc/path/to/script2";
	end;

OnPCLoginEvent:
if (!.set) {
	for (.@i = 0 ; .@i < getarraysize(.script_locations$) ; .@i++)
		atcommand "@loadnpc "+.script_locations$[.@i];
	.set = 1;
}
}

My bad I just forgot a '$'.

 

Never forget the $$ xD

 

 

WOW Master i owe u A HUGE ONE! u just saved me frm making a server frm scratch all over again xD. Works like a charm with the $ <3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

-	script	ScriptLoader	-1,{
OnInit:
	setarray .script_locations$ ,	"npc/path/to/script1" ,
									"npc/path/to/script2";
	query_sql ("SELECT `account_id` FROM `ragnarok`.`char` WHERE `online` = '1' LIMIT 1",.@aid);
	if (.@aid == -1) end;
	else attachrid(.@aid);
OnPCLoginEvent:
if (!.set) {
	for (.@i = 0 ; .@i < getarraysize(.script_locations$) ; .@i++)
		atcommand "@loadnpc "+.script_locations$[.@i];
	.set = 1;
}
}

Just so that it also loads the scripts on init because if you use '@reloadscript' you'd have to wait for someone to log on.

Not really convenient to test some scripts on your own..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

-	script	ScriptLoader	-1,{
OnInit:
	setarray .script_locations$ ,	"npc/path/to/script1" ,
									"npc/path/to/script2";
	query_sql ("SELECT `account_id` FROM `ragnarok`.`char` WHERE `online` = '1' LIMIT 1",.@aid);
	if (.@aid == -1) end;
	else attachrid(.@aid);
OnPCLoginEvent:
if (!.set) {
	for (.@i = 0 ; .@i < getarraysize(.script_locations$) ; .@i++)
		atcommand "@loadnpc "+.script_locations$[.@i];
	.set = 1;
}
}

Just so that it also loads the scripts on init because if you use '@reloadscript' you'd have to wait for someone to log on.

Not really convenient to test some scripts on your own..

 

 

hey kuro just to be sure does the "ragnarok" mean my server that i set at "s1" "p1"?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

ragnarok is a SQL table, it stores data from the game.

I don't remember the old times when I created my server so I can't tell you^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

ragnarok is a SQL table, it stores data from the game.

I don't remember the old times when I created my server so I can't tell you^^

 

Hey kuro badnews :( the sql thing doesnt work. even now i have to relogin if i use .@reloadscript.

Another issue is that not all npcs are loaded even if i put them in the script(only 5 out of 16 load) is there a limit set by anychance? thanks in advance :I

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

It works for me, normally all your scripts should load when you execute the command '@loadnpc .../.../yourscript.txt

 

Does your mapserv show sql errors?

 

For the limit, you should be able to put as many scripts as you want as far as you don't exceed 128 so 16 shouldn't be a problem.

Does the script loadings fail or does it just not load them?

Again if you have errors please show them to me  :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

It works for me, normally all your scripts should load when you execute the command '@loadnpc .../.../yourscript.txt

 

Does your mapserv show sql errors?

 

For the limit, you should be able to put as many scripts as you want as far as you don't exceed 128 so 16 shouldn't be a problem.

Does the script loadings fail or does it just not load them?

Again if you have errors please show them to me  :)

No errors at all. They just dont get loaded, i thought its the scripts fault but it worked when i manually used @loadnpc frm ingame :( no errors frm the script. And when i reload script everything disappears and i have to relogin to make it reappear. xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

When you reloadscript and load this NPC only it doesn't load other NPCs? And you don't get any sql errors? It's really weird..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

I had the same problem loading some custom. I tryed to load some npc that wasn't available (npc: npc/location/to/script.txt didn't exist for example), after that, I couldn't load more npc. Maybe you have the same strange things. Try to put the load at the beginning. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

I had the same problem loading some custom. I tryed to load some npc that wasn't available (npc: npc/location/to/script.txt didn't exist for example), after that, I couldn't load more npc. Maybe you have the same strange things. Try to put the load at the beginning. 

at the beginning? can u be more specific? :/

 

 

When you reloadscript and load this NPC only it doesn't load other NPCs? And you don't get any sql errors? It's really weird..

 

yea kuro rAmod is screwed up lol

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

//npc: npc/location/to/script.txt

put your script here before all the other ones.

 

 

Try to put your custom scripts at the begining of your scripts_custom.conf we never know.

 

if it works... -_-  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

 

I had the same problem loading some custom. I tryed to load some npc that wasn't available (npc: npc/location/to/script.txt didn't exist for example), after that, I couldn't load more npc. Maybe you have the same strange things. Try to put the load at the beginning. 

at the beginning? can u be more specific? :/

Edit the first .conf where the npc are load, and try to put your npc there. If it loads, you have maybe somewhere a npc that you can't load (because it doesn't exist) and make other npc fail loading. I don't know if it'll help, but I had this kind of problem.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

//npc: npc/location/to/script.txt
put your script here before all the other ones.

 

Try to put your custom scripts at the begining of your scripts_custom.conf we never know.

if it works... -_-

Nope i tried that xD

I had the same problem loading some custom. I tryed to load some npc that wasn't available (npc: npc/location/to/script.txt didn't exist for example), after that, I couldn't load more npc. Maybe you have the same strange things. Try to put the load at the beginning.

at the beginning? can u be more specific? :/

Edit the first .conf where the npc are load, and try to put your npc there. If it loads, you have maybe somewhere a npc that you can't load (because it doesn't exist) and make other npc fail loading. I don't know if it'll help, but I had this kind of problem.

Nope i tried that too i guess ill have to manually load them thanks alot for ur help u two :)

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

×   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...