コード例 #1
0
# Wendelline (2150006) | Edelstein (310000000)

from net.swordie.ms.loaders import StringData

options = []

al = chr.getAvatarData().getAvatarLook()
faceColour = al.getFace() % 1000 - al.getFace() % 100
baseFace = al.getFace() - faceColour

for colour in range(0, 900, 100):
    colourOption = baseFace + colour
    if not StringData.getItemStringById(colourOption) is None:
        options.append(colourOption)

answer = sm.sendAskAvatar(
    "With our specialized machine, you can see the results of your potential treatment in advance. "
    "What kind of lens would you like to wear? Please choose the style of your liking.",
    False, False, options)
if answer < len(options):
    sm.changeCharacterLook(options[answer])
コード例 #2
0
# Franz the Owner (2010002) | Orbis Plastic Surgery (200000201)
# Male: 23000 - 23099 (Vibrant Explorer to He Who Awakened)
# Female: 24000 - 24099 (Sugar to Alicia)

from net.swordie.ms.loaders import StringData

options = []

al = chr.getAvatarData().getAvatarLook()
faceColour = al.getFace() % 1000 - al.getFace() % 100

if al.getGender() == 0:
    baseID = 23000
else:
    baseID = 24000

for i in range(100):
    face = baseID + faceColour + i
    if not StringData.getItemStringById(face) is None:
        options.append(face)

answer = sm.sendAskAvatar("Choose your new face!", False, False, options)

if answer < len(options):
    sm.changeCharacterLook(options[answer])
コード例 #3
0
    4020000,  #Garnet Ore
    4020001,  #Amethyst Ore
    4020002,  #AquaMarine Ore
    4020003,  #Emerald Ore
    4020004,  #Opal Ore
    4020005,  #Sapphire Ore
    4020006,  #Topaz Ore
    4020007,  #Diamond Ore
    4020008,  #Black Crystal Ore
    #Secondary Crystal/Precious Jewels
    4004000,  #Power Crystal Ore
    4004001,  #Wisdom Crystal Ore
    4004002,  #DEX Crystal Ore
    4004003,  #LUK Crystal Ore
    4004004  #Dark Crystal Ore
]

rewardID = random.choice(ores)

if sm.getEmptyInventorySlots(4) >= 1:
    sm.consumeItem(2431232)
    sm.giveItem(rewardID, oreAmount)
    chr.chatMessage(
        ChatType.GameDesc, "You have gained items in the Etc tab (" +
        StringData.getItemStringById(rewardID) + " " + str(oreAmount) + ")")

else:
    sm.sendSayOkay(
        "You lack the required inventory space to use this item.\r\nSlots Required: #b1 Etc"
    )
コード例 #4
0
# Don Giovanni (1052100) | Kerning City Hair Salon (103000005)
# Male: 33000 - 33990 (Prince Cut to Hot Top)
# Female: 34000 - 34990 (Palm Tree to Jett)

from net.swordie.ms.loaders import StringData

options = []

al = chr.getAvatarData().getAvatarLook()
hairColour = al.getHair() % 10

if al.getGender() == 0:
    baseID = 33000
else:
    baseID = 34000

for i in range(0, 1000, 10):
    hair = baseID + i + hairColour
    if not StringData.getItemStringById(hair) is None:
        options.append(hair)

answer = sm.sendAskAvatar("Choose your new hairstyle!", False, False, options)

if answer < len(options):
    sm.changeCharacterLook(options[answer])