Jump to content
  • 0

Function request


Question

Posted

Hi!,

The item have 5 stats ( Agi, Dex, Str, Luk, Int )

Randomly active 1 stats for 30 seg with a delay for 60 seg to active another randomly stats.

When active Agi disguise the character into a valkyrie for example and when the effect end (30 seg) undisguise the character.

someone can make this please biggrin.gif?

ps: this function is for an item.

Greetings

4 answers to this question

Recommended Posts

Posted

try this

Function Script :

function script Sample {
if( @BuffTimer < gettimetick(2)) {
set @BuffTimer,gettimetick(2) + 60;
disguise 1751;
switch( rand(6) ){
 Case 0: sc_start SC_STRFOOD,30000,10; break;
 Case 1: sc_start SC_AGIFOOD,30000,10; break;
 Case 2: sc_start SC_INTFOOD,30000,10; break;
 Case 3: sc_start SC_VITFOOD,30000,10; break;
 Case 4: sc_start SC_DEXFOOD,30000,10; break;
 Case 5: sc_start SC_LUKFOOD,30000,10; break;
}
sleep2 30000;
undisguise;
dispbottom "Buff has Finished for 30 Seconds. Delay of Extra 30 Seconds will be applied.";
}else{
dispbottom "Delay : "+( @BuffTimer - gettimetick(2) )+" Seconds.";
}
end;
}

Item Database Script :

Add this

 callfunc("Sample");

Example :

501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("Sample"); },{},{}

  • Upvote 1
Posted

thx, but i forget to mention something, the effect active when attacking.

and how can i add more disguise?

For example,

Valkyrie for int

Thanatos for str ..

sry for my mistake

thx for reply!

Posted
and how can i add more disguise?

For example,

Valkyrie for int

Thanatos for str ..

Find this

disguise 1751;

switch( rand(6) ){

Case 0: sc_start SC_STRFOOD,30000,10; break;

Case 1: sc_start SC_AGIFOOD,30000,10; break;

Case 2: sc_start SC_INTFOOD,30000,10; break;

Case 3: sc_start SC_VITFOOD,30000,10; break;

Case 4: sc_start SC_DEXFOOD,30000,10; break;

Case 5: sc_start SC_LUKFOOD,30000,10; break;

}

change to this

switch( rand(6) ){
Case 0: sc_start SC_STRFOOD,30000,10; disguise 1751; break;  // STR
Case 1: sc_start SC_AGIFOOD,30000,10; disguise 1002; break;  // AGI
Case 2: sc_start SC_INTFOOD,30000,10; disguise 1003; break;  // INT
Case 3: sc_start SC_VITFOOD,30000,10; disguise 1021; break;  // VIT
Case 4: sc_start SC_DEXFOOD,30000,10; disguise 1753; break;  // DEX
Case 5: sc_start SC_LUKFOOD,30000,10; disguise 1345; break;  // LUK
}

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