Jump to content
  • 0

Help with Wings. Evo


fiction

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   1
  • Joined:  01/03/12
  • Last Seen:  

when i start to kill monster i get this error

[Error]: run_script: infinity loop !
[Debug]: Source (NPC): Wings_Conf (invisible/not on a map)

regards!.

Wings_Evo.txt

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

OnNPCKillEvent:
freeloop(1);
...............
............
...............
...............
freeloop(0);
end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

No, don't use freeloop here, it will freeze the emulator...

Just take a look here, the two loops use the same .@a variable.

	setarray .@slots[0], 1, 9, 10;	// put here your slots.
for ( set .@a, 0; .@a < 3 ; set .@a, .@a + 1 ) {
	set .@e, getequipid ( .@slots[.@a] );
	for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) {
		... code ...
	}
}

I think should be modified with:

	setarray .@slots[0], 1, 9, 10;	// put here your slots.
set .@slot_size, getarraysize(.@slots);
for ( set .@i, 0; .@i < .@slot_size ; set .@i, .@i + 1 ) {
	set .@e, getequipid ( .@slots[.@i] );
	for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) {
		... code ...
	}
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   1
  • Joined:  01/03/12
  • Last Seen:  

i made the changes, no error in consola but the wings doesn't envolved :/

Edited by fiction
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

It's hard to find the error since the script isn't really user friendly and clean (some bad loops and things).

I find one error here:

        if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;

Should be:

        if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;

Edit:

And another one (but don't cause you problem right now):

setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;

To:

setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;

Edit:

And again:

		setarray .@card[1], getequipcardid ( .slot, 0 ), getequipcardid ( .slot, 1 ), getequipcardid ( .slot, 2 ), getequipcardid ( .slot, 3 );
	set .@refine, getequiprefinerycnt ( .slot );

.slot should be replace with .@slots[.@i] each time.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   1
  • Joined:  01/03/12
  • Last Seen:  

It's hard to find the error since the script isn't really user friendly and clean (some bad loops and things).

I find one error here:

		if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;

Should be:

		if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;

Edit:

And another one (but don't cause you problem right now):

setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;

To:

setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;

Edit:

And again:

		setarray .@card[1], getequipcardid ( .slot, 0 ), getequipcardid ( .slot, 1 ), getequipcardid ( .slot, 2 ), getequipcardid ( .slot, 3 );
	set .@refine, getequiprefinerycnt ( .slot );

.slot should be replace with .@slots[.@i] each time.

Ok i made the changes, but continue without envolve. :(

Slot for wings => 1.

Wings_Evo.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  71
  • Reputation:   25
  • Joined:  11/23/11
  • Last Seen:  

I had this version some time ago: http://pastebin.com/raw.php?i=DmS5GFsi

I dunno if it works, but it looks better than the ugly version attached here.

EDIT:

Forgot

if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ;

to:

if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ;

Edited by Omnipotent
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   1
  • Joined:  01/03/12
  • Last Seen:  

I had this version some time ago: http://pastebin.com/raw.php?i=DmS5GFsi

I dunno if it works, but it looks better than the ugly version attached here.

EDIT:

Forgot

if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ;

to:

if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ;

works perfect!. Thx

KeyWorld and Omnipotent !

only spam this in the console

[Error]: script:delitem: failed to delete 1 items (AID=2000005 item_id=20139).

[Debug]: Source (NPC): Wings_Conf (invisible/not on a map)

callsub Ids, 20116, 1, 111, 1, 20139, 1, 111, 1, 20122, 1, 111, 0 ;

solved.

Thx so much !

Edited by fiction
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...