Jump to content
  • 0

request Option script


ajaytrix

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

Good day. I'm requesting for this item script. ( If this is possible )

Case:

Custom Item script {onequip} = when frozen after two seconds @option 0 will be executed. 

 

Thank you.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }

Which would only be active when the item is equipped.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }

Which would only be active when the item is equipped.

 

Is that ongoing? So lets say you do wear it while you are frozen, it will unfreeze you after 2 seconds. If you get frozen again, you have to unequip and equip it again for the effect?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }

Which would only be active when the item is equipped.

 

Is that ongoing? So lets say you do wear it while you are frozen, it will unfreeze you after 2 seconds. If you get frozen again, you have to unequip and equip it again for the effect?

 

Yes, that's what he asked for isn't it? OnEquip??? I could do it the other way with a timer or loops :o

 

Could also do it from autoscript which would take effect each time he attacks. I'm just trying to think of ways to reduce the load... 

 

Also have to say the @option 02 freeze isn't detected with getstatus(SC_FREEZE) but the monster version is.

 


 

// OnEquip{ doevent("Oven_Effect::OnTock"); } OnUnEquip{ deltimer("Oven_Effect::OnTock"); }

-	script	Oven_Effect	-1,{
OnTock:
	if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }
	addtimer .delay,"Oven_Effect::OnTock"; end;

OnInit:
	set(.delay,5000); //Delay in Milliseconds.
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

I remember trying to loop special effects via item script with timers as well, turned out really bad haha. Good stuff Skorm

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

The 'addtimer' issue could be related to bugreport:7979 (a very old bug).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

 

 

if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }

Which would only be active when the item is equipped.

 

Is that ongoing? So lets say you do wear it while you are frozen, it will unfreeze you after 2 seconds. If you get frozen again, you have to unequip and equip it again for the effect?

 

Yes, that's what he asked for isn't it? OnEquip??? I could do it the other way with a timer or loops :o

 

Could also do it from autoscript which would take effect each time he attacks. I'm just trying to think of ways to reduce the load... 

 

Also have to say the @option 02 freeze isn't detected with getstatus(SC_FREEZE) but the monster version is.

 


 

// OnEquip{ doevent("Oven_Effect::OnTock"); } OnUnEquip{ deltimer("Oven_Effect::OnTock"); }

-	script	Oven_Effect	-1,{
OnTock:
	if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }
	addtimer .delay,"Oven_Effect::OnTock"; end;

OnInit:
	set(.delay,5000); //Delay in Milliseconds.
}

So sir, this one is the ongoing script whenever your frozen, while wearing the item, it will just last for 2 secs right? 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I remember trying to loop special effects via item script with timers as well, turned out really bad haha. Good stuff Skorm

 

The 'addtimer' issue could be related to bugreport:7979 (a very old bug).

I was going to say worked fine when I tested it with r17089 O_O;; Which is like really old now.

 

So sir, this one is the ongoing script whenever your frozen, while wearing the item, it will just last for 2 secs right? 


Yes, if you want a more constant check, lower the delay.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

@sir Skorm, can  I put this also on { Script }? 

// OnEquip{ doevent("Oven_Effect::OnTock"); } OnUnEquip{ deltimer("Oven_Effect::OnTock"); }

-	script	Oven_Effect	-1,{
OnTock:
	if(getstatus(SC_FREEZE)) { sleep2 2000; sc_end(SC_FREEZE); }
	addtimer .delay,"Oven_Effect::OnTock"; end;

OnInit:
	set(.delay,5000); //Delay in Milliseconds.
}
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

@sir Skorm, can  I put this also on { Script }? 

 

I'm not exactly sure what you mean... The item script would look like this:

 

1599,Angra_Manyu,Angra Manyu,4,1,,10,10000:10000,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{},{ doevent("Oven_Effect::OnTock"); },{ deltimer("Oven_Effect::OnTock"); }

 

You could also use doevent("Oven_Effect::OnTock"); in the first script section but I really don't see why you would, and it might also cause problems.

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