Jump to content
  • 0

Support my Item Script, Im stuck on this


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Hi beautiful people,

it has been a  while since I asked for help in this site, but as you may know, I come here  just in those situations  where my "know how" won´t let me go any further

here we go, I has been working on this script, I think is 50/50 done,

 

BUT

what I want,  is  a solution  to stop it at the first effect, then I want to activate the next effect by reusing  the same item

 

This item is reusable, jus as the  ( reins of mount)  it never consume

 

This is an edower (weapon element changer), First use grants you fire weapon element, if you have fire element and you reuse it, your weapon element becomes wind, after wind if you use it again it turns into water element, while having water element and reuse it, you weapon will become earth element, after earth element and reuse while having earth element, it will change to shadow

 

this is my script:

 

29201,Endower,Endower Stone,11,1000,,10,,,,,0xFFFFFFFF,11,2,,,,,,{ specialeffect2 583; sc_start SC_FIREWEAPON,300000,1; if (SC_FIREWEAPON) {specialeffect2 257; sc_start SC_WINDWEAPON,300000,1; }  if (SC_WINDWEAPON) {specialeffect2 116; sc_start SC_WATERWEAPON,300000,1; } if (SC_WATERWEAPON) {specialeffect2 79; sc_start SC_EARTHWEAPON,300000,1; } if (SC_EARTHWEAPON) {specialeffect2 571; sc_start SC_SHADOWWEAPON,300000,1; } if (SC_SHADOWWEAPON) {specialeffect2 583; sc_start SC_FIREWEAPON,300000,1; } },{},{}
 

The clue is to stop the effect at the first element change, and then, reusing the item continue the other element change while having the effect of the previous, 

 

shadow is the last element

so I want an effect, when you have shadow element (last), and you reuse the item, you will have fire endow (first)

and start the loop of element changes by reusing

 

thanks in advance

Edited by Patskie
change to code
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

HEy thanks Im done with it!   Check it out! I works perfectly

 

 

 

kv9l.png

Edited by iraciz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Why not make the item just have a 'callfunc' in the script, and in the actual function, do it this way.

 

Have a player variable like @endow.  Have a Case for it in the script, and then do like this.

switch(@endow) {
Case 1:
specialeffect2 583;
sc_start SC_FIREWEAPON,300000,1;
set @endow, @endow+1;
end;
Case 2:
specialeffect2 257; 
sc_start SC_WINDWEAPON,300000,1;
set @endow, @endow+1;
end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Yo Dawg!

 

the script now display errors      and

it don't show me exactly the way I must place that script..  on the item script line. 

 

To be honest, I'm kinda newbie on this site, I don't expect people to do the whole thing for me 

but a helping hand would be really appreciated

 

where should I place?.. those....    called, Functions and cases?

Edited by iraciz
Link to comment
Share on other sites


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

you can try this..
http://upaste.me/r/5aeeab

// itemID,................{ callfunc "sc_changer"; },{},{}

refer getstatus , sc_start ...

 

 

tested and work fine in my rathena...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

is the same!

 

Look this one, I tried but I have the following errors in some lines than I dont know how to fix

 

the console,says that endostart is an unknown funcion, and lso show syntax errors

 

Dont know what to do right now

 
I made this one!  BUT IT NEED SOME FIXING, please help me
-       function        endower -1,{
 
if (endostart ==1){
if (SC_FIREWEAPON) {
specialeffect2 257;
sc_start SC_WINDWEAPON,300000,1;
end;
}
if (SC_WINDWEAPON){
specialeffect2 116;
sc_start SC_WATERWEAPON,300000,1;
end;
}
if (SC_WATERWEAPON){
specialeffect2 79;
sc_start SC_EARTHWEAPON,300000,1;
end;
}
if (SC_EARTHWEAPON){
specialeffect2 571;
sc_start SC_SHADOWWEAPON,300000,1;
end;
}
if (SC_SHADOWWEAPON){
specialeffect2 583;
sc_start SC_FIREWEAPON,300000,1; set endostart, 0;
end;
}
}
 
specialeffect2 583;
sc_start SC_FIREWEAPON,300000,1;
set endostart, 1;
end;
}

 

 
errors!! sigh

du1i.png

Edited by Emistry
changed to code bbcode.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

Please use the following :

 

 

function    script    endower    {


if (!.@Endo){
    specialeffect2 583;
    sc_start SC_FIREWEAPON,300000,1;
    set .@Endo, 1;
    end;
    }
    if (SC_FIREWEAPON) 
    {    
        callsub createEndo,257,"SC_WindWeapon"; break;        
    } 
    else if (SC_WINDWEAPON){
        callsub createEndo,116,"SC_WATERWEAPON"; break;    
    } 
    else if (SC_WATERWEAPON){
        callsub createEndo,79,"SC_EARTHWEAPON"; break;    
    } 
    else if (SC_EARTHWEAPON){
        callsub createEndo,571,"SC_SHADOWWEAPON"; break;
    } 
    else if (SC_SHADOWWEAPON){
        callsub createEndo,583,"SC_FIREWEAPON"; break;
    }
    
    createEndo:
        specialeffect2,getarg(0);    //Create Effect
        sc_start getarg(1),300000,1; //Create whatever this is.
        set .@Endo, 0;    //Reset Endo?
    end;
}
 

 

 

Than, To use the function.

 

callfunc "endower";

 

We could just make it give a random Endo, rather than it being totally predictable though. Just message me if you want me to do it.

Link to comment
Share on other sites


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

@both iraciz and SkittleNugget

have you tested the script .... does it really give you the element coorectly ?? hmm

if (SC_SHADOWWEAPON){

this method for checking sc status is wrong... it's not even performing any check ... it just simply return you a value that declared at db/const.txt ..

the only way to check if the SC is active or not ... getstatus

doc/script_commands.txt#L4883

*getstatus <effect type>{,<type>};

Retrieve information about a specific status effect when called. Depending on <type>
specified the function will return different information.

Possible <type> values:
	- 0 or undefined: whether the status is active
	- 1: the val1 of the status
	- 2: the val2 of the status
	- 3: the val3 of the status
	- 4: the val4 of the status
	- 5: the amount of time in milliseconds that the status has remaining

If <type> is not defined or is set to 0, then the script function will either
return 1 if the status is active, or 0 if the status is not active. If the status
is not active when any of the <type> fields are provided, this script function
will always return 0.
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...