Originariamente inviato da seel82
Visualizza il messaggio

Grazie marghe,sei meglio di euge:
set %doors WOC_VOC_GPC_FPC_IPC_HPC_CPC_BPC_EPC_DPC_
List<string> doors = new List<string> { "WOC", "VOC, "GPC", "FPC", "IPC", "HPC", "CPC", "BPC", "EPC", "DPC" };
doors = ["WOC", "VOC, "GPC", "FPC", "IPC", "HPC", "CPC", "BPC", "EPC", "DPC"]
res = "this|is|an|example".split('|')
set %msg La , #spc , tua , #spc , forza , #spc , è , #spc , #str , .
msg = 'La tua forza è ' + str(UO.Str) + '.'
msg = 'La tua forza è %d.' % UO.Str
msg = 'La tua forza è {0}.'.format(UO.Str)


import clr
clr.AddReference('System.Windows.Forms')
from System import Array
humantypes = Array[int]([0x190, 0x191])
humans = UO.FindItems(humantypes, 0)
if not humans is None:
UO.HeadMsg("Ci sono {0} pg/npc umani nei dintorni".format(len(humans)), 50)
totalvalue = {
'Strength Bonus' : 0,
'Dexterity Bonus' : 0,
'Intelligence Bonus' : 0
}
Hue = 80
UO.OpenPaperdoll()
UO.Wait(20)
items = UO.FindType(0, UO.ContID)
for itm in items:
if itm is None: continue
props = UO.GetPropList(itm.ID)
UO.Wait(10)
if props is None: continue
for k,v in totalvalue.iteritems():
if k in props.Keys:
totalvalue[k] += int(props[k])
s = 'Strength = {0}'.format(UO.Str - totalvalue['Strength Bonus'])
d = 'Dexterity = {0}'.format(UO.Dex - totalvalue['Dexterity Bonus'])
i = 'Intelligence = {0}'.format(UO.Int - totalvalue['Intelligence Bonus'])
res = ['Energy Resist', 'Poison Resist', 'Cold Resist', 'Fire Resist',
'Physical Resist']
ResSpell = UO.GetSkill("Resisting Spells").Real
resval = 0
if 445 <= ResSpell < 550:
resval = 5
elif ResSpell < 700:
resval = 10
elif ResSpell < 850:
resval = 20
elif ResSpell < 1000:
resval = 30
elif ResSpell < 1100:
resval = 40
elif ResSpell < 1200:
resval = 42
elif ResSpell == 1200:
resval = 44
UO.SysMessage('======== Char Base Props ========', Hue)
for stat in [s,d,i]:
UO.SysMessage(stat, Hue)
for r in res:
UO.SysMessage('{0} = {1}'.format(r, resval), Hue)
UO.SysMessage('===============================', Hue)

Commenta