Jump to content
Poison

checkemblem()

Recommended Posts

*checkemblem(<guild_id>,{<char_id>});

 

 

Check if guild emblem is on or off. Returns 0 if its off and 1 if its on.

 

 

Is this possible?

Share this post


Link to post
Share on other sites

Never realized there was no script function for this lol

Whats the point of the char_id param?

 

If argument is used, script command will run to that specific character.

 

How about if the guildhaving emblem but no image? So its useless..

 

This script command can be used for events that requires an emblem. If guild has transparent emblem, it will still return 1.  Should some players bypass the check using transparent emblem, then it can be reported by other players and game master can take action. 

 

Just a suggestion though.

Share this post


Link to post
Share on other sites

Suggestion:

 

Make the command return opaqueness level of the emblem, for example if 30% of pixels in the image is magenta (transparent), return 70 (70% is opaque). If it's all transparent return 0, and also return 0 if there is no emblem. 

This way you can set your own threshold in scripts, and allow some transparency.

Share this post


Link to post
Share on other sites

Question is this necessary anymore? now that there is:

// Limits use of blank (transparent) pixels in guild emblems to a set// percentage of the total.// Official servers do not enforce this technically to date, but some disallow// use of blank emblems in their rules. (Note 2)// A value of 100 (allowing 100% blank pixels) disables this check.// NOTE: Enabling this option slightly degrades performance.client_emblem_max_blank_percent: 100

Share this post


Link to post
Share on other sites

 

Question is this necessary anymore? now that there is:

// Limits use of blank (transparent) pixels in guild emblems to a set// percentage of the total.// Official servers do not enforce this technically to date, but some disallow// use of blank emblems in their rules. (Note 2)// A value of 100 (allowing 100% blank pixels) disables this check.// NOTE: Enabling this option slightly degrades performance.client_emblem_max_blank_percent: 100

 

it is, since we want to check if guild have an emblem or not, maybe for events, not to see if it is breaking any rule :P

Share this post


Link to post
Share on other sites

BUILDIN(checkemblem) {	struct guild *g = guild->search( script_getnum(st,2) );	if ( g && g->emblem_id )		script_pushint(st,1);	else		script_pushint(st,0);	return true;}
BUILDIN_DEF(checkemblem,"i"),
.

tested with

prontera,155,185,5	script	khdsgfjshf	100,{	if ( checkemblem( getcharid(2) ) )		dispbottom "You can join this event";	else		dispbottom "Your guild needs an emblem to join King of Emperium Hill event";	end;}
.

.

there is no need for optional parameter because getcharid itself can support optional parameter

checkemblem( getcharid(2, rid2name( <account_id> ) ) );

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

For the records: this (still unaccepted) suggestion has also been requested on Spanish section: http://herc.ws/board/topic/6782-emblema-transparente-guild/

 

We've got Annie's implementation, so it shouldn't be quite hard to implement it if we eventually decide to include this script command. I'll refrain from voting since I see its usefulness but I don't see plenty of use cases for it.

Share this post


Link to post
Share on other sites

For the records: this (still unaccepted) suggestion has also been requested on Spanish section: http://herc.ws/board/topic/6782-emblema-transparente-guild/

 

We've got Annie's implementation, so it shouldn't be quite hard to implement it if we eventually decide to include this script command. I'll refrain from voting since I see its usefulness but I don't see plenty of use cases for it.

Nice command no doubt, but I also do doubt for uses for it, I can't even imagine more than 1 use of it.

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.