Scrolling for Rev 7

Page 1 of 4 1234 LastLast
Results 1 to 25 of 98
  1. #1
    Member Aznbond is offline
    MemberRank
    Apr 2008 Join Date
    53Posts

    Scrolling for Rev 7

    Before you do this, it's best if you backup your files just in case.
    I heard that there were a few requests for scrolling in Rev 7 so here it is:

    Add this to the bottom of InventoryPacket.cpp:
    Code:
    void InventoryPacket::useScroll(Player* player, vector <Player*> players, char s){
    	Packet packet = Packet();
    	packet.addHeader(0x7A);
    	packet.addInt(player->getPlayerid());
    	packet.addInt(s);
    	packet.sendTo(player, players, 1);
    }
    Add this in Initializing.cpp:
    Code:
    				else if(strcmp("moveTo", pCur->Value()) == 0){
    					cons.moveTo = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("success", pCur->Value()) == 0){
    					cons.success = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("cursed", pCur->Value()) == 0){
    					cons.cursed = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iSTR", pCur->Value()) == 0){
    					cons.istr = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iDEX", pCur->Value()) == 0){
    					cons.idex = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iINT", pCur->Value()) == 0){
    					cons.iint = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iLUK", pCur->Value()) == 0){
    					cons.iluk = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iHP", pCur->Value()) == 0){
    					cons.ihp = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iMP", pCur->Value()) == 0){
    					cons.imp = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iWAtk", pCur->Value()) == 0){
    					cons.iwatk = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iMAtk", pCur->Value()) == 0){
    					cons.imatk = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iWDef", pCur->Value()) == 0){
    					cons.iwdef = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iMDef", pCur->Value()) == 0){
    					cons.imdef = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iAcc", pCur->Value()) == 0){
    					cons.iacc = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iAvo", pCur->Value()) == 0){
    					cons.iavo = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iHand", pCur->Value()) == 0){
    					cons.ihand = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iJump", pCur->Value()) == 0){
    					cons.ijump = strval((char*)pCur->GetText());
    				}
    				else if(strcmp("iSpeed", pCur->Value()) == 0){
    					cons.ispeed = strval((char*)pCur->GetText());
    				}
    After:
    Code:
    				else if(strcmp("MPR", pCur->Value()) == 0){
    					cons.mpr = strval((char*)pCur->GetText());
    				}
    Add this to InventoryPacket.h:
    Code:
    	static void useScroll(Player* player, vector <Player*> players, char s);
    Add this to Player.cpp under Player::handleRequest :
    Code:
    		case 0x65: Inventory::useScroll(this, buf+2); break;
    Find your struct ConsumeInfo code in Drops.h and replace it with this:
    Code:
    struct ConsumeInfo {
    	short hp;
    	short mp;
    	short hpr;
    	short mpr;
    	int moveTo;
    	int success;
    	int cursed;
    	short istr;
    	short idex;
    	short iint;
    	short iluk;
    	short ihp;
    	short imp;
    	short iwatk;
    	short imatk;
    	short iwdef;
    	short imdef;
    	short iacc;
    	short iavo;
    	short ihand;
    	short ijump;
    	short ispeed;
    };
    Add this to the bottom of Inventory.cpp:
    Code:
    void Inventory::useScroll(Player* player, unsigned char* packet){
    	short slot = getShort(packet+4);
    	short eslot = getShort(packet+6);
    	int itemid=0;
    	Equip* equip = NULL;
    	for(int i=0; i<player->inv->getItemNum(); i++){
    		if(player->inv->getItem(i)->pos == slot && player->inv->getItem(i)->inv == 2)	{
    			itemid = player->inv->getItem(i)->id;
    			break;
    		}
    	}
    	for(int i=0; i<player->inv->getEquipNum(); i++){
    		if(player->inv->getEquip(i)->pos == eslot)	{
    			equip = player->inv->getEquip(i);
    			break;
    		}
    	}
    	bool cursed=false;
    	if(itemid == 0 || equip == NULL)
    		return;
    	if(equip->slots > 0){
    		if(Drops::items.find(itemid) == Drops::items.end())
    			return;
    		takeItemSlot(player, slot, 2, 1);
    		equip->slots--;
    		if(rand()%100<Drops::consumes[itemid].success){
    			InventoryPacket::useScroll(player, Maps::info[player->getMap()].Players ,true);
    			equip->istr+=Drops::consumes[itemid].istr;
    			equip->idex+=Drops::consumes[itemid].idex;
    			equip->iint+=Drops::consumes[itemid].iint;
    			equip->iluk+=Drops::consumes[itemid].iluk;
    			equip->ihp+=Drops::consumes[itemid].ihp;
    			equip->imp+=Drops::consumes[itemid].imp;
    			equip->iwatk+=Drops::consumes[itemid].iwatk;
    			equip->imatk+=Drops::consumes[itemid].imatk;
    			equip->iwdef+=Drops::consumes[itemid].iwdef;
    			equip->imdef+=Drops::consumes[itemid].imdef;
    			equip->iacc+=Drops::consumes[itemid].iacc;
    			equip->iavo+=Drops::consumes[itemid].iavo;
    			equip->ihand+=Drops::consumes[itemid].ihand;
    			equip->ijump+=Drops::consumes[itemid].ijump;
    			equip->ispeed+=Drops::consumes[itemid].ispeed;
    			equip->scrolls++;
    		}
    		else{
    			if(rand()%100<Drops::consumes[itemid].cursed){
    				cursed = true;
    				for(int i=0; i<player->inv->getEquipNum(); i++){
    					if(player->inv->getEquip(i)->pos == eslot){
    						InventoryPacket::moveItem(player, 1, eslot, 0);
    						player->inv->deleteEquip(i);	
    						break;
    					}
    				}
    			}
    			InventoryPacket::useScroll(player, Maps::info[player->getMap()].Players , false);
    		}
    	}
    	if(!cursed) 
    		InventoryPacket::addEquip(player, equip, 1);
    	InventoryPacket::updatePlayer(player); 
    }
    Add this to Inventory.h:
    Code:
    	static void useScroll(Player* player, unsigned char* packet);
    And finally, download Rev 8 and copy the Items folder to your Rev 7 folder so that you get the new scroll files.
    And that's it. Build and it should work.. if you get errors, try to reread this closely or make sure you didnt do copy errors.
    All credits to KoolK for TitanMS and this scrolling code in Rev 8! I just took the code and refined it to be put into Rev 7.


  2. #2
    Infraction Banned Cartor is offline
    MemberRank
    Aug 2006 Join Date
    IsraelLocation
    166Posts

    Re: [Release] Scrolling for Rev 7

    kewl, i'll try this , thx, i'll make some backup first =D

  3. #3
    Account Upgraded | Title Enabled! theonendonly is offline
    MemberRank
    Apr 2008 Join Date
    411Posts

    Re: [Release] Scrolling for Rev 7

    is this the real one that shows it on the item because if not someone already release scrolling =P

  4. #4
    Proficient Member Zagete is offline
    MemberRank
    Nov 2006 Join Date
    188Posts

    Re: [Release] Scrolling for Rev 7

    Are the XML files really needed? (I'm running on SQL)

  5. #5
    Member Aznbond is offline
    MemberRank
    Apr 2008 Join Date
    53Posts

    Re: [Release] Scrolling for Rev 7

    Not ALL of the xml files.. but just the scroll files. I was kinda lazy to find the specific scroll files so I just copied the whole thing.

    EDIT: ohh you're running on sql.. o.o.. uhh.. I dunno anything about that.. I think you'd hafta edit the database which I do not know how to do =x

  6. #6
    Account Upgraded | Title Enabled! mrkrishan is offline
    MemberRank
    Apr 2008 Join Date
    333Posts

    Re: [Release] Scrolling for Rev 7

    Can you just tell us which XML files are needed please?

  7. #7
    Member Aznbond is offline
    MemberRank
    Apr 2008 Join Date
    53Posts

    Re: [Release] Scrolling for Rev 7

    Quote Originally Posted by mrkrishan View Post
    Can you just tell us which XML files are needed please?
    Ermm.. Just go to Sauna.gibbed.us and look at the ID of the scroll files?
    It's much easier to just replace the whole thing x_x You'll be replacing over a hundred files one by one if you do them specifically.

  8. #8
    Infraction Banned Cartor is offline
    MemberRank
    Aug 2006 Join Date
    IsraelLocation
    166Posts

    Re: [Release] Scrolling for Rev 7

    mrkrishin, it doesnt matter, because all items are the same, so you wont be changing anything =D
    Aznbond, building now... let's see if i have any errors..

    WTF!

    Code:
    ------ Build started: Project: MapleStoryServer, Configuration: Release Win32 ------
    Compiling...
    Initializing.cpp
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(87) : error C2011: 'ConsumeInfo' : 'struct' type redefinition
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(109) : error C2065: 'EquipInfo' : undeclared identifier
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(118) : error C2061: syntax error : identifier 'EquipInfo'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(119) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(119) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(129) : error C2079: 'cons' uses undefined struct 'ConsumeInfo'
    .\Initializing.cpp(135) : error C2228: left of '.hp' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(138) : error C2228: left of '.mp' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(141) : error C2228: left of '.hpr' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(144) : error C2228: left of '.mpr' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(147) : error C2228: left of '.moveTo' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(150) : error C2228: left of '.success' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(153) : error C2228: left of '.cursed' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(156) : error C2228: left of '.istr' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(159) : error C2228: left of '.idex' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(162) : error C2228: left of '.iint' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(165) : error C2228: left of '.iluk' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(168) : error C2228: left of '.ihp' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(171) : error C2228: left of '.imp' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(174) : error C2228: left of '.iwatk' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(177) : error C2228: left of '.imatk' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(180) : error C2228: left of '.iwdef' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(183) : error C2228: left of '.imdef' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(186) : error C2228: left of '.iacc' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(189) : error C2228: left of '.iavo' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(192) : error C2228: left of '.ihand' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(195) : error C2228: left of '.ijump' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(198) : error C2228: left of '.ispeed' must have class/struct/union
            type is 'int'
    .\Initializing.cpp(202) : error C2664: 'Drops::addConsume' : cannot convert parameter 2 from 'int' to 'ConsumeInfo'
            Source or target has incomplete type
    .\Initializing.cpp(296) : error C2065: 'EquipInfo' : undeclared identifier
    .\Initializing.cpp(296) : error C2146: syntax error : missing ';' before identifier 'equip'
    .\Initializing.cpp(296) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(297) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(297) : error C2228: left of '.slots' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(298) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(298) : error C2228: left of '.type' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(299) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(299) : error C2228: left of '.price' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(300) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(300) : error C2228: left of '.istr' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(301) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(301) : error C2228: left of '.idex' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(302) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(302) : error C2228: left of '.iint' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(303) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(303) : error C2228: left of '.iluk' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(304) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(304) : error C2228: left of '.ihp' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(305) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(305) : error C2228: left of '.imp' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(306) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(306) : error C2228: left of '.iwatk' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(307) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(307) : error C2228: left of '.imatk' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(308) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(308) : error C2228: left of '.iwdef' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(309) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(309) : error C2228: left of '.imdef' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(310) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(310) : error C2228: left of '.iacc' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(311) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(311) : error C2228: left of '.iavo' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(312) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(312) : error C2228: left of '.ihand' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(313) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(313) : error C2228: left of '.ijump' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(314) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(314) : error C2228: left of '.ispeed' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(315) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(315) : error C2228: left of '.cash' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(316) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(316) : error C2228: left of '.quest' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(320) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(320) : error C2228: left of '.type' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(323) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(323) : error C2228: left of '.price' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(326) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(326) : error C2228: left of '.slots' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(329) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(329) : error C2228: left of '.istr' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(332) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(332) : error C2228: left of '.idex' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(335) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(335) : error C2228: left of '.iint' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(338) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(338) : error C2228: left of '.iluk' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(341) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(341) : error C2228: left of '.ihp' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(344) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(344) : error C2228: left of '.imp' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(347) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(347) : error C2228: left of '.iwatk' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(350) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(350) : error C2228: left of '.imatk' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(353) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(353) : error C2228: left of '.iwdef' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(356) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(356) : error C2228: left of '.imdef' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(359) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(359) : error C2228: left of '.iacc' must have class/struct/union
            type is ''unknown-type''
    .\Initializing.cpp(362) : error C2065: 'equip' : undeclared identifier
    .\Initializing.cpp(362) : fatal error C1003: error count exceeds 100; stopping compilation
    InventoryPacket.cpp
    Player.cpp
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(87) : error C2011: 'ConsumeInfo' : 'struct' type redefinition
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(109) : error C2065: 'EquipInfo' : undeclared identifier
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(118) : error C2061: syntax error : identifier 'EquipInfo'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(119) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(119) : error C2065: 'equip' : undeclared identifier
    .\Player.cpp(60) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    .\Player.cpp(60) : error C2228: left of '.type' must have class/struct/union
    .\Player.cpp(66) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    .\Player.cpp(66) : error C2228: left of '.type' must have class/struct/union
    Inventory.cpp
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(87) : error C2011: 'ConsumeInfo' : 'struct' type redefinition
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(109) : error C2065: 'EquipInfo' : undeclared identifier
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(118) : error C2061: syntax error : identifier 'EquipInfo'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(119) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(119) : error C2065: 'equip' : undeclared identifier
    .\Inventory.cpp(207) : error C2065: 'EquipInfo' : undeclared identifier
    .\Inventory.cpp(207) : error C2146: syntax error : missing ';' before identifier 'ei'
    .\Inventory.cpp(207) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(207) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    .\Inventory.cpp(210) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(210) : error C2228: left of '.slots' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(212) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(212) : error C2228: left of '.type' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(214) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(214) : error C2228: left of '.istr' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(215) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(215) : error C2228: left of '.idex' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(216) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(216) : error C2228: left of '.iint' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(217) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(217) : error C2228: left of '.iluk' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(218) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(218) : error C2228: left of '.ihp' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(219) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(219) : error C2228: left of '.imp' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(220) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(220) : error C2228: left of '.iwatk' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(221) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(221) : error C2228: left of '.imatk' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(222) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(222) : error C2228: left of '.iwdef' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(223) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(223) : error C2228: left of '.imdef' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(224) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(224) : error C2228: left of '.iacc' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(225) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(225) : error C2228: left of '.iavo' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(226) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(226) : error C2228: left of '.ihand' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(227) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(227) : error C2228: left of '.ijump' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(228) : error C2065: 'ei' : undeclared identifier
    .\Inventory.cpp(228) : error C2228: left of '.ispeed' must have class/struct/union
            type is ''unknown-type''
    .\Inventory.cpp(271) : error C2663: 'stdext::_Hash<_Traits>::find' : 2 overloads have no legal conversion for 'this' pointer
    .\Inventory.cpp(271) : error C2663: 'stdext::_Hash<_Traits>::end' : 4 overloads have no legal conversion for 'this' pointer
    .\Inventory.cpp(306) : error C2678: binary '[' : no operator found which takes a left-hand operand of type 'stdext::hash_map' (or there is no acceptable conversion)
            C:\Program Files\Microsoft Visual Studio 9.0\VC\include\hash_map(156): could be '_Ty &stdext::hash_map<_Kty,_Ty,_Tr,_Alloc>::operator [](const _Kty &)'
            while trying to match the argument list '(stdext::hash_map, int)'
    .\Inventory.cpp(306) : error C2228: left of '.price' must have class/struct/union
    .\Inventory.cpp(318) : error C2663: 'stdext::_Hash<_Traits>::find' : 2 overloads have no legal conversion for 'this' pointer
    .\Inventory.cpp(318) : error C2663: 'stdext::_Hash<_Traits>::end' : 4 overloads have no legal conversion for 'this' pointer
    .\Inventory.cpp(381) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(381) : error C2228: left of '.hp' must have class/struct/union
    .\Inventory.cpp(382) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(382) : error C2228: left of '.hp' must have class/struct/union
    .\Inventory.cpp(384) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(384) : error C2228: left of '.mp' must have class/struct/union
    .\Inventory.cpp(385) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(385) : error C2228: left of '.mp' must have class/struct/union
    .\Inventory.cpp(389) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(389) : error C2228: left of '.hpr' must have class/struct/union
    .\Inventory.cpp(390) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(390) : error C2228: left of '.hpr' must have class/struct/union
    .\Inventory.cpp(392) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(392) : error C2228: left of '.mpr' must have class/struct/union
    .\Inventory.cpp(393) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(393) : error C2228: left of '.mpr' must have class/struct/union
    .\Inventory.cpp(489) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(489) : error C2228: left of '.success' must have class/struct/union
    .\Inventory.cpp(491) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(491) : error C2228: left of '.istr' must have class/struct/union
    .\Inventory.cpp(492) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(492) : error C2228: left of '.idex' must have class/struct/union
    .\Inventory.cpp(493) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(493) : error C2228: left of '.iint' must have class/struct/union
    .\Inventory.cpp(494) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(494) : error C2228: left of '.iluk' must have class/struct/union
    .\Inventory.cpp(495) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(495) : error C2228: left of '.ihp' must have class/struct/union
    .\Inventory.cpp(496) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(496) : error C2228: left of '.imp' must have class/struct/union
    .\Inventory.cpp(497) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(497) : error C2228: left of '.iwatk' must have class/struct/union
    .\Inventory.cpp(498) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(498) : error C2228: left of '.imatk' must have class/struct/union
    .\Inventory.cpp(499) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(499) : error C2228: left of '.iwdef' must have class/struct/union
    .\Inventory.cpp(500) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(500) : error C2228: left of '.imdef' must have class/struct/union
    .\Inventory.cpp(501) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(501) : error C2228: left of '.iacc' must have class/struct/union
    .\Inventory.cpp(502) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(502) : error C2228: left of '.iavo' must have class/struct/union
    .\Inventory.cpp(503) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(503) : error C2228: left of '.ihand' must have class/struct/union
    .\Inventory.cpp(504) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(504) : error C2228: left of '.ijump' must have class/struct/union
    .\Inventory.cpp(505) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(505) : error C2228: left of '.ispeed' must have class/struct/union
    .\Inventory.cpp(509) : error C2027: use of undefined type 'ConsumeInfo'
            c:\documents and settings\ifox\desktop\maplestory server\michel'z\maplestoryserver\Drops.h(54) : see declaration of 'ConsumeInfo'
    .\Inventory.cpp(509) : error C2228: left of '.cursed' must have class/struct/union
    Build log was saved at "file://c:\Documents and Settings\iFox\Desktop\MapleStory Server\Michel'z\MapleStoryServer\Release\BuildLog.htm"
    MapleStoryServer - 210 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
    I'm sure I did everything right!

  9. #9
    Apprentice ggitsjay is offline
    MemberRank
    Apr 2008 Join Date
    18Posts

    Re: [Release] Scrolling for Rev 7

    Does it have the light up effect?

  10. #10
    Novice john258doe is offline
    MemberRank
    Apr 2008 Join Date
    3Posts

    Re: [Release] Scrolling for Rev 7

    I think this is the right code to go on the bottom of Inventory.cpp

    void Inventory::useScroll(Player* player, unsigned char* packet){
    short slot = getShort(packet+4);
    short eslot = getShort(packet+6);
    int itemid=0;
    Equip* equip = NULL;
    for(int i=0; i<player->inv->getItemNum(); i++){
    if(player->inv->getItem(i)->pos == slot && player->inv->getItem(i)->inv == 2) {
    itemid = player->inv->getItem(i)->id;
    break;
    }
    }
    for(int i=0; i<player->inv->getEquipNum(); i++){
    if(player->inv->getEquip(i)->pos == eslot) {
    equip = player->inv->getEquip(i);
    break;
    }
    }
    bool cursed=false;
    if(itemid == 0 || equip == NULL)
    return;
    if(equip->slots > 0){
    if(Drops::items.find(itemid) == Drops::items.end())
    return;
    takeItemSlot(player, slot, 2, 1);
    equip->slots--;
    if(rand()%100<Drops::consumes[itemid].success){
    InventoryPacket::useScroll(player, Maps::info[player->getMap()].Players ,true);
    equip->istr+=Drops::consumes[itemid].istr;
    equip->idex+=Drops::consumes[itemid].idex;
    equip->iint+=Drops::consumes[itemid].iint;
    equip->iluk+=Drops::consumes[itemid].iluk;
    equip->ihp+=Drops::consumes[itemid].ihp;
    equip->imp+=Drops::consumes[itemid].imp;
    equip->iwatk+=Drops::consumes[itemid].iwatk;
    equip->imatk+=Drops::consumes[itemid].imatk;
    equip->iwdef+=Drops::consumes[itemid].iwdef;
    equip->imdef+=Drops::consumes[itemid].imdef;
    equip->iacc+=Drops::consumes[itemid].iacc;
    equip->iavo+=Drops::consumes[itemid].iavo;
    equip->ihand+=Drops::consumes[itemid].ihand;
    equip->ijump+=Drops::consumes[itemid].ijump;
    equip->ispeed+=Drops::consumes[itemid].ispeed;
    }
    else{
    if(rand()%100<Drops::consumes[itemid].cursed){
    cursed = true;
    for(int i=0; i<player->inv->getEquipNum(); i++){
    if(player->inv->getEquip(i)->pos == eslot){
    InventoryPacket::moveItem(player, 1, eslot, 0);
    player->inv->deleteEquip(i);
    break;
    }
    }
    }
    InventoryPacket::useScroll(player, Maps::info[player->getMap()].Players , false);
    }
    }
    if(!cursed)
    InventoryPacket::addEquip(player, equip, 1);
    InventoryPacket::updatePlayer(player);
    }

  11. #11
    Infraction Banned DaOdin is offline
    MemberRank
    Apr 2008 Join Date
    .Location
    1,824Posts

    Re: [Release] Scrolling for Rev 7

    Was this proven to work?

  12. #12
    Account Upgraded | Title Enabled! theonendonly is offline
    MemberRank
    Apr 2008 Join Date
    411Posts

    Re: [Release] Scrolling for Rev 7

    i dont know i have the other scrolling one so i need someone else to test this =P

  13. #13
    Enthusiast Santadancer77 is offline
    MemberRank
    Apr 2008 Join Date
    43Posts

    Re: [Release] Scrolling for Rev 7

    Quote Originally Posted by theonendonly View Post
    i dont know i have the other scrolling one so i need someone else to test this =P
    Yup, tested, works including light up effect.

    @john258doe (below): ok i'll just test it too.

  14. #14
    Novice john258doe is offline
    MemberRank
    Apr 2008 Join Date
    3Posts

    Re: [Release] Scrolling for Rev 7

    It worked for me, ^^

  15. #15
    Infraction Banned Cartor is offline
    MemberRank
    Aug 2006 Join Date
    IsraelLocation
    166Posts

    Re: [Release] Scrolling for Rev 7

    john wth how did it work? i did that and i had thousands of errors!

  16. #16
    Account Upgraded | Title Enabled! theonendonly is offline
    MemberRank
    Apr 2008 Join Date
    411Posts

    Re: [Release] Scrolling for Rev 7

    light up effect also !? ZOMG will test now [=

  17. #17
    Proficient Member iFate is offline
    MemberRank
    Apr 2008 Join Date
    168Posts

    Re: [Release] Scrolling for Rev 7

    compiled fine, first try, no errors. :)

    Taking it in-game now...

  18. #18
    Account Upgraded | Title Enabled! theonendonly is offline
    MemberRank
    Apr 2008 Join Date
    411Posts

    Re: [Release] Scrolling for Rev 7

    oh check if it says if the scroll failed or not also

  19. #19
    Enthusiast Santadancer77 is offline
    MemberRank
    Apr 2008 Join Date
    43Posts

    Re: [Release] Scrolling for Rev 7

    Quote Originally Posted by theonendonly View Post
    oh check if it says if the scroll failed or not also
    With the text at the bottom? The scroll has blah blah blah.

    Heres a picture.. had to resize to fit the upload size limit


    The one thing that does not display is the Item +5 or item+2. It does decrease slots and everything else though.
    Attached Thumbnails Attached Thumbnails scrolling.bmp  

  20. #20
    Proficient Member iFate is offline
    MemberRank
    Apr 2008 Join Date
    168Posts

    Re: [Release] Scrolling for Rev 7

    Very nice. Doesn't notify of break (Items break), animation for success and fail. With the other scrolling, half of the scrolls didn't work, now I can finally scroll a zakum helm for dex.

  21. #21
    Enthusiast Santadancer77 is offline
    MemberRank
    Apr 2008 Join Date
    43Posts

    Re: [Release] Scrolling for Rev 7

    Quote Originally Posted by iFate View Post
    Very nice. Doesn't notify of break (Items break), animation for success and fail. With the other scrolling, half of the scrolls didn't work, now I can finally scroll a zakum helm for dex.
    Edit: my apologies, I read it wrong >.<

    @theonendonly (below): You have to edit them manually..... with an update table function i believe. It will take some time.. I use GMSDB also on my real server, but this is just my testing server which doesn't have it. I have no clue what would happen now, so you could just try it without updating and hope its correct. But OP recommended getting them.

    @cartor (below): glad you got it working :)

  22. #22
    Account Upgraded | Title Enabled! theonendonly is offline
    MemberRank
    Apr 2008 Join Date
    411Posts

    Re: [Release] Scrolling for Rev 7

    what if were using GMSDB ?

  23. #23
    Proficient Member iFate is offline
    MemberRank
    Apr 2008 Join Date
    168Posts

    Re: [Release] Scrolling for Rev 7

    @Santa, yeah I got rev8's item xmls. The other scrolling script that was posted the other day didn't have all the scrolls working.

  24. #24
    Account Upgraded | Title Enabled! npmaple is offline
    MemberRank
    Apr 2008 Join Date
    Israel - a bad placeLocation
    281Posts

    Re: [Release] Scrolling for Rev 7

    but there alredy there on rev 8...
    so why to add them?
    EDIT: oh nvm... you said for rev 7...

  25. #25
    Infraction Banned Cartor is offline
    MemberRank
    Aug 2006 Join Date
    IsraelLocation
    166Posts

    Re: [Release] Scrolling for Rev 7

    Ew, I'll try again, but i'm pretty sure I did everything right :\
    Eww stupid me, I found what I did wrong, I'm trying to build now ^_^
    Compiles just fine, now I have an error with some stupid thing I installed before, since I installed it each time I add something new I have errors.. fixing now tho
    Thanks a lot ~



Page 1 of 4 1234 LastLast

Advertisement