Author Topic: Weapon Check & Change script  (Read 14203 times)

0 Members and 1 Guest are viewing this topic.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Weapon Check & Change script
« on: April 13, 2015, 06:10:42 PM »
0
I'm wondering if anyone out there has or can write a script that changes a weapon once it's durability hits 0 to another weapon automatically while still using lame3.0 to target mobs?
E.G I'm hitting away at barracoon champ spawn and my weapon durability hits 0, the script then swaps the weapon out for a weapon of the same type and then when the wep I'm using hits 0 it changes to another and so on until all my weapons hits 0 durability
If anyone could please help me out with this I would love you!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Weapon Check & Change script
« Reply #1 on: April 13, 2015, 06:24:48 PM »
0
I'm wondering if anyone out there has or can write a script that changes a weapon once it's durability hits 0 to another weapon automatically while still using lame3.0 to target mobs?
E.G I'm hitting away at barracoon champ spawn and my weapon durability hits 0, the script then swaps the weapon out for a weapon of the same type and then when the wep I'm using hits 0 it changes to another and so on until all my weapons hits 0 durability
If anyone could please help me out with this I would love you!

Shouldn't that be  "I would love you  .. LONG TIME" !!!  

 Before i can even consider your proposition of love in exchange for scripting I need to know quiet a number of facts..... i need to know where you reside... as obviously love from afar is not worth half as much as local love !!!!    Also I would need to know your gender as that is also relevant for consideration and more... perhpas you should post a full bio along with the request for expediency....  :D ;D


All jesting aside these kind of little costum changes are perfect for you to learn how to tweak a script.   Its not that hard.  I'll start you out fill in the blanks and bits..

Code: [Select]
gosub weaponcheck   ; place this were needed inside the lame script....

; place at end of lame script
sub weaponcheck
   set %thisweapon    <change this to the  weapon u are holding>
   event property  %thisweapon
   ; Some code to extract duarbility from #property and set value to %durability
   if %durability = 0
      {
       ; some code here to find a new weapon that doent have a durability of zero
       }
return




Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #2 on: April 13, 2015, 07:13:06 PM »
0
FYI  Don't forget to add
if reforged in #property 

so you can scan the right line for the durability.

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 3016
  • Activity:
    3.6%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +206
  • Referrals: 2
    • View Profile
Re: Weapon Check & Change script
« Reply #3 on: April 13, 2015, 07:35:16 PM »
0
I'm wondering if anyone out there has or can write a script that changes a weapon once it's durability hits 0 to another weapon automatically while still using lame3.0 to target mobs?
E.G I'm hitting away at barracoon champ spawn and my weapon durability hits 0, the script then swaps the weapon out for a weapon of the same type and then when the wep I'm using hits 0 it changes to another and so on until all my weapons hits 0 durability
If anyone could please help me out with this I would love you!

Shouldn't that be  "I would love you  .. LONG TIME" !!!  

 Before i can even consider your proposition of love in exchange for scripting I need to know quiet a number of facts..... i need to know where you reside... as obviously love from afar is not worth half as much as local love !!!!    Also I would need to know your gender as that is also relevant for consideration and more... perhpas you should post a full bio along with the request for expediency....  :D ;D


All jesting aside these kind of little costum changes are perfect for you to learn how to tweak a script.   Its not that hard.  I'll start you out fill in the blanks and bits..

Code: [Select]
gosub weaponcheck   ; place this were needed inside the lame script....

; place at end of lame script
sub weaponcheck
   set %thisweapon    <change this to the  weapon u are holding>
   event property  %thisweapon
   ; Some code to extract duarbility from #property and set value to %durability
   if %durability = 0
      {
       ; some code here to find a new weapon that doent have a durability of zero
       }
return






I have translated this for everyone

Ketchup: I love you man
EN: You're not getting my bud lite!

« Last Edit: April 13, 2015, 07:46:19 PM by Crisis »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Weapon Check & Change script
« Reply #4 on: April 13, 2015, 08:55:10 PM »
0
Shouldn't that be  "I would love you  .. LONG TIME" !!!  

+1 for EN!
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #5 on: April 14, 2015, 03:27:54 AM »
0
hah, sadly my scripting knowledge is not good enough to work this out myself, I've tried working it our for a few hours but nothing but thank you for the replies
« Last Edit: April 14, 2015, 03:31:05 AM by Ketchup »

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Weapon Check & Change script
« Reply #6 on: April 14, 2015, 07:39:29 AM »
0
hah, sadly my scripting knowledge is not good enough to work this out myself, I've tried working it our for a few hours but nothing but thank you for the replies

Well we all have to start someplace.   I know it can seem daunting at first but once you get over the initial hurdle it gets easier and easier.   Wouldn't it be nice to be able to tweak the script you download to have that little more customization to how you want it.

I think you will find that people are much more willing to help you debug a script snippet that you are trying to write/learn than actually write it for you...


Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #7 on: April 14, 2015, 01:06:52 PM »
0
I appreciate the posts again, I'm relishing in the dream of being able to edit/write myself, I'll keep trying and maybe one day crack the code!

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #8 on: April 14, 2015, 01:54:23 PM »
0
Just post what you got and we can help you make correction.

Offline Zurg

  • Full Member
  • ***
  • Posts: 105
  • Activity:
    0%
  • Reputation Power: 2
  • Zurg has no influence.
  • Gender: Male
  • Respect: +10
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #9 on: April 14, 2015, 04:45:39 PM »
0
don't feel bad to post it i promise it can't be no worst than mine scripting.
Just glad to have a blast

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Weapon Check & Change script
« Reply #10 on: April 15, 2015, 05:35:44 AM »
0
don't feel bad to post it i promise it can't be no worst than mine scripting.
Even if its more worse, i know atleast 10 persons who not even would be able to copy code together (and i teached them irl a while).

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #11 on: April 16, 2015, 11:51:21 AM »
0
I'm still trying my hardest to get a code together that doesn't offend myself for looking so stupid :)

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #12 on: April 16, 2015, 02:27:06 PM »
0
The cat is out of the bag now, so let the mice out

Offline Zurg

  • Full Member
  • ***
  • Posts: 105
  • Activity:
    0%
  • Reputation Power: 2
  • Zurg has no influence.
  • Gender: Male
  • Respect: +10
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #13 on: April 16, 2015, 02:32:51 PM »
0
We will keep the snakes in the cages so the mice wont get ate.
Just glad to have a blast

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Weapon Check & Change script
« Reply #14 on: April 16, 2015, 03:39:29 PM »
0
I've tried but I've given up, I can't grasp the whole concept, been at it days now.

Tags: