• 0
Gladius

Check equipment ID the player is using

Question

Hello guys, I need help with my script.
Basically I need NPC usage data to be stored in SQL. (It's already being done, but I want to improve the information.)

I am using this script that removes refinement as an example:

	case 3:
	 if (getequipisequiped(EQI_HEAD_LOW)) goto baixo_remove;
		next;
		mes @np$;
		mes "Você deve equipar o equipamento antes de tentar remover o refinamento.";
		close;
	
		baixo_remove:
		if(getequiprefinerycnt(EQI_HEAD_LOW) <= 0) {	next;	mes @np$;	mes "Eu não posso remover o refinamento deste item!";	close;	}
		if(countitem(7619) < 10){ 
		next;
		mes @np$;
		mes "Desculpe, mas você não possui os ^FFA500^FFA500"+getitemname(7619)+"^000000^000000 necessários para remover o refinamento do seu equipamento"; close; }
		next;
		mes @np$;
		mes "Ok, vamos começar!";
		delitem 7619,10;
		progressbar "ffff00",.progress_time;
		atcommand "@refine 1-10";
		query_sql "INSERT INTO `refinador_especial` (`account_id`, `char_id`, `Equipamento`, `ID`, `Refinamento`, `Data`) VALUES ('"+ getcharid(3) +"', '"+ getcharid(0) +"', 'Cabeça - Baixo','????' '-10', '"+gettimestr("%d/%m/%Y - %H:%M:%S", 25)+"')";
		close;	

 

What I need:
How do I get the equipment ID the player is using?
I want to add this information to SQL

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

use

getequipid();

doc\script_commands.txt line 2607

then just add $equip_id_blablabla = n;

  • Love 1

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Start_ said:

use

getequipid();

doc\script_commands.txt line 2607

then just add $equip_id_blablabla = n;

Works 🥰

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

Loading...