Member
Join Date: Feb 2012
Posts: 30
|
Hello hero lab world, I have some problems while trying to create the eval-scripts for 3 magic weapons.
I've created 6 weapons that everyone can held, but in the hands of the right character the weapon if more powerful (like the holy avenger, that in normal hands is a +2 cold iron longsword, but on a paladin's hands it is the powerful holy avenger) I have problems with 3 of them. One of the weapon supposes to be used by any arcane spellcaster, and when that happens the weapon turns from a masterwork +0 weapon, to a +4, and I've tried to use this eval script: Quote:
The other weapon instead of be used by a good-alignment fighter, ranger or paladin, and tried this eval script: Quote:
And finally I have a weapon that if used by anyone with 5 ranks or more on Diplomacy gets the bonus, and I don't know how to check on the ranks a character haves on a selected skill. Thank you |
||
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
phase & priority for those scripts?
|
#2 |
Member
Join Date: Feb 2012
Posts: 30
|
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
As Mathias said you need the right phase and priority, the cheeseweasel vids on youtube can help with that. Compare this to the code you did for the weapon
Code:
~ If we're an arcane spellcaster, add our bonuses if (hero.tagis[Hero.Arcane] <> 0) then if (field[gIsEquip].value <> 0) then hero.child[XXXXXXXX].field[BonEnhance].value = 4 endif endif |
#4 |
Member
Join Date: Feb 2012
Posts: 30
|
Quote:
I still need help with the 2nd and the 3rd weapons, that means, a way the weapon can accept 3 different classes (Fighter, Paladin or Ranger) and a way to ask the weapon about if a character does haves 5 ranks or more at Diplomacy |
|
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
This will check for levels in any of those three classes. It needs to run in the Post-Levels phase.
if (#levelcount[Fighter] + #levelcount[Paladin] + #levelcount[Ranger] <> 0) then Do whatever endif You could also make that a doneif and it'd still work. For the Diplomacy skill if (#skillranks[skDiplo] >= 5) then Do whatever. endif Again, also would work as a doneif |
#6 |
Member
Join Date: Feb 2012
Posts: 30
|
thank you Aaron that really helped me a lot
problem solved, thanks to you all! |
#7 |
|
|