Jump to content
  • 0

Loop npc function while item is equipped


agamanaros

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

Good day,

I'd like to know if its possible to loop a script function called by item script. And script will run a loop while item is equipped?

I'm trying to make a simple function script that would do @jump every 10 seconds while item 35815 is equipped.

function    script    autojump    {
OnInit:
while(1) {
warp strcharinfo(3),0,0;
}
end;
}

35815,Auto_Attack_Floater,Auto Attack Floater,5,20,,150,,6,,1,0xFFFFFFFF,63,2,2048,,1,1,4249,{},{ callfunc "autojump"; },{ callfunc "autojump"; }

Thank you and more power!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

Try like this:

35815,Auto_Attack_Floater,Auto Attack Floater,5,20,,150,,6,,1,0xFFFFFFFF,63,2,2048,,1,1,4249,{},{ set @CloseW,0; callfunc "autojump"; },{ set @CloseW,1; }
function	script	autojump	{

	freeloop(1);
	while(!@CloseW)
	{
		warp strcharinfo(3),0,0;
		sleep2 10000;
	}
	freeloop(0); 

end;
}

 

Edited by Hyroshima
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

18 hours ago, Hyroshima said:

Try like this:


35815,Auto_Attack_Floater,Auto Attack Floater,5,20,,150,,6,,1,0xFFFFFFFF,63,2,2048,,1,1,4249,{},{ set @CloseW,0; callfunc "autojump"; },{ set @CloseW,1; }

function	script	autojump	{

	freeloop(1);
	while(!@CloseW)
	{
		warp strcharinfo(3),0,0;
		sleep2 10000;
	}
	freeloop(0); 

end;
}

Hi Sir, The script worked perfectly! I would like to seek anyone's opinion about my problem. And my apologies if Im in the wrong section however, Im not sure if the problem is on the script or sprite. So the problem all started when, I tried installing @autoattack feature in my server however upon checking when using @autoattack and @jump at the same time it shows a sprite error. However, If I use a GM account in a GM suit it doesn't show any errors when using @autoattack and @jump at the same time. I tried literally all jobs if any jobs work but all we're having the same error. I even tried making a custom item/costume that has a GM Suit(GM Suit Costume), And still it shows the same error.

I included a video of my problem below. I could really need a help right now. Thank you! ^^ 

 

2020-11-20 04-43-39.mkv

2020-11-20 04-45-35.mkv

2020-11-20 04-56-16.mkv

Edited by agamanaros
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

about the problem I don't know how to help you, try to create a topic in category client or source area asking for help

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