Jump to content
  • 0

War of Emperium Reward


Question

Posted

Just want to request a script or code that will help this script to give to the kriemhild guild leader owner the item ID# 7146's amount depends on how many castles they're owned.

SIEGE_P:
	set @GID,getcharid(2);
	set .@GID, GetCastleData("prtg_cas01",1);
	set .Map$,"prtg_cas01";
	if ( agitcheck() ){ message strcharinfo(0), "You can't get any guild profit if there's a war."; end; }
	if ( SIEGEPOINTS < 1 ){ message strcharinfo(0), "You don't have any Siege Point(s)."; end; }
	if ( MaxWeight <= Weight * 2 ){ message strcharinfo(0), "You can't get any profit if you're over weight."; end; }
	if ( @inventorylist_count > 95 ){ message strcharinfo(0), "Remove some of your inventory item(s) to get your profit."; end; }
	if( strcharinfo(0) == getguildmaster( getcastledata( .Map$,1 ) ) ){
	getitem 7146,10;
	getitem 30004,SIEGEPOINTS*100;
	set SIEGEPOINTS,0;
	end;
	}
}

 

1 answer to this question

Recommended Posts

  • 0
Posted

you can try this.

SIEGE_P:
	.@name$ = strcharinfo(0);
	if ( agitcheck() ) {
		message .@name$, "You can't get any guild profit if there's a war.";
	}
	else if ( SIEGEPOINTS < 1 ) { 
		message .@name$, "You don't have any Siege Point(s).";
	}
	else if ( MaxWeight <= Weight * 2 ){ 
		message .@name$, "You can't get any profit if you're over weight.";
	}
	else {
		getinventorylist;
		if ( @inventorylist_count > 95 ){ 
			message .@name$, "Remove some of your inventory item(s) to get your profit.";
		}
		else {
			setarray .@map$,
				"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
				"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
				"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
				"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
			.@map_size = getarraysize( .@map$ );
			
			for ( .@i = 0; .@i < .@map_size; .@i++ ) {
				.@gid = getcastledata( .@map$[.@i],1 );
				if ( .@gid && .@name$ == getguildmaster( .@gid ) )
					.@count++;
			}
			
			if ( .@count ) {
				getitem 7146,.@count;
				getitem 30004,SIEGEPOINTS*100;
				set SIEGEPOINTS,0;
			}
		}
	}
	end;

 

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