Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

UsePrimaryAbility and Secondary problems. Help.

Ask for help
Post Reply
Th3Ma5hatt3r
Posts: 4
Joined: 08.03.2014 23:16

UsePrimaryAbility and Secondary problems. Help.

Post by Th3Ma5hatt3r »

Hello. I have been writing a simple attacker script that just uses the Primary/Secondary ability on the weapon. However on certain weapons like the 'Bone Crusher', the methods UsePrimaryAbility() or UseSecondaryAbility() doesn't work on this weapon. So I tried toggling the weapon ability myself and than wrote a little script to report back what the active ability was currently, and it told me the ability I expected to be active was currently active.

Do you have any idea what is going wrong?

Example Python Code:

Code: Select all

def UseAbility():
	if USE_ABILITY == 1:
		UsePrimaryAbility()
	elif USE_ABILITY == 2:
		UseSecondaryAbility()
As I stated above it works on some weapons, but not others?
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Vizit0r »

Bone Crusher - what type of weapon?
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Th3Ma5hatt3r
Posts: 4
Joined: 08.03.2014 23:16

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Th3Ma5hatt3r »

Code: Select all

* Info * : ID: $48D652A1 Name: NoName Type: $1406 Color: $060C 
* Info * : Quantity: 1 X: 132 Y: 111 Z: 0
* Info * : Tooltip:  Bone Crusher|<b>insured</b>|artifact rarity 11|damage increase 75%|hit lower defense 50%|strength bonus 10|physical damage 100%|weapon damage 16 - 17|weapon speed 26|strength requirement 80|one-handed weapon|skill required: mace fighting|durability 220 / 255|Level: 10|Experience: 10046
The 'Bone Crusher' is a War Mace, but the graphic is facing the opposite direction. I also seem to have a problem with Halberds working. Below is the information on a Halberd my character uses currently. Halberd Specials should be WW primary Concussion Blow Secondary, Bone Crusher (war Mace) Crushing Blow primary, bleed attack secondary.

Code: Select all

* Info * : ID: $40B3BDEA Name: NoName Type: $143E Color: $0000 
* Info * : Quantity: 0 X: 0 Y: 0 Z: 0
* Info * : Tooltip:  Electrum Lance|blessed|hit chance increase 12%|hit energy area 50%|hit fire area 31%|hit fireball 50%|hit life leech 50%|hit mana leech 50%|hit physical area 50%|lower requirements 90%|self repair 5|energy damage 100%|weapon damage 18 - 19|weapon speed 25|strength requirement 9|two-handed weapon|skill required: swordsmanship|durability 251 / 255|Level: 100|Experience: 999900
Thanks for any help you can give me.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Vizit0r »

this type of weapon not in list of known weapon abilities.

Give me abilities for this weapon, i'll add it
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Vizit0r »

found it.
this type of weapon added to list, all other artifacts from list in RunUO 2.2 also added.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Th3Ma5hatt3r
Posts: 4
Joined: 08.03.2014 23:16

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Th3Ma5hatt3r »

Amazing thank you. When do you think the update for that will be available download?
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Vizit0r »

maybe today, max tomorrow.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Vizit0r »

Stealth 6.4
http://stealth.od.ua/download/Stealth_v6.4.rar

changelist will be published tomorrow
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Th3Ma5hatt3r
Posts: 4
Joined: 08.03.2014 23:16

Re: UsePrimaryAbility and Secondary problems. Help.

Post by Th3Ma5hatt3r »

The changes work great, thank you for the fast response and quick update.
Post Reply