Jump to content
  • 0

How to add custom commands like @freebies @gpack Newbie Here


herpanda

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   1
  • Joined:  09/22/15
  • Last Seen:  

Can you help me to add @freebies @gpack @costumeitem commands. step by step if possible newbie developer here :( Thankyou 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

-	script	command#freebies	-1,{
OnInit:
	// This part binds "freebies" as atcommand. 
	bindatcmd("freebies",strnpcinfo(0)+"::OnCommand");
	end;

OnCommand:
	// This part tells your players that he got his freebies
	If(GetFree) { 
		mes "You have received your rewards";
		close; 
		} else {
	// This part if players didnt get his freebies yet
	mes "Welcome! Here are your freebies";
	close2:
	set GetFree,1; // To avoid abuse, Set GetFree variable to 1
	getitem 501,1; // Items received by the player in this case, 1 red potion (ItemID 501) you can add more by adding getitem <ITEMID>,<AMOUNT>; below
	end;
    }	
}

Do the same for gpack and costumeitem(if it means to get a free costume item)

1 hour ago, herpanda said:

Can you help me to add @freebies @gpack @costumeitem commands. step by step if possible newbie developer here :( Thankyou 

 

Edited by pajodex
corrected the script
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   1
  • Joined:  09/22/15
  • Last Seen:  

Thankyou so much sir

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