What This Means

All Helbreath Server Source Discussion here.
Post Reply
Tafka12
<3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Code: Select all

--------------------Configuration: HGserver - Win32 Release--------------------
Compiling resources...
Compiling...
BuildItem.cpp
Client.cpp
DelayEvent.cpp
DynamicObject.cpp
Fish.cpp
Game.cpp
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(2112) : warning C4305: '=' : truncation from 'const int' to 'char'
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(2112) : warning C4309: '=' : truncation of constant value
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(8857) : warning C4305: '=' : truncation from 'const int' to 'short'
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(8857) : warning C4309: '=' : truncation of constant value
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(49552) : error C2601: 'bReadAdminSetConfigFile' : local function definitions are illegal
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(50117) : error C2601: 'AdminOrder_Time' : local function definitions are illegal
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\Game.cpp(50117) : fatal error C1903: unable to recover from previous error(s); stopping compilation
GuildsMan.cpp
Item.cpp
Magic.cpp
Map.cpp
Mineral.cpp
Misc.cpp
Msg.cpp
Npc.cpp
OccupyFlag.cpp
Portion.cpp
Quest.cpp
Skill.cpp
StrategicPoint.cpp
StrTok.cpp
Teleport.cpp
TeleportLoc.cpp
TempNpcItem.cpp
Tile.cpp
wmain.cpp
XSocket.cpp
DebugDialog.cpp
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\DebugDialog.cpp(85) : warning C4018: '<' : signed/unsigned mismatch
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\DebugDialog.cpp(88) : warning C4018: '<' : signed/unsigned mismatch
C:\Documents and Settings\Admin\My Documents\Helbreath\2.24c\DebugDialog.cpp(97) : warning C4018: '<' : signed/unsigned mismatch
Error executing cl.exe.

HGserver.exe - 3 error(s), 7 warning(s)
Look there are two errors in the middle. if i go that adress there is only:

BOOL CGame::bReadAdminSetConfigFile(char * cFn)
{
FILE * pFile;

what shall i do, if there is only { and if i take it away or do smth i get more errors.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

try to check out function definitions in game.h, maybe they're different from the ones you have un game.cpp.

Did you add or edit a function right before the first function that give you errors ?
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Yes, there was the CGame::GetMultipleItemNamesWhenDeleteNpc
i only changed dices and few small drops a little bit... shouldn't do that?

I tried compile again and i get that error with every function, there is { again in every place.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

That's cuz you've done a mistake in your code... post it here and i'll fix it ;-)
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Code: Select all

void CGame::NpcDeadItemGenerator(int iNpcH, short sAttackerH, char cAttackerType)
{
	class CItem * pItem;
	char  cColor, cItemName[21];
	BOOL  bIsGold;
	int   iGenLevel, iResult, iItemID;
	DWORD dwType, dwValue;
	double dTmp1, dTmp2, dTmp3;

	if (m_pNpcList[iNpcH] == NULL) return;
	if ((cAttackerType != DEF_OWNERTYPE_PLAYER) || (m_pNpcList[iNpcH]->m_bIsSummoned == TRUE)) return;
	if (m_pNpcList[iNpcH]->m_bIsUnsummoned == TRUE) return;

	ZeroMemory(cItemName, sizeof(cItemName));
	bIsGold = FALSE;

	switch (m_pNpcList[iNpcH]->m_sType) {
  // NPC not dropping Gold
	case 21: // Guard
	case 34: // Dummy
	case 64: // Crop
  return;
	}

	// 6500 default; the lower the greater the Weapon/Armor/Wand Drop
	if (iDice(1,10000) >= m_iPrimaryDropRate) {
  // 35% Drop 60% of that is gold
  // 35% Chance of drop (35/100)
  if (iDice(1,10000) <= 6000) {
  	iItemID = 90; // Gold: (35/100) * (60/100) = 21%
  	// If a non-existing itemID is given create no item
  	pItem = new class CItem;
  	if (_bInitItemAttr(pItem, iItemID) == FALSE) {
    delete pItem;
    return;	
  	}

  	pItem->m_dwCount = (DWORD)(iDice(1, (m_pNpcList[iNpcH]->m_iGoldDiceMax - m_pNpcList[iNpcH]->m_iGoldDiceMin)) + m_pNpcList[iNpcH]->m_iGoldDiceMin);

  	// v1.42 Gold 
  	if ((cAttackerType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sAttackerH]->m_iAddGold != NULL)) {
    dTmp1 = (double)m_pClientList[sAttackerH]->m_iAddGold;
    dTmp2 = (double)pItem->m_dwCount;
    dTmp3 = (dTmp1/100.0f)*dTmp2;
    pItem->m_dwCount += (int)dTmp3;
  	}
  }
  else {
  	// 9000 default; the lower the greater the Weapon/Armor/Wand Drop
  	// 35% Drop 40% of that is an Item 
  	dTmp1 = m_pClientList[sAttackerH]->m_iRating*m_cRepDropModifier;
  	if (dTmp1 > 3000) dTmp1 = 3000;
  	if (dTmp1 < -3000) dTmp1 = -3000;
  	dTmp2 = (m_iSecondaryDropRate - (dTmp1));
  	if (iDice(1,10000) <= dTmp2) { 
    // 40% Drop 90% of that is a standard drop
    // Standard Drop Calculation: (35/100) * (40/100) * (90/100) = 12.6%
    iResult = iDice(1,12000);
    if ((iResult >= 1) && (iResult <= 3000))          dwValue = 1;
    else if ((iResult >= 3001) && (iResult <= 4000))  dwValue = 2;
    else if ((iResult >= 4001) && (iResult <= 5500))  dwValue = 3;
    else if ((iResult >= 5501) && (iResult <= 7000))  dwValue = 4;
    else if ((iResult >= 7001) && (iResult <= 8500))  dwValue = 5;
    else if ((iResult >= 8501) && (iResult <= 9200))  dwValue = 6;
    else if ((iResult >= 9201) && (iResult <= 9800))  dwValue = 7;
    else if ((iResult >= 9801) && (iResult <= 10000)) dwValue = 8;
    else if ((iResult >= 10001) && (iResult <= 12000)) dwValue = 9;

    switch (dwValue) {	
      case 1: iItemID = 95; break; // Green Potion
      case 2: iItemID = 91; break; // Red Potion
      case 3: iItemID = 93; break; // Blue Potion
      case 4: iItemID = 96; break; // Big Green Potion
      case 5: iItemID = 92; break; // Big Red Potion
      case 6: iItemID = 94; break; // Big Blue Potion
      case 7: switch(iDice(1,2)) {
        case 1: iItemID = 390; break; // Power Green Potion
        case 2: iItemID = 95;  break; // Green Potion
        }
        break;
      case 8: switch(iDice(1,6)) {
        case 1: iItemID = 391; break; // Super Power Green Potion
        case 2: iItemID = 650; break; // Zemstone of Sacrifice
        case 3: iItemID = 656; break; // Xelima Stone
        case 4: iItemID = 657; break; // Merien Stone
        case 5: iItemID = 95;  break; // Green Potion
        case 6: switch(iDice(1,5)) {
          case 1: iItemID = 651; break; // GreenBall
          case 2: iItemID = 652; break; // RedBall
          case 3: iItemID = 653; break; // YellowBall
          case 4: iItemID = 654; break; // BlueBall
          case 5: switch(iDice(1,11)) {
            case 1: iItemID = 881; break; // ArmorDye(Indigo)
            case 2: iItemID = 882; break; // ArmorDye(Crimson-Red)
            case 3: iItemID = 883; break; // ArmorDye(Gold)
            case 4: iItemID = 884; break; // ArmorDye(Aqua)
            case 5: iItemID = 885; break; // ArmorDye(Pink)
            case 6: iItemID = 886; break; // ArmorDye(Violet)
            case 7: iItemID = 887; break; // ArmorDye(Blue)
            case 8: iItemID = 888; break; // ArmorDye(Khaki)
            case 9: iItemID = 889; break; // ArmorDye(Yellow)
            case 10: iItemID = 890; break; // ArmorDye(Red)
            case 11: iItemID = 655; break; // PearlBall
            }
            break;
          }
          break;
        }
        break;

      case 9:  	
      	SYSTEMTIME SysTime;
      	GetLocalTime(&SysTime);
      	if (((short)SysTime.wMonth == 12) && (m_pNpcList[iNpcH]->m_sType == 61 || 55)) {
        switch(iDice(1,4)) {
        case 1: iItemID = 780; break; // Red Candy
        case 2: iItemID = 781; break; // Blue Candy
        case 3: iItemID = 782; break; // Green Candy
        case 4: iItemID = 91;  break; // Red Potion
        }
      	}
      	break;
    }
    // If a non-existing item is created then delete the item
    pItem = new class CItem;
    if (_bInitItemAttr(pItem, iItemID) == FALSE) {
    	delete pItem;
    	return;	
    }
  	}
  	else {
    // Valuable Drop Calculation: (35/100) * (40/100) * (10/100) = 1.4%
    // Define iGenLevel using Npc.cfg#
    switch (m_pNpcList[iNpcH]->m_sType) {

    case 10: // Slime
    case 16: // Giant-Ant
    case 22: // Amphis
    case 55: // Rabbit
    case 56: //	Cat
    	iGenLevel = 1;
    	break;

    case 11: // Skeleton
    case 14: // Orc, Orc-Mage
    case 17: // Scorpion
    case 18: // Zombie
    	iGenLevel = 2;
    	break;

    case 12: // Stone-Golem
    case 23: // Clay-Golem
    	iGenLevel = 3;
    	break;

    case 27: // Hellbound
    case 61: // Rudolph
    	iGenLevel = 4;
    	break; 

    case 72: // Claw-Turtle
    case 76: // Giant-Plant
    case 74: // Giant-Crayfish
    case 13: // Cyclops
    case 28: // Troll
    case 53: // Beholder
    case 60: // Cannibal-Plant
    case 62: // DireBoar
    	iGenLevel = 5;
    	break;

    case 29: // Orge
    case 33: // WereWolf
    case 48: // Stalker
    case 54: // Dark-Elf
    case 65: // Ice-Golem
       case 78: // Minotaurus
    	iGenLevel = 6;
    	break;

        case 70: // Balrogs
    case 71: // Centaurus
    case 30: // Liche
    case 63: // Frost
       case 79: // Nizie
    	iGenLevel = 7;
    	break;

    case 31: // Demon
    case 32: // Unicorn
    case 49: // Hellclaw
    case 50: // Tigerworm
    case 52: // Gagoyle
    	iGenLevel = 8;
    	break; 

    case 58: // MountainGiant
    	iGenLevel = 9;
    	break;

       case 77: // MasterMage-Orc
    case 59: // Ettin
    case 75: // Lizards
    	iGenLevel = 10;
    	break;
    }	

    if (iGenLevel == 0) return;

    // Weapon Drop: 
    // 1.4% chance Valuable Drop 60% that it is a Weapon
    if (iDice(1,10000) <= 6000) {
    	if (iDice(1,10000) <= 8000) {
      // 70% the Weapon is Melee
      switch (iGenLevel) { 

    case 1: // Slime, Giant-Ant, Amphis, Rabbit, Cat
    	switch (iDice(1,3)) { 
    case 1: iItemID = 1;  break; // Dagger
    case 2: iItemID = 8;  break; // ShortSword
    case 3: iItemID = 59; break; // LightAxe
    	}
    	break; 

    case 2: // Skeleton, Orc, Orc-Mage, Scorpion, Zombie
    	switch (iDice(1,6)) {
      case 1: iItemID = 12;  break; // MainGauche
      case 2: iItemID = 15;  break; // Gradius
      case 3: iItemID = 65;  break; // SexonAxe
      case 4: iItemID = 62;  break; // Tomahoc
      case 5: iItemID = 23;  break; // Sabre
      case 6: iItemID = 31;  break; // Esterk
    	}
    	break;

    case 3: // Stone-Golem, Clay-Golem
    	switch (iDice(1,4)) {
    case 1: iItemID = 17;  break; // LongSword
    case 2: iItemID = 68;  break; // DoubleAxe
    case 3: iItemID = 23;  break; // Sabre
    case 4: iItemID = 31;  break; // Esterk
    	}
    	break;

    case 4: // Hellbound, Rudolph
    	switch (iDice(1,5)) {
    case 1: iItemID = 23;  break; // Sabre
    case 2: iItemID = 25;  break; // Scimitar
    case 3: iItemID = 28;  break; // Falchion
    case 4: iItemID = 31;  break; // Esterk
    case 5: iItemID = 34;  break; // Rapier
    	}
    	break;

    case 5: // Cyclops, Troll, Beholder, Cannibal-Plant, DireBoar
    	switch (iDice(1,3)) {
    case 1: iItemID = 31;  break; // Esterk
    case 2: iItemID = 34;  break; // Rapier
    case 3: iItemID = 71;  break; // WarAxe
    	}
    	break;

    case 6: // Orge, WereWolf, Stalker, Dark-Elf, Ice-Golem
    	switch (iDice(1,9)) {
    case 1: iItemID = 1545;  break; // SamuraiBlade
    case 2: iItemID = 1237;  break; // SamuraiSword
    case 3: iItemID = 1235;  break; // SamuraiHammer
    case 4: iItemID = 1997;  break; // SamuraiShield
    case 5: iItemID = 1234;  break; // SamuraiWand(MS30)
    case 6: iItemID = 617; break; // CompositeBow
    	}
    	break;

    case 7: // Liche, Frost
    	switch (iDice(1,4)) {
    case 1: iItemID = 50;  break; // GreatSword
    case 2: iItemID = 54;  break; // Flameberge
    case 3: iItemID = 31;  break; // Esterk
    case 4: iItemID = 34;  break; // Rapier
    	}
    	break;

    case 8: // Demon, Unicorn, Hellclaw, Tigerworm, Gagoyle
    	switch (iDice(1,7)) {
    case 1: iItemID = 654;  break; // BlueBall
    case 2: iItemID = 54;  break; // Flameberge
    case 3: iItemID = 560; break; // BattleAxe
    case 4: iItemID = 31;  break; // Esterk
    case 5: iItemID = 34;  break; // Rapier
    case 6: iItemID = 55;  break; // Flameberge+1
    case 7: iItemID = 615; break; // GiantSword
    	}
    	break;

    case 9: // MountainGiant
    	switch (iDice(1,6)) {
    case 1: iItemID = 23;  break; // Sabre
    case 2: iItemID = 25;  break; // Scimitar
    case 3: iItemID = 28;  break; // Falchion
    case 4: iItemID = 31;  break; // Esterk
    case 5: iItemID = 34;  break; // Rapier
    case 6: iItemID = 760; break; // Hammer
    	}
    	break;

    case 10: // Ettin
    	switch (iDice(1,5)) {
    	case 1: iItemID = 46;  break; // Claymore
    	case 2: iItemID = 31;  break; // Esterk
    	case 3: iItemID = 34;  break; // Rapier
    	case 4: iItemID = 760; break; // Hammer
    	case 5: iItemID = 761; break; // GiantHammer
    	}
    	break;


      }
    	}
    	else {
      // 30% the weapon is a Wand
      switch (iGenLevel) {

      case 2: 
      case 3:
      	iItemID = 258; break; // MagicWand(MS0)
      case 4: 
      case 5: 
      case 6: 
      	iItemID = 257; break; // MagicWand(MS10)
      case 7:
      case 8:
      	iItemID = 256; break; // MagicWand(MS20)
      case 9:
      case 10:
      	break;
      }	
    	}
    }
    else {
    	// 1.4% chance Valuable Drop 40% that drop is an Armor/Shield
    	switch (iGenLevel) {

    	case 1: // Slime, Giant-Ant, Amphis, Rabbit, Cat
    	case 2: // Skeleton, Orc, Orc-Mage, Scorpion, Zombie
      switch (iDice(1,2)) { 
      	case 1: iItemID = 79;  break; // WoodShield
      	case 2: iItemID = 81;  break; // TargeShield
      }
      break; 

    	case 3: // Stone-Golem, Clay-Golem
      switch (iDice(1,45)) {
      	case 1: iItemID = 653; break; // YellowBall
      	case 2: iItemID = 652; break; // RedBall
      	case 3: iItemID = 832; break; // Mushroom
      break;

    	case 4: // Hellbound, Rudolph
      switch (iDice(1,5)) {
      	case 1: iItemID = 454; break; // Hauberk(M)
      	case 2: iItemID = 472; break; // Hauberk(W)
      	case 3: iItemID = 461; break; // ChainHose(M)
      	case 4: iItemID = 482; break; // ChainHose(W)
      	case 5: iItemID = 83;  break; // BlondeShield
      }
      break;

    	case 5: // Cyclops, Troll, Beholder, Cannibal-Plant, DireBoar
      switch (iDice(1,3)) {
      	case 1: iItemID = 455; break; // LeatherArmor(M)
      	case 2: iItemID = 475; break; // LeatherArmor(W)
      	case 3: iItemID = 84;  break; // IronShield
      }
      break;

    	case 6: // Orge, WereWolf, Stalker, Dark-Elf, Ice-Golem
      switch (iDice(1,6)) {
      case 1: switch(iDice(1,20)) {
      	case 1: iItemID = 652; break; // RedBall
      	case 2: iItemID = 651; break; // GreenBall
      }
      break;
      case 2: switch(iDice(1,4)) {
      	case 1: iItemID = 458; break; // PlateMail(M)
      	case 2: iItemID = 478; break; // PlateMail(W)
      }
      break;
      case 3: iItemID = 402; break; // Cape
      case 4: switch(iDice(1,5)) {
      	case 1: iItemID = 750; break; // Horned-Helm(M)
      	case 2: iItemID = 751; break; // Wings-Helm(M)
      	case 3: iItemID = 754; break; // Horned-Helm(W)
      	case 4: iItemID = 755; break; // Wings-Helm(W)
      	case 5: iItemID = 752; break; // Wizard-Cap(M) 
      	case 6: iItemID = 753; break; // Wizard-Hat(M)
      	case 7: iItemID = 992; break; // DragonSword
      	case 8: iItemID = 757; break; // Wizard-Hat(W) 
      }
      break;	
      case 5: switch(iDice(1,4)) {
      	case 1: iItemID = 454; break; // Hauberk(M)
      	case 2: iItemID = 472; break; // Hauberk(W)
      }
      break;
      case 6: switch(iDice(1,5)) {
      	case 1: iItemID = 461; break; // ChainHose(M)
      	case 2: iItemID = 482; break; // ChainHose(W)
      }
      break;
      }
      break;


    	case 7: // Liche, Frost
      switch (iDice(1,6)) {
      case 1: switch(iDice(1,2)) {
      	case 1: iItemID = 457; break; // ScaleMail(M)
      	case 2: iItemID = 477; break; // ScaleMail(W)
      	}
      	break;
      case 2: switch(iDice(1,2)) {
      	case 1: iItemID = 458; break; // PlateMail(M)
      	case 2: iItemID = 478; break; // PlateMail(W)
      	}
      	break;
      case 3: iItemID = 86; break; // KnightShield
      case 4: iItemID = 87; break; // TowerShield
      case 5: switch(iDice(1,2)) {
      	case 1: iItemID = 600; break; // Helm(M)
      	case 2: iItemID = 602; break; // Helm(M)
      	}
      	break;
      case 6: switch(iDice(1,2)) {
      	case 1: iItemID = 601; break; // Full-Helm(M)
      	case 2: iItemID = 603; break; // Full-Helm(M)
      	}
      	break;
      }
      break;

    	case 8: // Demon, Unicorn, Hellclaw, Tigerworm, Gagoyle
      iItemID = 848; // LightingBlade
      break;

    	case 9:
    	case 10:
      break;
    	}
    }
    // 0-None 1-í•„ìā€&#154;´ê¸°ëŒ€ë¯¸ì§€ì¶”ê°€ 2-ì¤ā€&#152;독íÅ¨ê³¼ 3-ì •ìĖ&#156;ìĖ&#156;  
    // 5-민첩ìĖ&#156; 6-가벼ìÅĀ´ 7-ƬĖ&#156;ˆë¦¬í•œ 8-ê°•í™”ëĀ￾Å“ 9-고대문명ìĖ&#156; 10-마법 성공ìĖ&#156;
    // 아이템을 ë§Œëā€&#156;¤ê³  
    pItem = new class CItem;
    // 기본 특성으ëĀÅ“ 아이템 생성 
    if (_bInitItemAttr(pItem, iItemID) == FALSE) {
    	delete pItem;
    	return;	
    }

    if (pItem->m_sItemEffectType == DEF_ITEMEFFECTTYPE_ATTACK) {
    	// °ø°Ý ¹«±â·ù¿Ā ºÙÀ» ¼ö ÀÖ´Â Ć￾¢µÎ»ç¸¦ ¼±ÅĆ&#131; 
    	// °Āº­¿î(3%) °­Ć&#136;­µĆ&#136;(7%) ƇĆ&#138;ȓ˂(15%) ¹ÎĆ&#131;¸ÀÇ(20%) Ć￾¤ÀÇÀÇ(20%) Ć￾Ć&#159;µ¶ÀÇ(16%) ¿¹¸®ÇÑ(16%) °í´ë¹®¸íÀÇ(3%)
    	iResult = iDice(1,10000);
    	if ((iResult >= 1) && (iResult <= 299)) {
      dwType = 6; 
      cColor = 2; 
    	}
    	else if ((iResult >= 300) && (iResult <= 999)) {
      dwType = 8; 
      cColor = 3;
    	}
    	else if ((iResult >= 1000) && (iResult <= 2499)) {
      dwType = 1;
      cColor = 5;
    	}
    	else if ((iResult >= 2500) && (iResult <= 4499)) {
      dwType = 5;
      cColor = 1;
    	}
    	else if ((iResult >= 4500) && (iResult <= 6499)) {
      dwType = 3;
      cColor = 7;
    	}
    	else if ((iResult >= 6500) && (iResult <= 8099)) {
      dwType = 2;
      cColor = 4;
    	}
    	else if ((iResult >= 8100) && (iResult <= 9699)) {
      dwType = 7;
      cColor = 6;
    	}
    	else if ((iResult >= 9700) && (iResult <= 10000)) {
      dwType = 9;
      cColor = 8;
    	}

    	// ¾ÆÀĆ&#140;Ć…Ć› »ö»ó ÀÔ·Â 
    	pItem->m_cItemColor = cColor;

    	// °Āº­¿î, °­Ć&#136;­µĆ&#136;, ƇĆ&#138;ȓ˂, ¹ÎĆ&#131;¸ÀÇ, Ć￾¤ÀÇÀÇ, Ć￾Ć&#159;µ¶ÀÇ, ¿¹¸®ÇÑ, °í´ë¹®¸íÀÇ
    	// ¾ÆÀĆ&#140;Ć…Ć› Main Ư¼ºÄĀ Ć￾¤µµ°ª ÀÔ·Â 

    	// ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć￾¤µµ°ª ÀÔ·Â 
    	iResult = iDice(1, 30000);
    	if ((iResult >= 1) && (iResult < 10000))           dwValue = 1;  // 10000/29348 = 34%
    	else if ((iResult >= 10000) && (iResult < 17400))  dwValue = 2;  // 6600/29348 = 22.4%
    	else if ((iResult >= 17400) && (iResult < 22400))  dwValue = 3;  // 4356/29348 = 14.8%
    	else if ((iResult >= 22400) && (iResult < 25400))  dwValue = 4;  // 2874/29348 = 9.7%
    	else if ((iResult >= 25400) && (iResult < 27400))  dwValue = 5;  // 1897/29348 = 6.4%
    	else if ((iResult >= 27400) && (iResult < 28400))  dwValue = 6;  // 1252/29348 = 4.2%
    	else if ((iResult >= 28400) && (iResult < 28900))  dwValue = 7;  // 826/29348 = 2.8%
    	else if ((iResult >= 28900) && (iResult < 29300))  dwValue = 8;  // 545/29348 = 1.85%
    	else if ((iResult >= 29300) && (iResult < 29600))  dwValue = 9;  // 360/29348 = 1.2%
    	else if ((iResult >= 29600) && (iResult < 29800))  dwValue = 10; // 237/29348 = 0.8%
    	else if ((iResult >= 29800) && (iResult < 29900))  dwValue = 11; // 156/29348 = 0.5%
    	else if ((iResult >= 29900) && (iResult < 29970))  dwValue = 12; // 103/29348 = 0.3%
    	else if ((iResult >= 29970) && (iResult <= 30000))  dwValue = 13; // 68/29348 = 0.1%
    	else dwValue = 1; // v2.03 906

    	// ¹«±âÀÇ Main Ư¼ºÄĀĀæĀ µû¶ó ¼öÄĀ ĀŗĀøĆ￾¤ 
    	switch (dwType) {
    	case 1: // ƇĆ&#138;ȓ Ÿ°Ý Ć&#131;ÖÀú +5
      if (dwValue <= 5) dwValue = 5;
      break; 
    	case 2: // Ć￾Ć&#159;µ¶ Ÿ°Ý Ć&#131;ÖÀú +20
      if (dwValue <= 4) dwValue = 4;
      break; 
    	case 6: // °æ·®Ć&#136;Ā­ Ć&#131;ÖÀú  +16%
      if (dwValue <= 4) dwValue = 4;
      break; 
    	case 8: // ¼ö¸í Ć&#131;ÖÀú +14%    	
      if (dwValue <= 2) dwValue = 2;
      break; 
    	}
    	// v2.03 912 ¾ÆÀĆ&#140;Ć…Ć› ¼öĆ￾Ć&#152;Ć€Ć&#140; 2Ć€Ć&#140;ÇÏÀ϶§ Ư¼ºÄĀ Ć&#131;Ö´ë°ªÀº 7
    	if ((iGenLevel <= 2) && (dwValue > 7)) dwValue = 7;

    	// ¾ÆÀĆ&#140;Ć…Ć› Main Ư¼ºÄĀ, °ª ÀÔ·Â
    	pItem->m_dwAttribute = NULL;
    	dwType  = dwType << 20;
    	dwValue = dwValue << 16;
    	pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue;

    	// ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ°Ā ÀԷµÉ Ć&#136;®·üÀº 40%
    	if (iDice(1,10000) >= 6000) {

      // Ć&#136;ñ±Í ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć&#136;¿°ú Ć￾¾·ù: 
      //Ć&#131;Ć&#159;°Ā µ¶¼ºÀúÇ×(1), Ć&#131;Ć&#159;°Ā ĀøĆ­Ć￾Ć&#159;°ª(2), Ć&#131;Ć&#159;°Ā ¹æ¾î°ª(3), HP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(4), SP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(5)
      //MP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(6), Ć&#131;Ć&#159;°Ā ¸¶¹ýÀúÇ×(7), ¹°¸® ´ë¹Ć&#140;Ć￾ƶ Ć&#136;í¼ö(8), ¸¶¹ý ´ë¹Ć&#140;Ć￾ƶ Ć&#136;í¼ö(9)
      //¿¬Å¸ ´ë¹Ć&#140;Ć￾ƶ Ć&#131;Ć&#159;°Ā(10), ´õ ¸¹Àº °æÇèÄĀ(11), ´õ¸¹Àº Gold(12)

      // ¹«±â·ùÀĆ&#140;±â ¶§¹®¿Ā °ø°Ý ĀøĆ­Ć￾Ć&#159; Ć&#131;Ć&#159;°Ā(50%), ¿¬Å¸ Ÿ°ÝÄĀ Ć￾õ°Ā(35%), ´õ ¸¹Àº Gold(10%), ´õ ¸¹Àº °æÇèÄĀ(5%)
      iResult = iDice(1,10000);
      if ((iResult >= 1) && (iResult <= 4999))          dwType = 2;
      else if ((iResult >= 5000) && (iResult <= 8499))  dwType = 10;
      else if ((iResult >= 8500) && (iResult <= 9499))  dwType = 12;
      else if ((iResult >= 9500) && (iResult <= 10000)) dwType = 11;

      // ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć￾¤µµ°ª ÀÔ·Â 
      iResult = iDice(1, 30000);
      if ((iResult >= 1) && (iResult < 10000))           dwValue = 1;  // 10000/29348 = 34%
      else if ((iResult >= 10000) && (iResult < 17400))  dwValue = 2;  // 6600/29348 = 22.4%
      else if ((iResult >= 17400) && (iResult < 22400))  dwValue = 3;  // 4356/29348 = 14.8%
      else if ((iResult >= 22400) && (iResult < 25400))  dwValue = 4;  // 2874/29348 = 9.7%
      else if ((iResult >= 25400) && (iResult < 27400))  dwValue = 5;  // 1897/29348 = 6.4%
      else if ((iResult >= 27400) && (iResult < 28400))  dwValue = 6;  // 1252/29348 = 4.2%
      else if ((iResult >= 28400) && (iResult < 28900))  dwValue = 7;  // 826/29348 = 2.8%
      else if ((iResult >= 28900) && (iResult < 29300))  dwValue = 8;  // 545/29348 = 1.85%
      else if ((iResult >= 29300) && (iResult < 29600))  dwValue = 9;  // 360/29348 = 1.2%
      else if ((iResult >= 29600) && (iResult < 29800))  dwValue = 10; // 237/29348 = 0.8%
      else if ((iResult >= 29800) && (iResult < 29900))  dwValue = 11; // 156/29348 = 0.5%
      else if ((iResult >= 29900) && (iResult < 29970))  dwValue = 12; // 103/29348 = 0.3%
      else if ((iResult >= 29970) && (iResult <= 30000))  dwValue = 13; // 68/29348 = 0.1%
      else dwValue = 1; // v2.03 906

      // ¹«±âÀÇ Sub Ư¼ºÄĀĀæĀ µû¶ó ¼öÄĀ ĀŗĀøĆ￾¤ 
      switch (dwType) {
      case 2: // °ø°Ý¸íĆ￾Ć&#159; Ć&#131;ÖÀú +21%
      	if (dwValue <= 3) dwValue = 3;
      	break; 
      case 10: // ¿¬¼Ó Ÿ°Ý Ć&#131;ÖÀú +1 Ć&#131;Ć–Ā´Ć« 7
      	if (dwValue > 7) dwValue = 7; 
      	break; 
      case 11: // ExpĀ´Ć‚ ¹«Ć￾¶°Ç +20%
      	dwValue = 2;
      	break; 
      case 12: // GoldĀ´Ć‚ ¹«Ć￾¶°Ç +50%
      	dwValue = 5;
      	break; 
      }
      // v2.03 912 ¾ÆÀĆ&#140;Ć…Ć› ¼öĆ￾Ć&#152;Ć€Ć&#140; 2Ć€Ć&#140;ÇÏÀ϶§ Ư¼ºÄĀ Ć&#131;Ö´ë°ªÀº 7
      if ((iGenLevel <= 2) && (dwValue > 7)) dwValue = 7;

      // ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ ÀÔ·Â
      dwType  = dwType << 12;
      dwValue = dwValue << 8;

      pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue;
    	}
    }

    else if (pItem->m_sItemEffectType == DEF_ITEMEFFECTTYPE_ATTACK_MANASAVE) {
    	// ¸¶¹ý °ø°Ý ¹«±â·ù¿Ā ºÙÀ» ¼ö ÀÖ´Â Ć￾¢µÎ»ç¸¦ ¼±ÅĆ&#131; 10, 11
    	// ¸¶¹ý ¼º°øÀÇ(100%) <- ƇƶƀƧ ¸¶¹ý Ć￾ƶƆơƀĆ&#140;ĀæĀ ºÙÀ» ¼ö ÀÖ´Â ¿ä¼Ò°Ā Ć€Ć&#140;°Å ¹Û¿Ā ¾ø´Ù.
    	dwType = 10;
    	cColor = 5;

    	// ¾ÆÀĆ&#140;Ć…Ć› »ö»ó ÀÔ·Â 
    	pItem->m_cItemColor = cColor;

    	iResult = iDice(1, 30000);
    	if ((iResult >= 1) && (iResult < 10000))           dwValue = 1;  // 10000/29348 = 34%
    	else if ((iResult >= 10000) && (iResult < 17400))  dwValue = 2;  // 6600/29348 = 22.4%
    	else if ((iResult >= 17400) && (iResult < 22400))  dwValue = 3;  // 4356/29348 = 14.8%
    	else if ((iResult >= 22400) && (iResult < 25400))  dwValue = 4;  // 2874/29348 = 9.7%
    	else if ((iResult >= 25400) && (iResult < 27400))  dwValue = 5;  // 1897/29348 = 6.4%
    	else if ((iResult >= 27400) && (iResult < 28400))  dwValue = 6;  // 1252/29348 = 4.2%
    	else if ((iResult >= 28400) && (iResult < 28900))  dwValue = 7;  // 826/29348 = 2.8%
    	else if ((iResult >= 28900) && (iResult < 29300))  dwValue = 8;  // 545/29348 = 1.85%
    	else if ((iResult >= 29300) && (iResult < 29600))  dwValue = 9;  // 360/29348 = 1.2%
    	else if ((iResult >= 29600) && (iResult < 29800))  dwValue = 10; // 237/29348 = 0.8%
    	else if ((iResult >= 29800) && (iResult < 29900))  dwValue = 11; // 156/29348 = 0.5%
    	else if ((iResult >= 29900) && (iResult < 29970))  dwValue = 12; // 103/29348 = 0.3%
    	else if ((iResult >= 29970) && (iResult <= 30000))  dwValue = 13; // 68/29348 = 0.1%
    	else dwValue = 1; // v2.03 906

    	// v2.03 912 ¾ÆÀĆ&#140;Ć…Ć› ¼öĆ￾Ć&#152;Ć€Ć&#140; 2Ć€Ć&#140;ÇÏÀ϶§ Ư¼ºÄĀ Ć&#131;Ö´ë°ªÀº 7
    	if ((iGenLevel <= 2) && (dwValue > 7)) dwValue = 7;

    	// ¹æ¾î±¸ Main Ư¼ºÄĀ, °ª ÀÔ·Â
    	pItem->m_dwAttribute = NULL;
    	dwType  = dwType << 20;
    	dwValue = dwValue << 16;
    	pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue;

    	// ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ°Ā ÀԷµÉ Ć&#136;®·üÀº 40%
    	if (iDice(1,10000) >= 6000) {

      // Ć&#136;ñ±Í ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć&#136;¿°ú Ć￾¾·ù: 
      //Ć&#131;Ć&#159;°Ā µ¶¼ºÀúÇ×(1), Ć&#131;Ć&#159;°Ā ĀøĆ­Ć￾Ć&#159;°ª(2), Ć&#131;Ć&#159;°Ā ¹æ¾î°ª(3), HP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(4), SP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(5)
      //MP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(6), Ć&#131;Ć&#159;°Ā ¸¶¹ýÀúÇ×(7), ¹°¸® ´ë¹Ć&#140;Ć￾ƶ Ć&#136;í¼ö(8), ¸¶¹ý ´ë¹Ć&#140;Ć￾ƶ Ć&#136;í¼ö(9)
      //¿¬Å¸ ´ë¹Ć&#140;Ć￾ƶ Ć&#131;Ć&#159;°Ā(10), ´õ ¸¹Àº °æÇèÄĀ(11), ´õ¸¹Àº Gold(12)

      // ¹«±â·ùÀĆ&#140;±â ¶§¹®¿Ā °ø°Ý ĀøĆ­Ć￾Ć&#159; Ć&#131;Ć&#159;°Ā(50%), ¿¬Å¸ Ÿ°ÝÄĀ Ć￾õ°Ā(35%), ´õ ¸¹Àº Gold(10%), ´õ ¸¹Àº °æÇèÄĀ(5%)
      iResult = iDice(1,10000);
      if ((iResult >= 1) && (iResult <= 4999))          dwType = 2;
      else if ((iResult >= 5000) && (iResult <= 8499))  dwType = 10;
      else if ((iResult >= 8500) && (iResult <= 9499))  dwType = 12;
      else if ((iResult >= 9500) && (iResult <= 10000)) dwType = 11;

      // ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć￾¤µµ°ª ÀÔ·Â 
      iResult = iDice(1, 30000);
      if ((iResult >= 1) && (iResult < 10000))           dwValue = 1;  // 10000/29348 = 34%
      else if ((iResult >= 10000) && (iResult < 17400))  dwValue = 2;  // 6600/29348 = 22.4%
      else if ((iResult >= 17400) && (iResult < 22400))  dwValue = 3;  // 4356/29348 = 14.8%
      else if ((iResult >= 22400) && (iResult < 25400))  dwValue = 4;  // 2874/29348 = 9.7%
      else if ((iResult >= 25400) && (iResult < 27400))  dwValue = 5;  // 1897/29348 = 6.4%
      else if ((iResult >= 27400) && (iResult < 28400))  dwValue = 6;  // 1252/29348 = 4.2%
      else if ((iResult >= 28400) && (iResult < 28900))  dwValue = 7;  // 826/29348 = 2.8%
      else if ((iResult >= 28900) && (iResult < 29300))  dwValue = 8;  // 545/29348 = 1.85%
      else if ((iResult >= 29300) && (iResult < 29600))  dwValue = 9;  // 360/29348 = 1.2%
      else if ((iResult >= 29600) && (iResult < 29800))  dwValue = 10; // 237/29348 = 0.8%
      else if ((iResult >= 29800) && (iResult < 29900))  dwValue = 11; // 156/29348 = 0.5%
      else if ((iResult >= 29900) && (iResult < 29970))  dwValue = 12; // 103/29348 = 0.3%
      else if ((iResult >= 29970) && (iResult <= 30000))  dwValue = 13; // 68/29348 = 0.1%
      else dwValue = 1; // v2.03 906

      // v2.03 912 ¾ÆÀĆ&#140;Ć…Ć› ¼öĆ￾Ć&#152;Ć€Ć&#140; 2Ć€Ć&#140;ÇÏÀ϶§ Ư¼ºÄĀ Ć&#131;Ö´ë°ªÀº 7
      if ((iGenLevel <= 2) && (dwValue > 7)) dwValue = 7;

      // ¹«±âÀÇ Sub Ư¼ºÄĀĀæĀ µû¶ó ¼öÄĀ ĀŗĀøĆ￾¤ 
      switch (dwType) {
      case 2: // °ø°Ý¸íĆ￾Ć&#159; Ć&#131;ÖÀú +21%
      	if (dwValue <= 3) dwValue = 3;
      	break; 
      case 10: // ¿¬¼Ó Ÿ°Ý Ć&#131;ÖÀú +1 Ć&#131;Ć–Ā´Ć« 7
      	if (dwValue > 7) dwValue = 7; 
      	break; 
      case 11: // ExpĀ´Ć‚ ¹«Ć￾¶°Ç +20%
      	dwValue = 2;
      	break; 
      case 12: // GoldĀ´Ć‚ ¹«Ć￾¶°Ç +50%
      	dwValue = 5;
      	break; 
      }

      // ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ ÀÔ·Â
      dwType  = dwType << 12;
      dwValue = dwValue << 8;
      pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue;
    	}
    }
    else if (pItem->m_sItemEffectType == DEF_ITEMEFFECTTYPE_DEFENSE) {
    	// ¹æ¾î±¸¿Ā ¸Â´Â Ć￾¢µÎ»ç¿Í Ư¼ºÄĀ¸¦ ¼±ÅĆ&#131;, ÇÒ´çÇÑ´Ù.

    	// °­Ć&#136;­µĆ&#136;(60%) °Āº­¿î (30%) ¸¶³ª ĀŗĀÆĆ&#136;¯ÀÇ(5%) ƇĆ&#138;ȓ Ć&#131;æÀüÀÇ(5%)
    	iResult = iDice(1,10000);
    	if ((iResult >= 1) && (iResult <= 5999))          dwType = 8;
    	else if ((iResult >= 6000) && (iResult <= 8999))  dwType = 6;
    	else if ((iResult >= 9000) && (iResult <= 9554))  dwType = 11; //dwType = 11;
    	else if ((iResult >= 9555) && (iResult <= 10000)) dwType = 12; //dwType = 12;

    	// ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć￾¤µµ°ª ÀÔ·Â 
    	iResult = iDice(1, 30000);
    	if ((iResult >= 1) && (iResult < 10000))           dwValue = 1;  // 10000/29348 = 34%
    	else if ((iResult >= 10000) && (iResult < 17400))  dwValue = 2;  // 6600/29348 = 22.4%
    	else if ((iResult >= 17400) && (iResult < 22400))  dwValue = 3;  // 4356/29348 = 14.8%
    	else if ((iResult >= 22400) && (iResult < 25400))  dwValue = 4;  // 2874/29348 = 9.7%
    	else if ((iResult >= 25400) && (iResult < 27400))  dwValue = 5;  // 1897/29348 = 6.4%
    	else if ((iResult >= 27400) && (iResult < 28400))  dwValue = 6;  // 1252/29348 = 4.2%
    	else if ((iResult >= 28400) && (iResult < 28900))  dwValue = 7;  // 826/29348 = 2.8%
    	else if ((iResult >= 28900) && (iResult < 29300))  dwValue = 8;  // 545/29348 = 1.85%
    	else if ((iResult >= 29300) && (iResult < 29600))  dwValue = 9;  // 360/29348 = 1.2%
    	else if ((iResult >= 29600) && (iResult < 29800))  dwValue = 10; // 237/29348 = 0.8%
    	else if ((iResult >= 29800) && (iResult < 29900))  dwValue = 11; // 156/29348 = 0.5%
    	else if ((iResult >= 29900) && (iResult < 29970))  dwValue = 12; // 103/29348 = 0.3%
    	else if ((iResult >= 29970) && (iResult <= 30000))  dwValue = 13; // 68/29348 = 0.1%
    	else dwValue = 1; // v2.03 906

    	// ¹æ¾î±¸ÀÇ Main Ư¼ºÄĀĀæĀ µû¶ó ¼öÄĀ ĀŗĀøĆ￾¤ 
    	switch (dwType) {
    	case 6: // °æ·®Ć&#136;Ā­ Ć&#131;ÖÀú +16%
      if (dwValue <= 4) dwValue = 4;
      break; 
    	case 8: // ¼ö¸í Ć&#131;ÖÀú +14%
      if (dwValue <= 2) dwValue = 2;
      break; 

    	case 11:
    	case 12:
      // v2.04
      dwValue = (dwValue+1) / 2;
      if (dwValue < 1) dwValue = 1;
      if ((iGenLevel <= 3) && (dwValue > 2)) dwValue = 2;
      break;
    	}
    	// v2.03 912 ¾ÆÀĆ&#140;Ć…Ć› ¼öĆ￾Ć&#152;Ć€Ć&#140; 2Ć€Ć&#140;ÇÏÀ϶§ Ư¼ºÄĀ Ć&#131;Ö´ë°ªÀº 7
    	if ((iGenLevel <= 2) && (dwValue > 7)) dwValue = 7;

    	// ¹æ¾î±¸ Main Ư¼ºÄĀ, °ª ÀÔ·Â
    	pItem->m_dwAttribute = NULL;
    	dwType  = dwType << 20;
    	dwValue = dwValue << 16;
    	pItem->m_dwAttribute = pItem->m_dwAttribute | dwType | dwValue;

    	// ¹æ¾î±¸ Sub Ư¼ºÄĀ°Ā ÀԷµÉ Ć&#136;®·üÀº 40%
    	if (iDice(1,10000) >= 6000) {

      // Ć&#136;ñ±Í ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć&#136;¿°ú Ć￾¾·ù: 
      //Ć&#131;Ć&#159;°Ā µ¶¼ºÀúÇ×(1), Ć&#131;Ć&#159;°Ā ĀøĆ­Ć￾Ć&#159;°ª(2), Ć&#131;Ć&#159;°Ā ¹æ¾î°ª(3), HP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(4), SP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(5)
      //MP Ć&#136;¸º¹·® Ć&#131;Ć&#159;°Ā(6), Ć&#131;Ć&#159;°Ā ¸¶¹ýÀúÇ×(7), ¹°¸® ´ë¹Ć&#140;Ć￾ƶ Ć&#136;í¼ö(8), ¸¶¹ý ´ë¹Ć&#140;Ć￾ƶ Ć&#136;í¼ö(9)
      //¿¬Å¸ ´ë¹Ć&#140;Ć￾ƶ Ć&#131;Ć&#159;°Ā(10), ´õ ¸¹Àº °æÇèÄĀ(11), ´õ¸¹Àº Gold(12)

      // ¹æ¾î±¸ Ć€Ć&#140;±â ¶§¹®¿Ā 
      // Ć&#131;Ć&#159;°Ā¹æ¾î°ª(10%) Ć&#131;Ć&#159;°Āµ¶¼ºÀúÇ×(30%)    SPĆ&#136;¸º¹Ć&#131;Ć&#159;°Ā(15%)  HPĆ&#136;¸º¹Ć&#131;Ć&#159;°Ā(10%) 
      // MPĆ&#136;¸º¹ Ć&#131;Ć&#159;°Ā(10%) Ć&#131;Ć&#159;°Ā¸¶¹ýÀúÇ×(15%) ¹°¸®´ë¹Ć&#140;Ć￾ƶĆ&#136;í¼ö(3%) ¸¶¹ý´ë¹Ć&#140;Ć￾ƶĆ&#136;í¼ö(3%)
      iResult = iDice(1,10000);
      if ((iResult >= 1) && (iResult <= 999))           dwType = 3;
      else if ((iResult >= 1000) && (iResult <= 3999))  dwType = 1;
      else if ((iResult >= 4000) && (iResult <= 5499))  dwType = 5;
      else if ((iResult >= 5500) && (iResult <= 6499))  dwType = 4;
      else if ((iResult >= 6500) && (iResult <= 7499))  dwType = 6;
      else if ((iResult >= 7500) && (iResult <= 9399))  dwType = 7;
      else if ((iResult >= 9400) && (iResult <= 9799))  dwType = 8;
      else if ((iResult >= 9800) && (iResult <= 10000)) dwType = 9;

      // ¾ÆÀĆ&#140;Ć…Ć› Sub Ư¼ºÄĀ Ć￾¤µµ°ª ÀÔ·Â 
      iResult = iDice(1, 30000);
      if ((iResult >= 1) && (iResult < 10000))           dwValue = 1;  // 10000/29348 = 34%
      else if ((iResult >= 10000) && (iResult < 17400))  dwValue = 2;  // 6600/29348 = 22.4%
      else if ((iResult >= 17400) && (iResult < 22400))  dwValue = 3;  // 4356/29348 = 14.8%
      else if ((iResult >= 22400) && (iResult < 25400))  dwValue = 4;  // 2874/29348 = 9.7%
      else if ((iResult >= 25400) && (iResult < 27400))  dwValue = 5;  // 1897/29348 = 6.4%
      else if ((iResult >= 27400) && (iResult < 28400))  dwValue = 6;  // 1252/29348 = 4.2%
      else if ((iResult >= 28400) && (iResult < 28900))  dwValue = 7;  // 826/29348 = 2.8%
      else if ((iResult >= 28900) && (iResult < 29300))  dwValue = 8;  // 545/29348 = 1.85%
      else if ((iResult >= 29300) && (iResult < 29600))  dwValue = 9;  // 360/29348 = 1.2%
      else if ((iResult >= 29600) && (iResult < 29800))  dwValue = 10; // 237/29348 = 0.8%
      else if ((iResult >= 29800) && (iResult < 29900))  dwValue = 11; // 156/29348 = 0.5%
      else if ((iResult >= 29900) && (iResult < 29970))  dwValue = 12; // 103/29348 = 0.3%
      else if ((iResult >= 29970) && (iResult <= 30000))  dwValue = 13; // 68/29348 = 0.1%
      else dwValue = 1; // v2.03 906

      // ¹æ¾î±¸ÀÇ Sub Ư¼ºÄĀĀæĀ µû¶ó ¼öÄĀ ĀŗĀøĆ￾¤ 
      switch (dwType) {
      case 1: // µ¶¼ºÀúÇ× Ć&#131;ÖÀú +21%
      case 3: // ¹°¸®¹æ¾î Ć&#131;ÖÀú +21%
      case 7: // ¸¶¹ý ÀúÇ× Ć&#131;ÖÀú +21%
      case 8: // ¹°&#25
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Post Reply