Jump to content
  • 0

Weapon Announce


Deleted User

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

Hi, i'm just wondering if how can i do this script? if a weapon reaches +9 to +10 it will announce, since the script itself is {callfunc} attach to the weapon i'm using it.

Thank you.

Link to comment
Share on other sites

16 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

	function	script	weapon_check	{
	
	if (itemlevel != getequiprefinerycnt(EQI_HAND_R) || itemname$ != getequipname(EQI_HAND_R))
	if (getequiprefinerycnt(EQI_HAND_R)>= 8) {
		announce strcharinfo(0) + " has just upgraded thier " + getequipname(EQI_HAND_R) + " to +" + getequiprefinerycnt(EQI_HAND_R),bc_yellow|bc_all;
		set itemlevel, getequiprefinerycnt(EQI_HAND_R);
		set itemname$, getequipname(EQI_HAND_R);
	}	
	
}

 

I went through the script thoroughly, ran some tests on my test server, it works perfect now, Sorry about that.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

You could try attach the script to a refiner, so that when an Item is refined to +9 or +10, It announces to everyone.

Attaching a script to every weapon, seems like a long route to take.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

May i asked? for your example?

my item_db2

1264,Various_Jur,Specialty Jur,4,20,,800,90,,1,4,0x00001000,7,2,34,1,1,1,16,{ callfunc "Testing"; },{},{}
function    script    Testing    {
 
if 8 to +10 it will announce BLA BLA BLA..
an the player gives something specialeffect -.-

 

In script? how to do this one. i don't want to attach this to other refiner NPC's

i want an item attach to this in enables to function the weapon etc. etc.

Edited by Kaze
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

I haven't tested this, But this might work.

 

callfunc "weapon_check";
	function	script	weapon_check	{
	
	if (itemlevel != getequipweaponlv(EQI_HAND_R) || (itemname$ != getequipname(3)) && (getequipweaponlv(EQI_HAND_R) >= 8)){
		announce strcharinfo(0) + " has just upgraded thier " + getitemname(3) + " to " + getequipweaponlv(3),bc_yellow|bc_all;
		set itemlevel, getequipweaponlv(EQI_HAND_R);
		set itemname$, getequipname(EQI_HAND_R);
	}	
	
}
Edited by Metamorphic
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

Thanks for the respond, however i got this.

post-630-0-08559100-1366943262_thumb.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

Already corrected, using the edit button, Sorry, Copy paste it again. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

Thank you!  /bo

btw, using @refine does it work or do really need to refine it through NPC?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

It does not matter how you upgrade your weapon when using this call function method, since it checks for changes when item is equipped.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

It does not matter how you upgrade your weapon when using this call function method, since it checks for changes when item is equipped.

 

1 more question, I have try using @refine 0+8 but it doesn't seems to announce?

 

1201,Knife,Knife,4,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{ callfunc "Weapon_Check" ;},{},{}
Edited by Kaze
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

	function	script	weapon_check	{
	
	if (itemlevel != getequipweaponlv(EQI_HAND_R) || (itemname$ != getequipname(EQI_HAND_R)) && (getequipweaponlv(EQI_HAND_R) >= 8)){
		announce strcharinfo(0) + " has just upgraded thier " + getitemname(EQI_HAND_R) + " to " + getequipweaponlv(EQI_HAND_R),bc_yellow|bc_all;
		set itemlevel, getequipweaponlv(EQI_HAND_R);
		set itemname$, getequipname(EQI_HAND_R);
	}	
	
}

 

there was a typo on the announce, but it is announcing. Testing it now..

(Only announcing first time).

Edited by Metamorphic
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

Thank you hopefully this will work out.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

	function	script	weapon_check	{
	
	if (itemlevel != getequiprefinerycnt(EQI_HAND_R) || itemname$ != getequipname(EQI_HAND_R))
	if (getequiprefinerycnt(EQI_HAND_R)>= 8) {
		announce strcharinfo(0) + " has just upgraded thier " + getequipname(EQI_HAND_R) + " to +" + getequiprefinerycnt(EQI_HAND_R),bc_yellow|bc_all;
		set itemlevel, getequiprefinerycnt(EQI_HAND_R);
		set itemname$, getequipname(EQI_HAND_R);
	}	
	
}

 

I went through the script thoroughly, ran some tests on my test server, it works perfect now, Sorry about that.

 

How about if the weapon is located on the left hand is >=8? For example : assassins

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  318
  • Reputation:   54
  • Joined:  12/23/12
  • Last Seen:  

Assassins use katars, katars are placed on both right and left, I am sure it would work for that class regardless,

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

i dont think this script suppose to do using the database part....it should be adjust in ur refiner script...since it's an announcement when your characters success to refine a +8 and above equipments....

 

find the successrefitem and add below..

.@refine_count = getequiprefinerycnt(<equipment slot>);
if( .@refine_count >= 8 ){
	announce strcharinfo(0)+" refined a "+.@refine_count+" "+getequipname(<equipment slot>),0;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Assassins use katars, katars are placed on both right and left, I am sure it would work for that class regardless,

Assassins use double dagger /swt

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