Jump to content
  • 0

Check equipment ID the player is using


Gladius

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

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

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

use

getequipid();

doc\script_commands.txt line 2607

then just add $equip_id_blablabla = n;

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

1 hour ago, Start_ said:

use

getequipid();

doc\script_commands.txt line 2607

then just add $equip_id_blablabla = n;

Works ?

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