Jump to content
  • 0

Help with Wings. Evo


Question

7 answers to this question

Recommended Posts

Posted

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
Posted

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.

Posted

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

Posted (edited)

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
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...