Jump to content
  • 0

itembound2 error & party vs party request.


Question

Posted (edited)

hello,

 

anyone can fix this script? byw this script is not mine i just found it here.. 

 

this is the error shown in my map_server

script error on npc/uscript/freebies.txt line 27
    parse_callfunc: not enough arguments, expected ','
    22 : close2;
    23 : set #NewbieGift, 1;
    24 : setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;
    25 : 
    26 : for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
*   27 : getitembound2 .@rwd[.@i], .@rwd[.@i+1]';'

this is the script

prontera,164,166,3 script Freebies 90,{


set .@n$, "[Freebies]";
setarray .@rwd[0],5170,1,2549,1,2772,2,2444,1,2394,1,2286,1,7608,3,18746,1,13758,1,6376,2000; // Rewards: <item id>,<item amount>


query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);


if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)
{
mes .@n$;
mes "I'm sorry, the rewards are exclusively for new players.";
close;
}


mes .@n$;
mes "Welcome! Here are some free gifts"; 
mes "for newcomers:";


for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);


close2;
set #NewbieGift, 1;
setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;


for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
getitembound2 .@rwd[.@i], .@rwd[.@i+1];


end;


}

----------------------------------------

I found this script too here. working but i want to request that all same partymember wil be warp on the same area.

this is the script

ra_temple,135,158,4	script	Party vs Party	734,{
mes "I am Party Match Manager.";
mes "Party Leader may create a PVP Match here.";
next;
switch( select( ( .Created )?"Join Game[ ^FF0000"+.No+"vs"+.No+"^000000 ]":"Create Game",
				( ( getgmlevel() >= .GMLevel || getcharid(0) == getpartyleader( getcharid(1),2 ) ) && .Created )?"^FF0000Remove Game^000000":"" )){

Case 1:
	switch( .Created ){
		Case 0:
			getpartymember getcharid(1),1;
			if( getcharid(0) != getpartyleader( getcharid(1),2 ) || !getcharid(1) ){
				mes "Sorry, but only a ^FF0000Party Leader^000000 can register a game here.";
			}else{
				mes "How many Players for each Party Team ?";
				mes "Min = 1    Max = "+$@partymembercount;
				mes "Because you only have "+$@partymembercount+" member right now.";
				next;
				input .No,1,$@partymembercount;
				announce "[ "+.No+"vs"+.No+" Party Match ] created by "+strcharinfo(0)+", you may register to join.",0;
				set .Team[0],getcharid(1);
				set .Created,1;
			}
			close;
		Case 1:
			if( !.Team[1] && getcharid(1) == .Team[0] ){
				mes "Please wait for ^FF0000Team 2^000000 to Register.";
			}else{
				if( getcharid(0) != getpartyleader( getcharid(1),2 ) || !getcharid(1) ){
					mes "Sorry, but only a ^FF0000Party Leader^000000 can register a game here.";
					close;
				}
				getpartymember getcharid(1),1;
				if( $@partymembercount < .No ){
					mes "You didnt have enough of "+.No+" Member for the Game.";
					mes "You only have "+$@partymembercount+" Member.";
				}else{
					mes "Confirm Registration ?";
					if( select("Yes:No") == 1 ){
						set .Team[1],getcharid(1);
						set .Created,2;
						setarray .Members[0],.No,.No;
						for( set .@party,0; .@party < 2; set .@party,.@party + 1 ){
							getpartymember .Team[.@party],1;
							for( set .@i,0; .@i < .No; set .@i,.@i + 1 )
								warpchar .Map$,0,0,$@partymembercid[.@i];
						}
						end;
					}
				}
			}
			close;
		Case 2:
			mes "^FF0000The Game is in Progress.^000000";
			mes "[ A "+.No+" vs "+.No+" Game ]";
			mes "Team ^FF0000"+getpartyname( .Team[0] )+"^000000 vs Team ^FF0000"+getpartyname( .Team[1] )+"^000000 .";
			close;
		}
		close;
Case 2:
		mes "Done, Match will be terminated right away.";
		mapannounce .Map$,"Match has been Cancelled by a GM.",0;
		close2;
	OnReset:
		deletearray .Team[0],getarraysize( .Team );
		deletearray .Members[0],getarraysize( .Members );
		if( .Winner ){
			getpartymember .Winner,2;
			for( set .@i,0; .@i < .No; set .@i,.@i + 1 ){
				getitem 512,10,$@partymemberaid[.@i];
				getitem 607,10,$@partymemberaid[.@i];
			}
		set .Winner,0;
		}
		sleep2 2000;
		set .Created,0;
		mapwarp .Map$,"pvp_y_1-2",127,161;
		end;
}
close;
		
OnPCDieEvent:
OnPCLogoutEvent:
if( strcharinfo(3) == .Map$ && .Created ){
	for( set .@i,0; .@i < 2; set .@i,.@i + 1 )	
		if( getcharid(1) == .Team[.@i] )
			set .Members[.@i],.Members[.@i] - 1;
			
	if( .Members[0] < 1 ) set .Winner,.Team[1];
	else if( .Members[1] < 1 ) set .Winner,.Team[0];
			
	if( .Winner ){
		mapannounce .Map$,"Team "+getpartyname( .Winner )+" Win the "+.No+"vs"+.No+" Game.",0;
		donpcevent strnpcinfo(0)+"::OnReset";
	}else{
		warp "ra_temple",120,142;
	}
}
end;
				
OnInit:
set .GMLevel,80;
set .Map$,"pvp_y_1-2";
	do {
		delwaitingroom;
		waitingroom "Party vs Party",0;
	sleep 3000; // Evites super infinity loop
	} while(1); // End Loop
end;
}
Edited by Cisqua

3 answers to this question

Recommended Posts

Posted

wrong arguments

 

 

*getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>{,<account ID>};

*getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>{,<account ID>};

 

getitembound2 .@rwd[.@i], .@rwd[.@i+1], 1, 0 ,0 ,0 , 0 , 0, 0, 3;

  • Upvote 1
Posted

wrong arguments

 

 

*getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>{,<account ID>};

*getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>{,<account ID>};

 

getitembound2 .@rwd[.@i], .@rwd[.@i+1], 1, 0 ,0 ,0 , 0 , 0, 0, 3;

 thank you Napster

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...