Jump to content
  • 0
vijay

This script crashes the client.

Question

Hello everyone,
As the topic says, The script bellow crashes the client.
I've assigned a call function for a usable item.

function	script	RefineScroll	{			set .@menu$,"";			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )			{				if( getequipisequiped(.@i) )					set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";				 set .@menu$, .@menu$ + ":";			}	set .@part,select(.@menu$);		// =========================			if(!getequipisequiped(.@part)) {		getitem 18547,1;		dispbottom "You're not wearing anything there that refines!";		close;	}	//Check if the item is refinable...	if(!getequipisenableref(.@part)) {		getitem 18547,1;		dispbottom "There is no way that this item could be refined!";		close;	}	//Check if the item is identified... (Don't know why this is in here... but kept it anyway)	if(!getequipisidentify(.@part)) {		getitem 18547,1;		dispbottom "You can't refine this if you haven't appraised it first. Make sure your stuff is identified before refining it.";		close;	}	//Check to see if the items is already +10	if(getequiprefinerycnt(.@part) >= 10) {		getitem 18547,1;		dispbottom "This item can't be refined anymore, coz its already +10.";		close;	}		successrefitem .@part;		dispbottom "There you go, Enriched Refine Scroll works like a charm :D";		close;} item_db.conf:// Refine Scroll{	Id: 18547	AegisName: "Enriched_Refine_Scroll"	Name: "Enriched Refine Scroll"	Type: 0	Buy: 10	Weight: 10	Script: <" callfunc "RefineScroll"; ">}, 


Any idea why guys?
Thanks!

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Through my tests seems like the problem is the ":D" in the last dispbottom, more specifically the ":", not sure why though, it normally works but in this specific case it's crashing.

Share this post


Link to post
Share on other sites
  • 0

I guess I heard somewhere, client cannot handle menu(includes select command too) without any message been passed.

Share this post


Link to post
Share on other sites
  • 0

Iirc there was an issue fixed in src long time ago by Ind, it was connected to ":D" in character names which would crash clients on fetching info on character. Maybe this is also part of that bug?

Edited by Garr

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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