Thread: [wpdev-commits] xmlscripts/scripts tooltip.py,1.10,1.11
Brought to you by:
rip,
thiagocorrea
|
From: <co...@us...> - 2003-12-29 13:21:34
|
Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv17993/scripts
Modified Files:
tooltip.py
Log Message:
Aos modifiers tooltips
Index: tooltip.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/tooltip.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** tooltip.py 27 Sep 2003 13:33:44 -0000 1.10
--- tooltip.py 29 Dec 2003 13:21:31 -0000 1.11
***************
*** 13,17 ****
# Register as a global script
def onLoad():
! wolfpack.registerglobal( EVENT_SHOWTOOLTIP, "tooltip" )
def onShowTooltip( sender, target, tooltip ):
--- 13,17 ----
# Register as a global script
def onLoad():
! wolfpack.registerglobal( EVENT_SHOWTOOLTIP, "tooltip" )
def onShowTooltip( sender, target, tooltip ):
***************
*** 33,43 ****
else:
- # if target.name == '' or target.name == '#':
- #params = str( target.amount ) + "\t" + '#' + str( 0xF9060 + target.id )
- #print params
- #tooltip.add( 1050039, params )
- #else:
- #tooltip.add( 1050039, str( target.amount ) + "\t" + target.getname() ) #$amount $name
-
if target.name == '#' or target.name == '':
if target.amount > 1:
--- 33,36 ----
***************
*** 52,57 ****
tooltip.add( 1050045, " \t" + name + "\t " )
! if target.hastag( "blessed" ):
! tooltip.add( 1038021, "" ) # Blessed
if isspellbook( target ):
--- 45,49 ----
tooltip.add( 1050045, " \t" + name + "\t " )
! modifiers( target, tooltip )
if isspellbook( target ):
***************
*** 66,130 ****
def armor( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " ) #prefix name suffix
! if (target.hastag( "blessed")):
! tooltip.add( 1038021, "" ) # Blessed
! tooltip.add( 1060448, "3" ) #Physical Resist
! tooltip.add( 1060447, "1" ) #Fire Resist
! tooltip.add( 1060445, "1" ) #Cold Resist
! tooltip.add( 1060449, "5" ) #Poison Resist
! tooltip.add( 1060446, "3" ) #Energy Resist
! if target.hastag( 'req_str' ):
! tooltip.add( 1061170, str( target.gettag( 'req_str' ) ) ) #Strength Requirement
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth ) ) #Durability
def container( target, tooltip ):
! tooltip.add( 1050045, "Bag" )
! tooltip.add( 1050044, "1000\t10000" ) #$count items, $weight stones
def shield( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " )
! if (target.hastag( "blessed")):
! tooltip.add( 1038021, "" ) # Blessed
! tooltip.add( 1060448, "1" ) #Physical resist
! if target.hastag( 'req_str' ):
! tooltip.add( 1061170, str( target.gettag( 'req_str' ) ) ) #Strength Requirement
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth ) ) #Durability
def hat( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " )
! if (target.hastag( "blessed" )):
! tooltip.add( 1038021, "" ) # Blessed
! tooltip.add( 1060447, "5" ) #Fire Resist
! tooltip.add( 1060445, "9" ) #Cold Resist
! tooltip.add( 1060449, "5" ) #Poison Resist
! tooltip.add( 1060446, "3" ) #Energy Resist
! if target.hastag( 'req_str' ):
! tooltip.add( 1061170, str( target.gettag( 'req_str' ) ) ) #Strength Requirement
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth) ) #Durability
def weapon( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " )
! if (target.hastag( "blessed" )):
! tooltip.add( 1038021, "" ) # Blessed
! tooltip.add( 1060403, "100" ) # Physical Damage
! tooltip.add( 1061168, str( target.lodamage ) + " \t" + str(target.hidamage))# Weapon Damage
! tooltip.add( 1061167, str( target.speed ))
! if target.hastag( 'req_str' ):
! tooltip.add( 1061170, str( target.gettag( 'req_str' ) ) ) #Strength Requirement
! if ( target.twohanded ):
! tooltip.add( 1061171, "" ) # two-handed
! else:
! tooltip.add( 1061824, "" ) # One-handed
! if ( target.type ) == 1001 or ( target.type ) == 1002:
! tooltip.add( 1061172, "" ) # Weapon Skill: Swordsmanship
! if ( target.type ) == 1003 or ( target.type ) == 1004:
! tooltip.add( 1061173, "" ) # Weapon Skill: Mace Fighting
! if ( target.type ) == 1005:
! tooltip.add( 1061174, "" ) #Weapon Skill: Fencing
! if ( target.type ) == 1006 or ( target.type ) == 1007:
! tooltip.add( 1061175, "" ) # Weapon Skill: Archery
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth ))
--- 58,123 ----
def armor( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " ) #prefix name suffix
! modifiers( target, tooltip )
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth ) ) #Durability
def container( target, tooltip ):
! tooltip.add( 1050045, "Bag" )
! tooltip.add( 1050044, "1000\t10000" ) #$count items, $weight stones
def shield( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " )
! modifiers( target, tooltip )
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth ) ) #Durability
def hat( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " )
! modifiers( target, tooltip )
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth) ) #Durability
def weapon( target, tooltip ):
! name = target.getname()
! tooltip.add( 1050045, " \t" + name + "\t " )
! modifiers( target, tooltip )
! if ( target.twohanded ):
! tooltip.add( 1061171, "" ) # two-handed
! else:
! tooltip.add( 1061824, "" ) # One-handed
! if ( target.type ) == 1001 or ( target.type ) == 1002:
! tooltip.add( 1061172, "" ) # Weapon Skill: Swordsmanship
! if ( target.type ) == 1003 or ( target.type ) == 1004:
! tooltip.add( 1061173, "" ) # Weapon Skill: Mace Fighting
! if ( target.type ) == 1005:
! tooltip.add( 1061174, "" ) #Weapon Skill: Fencing
! if ( target.type ) == 1006 or ( target.type ) == 1007:
! tooltip.add( 1061175, "" ) # Weapon Skill: Archery
! tooltip.add( 1060639, str( target.health ) + "\t" + str( target.maxhealth ))
!
! def modifiers( target, tooltip ):
! modifiers = {
! "blessed" : [1038021,0],
! "req_str" : [1061170,1],
! "res_physical" : [1060448,1],
! "res_fire" : [1060447,1],
! "res_cold" : [1060445,1],
! "res_poison" : [1060449,1],
! "res_energy" : [1060446,1],
! "dmg_physical" : [1060403,1],
! "dmg_fire" : [1060405,1],
! "dmg_cold" : [1060404,1],
! "dmg_poison" : [1060406,1],
! "dmg_energy" : [1060407,1]
! }
!
! for tagname in modifiers.keys():
! if target.hastag( tagname ):
! params = ""
! if modifiers[ tagname ][1]:
! params = str( target.gettag( tagname ) )
! tooltip.add( modifiers[ tagname ][0], params )
!
!
!
|