How Do i put all my shop to lvl 0?

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    How Do i put all my shop to lvl 0?

    How Do i put all my shop to lvl 0?
    Last edited by ofiritsmeeee; 14-04-12 at 01:53 PM.


  2. #2
    Valued Member DelPa is offline
    MemberRank
    May 2010 Join Date
    JapanLocation
    100Posts

    Re: How Do i put all my shop to lvl 0?

    Here's a simple app.

    Code:
    #include <iostream>
    using namespace std;
    
    #include <stdlib.h>
    
    #include "TinyXML/tinyxml.h"	// TinyXML header.
    
    int main()	{
    	TiXmlDocument ZItem("zitem.xml");
    
    	if(ZItem.LoadFile() == false)	{
    		cout << "Can't open zitem.xml.\n";
    		system("PAUSE");
    		return -1;
    	}
    
    	TiXmlElement *LoadZItem = ZItem.FirstChild("XML")->FirstChild("ITEM")->ToElement();
    	// int ItemID;
    
    	cout << "Setting all items level to 0...\n";
    
    	while(LoadZItem != 0)	{
    		// LoadZItem->QueryIntAttribute("id", &ItemID);
    		// cout << "Found item ID :" << ItemID << ".\n";
    		LoadZItem->SetAttribute("res_level", 0);
    		LoadZItem = LoadZItem->NextSiblingElement();
    	}
    
    	ZItem.SaveFile("zitem_0lv.xml");
    	cout << "File is saved as zitem_0lv.xml.\n";
    
    	system("PAUSE");
    
    	return 0;
    }
    Attached Files Attached Files

  3. #3
    Account Upgraded | Title Enabled! ofiritsmeeee is offline
    MemberRank
    Sep 2011 Join Date
    274Posts

    Re: How Do i put all my shop to lvl 0?

    Thanks, Works !

  4. #4
    2D > 3D Wucas is offline
    MemberRank
    Dec 2008 Join Date
    In your bed :3Location
    2,523Posts

    Re: How Do i put all my shop to lvl 0?

    Quote Originally Posted by DelPa View Post
    Here's a simple app.

    Code:
    #include <iostream>
    using namespace std;
    
    #include <stdlib.h>
    
    #include "TinyXML/tinyxml.h"	// TinyXML header.
    
    int main()	{
    	TiXmlDocument ZItem("zitem.xml");
    
    	if(ZItem.LoadFile() == false)	{
    		cout << "Can't open zitem.xml.\n";
    		system("PAUSE");
    		return -1;
    	}
    
    	TiXmlElement *LoadZItem = ZItem.FirstChild("XML")->FirstChild("ITEM")->ToElement();
    	// int ItemID;
    
    	cout << "Setting all items level to 0...\n";
    
    	while(LoadZItem != 0)	{
    		// LoadZItem->QueryIntAttribute("id", &ItemID);
    		// cout << "Found item ID :" << ItemID << ".\n";
    		LoadZItem->SetAttribute("res_level", 0);
    		LoadZItem = LoadZItem->NextSiblingElement();
    	}
    
    	ZItem.SaveFile("zitem_0lv.xml");
    	cout << "File is saved as zitem_0lv.xml.\n";
    
    	system("PAUSE");
    
    	return 0;
    }
    Only you DelPa + 1 for sure ^^



Advertisement