Jump to content
  • 0

A bunch of Guild item redeem


madtoyz

Question


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  142
  • Reputation:   10
  • Joined:  01/21/12
  • Last Seen:  

OnInit:
set .Guild$,"NAME";
set .Item,<itemID>;
set .Amount,<Amount>;
end;

- How to use this code for lot guild.

example :

- Setup only Leader guild from LordOfDeath,ArmyOfHeaven,JackFrozen can redeem item from NPC

getitem :

getitem 18601,5;//Red Bred Hat
getitem 18603,5;//Black Devil Mask[1]
getitem 18509,5;//RWC 2010 Indonesia
getitem 18508,5;//Garuda Hat
getitem 18599,5;//Black Devil Mask

correct me if wrong :

getitem 18601,5;//Red Bred Hat
getitem 18603,5;//Black Devil Mask[1]
getitem 18509,5;//RWC 2010 Indonesia
getitem 18508,5;//Garuda Hat
getitem 18599,5;//Black Devil Mask
set .Guild$,LordOfDeath,ArmyOfHeaven,JackFrozen;

Edited by madtoyz
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,157,175,5	script	guild redeem	100,{
for ( set .@i, 0; .@i < .guild_size; set .@i, .@i +1 ) {
	if ( strcharinfo(2) == .guild_name$ ) {
		if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) {
			for ( set .@i, 0; .@i < .item_size; set .@i, .@i +2 )
				getitem .item[ .@i ], .item[ .@i +1 ];
			mes "you received the items";
			close;
		}
		mes "you are not guild master";
		close;
	}
}
for ( set .@i, 1; .@i < .guild_size -1; set .@i, .@i +1 )
	set .@str$, .@str$ +", ^0000FF"+ .guild_name$[.@i] +"^000000";
mes "sorry, only ^0000FF"+ .guild_name$[0] +"^000000"+ .@str$ +" and ^0000FF"+ .guild_name$[ .guild_size -1 ] +"^000000 can redeem prize from me";
close;

OnInit:
setarray .guild_name$,
	"LordOfDeath",
	"ArmyOfHeaven",
	"JackFrozen ";
setarray .item,
	18601, 5,
	18603, 5,
	18509, 5,
	18508, 5,
	18599, 5;

set .guild_size, getarraysize( .guild_name$ ); // don't touch these 2
set .item_size, getarraysize( .item );
end;
}

pretty simple script if you know how to work your way in arrays

EDIT:

oh f*** up, I messed up about this is not a script request section and made a working script instead

oh well, currently I'm in script frenzy mode anyways, to polish up my scripting techniques atm

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