Jump to content

Recommended Posts

Posted

What's being shown in the server log when the NPC loads or a player clicks the NPC?

Don't just say `this npc isn't working sir`. That's like going to a doctor and only tell him `I'm not feeling well` without any details.

 

Anyways, I suspect you just copy-paste the script without checking tabs on the script header.

Posted

Hi sir.

I take the script and edit it applying the tab. and its not showing any errors on the  map server

heres my script

prontera,168,179,2	script	Repair all	826,{
	while(getbrokenid(0)){
	repair getbrokenid(0);
	}
	end;
}

  • 4 weeks later...
Posted (edited)

try this 

prontera,168,179,2 script Repair all 826,

mes "[Repair All]";
getinventorylist;
while( .@i < @inventorylist_count ){
	if( @inventorylist_attribute[.@i] )
		set .@broken,.@broken + 1;
	set .@i,.@i + 1;
}
mes "You have "+.@broken+" broken items.";
mes "So you need to have "+.@broken+" "+getitemname( 999 )+" to repair all.";
if( select( ( countitem( 999 ) < .@broken )?"":"Repair","Cancel" ) == 1 ){
	repairall;
	next;
	mes "[Repair All]";
	mes "Done repaired all items.";
	delitem 999,.@broken;
}
close;
}
Edited by MuffinEater
  • 1 month later...

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