Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 12 von 12
  1. Beiträge anzeigen #1 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline

    [Work In Progress] Level Scaling Sword

    Hello guys. I'm making a level scaling sword. I got the idea from beliar's craw when you want to make it stronger, it depends on the hero's level. I created the scripts, but at start I get an error: undefined function. Without the "leveling" scripts the weapon works like magic, but I want to create a method in game where I don't need to use the console to "insert" the weapons.

    Code:
    The weapon's script: 
    prototype Scalingtwohander(C_Item)
    {
    name = "Innos kardja";
    mainflag = ITEM_KAT_NF;
    flags = ITEM_2HD_SWD;
    material = MAT_METAL;
    value = 5000;
    damagetype = DAM_EDGE | DAM_MAGIC;
    range = 150;
    effect = "SPELLFX_FIRESWORDBLACK";
    cond_atr[2] = ATR_STRENGTH;
    cond_value[2] = 30;
    visual = "ItMw_060_2h_sword_01.3DS";
    description = name;
    text[0] = "Innos erelyével van felruházva";
    text[3] = NAME_Str_needed;
    count[3] = cond_value[2];
    text[4] = NAME_TwoHanded;
    text[5] = NAME_Value;
    count[5] = value;
    };
    
    instance ItMw_Scalingtwohander_01(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 10;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_02(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 10;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_03(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 15;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_04(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 20;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_05(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 25;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_06(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 30;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_07(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 35;
    damage[DAM_INDEX_MAGIC] = 10;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_08(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 40;
    damage[DAM_INDEX_MAGIC] = 15;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_09(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 45;
    damage[DAM_INDEX_MAGIC] = 20;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_10(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 50;
    damage[DAM_INDEX_MAGIC] = 25;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_11(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 55;
    damage[DAM_INDEX_MAGIC] = 30;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_12(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 60;
    damage[DAM_INDEX_MAGIC] = 35;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_13(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 65;
    damage[DAM_INDEX_MAGIC] = 40;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_14(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 70;
    damage[DAM_INDEX_MAGIC] = 45;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_15(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 75;
    damage[DAM_INDEX_MAGIC] = 50;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_16(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 80;
    damage[DAM_INDEX_MAGIC] = 55;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_17(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 85;
    damage[DAM_INDEX_MAGIC] = 60;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_18(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 90;
    damage[DAM_INDEX_MAGIC] = 65;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_19(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 95;
    damage[DAM_INDEX_MAGIC] = 70;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_20(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 100;
    damage[DAM_INDEX_MAGIC] = 75;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_21(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 105;
    damage[DAM_INDEX_MAGIC] = 80;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_22(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 110;
    damage[DAM_INDEX_MAGIC] = 85;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_23(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 115;
    damage[DAM_INDEX_MAGIC] = 90;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_24(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 120;
    damage[DAM_INDEX_MAGIC] = 95;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    };
    
    instance ItMw_Scalingtwohander_25(Scalingtwohander)
    {
    damage[DAM_INDEX_EDGE] = 125;
    damage[DAM_INDEX_MAGIC] = 100;
    text[1] = NAME_Dam_Edge;
    count[1] = damage[DAM_INDEX_EDGE];
    text[2] = NAME_Dam_Magic;
    count[2] = damage[DAM_INDEX_MAGIC];
    }
    


    Code:
    Leveling script in prayshrine.d
    instance PC_PrayShrine_UPGRADESCALINGWEAPON(C_Info)
    {
    npc = PC_Hero;
    nr = 2;
    condition = PC_PrayShrine_UPGRADESCALINGWEAPON_Condition;
    information = PC_PrayShrine_UPGRADESCALINGWEAPON_Info;
    permanent = TRUE;
    description = NAME_ADDON_UPGRADESCALINGWEAPON;
    };
    
    
    func int PC_PrayShrine_UPGRADESCALINGWEAPON_Condition()
    {
    if((player_mobsi_production == MOBSI_PrayShrine) && (C_ScCanUpgradeScalingWeapon() == TRUE) && (C_ScHasScalingWeapon() == TRUE))
    {
    return TRUE;
    };
    };
    
    func void PC_PrayShrine_UPGRADESCALINGWEAPON_Info()
    {
    B_ClearScalingWeapon();
    B_UPGRADESCALINGWEAPON();
    };
    Code:
    Leveling script "part2" mainfile
    func int C_ScHasScalingWeapon()
    {
    if(Npc_HasItems(hero,ItMw_Scalingtwohander_01) || Npc_HasItems(hero,ItMw_Scalingtwohander_02) || Npc_HasItems(hero,ItMw_Scalingtwohander_03) || Npc_HasItems(hero,ItMw_Scalingtwohander_04) || Npc_HasItems(hero,ItMw_Scalingtwohander_05) || Npc_HasItems(hero,ItMw_Scalingtwohander_06) || Npc_HasItems(hero,ItMw_Scalingtwohander_07) || Npc_HasItems(hero,ItMw_Scalingtwohander_08) || Npc_HasItems(hero,ItMw_Scalingtwohander_09) || Npc_HasItems(hero,ItMw_Scalingtwohander_10) || Npc_HasItems(hero,ItMw_Scalingtwohander_11) || Npc_HasItems(hero,ItMw_Scalingtwohander_12) || Npc_HasItems(hero,ItMw_Scalingtwohander_13) || Npc_HasItems(hero,ItMw_Scalingtwohander_14) || Npc_HasItems(hero,ItMw_Scalingtwohander_15) || Npc_HasItems(hero,ItMw_Scalingtwohander_16) || Npc_HasItems(hero,ItMw_Scalingtwohander_17) || Npc_HasItems(hero,ItMw_Scalingtwohander_18) || Npc_HasItems(hero,ItMw_Scalingtwohander_19) || Npc_HasItems(hero,ItMw_Scalingtwohander_20) || Npc_HasItems(hero,ItMw_Scalingtwohander_21) || Npc_HasItems(hero,ItMw_Scalingtwohander_22) || Npc_HasItems(hero,ItMw_Scalingtwohander_23) || Npc_HasItems(hero,ItMw_Scalingtwohander_24) || Npc_HasItems(hero,ItMw_Scalingtwohander_25))
    {
    return TRUE;
    };
    return FALSE;
    };
    
    func int C_IsItemScalingWeapon(var C_Item Weap)
    {
    if((Hlp_IsItem(Weap,ItMw_Scalingtwohander_01) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__02) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__03) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__04) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__05) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__06) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__07) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__08) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__09) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__10) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__11) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__12) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__13) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__14) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__15) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__16) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__17) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__18) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__19) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__20) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__21) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__22) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__23) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__24) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__25) == TRUE))
    {
    return TRUE;
    };
    return FALSE;
    };
    
    func int C_ScHasReadiedScalingWeapon()
    {
    var C_Item ReadyWeap;
    ReadyWeap = Npc_GetReadiedWeapon(hero);
    if(C_IsItemScalingWeapon(ReadyWeap))
    {
    return TRUE;
    };
    return FALSE;
    };
    
    func int C_ScHasEquippedScalingWeapon()
    {
    var C_Item EquipWeap;
    EquipWeap = Npc_GetEquippedMeleeWeapon(hero);
    if(C_IsItemScalingWeapon(EquipWeap))
    {
    return TRUE;
    };
    return FALSE;
    };
    
    func void B_ClearScalingtwohander()
    {
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_01,Npc_HasItems(hero,ItMw_Scalingtwohander_01));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_02,Npc_HasItems(hero,ItMw_Scalingtwohander_02));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_03,Npc_HasItems(hero,ItMw_Scalingtwohander_03));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_04,Npc_HasItems(hero,ItMw_Scalingtwohander_04));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_05,Npc_HasItems(hero,ItMw_Scalingtwohander_05));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_06,Npc_HasItems(hero,ItMw_Scalingtwohander_06));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_07,Npc_HasItems(hero,ItMw_Scalingtwohander_07));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_08,Npc_HasItems(hero,ItMw_Scalingtwohander_08));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_09,Npc_HasItems(hero,ItMw_Scalingtwohander_09));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_10,Npc_HasItems(hero,ItMw_Scalingtwohander_10));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_11,Npc_HasItems(hero,ItMw_Scalingtwohander_11));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_12,Npc_HasItems(hero,ItMw_Scalingtwohander_12));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_13,Npc_HasItems(hero,ItMw_Scalingtwohander_13));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_14,Npc_HasItems(hero,ItMw_Scalingtwohander_14));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_15,Npc_HasItems(hero,ItMw_Scalingtwohander_15));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_16,Npc_HasItems(hero,ItMw_Scalingtwohander_16));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_17,Npc_HasItems(hero,ItMw_Scalingtwohander_17));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_18,Npc_HasItems(hero,ItMw_Scalingtwohander_18));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_19,Npc_HasItems(hero,ItMw_Scalingtwohander_19));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_20,Npc_HasItems(hero,ItMw_Scalingtwohander_20));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_21,Npc_HasItems(hero,ItMw_Scalingtwohander_21));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_22,Npc_HasItems(hero,ItMw_Scalingtwohander_22));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_23,Npc_HasItems(hero,ItMw_Scalingtwohander_23));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_24,Npc_HasItems(hero,ItMw_Scalingtwohander_24));
    Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_25,Npc_HasItems(hero,ItMw_Scalingtwohander_25));
    };
    
    
    var int ScalingWeaponCurrentLvL;
    var int ScalingWeaponNextLvL;
    
    func int C_ScCanUpgradeScalingWeapon()
    {
    var int herolvl;
    herolvl = hero.level;
    if (herolvl > 25)
    {
    ScalingWeaponNextLvL = 25;
    }
    else if (herolvl > 24)
    {
    ScalingWeaponNextLvL = 24;
    }
    else if (herolvl > 23)
    {
    ScalingWeaponNextLvL = 23;
    }
    else if (herolvl > 22)
    {
    ScalingWeaponNextLvL = 22;
    }
    else if (herolvl > 21)
    {
    ScalingWeaponNextLvL = 21;
    }
    else if (herolvl > 20)
    {
    ScalingWeaponNextLvL = 20;
    }
    else if (herolvl > 19)
    {
    ScalingWeaponNextLvL = 19;
    }
    else if (herolvl > 18)
    {
    ScalingWeaponNextLvL = 18;
    }
    else if (herolvl > 17)
    {
    ScalingWeaponNextLvL = 17;
    }
    else if (herolvl > 16)
    {
    ScalingWeaponNextLvL = 16;
    }
    else if (herolvl > 15)
    {
    ScalingWeaponNextLvL = 15;
    }
    else if (herolvl > 14)
    {
    ScalingWeaponNextLvL = 14;
    }
    else if (herolvl > 13)
    {
    ScalingWeaponNextLvL = 13;
    }
    else if (herolvl > 12)
    {
    ScalingWeaponNextLvL = 12;
    }
    else if (herolvl > 11)
    {
    ScalingWeaponNextLvL = 11;
    }
    else if (herolvl > 10)
    {
    ScalingWeaponNextLvL = 10;
    }
    else if (herolvl > 9)
    {
    ScalingWeaponNextLvL = 9;
    }
    else if (herolvl > 8)
    {
    ScalingWeaponNextLvL = 8;
    }
    else if (herolvl > 7)
    {
    ScalingWeaponNextLvL = 7;
    }
    else if (herolvl > 6)
    {
    ScalingWeaponNextLvL = 6;
    }
    else if (herolvl > 5)
    {
    ScalingWeaponNextLvL = 5;
    }
    else if (herolvl > 4)
    {
    ScalingWeaponNextLvL = 4;
    }
    else if (herolvl > 3)
    {
    ScalingWeaponNextLvL = 3;
    }
    else if (herolvl > 2)
    {
    ScalingWeaponNextLvL = 2;
    }
    else if (herolvl > 1)
    {
    ScalingWeaponNextLvL = 1;
    };
    if(ScalingWeaponCurrentLvL < ScalingWeaponNextLvL)
    {
    return TRUE;
    };
    };
    
    func void B_UpgradeScalingWeapon()
    {
    var int InnosTribute;
    var string concatText;
    InnosTribute = (ScalingWeaponNextLvL - ScalingWeaponCurrentLvL) * 200;
    hero,ItMi_Gold = hero,ItMi_Gold - InnosTribute;
    if(Npc_HasItems(hero,ItMi_Gold) >= Gold_UpgradeScalingWeapon)
    {
    concatText = ConcatStrings(PRINT_ItMi_Gold_MAX,IntToString(InnosTribute));
    PrintScreen(concatText,-1,-1,FONT_Screen,4);
    };
    ScalingWeaponCurrentLvL = ScalingWeaponNextLvL;
    if (ScalingWeaponCurrentLvL <= 1)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_01);
    }
    else if (ScalingWeaponCurrentLvL <= 2)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_02);
    }
    else if (ScalingWeaponCurrentLvL <= 3)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_03);
    }
    else if (ScalingWeaponCurrentLvL <= 4)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_04);
    }
    else if (ScalingWeaponCurrentLvL <= 5)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_05);
    }
    else if (ScalingWeaponCurrentLvL <= 6)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_06);
    }
    else if (ScalingWeaponCurrentLvL <= 7)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_07);
    }
    else if (ScalingWeaponCurrentLvL <= 8)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_08);
    }
    else if (ScalingWeaponCurrentLvL <= 9)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_09);
    }
    else if (ScalingWeaponCurrentLvL <= 10)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_10);
    }
    else if (ScalingWeaponCurrentLvL <= 11)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_11);
    }
    else if (ScalingWeaponCurrentLvL <= 12)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_12);
    }
    else if (ScalingWeaponCurrentLvL <= 13)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_13);
    }
    else if (ScalingWeaponCurrentLvL <= 14)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_14);
    }
    else if (ScalingWeaponCurrentLvL <= 15)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_15);
    }
    else if (ScalingWeaponCurrentLvL <= 16)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_16);
    }
    else if (ScalingWeaponCurrentLvL <= 17)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_17);
    }
    else if (ScalingWeaponCurrentLvL <= 18)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_18);
    }
    else if (ScalingWeaponCurrentLvL <= 19)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_19);
    }
    else if (ScalingWeaponCurrentLvL <= 20)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_20);
    }
    else if (ScalingWeaponCurrentLvL <= 21)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_21);
    }
    else if (ScalingWeaponCurrentLvL <= 22)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_22);
    }
    else if (ScalingWeaponCurrentLvL <= 23)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_23);
    }
    else if (ScalingWeaponCurrentLvL <= 24)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_24);
    }
    else if (ScalingWeaponCurrentLvL <= 25)
    {
    CreateInvItem(hero,ItMw_ScalingWeapon_25);
    };
    Wld_PlayEffect("spellFX_PalHeal_ORIGIN",hero,hero,0,0,0,FALSE);
    Snd_Play("MFX_Heal_Cast");
    ScalingWeaponUpgrated = TRUE;
    };

    Geändert von ohje00 (17.07.2018 um 12:03 Uhr)

  2. Homepage besuchen Beiträge anzeigen #2 Zitieren
    SumpfkrautOnline Avatar von Orange
    Registriert seit
    Jul 2008
    Ort
    Da wo du nicht bist
    Beiträge
    2.699
     
    Orange ist offline
    I recommend you ask in the editing. This is the modification corner. This is primarily about the mods, not their technical aspect.
    Maybe a moderator could be so kind to move this thread.

  3. Beiträge anzeigen #3 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.447
     
    Lehona ist offline
    For future reference: Post code within [code][/code]-tags (or just click the # in the editor), to retain formatting. That makes it much easier to read. Feel free to edit your post.

    Without further information (e.g. which function is mentioned in the error message?) I can't be certain, but it looks like some of the files you have created are not being parsed (i.e. "considered" by the game). Every *.d-file has to be included via the Gothic.src file. Many files are automatically included via wildcard-includes (the lines with *), which is probably why you haven't had to do this so far. Make sure all files are being parsed, i.e. are included either explicitly or via a wildcard in the Gothic.src.

    To make sure that your files have been included, make an obvious syntax error in the file and see whether the parser will pick up on it.

    The order of the files is also important: You cannot use functions that are in a file that is parsed later (i.e. its line is further below in the Gothic.src). In that case you simply have to reorder the lines if possible or move your file somewhere else.

  4. Beiträge anzeigen #4 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    For future reference: Post code within [code][/code]-tags (or just click the # in the editor), to retain formatting. That makes it much easier to read. Feel free to edit your post.

    Without further information (e.g. which function is mentioned in the error message?) I can't be certain, but it looks like some of the files you have created are not being parsed (i.e. "considered" by the game). Every *.d-file has to be included via the Gothic.src file. Many files are automatically included via wildcard-includes (the lines with *), which is probably why you haven't had to do this so far. Make sure all files are being parsed, i.e. are included either explicitly or via a wildcard in the Gothic.src.

    To make sure that your files have been included, make an obvious syntax error in the file and see whether the parser will pick up on it.

    The order of the files is also important: You cannot use functions that are in a file that is parsed later (i.e. its line is further below in the Gothic.src). In that case you simply have to reorder the lines if possible or move your file somewhere else.
    Thank you so much. The problem was the order of the files. The "prayshrine.d" was later before it's functions defined. I moved the "B_UpgradeScalingWeapon.d" before that and it fixed it. But I got another error.

    The error is "U:PAR: Expected '=' ( line 190 )" Solved.

    The line is this:

    Code:
    hero,ItMi_Gold = hero,ItMi_Gold - InnosTribute;
    My plan with this: For each upgrade it'll cost you 200 gold coins.
    Example: You're level 15 and your sword is 10.

    15-10=5 <--- Innos tribute

    So to upgrade your weapon to level 15 it'll take 1000 gold coins.


    Edit: There was a problem with
    Code:
    func void B_ClearScalingtwohander()
    changed it to match the "prayshrine.d" function
    Code:
    func void B_ClearScalingWeapon()
    Geändert von ohje00 (17.07.2018 um 13:07 Uhr)

  5. Beiträge anzeigen #5 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    The error is "U:PAR: Expected '=' ( line 190 )" Solved.

    The line is this:

    Code:
    hero,ItMi_Gold = hero,ItMi_Gold - InnosTribute;
    My plan with this: For each upgrade it'll cost you 200 gold coins.
    Example: You're level 15 and your sword is 10.

    15-10=5 <--- Innos tribute

    So to upgrade your weapon to level 15 it'll take 1000 gold coins.
    Solved by:
    Code:
    InnosTribute = (ScalingWeaponNextLvL - ScalingWeaponCurrentLvL);
    Npc_RemoveInvItems(hero,ItMi_Gold,Gold_UpgradeScalingWeapon * InnosTribute);
    Where "Gold_UpgradeScalingWeapon" is 200 and defined in Story_Globals.d

    New error:
    "Error: Unknown identifier: ITMW_SCALING_TWOHANDER_25"

  6. Beiträge anzeigen #6 Zitieren
    Knight Avatar von Draxes
    Registriert seit
    Aug 2007
    Ort
    Mainz
    Beiträge
    1.920
     
    Draxes ist offline
    In your first post you were missing a ";" behind your definition of ITMW_SCALING_TWOHANDER_25

  7. Beiträge anzeigen #7 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    Zitat Zitat von Draxes Beitrag anzeigen
    In your first post you were missing a ";" behind your definition of ITMW_SCALING_TWOHANDER_25
    Placed the ';' there:
    Code:
    instance ItMw_Scalingtwohander_25(Scalingtwohander)
    {
        damage[DAM_INDEX_EDGE] = 125;
        damage[DAM_INDEX_MAGIC] = 100;
        text[1] = NAME_Dam_Edge;
        count[1] = damage[DAM_INDEX_EDGE];
        text[2] = NAME_Dam_Magic;
        count[2] = damage[DAM_INDEX_MAGIC];
    };
    When I try to compile the files with the sourcer, at the process of "linking" the error still comes up here:

    Code:
    if((Hlp_IsItem(Weap,ItMw_Scalingtwohander_01) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__02) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__03) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__04) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__05) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__06) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__07) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__08) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__09) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__10) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__11) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__12) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__13) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__14) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__15) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__16) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__17) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__18) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__19) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__20) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__21) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__22) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__23) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__24) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander__25) == TRUE))
    Geändert von ohje00 (17.07.2018 um 13:46 Uhr)

  8. Beiträge anzeigen #8 Zitieren
    Knight Avatar von Draxes
    Registriert seit
    Aug 2007
    Ort
    Mainz
    Beiträge
    1.920
     
    Draxes ist offline
    In all cases except ItMw_Scalingtwohander_01, you use not the right Instance-Names. There are always two underscores instead of one.
    ItMw_Scalingtwohander__02

  9. Beiträge anzeigen #9 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    Zitat Zitat von Draxes Beitrag anzeigen
    In all cases except ItMw_Scalingtwohander_01, you use not the right Instance-Names. There are always two underscores instead of one.
    ItMw_Scalingtwohander__02
    Wow, you're a genious. Thank you, now the mod works like magic

  10. Beiträge anzeigen #10 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    I tried out the mod today. I got 0 errors, but...
    When I pray at the shrine the dialogue option for the mod is missing. There are only 2 options: "pray" and "exit".

    Code:
    Prayshrine.d
    instance PC_PrayShrine_UPGRADESCALINGWEAPON(C_Info)
    {
        npc = PC_Hero;
        nr = 5;
        condition = PC_PrayShrine_UPGRADESCALINGWEAPON_Condition;
        information = PC_PrayShrine_UPGRADESCALINGWEAPON_Info;
        permanent = TRUE;
        description = "Innos Kardjának fejlesztése";
    };
    
    
    func int PC_PrayShrine_UPGRADESCALINGWEAPON_Condition()
    {
        if((player_mobsi_production == MOBSI_PrayShrine) && (C_ScCanUpgradeScalingWeapon()) && (C_ScHasScalingWeapon() == TRUE))
        {
            return TRUE;
        };
    };
    
    
    func void PC_PrayShrine_UPGRADESCALINGWEAPON_Info()
    {
        B_ClearScalingWeapon();
        B_UpgradeScalingWeapon();
    };
    Code:
    B_UpgradeScalingWeapon.d
    
    
    func int C_ScHasScalingWeapon()
    {
        if(Npc_HasItems(hero,ItMw_Scalingtwohander_01) || Npc_HasItems(hero,ItMw_Scalingtwohander_02) || Npc_HasItems(hero,ItMw_Scalingtwohander_03) || Npc_HasItems(hero,ItMw_Scalingtwohander_04) || Npc_HasItems(hero,ItMw_Scalingtwohander_05) || Npc_HasItems(hero,ItMw_Scalingtwohander_06) || Npc_HasItems(hero,ItMw_Scalingtwohander_07) || Npc_HasItems(hero,ItMw_Scalingtwohander_08) || Npc_HasItems(hero,ItMw_Scalingtwohander_09) || Npc_HasItems(hero,ItMw_Scalingtwohander_10) || Npc_HasItems(hero,ItMw_Scalingtwohander_11) || Npc_HasItems(hero,ItMw_Scalingtwohander_12) || Npc_HasItems(hero,ItMw_Scalingtwohander_13) || Npc_HasItems(hero,ItMw_Scalingtwohander_14) || Npc_HasItems(hero,ItMw_Scalingtwohander_15) || Npc_HasItems(hero,ItMw_Scalingtwohander_16) || Npc_HasItems(hero,ItMw_Scalingtwohander_17) || Npc_HasItems(hero,ItMw_Scalingtwohander_18) || Npc_HasItems(hero,ItMw_Scalingtwohander_19) || Npc_HasItems(hero,ItMw_Scalingtwohander_20) || Npc_HasItems(hero,ItMw_Scalingtwohander_21) || Npc_HasItems(hero,ItMw_Scalingtwohander_22) || Npc_HasItems(hero,ItMw_Scalingtwohander_23) || Npc_HasItems(hero,ItMw_Scalingtwohander_24) || Npc_HasItems(hero,ItMw_Scalingtwohander_25))
        {
            return TRUE;
        };
        return FALSE;
    };
    
    
    func int C_IsItemScalingWeapon(var C_Item Weap)
    {
        if((Hlp_IsItem(Weap,ItMw_Scalingtwohander_01) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_02) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_03) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_04) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_05) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_06) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_07) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_08) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_09) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_10) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_11) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_12) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_13) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_14) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_15) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_16) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_17) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_18) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_19) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_20) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_21) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_22) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_23) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_24) == TRUE) || (Hlp_IsItem(Weap,ItMw_Scalingtwohander_25) == TRUE))
        {
            return TRUE;
        };
        return FALSE;
    };
    
    
    func int C_ScHasReadiedScalingWeapon()
    {
        var C_Item ReadyWeap;
        ReadyWeap = Npc_GetReadiedWeapon(hero);
        if(C_IsItemScalingWeapon(ReadyWeap))
        {
            return TRUE;
        };
        return FALSE;
    };
    
    
    func int C_ScHasEquippedScalingWeapon()
    {
        var C_Item EquipWeap;
        EquipWeap = Npc_GetEquippedMeleeWeapon(hero);
        if(C_IsItemScalingWeapon(EquipWeap))
        {
            return TRUE;
        };
        return FALSE;
    };
    
    
    func void B_ClearScalingWeapon()
    {
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_01,Npc_HasItems(hero,ItMw_Scalingtwohander_01));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_02,Npc_HasItems(hero,ItMw_Scalingtwohander_02));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_03,Npc_HasItems(hero,ItMw_Scalingtwohander_03));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_04,Npc_HasItems(hero,ItMw_Scalingtwohander_04));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_05,Npc_HasItems(hero,ItMw_Scalingtwohander_05));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_06,Npc_HasItems(hero,ItMw_Scalingtwohander_06));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_07,Npc_HasItems(hero,ItMw_Scalingtwohander_07));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_08,Npc_HasItems(hero,ItMw_Scalingtwohander_08));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_09,Npc_HasItems(hero,ItMw_Scalingtwohander_09));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_10,Npc_HasItems(hero,ItMw_Scalingtwohander_10));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_11,Npc_HasItems(hero,ItMw_Scalingtwohander_11));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_12,Npc_HasItems(hero,ItMw_Scalingtwohander_12));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_13,Npc_HasItems(hero,ItMw_Scalingtwohander_13));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_14,Npc_HasItems(hero,ItMw_Scalingtwohander_14));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_15,Npc_HasItems(hero,ItMw_Scalingtwohander_15));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_16,Npc_HasItems(hero,ItMw_Scalingtwohander_16));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_17,Npc_HasItems(hero,ItMw_Scalingtwohander_17));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_18,Npc_HasItems(hero,ItMw_Scalingtwohander_18));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_19,Npc_HasItems(hero,ItMw_Scalingtwohander_19));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_20,Npc_HasItems(hero,ItMw_Scalingtwohander_20));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_21,Npc_HasItems(hero,ItMw_Scalingtwohander_21));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_22,Npc_HasItems(hero,ItMw_Scalingtwohander_22));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_23,Npc_HasItems(hero,ItMw_Scalingtwohander_23));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_24,Npc_HasItems(hero,ItMw_Scalingtwohander_24));
        Npc_RemoveInvItems(hero,ItMw_Scalingtwohander_25,Npc_HasItems(hero,ItMw_Scalingtwohander_25));
    };
    
    
    
    
    var int ScalingWeaponCurrentLvL;
    var int ScalingWeaponNextLvL;
    
    
    func int C_ScCanUpgradeScalingWeapon()
    {
        var int herolvl;
        herolvl = hero.level;
        if(herolvl >= 25)
        {
            ScalingWeaponNextLvL = 25;
        }
        else if(herolvl >= 24)
        {
            ScalingWeaponNextLvL = 24;
        }
        else if(herolvl >= 23)
        {
            ScalingWeaponNextLvL = 23;
        }
        else if(herolvl >= 22)
        {
            ScalingWeaponNextLvL = 22;
        }
        else if(herolvl >= 21)
        {
            ScalingWeaponNextLvL = 21;
        }
        else if(herolvl >= 20)
        {
            ScalingWeaponNextLvL = 20;
        }
        else if(herolvl >= 19)
        {
            ScalingWeaponNextLvL = 19;
        }
        else if(herolvl >= 18)
        {
            ScalingWeaponNextLvL = 18;
        }
        else if(herolvl >= 17)
        {
            ScalingWeaponNextLvL = 17;
        }
        else if(herolvl >= 16)
        {
            ScalingWeaponNextLvL = 16;
        }
        else if(herolvl >= 15)
        {
            ScalingWeaponNextLvL = 15;
        }
        else if(herolvl >= 14)
        {
            ScalingWeaponNextLvL = 14;
        }
        else if(herolvl >= 13)
        {
            ScalingWeaponNextLvL = 13;
        }
        else if(herolvl >= 12)
        {
            ScalingWeaponNextLvL = 12;
        }
        else if(herolvl >= 11)
        {
            ScalingWeaponNextLvL = 11;
        }
        else if(herolvl >= 10)
        {
            ScalingWeaponNextLvL = 10;
        }
        else if(herolvl >= 9)
        {
            ScalingWeaponNextLvL = 9;
        }
        else if(herolvl >= 8)
        {
            ScalingWeaponNextLvL = 8;
        }
        else if(herolvl >= 7)
        {
            ScalingWeaponNextLvL = 7;
        }
        else if(herolvl >= 6)
        {
            ScalingWeaponNextLvL = 6;
        }
        else if(herolvl >= 5)
        {
            ScalingWeaponNextLvL = 5;
        }
        else if(herolvl >= 4)
        {
            ScalingWeaponNextLvL = 4;
        }
        else if(herolvl >= 3)
        {
            ScalingWeaponNextLvL = 3;
        }
        else if(herolvl >= 2)
        {
            ScalingWeaponNextLvL = 2;
        }
        else if(herolvl <= 1)
        {
            ScalingWeaponNextLvL = 1;
        };
    };
    
    
    func void B_UpgradeScalingWeapon()
    {
        var int InnosTribute;
        var int ItMi_Gold_Max;
        var string InnosText;
        InnosTribute = (ScalingWeaponNextLvL - ScalingWeaponCurrentLvL);
        ItMi_Gold_Max = (200 * InnosTribute);
        Npc_RemoveInvItems(hero,ItMi_Gold,ItMi_Gold_Max);
        if(InnosTribute > 0)
        {
            InnosText = ConcatStrings(PRINT_ItMi_Gold_Max,IntToString(InnosTribute));
            PrintScreen(InnosText,-1,-1,FONT_Screen,4);
        };
        ScalingWeaponCurrentLvL = ScalingWeaponNextLvL;
        if((hero.guild == GIL_NONE) && (hero.guild == GIL_PAL) && (hero.guild == GIL_MIL) && (hero.guild == GIL_SLD) && (hero.guild == GIL_DJG))
        {
            if(ScalingWeaponCurrentLvL <= 1)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_01);
            }
            else if(ScalingWeaponCurrentLvL == 2)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_02);
            }
            else if(ScalingWeaponCurrentLvL == 3)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_03);
            }
            else if(ScalingWeaponCurrentLvL == 4)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_04);
            }
            else if(ScalingWeaponCurrentLvL == 5)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_05);
            }
            else if(ScalingWeaponCurrentLvL == 6)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_06);
            }
            else if (ScalingWeaponCurrentLvL == 7)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_07);
            }
            else if (ScalingWeaponCurrentLvL == 8)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_08);
            }
            else if (ScalingWeaponCurrentLvL == 9)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_09);
            }
            else if (ScalingWeaponCurrentLvL == 10)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_10);
            }
            else if (ScalingWeaponCurrentLvL == 11)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_11);
            }
            else if (ScalingWeaponCurrentLvL == 12)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_12);
            }
            else if (ScalingWeaponCurrentLvL == 13)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_13);
            }
            else if (ScalingWeaponCurrentLvL == 14)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_14);
            }
            else if (ScalingWeaponCurrentLvL == 15)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_15);
            }
            else if (ScalingWeaponCurrentLvL == 16)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_16);
            }
            else if (ScalingWeaponCurrentLvL == 17)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_17);
            }
            else if (ScalingWeaponCurrentLvL == 18)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_18);
            }
            else if (ScalingWeaponCurrentLvL == 19)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_19);
            }
            else if (ScalingWeaponCurrentLvL == 20)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_20);
            }
            else if (ScalingWeaponCurrentLvL == 21)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_21);
            }
            else if (ScalingWeaponCurrentLvL == 22)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_22);
            }
            else if (ScalingWeaponCurrentLvL == 23)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_23);
            }
            else if (ScalingWeaponCurrentLvL == 24)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_24);
            }
            else if (ScalingWeaponCurrentLvL == 25)
            {
                CreateInvItem(hero,ItMw_ScalingTwoHander_25);
            };
        Wld_PlayEffect("spellFX_PalHeal_ORIGIN",hero,hero,0,0,0,FALSE);
        Snd_Play("MFX_Heal_Cast");
        ScalingWeaponUpgraded = TRUE;
        };
    };
    Code:
    Story_Globals.d
    var int ScalingWeaponUpgraded;
    Geändert von ohje00 (18.07.2018 um 14:08 Uhr)

  11. Beiträge anzeigen #11 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.447
     
    Lehona ist offline
    Look at C_ScCanUpgradeScalingWeapon(). The function is declared as a func int, i.e. returning an integer, but you never do. This implicitly returns 0, which is the same as false. Now in your condition you check C_ScCanUpgradeScalingWeapon() which makes your dialog not show up.

  12. Beiträge anzeigen #12 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    Look at C_ScCanUpgradeScalingWeapon(). The function is declared as a func int, i.e. returning an integer, but you never do. This implicitly returns 0, which is the same as false. Now in your condition you check C_ScCanUpgradeScalingWeapon() which makes your dialog not show up.
    Thank you, now it works. Changed it to:

    Code:
    	else if(herolvl <= 1)
    	{
    		ScalingWeaponNextLvL = 1;
    	};
    	if(ScalingWeaponCurrentLvL < ScalingWeaponNextLvL)
    	{
    		return TRUE;
    	};
    };

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide