Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
FaeruN
Member
 
Join Date: Feb 2012
Posts: 30

Old February 27th, 2012, 08:59 AM
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:
~ If we're an arcane spellcaster, add our bonuses
if (hero.tagis[Hero.Arcane] <> 0) then
if (field[gIsEquip].value <> 0) then
field[BonEnhance].value = 4
endif
endif
but I dont know how to make it work correctly.

The other weapon instead of be used by a good-alignment fighter, ranger or paladin, and tried this eval script:

Quote:
~If we're non-good, get out now
doneif (hero.tagis[Alignment.Good] = 0)

~ If we're not a paladin, fighter or ranger, get out now
doneif (hero.tagis[Classes.Paladin] = 0 or hero.tagis[Classes.Ranger] = 0 or hero.tagis[Classes.Fighter] = 0)
field[BonEnhance].value = 4
I know that should works but I don't know how to use the "OR" properly on hero lab yet.

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
FaeruN is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 27th, 2012, 09:57 AM
phase & priority for those scripts?
Mathias is online now   #2 Reply With Quote
FaeruN
Member
 
Join Date: Feb 2012
Posts: 30

Old February 27th, 2012, 10:31 AM
Quote:
Originally Posted by Mathias View Post
phase & priority for those scripts?
I don't know how that works really yet, but by the moment I had been used Pre-Levels and 100 Priority, if any other way it can be done is okay
FaeruN is offline   #3 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old February 27th, 2012, 11:39 AM
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
XXXXXXXX would be the field reference for your weapon...
RavenX is offline   #4 Reply With Quote
FaeruN
Member
 
Join Date: Feb 2012
Posts: 30

Old February 27th, 2012, 12:57 PM
Quote:
Originally Posted by RavenX View Post
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
XXXXXXXX would be the field reference for your weapon...
thank you that really helped me a lot I've tried using the Final Phase and a 100000 priority and did worked, maybe is not the perfect way but at least it worked for me.

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
FaeruN is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old February 27th, 2012, 04:16 PM
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
Aaron is offline   #6 Reply With Quote
FaeruN
Member
 
Join Date: Feb 2012
Posts: 30

Old February 28th, 2012, 06:39 AM
thank you Aaron that really helped me a lot

problem solved, thanks to you all!
FaeruN is offline   #7 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:52 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.