Jump to content
  • 0

callfunc help


darking123

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

7338,RO_Transportation_Card,One-way Ticket,3,0,,0,,,,,,,,,,,,,{ callfunc "VIPBROADCAST";},{},{}

function	script	VIPBROADCAST	{
if(@Delay < gettimetick(2)){
	
input @megaphone$;
	
announce strcharinfo(0) + "[VIP SHOUT]: " + @megaphone$,bc_all,0x00FF00;
	
set @Delay,gettimetick(2) + 180;

}

else if(@Delay > 0){

mes "Sorry , but you have to wait 3 Minutes To Use VIP Shout Again.";

close;

}
end; 
}

but everytime i double click the item. nothing works. help

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

change type item & function to

7338,RO_Transportation_Card,One-way Ticket,11,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("VIPBROADCAST", 7338); },{},{}

mod function

function	script	VIPBROADCAST	{

	if (!countitem(getarg(0))
		return;
	else {
		if(@Delay < gettimetick(2)) {	
			input @megaphone$;	
			announce strcharinfo(0) + "[VIP SHOUT]: " + @megaphone$,bc_all,0x00FF00;
			set @Delay,gettimetick(2) + 180;
			delitem getarg(0), 1;
		} else if(@Delay > 0)
			dispbottom "Sorry , but you have to wait 3 Minutes To Use VIP Shout Again.";
	}
	return;
}

 

Edited by Napster
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

 

change type item & function to

7338,RO_Transportation_Card,One-way Ticket,11,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("VIPBROADCAST", 7338); },{},{}

mod function

function	script	VIPBROADCAST	{

	if (!countitem(getarg(0))
		return;
	else {
		if(@Delay < gettimetick(2)) {	
			input @megaphone$;	
			announce strcharinfo(0) + "[VIP SHOUT]: " + @megaphone$,bc_all,0x00FF00;
			set @Delay,gettimetick(2) + 180;
			delitem getarg(0), 1;
		} else if(@Delay > 0)
			dispbottom "Sorry , but you have to wait 3 Minutes To Use VIP Shout Again.";
	}
	return;
}

The problem is when I use the VIP ticket to broadcast. the VIP ticket disappears

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   259
  • Joined:  04/25/12
  • Last Seen:  

Add one 

 

getitem 7338,1;

 

On first line after the header.

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