Deleted User Posted April 25, 2013 Posted April 25, 2013 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. Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 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. Quote
-SkittleNugget- Posted April 25, 2013 Posted April 25, 2013 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. Quote
Deleted User Posted April 26, 2013 Author Posted April 26, 2013 (edited) 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 April 26, 2013 by Kaze Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 (edited) 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 April 26, 2013 by Metamorphic Quote
Deleted User Posted April 26, 2013 Author Posted April 26, 2013 Thanks for the respond, however i got this. Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 Already corrected, using the edit button, Sorry, Copy paste it again. Quote
Deleted User Posted April 26, 2013 Author Posted April 26, 2013 Thank you! btw, using @refine does it work or do really need to refine it through NPC? Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 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 Quote
Deleted User Posted April 26, 2013 Author Posted April 26, 2013 (edited) 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 April 26, 2013 by Kaze Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 (edited) 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 April 26, 2013 by Metamorphic Quote
Deleted User Posted April 26, 2013 Author Posted April 26, 2013 Thank you hopefully this will work out. Quote
Patskie Posted April 26, 2013 Posted April 26, 2013 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 Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 Assassins use katars, katars are placed on both right and left, I am sure it would work for that class regardless, Quote
Emistry Posted April 26, 2013 Posted April 26, 2013 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; } Quote
-SkittleNugget- Posted April 26, 2013 Posted April 26, 2013 It is what he wanted, who are we to judge. Quote
Patskie Posted April 26, 2013 Posted April 26, 2013 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 Quote
Question
Deleted User
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.
16 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.