Jump to content
  • 0

Claw Script help!!!


blueleaf711

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  12/26/16
  • Last Seen:  

can anyone help me i get error when i use this claw script by Nova Script

//===== rAthena Script =======================================
//= The Claw Script
//===== By: ==================================================
//= Nova http://www.novaragnarok.com
//============================================================

moc_para01,13,25,6	script	The Claw	562,{
    set .@n$,"[ ^FF0000The Claw^000000 ]";
    mes .@n$;
    mes "Instructions:";
	mes "You may pay 250 coins for a random headgear, or 500 to pick a specific headgear.";
	mes "New hats will be in stock every month.";
    next;
	
		switch(select("Random Hat",""+.hat1$+"",""+.hat2$+"",""+.hat3$+"",""+.hat4$+"")) {
			case 1:
				mes .@n$;
				mes "Are you sure you want a random hat for 250 Gold Coins?";
				next;
				switch(select("Yes","No")) {
					case 1:
						if (countitem(671)) < (500) { mes .@n$,"You do not have enough Gold Coins to operate The Claw."; close; }
						if (checkweight(.@pickedhat,1) == 0 ) { mes .@n$,"The Claw detects you are over your weight limit."; close; }
						set .HatRandomArray,rand(1,4);
						delitem 671,250;
						if(.HatRandomArray==1) { getitem .hatid1,1; }
						if(.HatRandomArray==2) { getitem .hatid2,1; }
						if(.HatRandomArray==3) { getitem .hatid3,1; }
						if(.HatRandomArray==4) { getitem .hatid4,1; }
						mes .@n$;
						mes "The Claw has chosen. Here is your hat.";
						close;
					case 2:                 
						mes .@n$;
						mes "Come back and play again!";
							close;
				}
				end;
			case 2:
				.@pickedhat = .hatid1;
				.@pickedname$ = .hat1$;
				break;
			case 3:
				.@pickedhat = .hatid2;
				.@pickedname$ = .hat2$;
				break;
			case 4:
				.@pickedhat = .hatid3;
				.@pickedname$ = .hat3$;
				break;
			case 5:
				.@pickedhat = .hatid4;
				.@pickedname$ = .hat4$;
				break;
		}
            
		mes .@n$;
		mes "Are you sure you want to buy: ";
		mes "<ITEMLINK>"+.@pickedname$+"<INFO>"+.@pickedhat+"</INFO></ITEMLINK> ?";
		next;
		
			switch(select("Buy for 500 Gold Coins","Cancel")) {
				case 1:
					if (countitem(671)) < (500) { mes .@n$,"You do not have enough Gold Coins to operate The Claw."; close; }
					if (checkweight(.@pickedhat,1) == 0 ) { mes .@n$,"The Claw detects you are over your weight limit."; close; }
					delitem 671,500;
					getitem .@pickedhat,1;
					mes .@n$;
					mes "The Claw has retrieved your "+.@pickedname$+". Enjoy it.";
					close;	
				case 2:
					mes .@n$;
					mes "Come back and play again!";
					close;
			}
	
OnInit:
	.hatid1 = 5474;
	.hatid2 = 5102;
	.hatid3 = 18678;
	.hatid4 = 5793;
	.hat1$ = getitemname(.hatid1);
	.hat2$ = getitemname(.hatid2);
	.hat3$ = getitemname(.hatid3);
	.hat4$ = getitemname(.hatid4);
	end;
	
}

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

if (countitem(671)) < (500)

change to

if (countitem(671) < 500)

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  12/26/16
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  111
  • Reputation:   2
  • Joined:  05/09/13
  • Last Seen:  

Hello , sorry to bumb this , but is it possible to get the Hats based on chance ?
lets say a group of 1% chance, a group of 10% and a group of 15% chance ?

 

Thanks in advance

 

Edited by BFPkiller
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...