Jump to content

mkhzaleh

Community
  • Content Count

    305
  • Joined

  • Last visited

  • Days Won

    30

Posts posted by mkhzaleh


  1. inside source code it's called insde
     

    void CItemCommand::AddHint( int x, int y ){

    UIItemCommand.cpp
    then inside it 
     

    	if(_ItemData.sEndure[1] == 25000 && _ItemData.sEnergy[1] == 0){
    		PushHint( _pItem->szName, COLOR_WHITE, 5, 1 );
    		_ShowBody();
    		return;
    	}

    and in co they use this line of code
     

    	if( isWeapon || isDefenceType || isJewelery ||isEquip  ){
    		if ( _ItemData.GetItemLevel() > 0 ){
    			sprintf( buf, "Lv%d %s",_ItemData.GetItemLevel(), GetName());
    		}else{
    			sprintf( buf, "%s", GetName() );
    		}
    		PushHint( buf, COLOR_WHITE, 5, 1 ); //		//item name color  >	note i just made it as white was black before lol <

     


  2. you can't killl npc but if you mean kill a monster 
    use this small lua function
     

    function fairyexp(Player, Fairy)
    	local FairyEXP = GetItemAttr(Fairy, ITEMATTR_ENERGY)
    	local FairyMaxEXP = GetItemAttr(Fairy, ITEMATTR_MAXENERGY)
    	FairyEXP = FairyEXP + 1
    	if GetItemAttr(Fairy, ITEMATTR_URE) > 49 then
    		if FairyEXP >= FairyMaxEXP then
    			FairyEXP = FairyMaxEXP
    		end
    		
    		SetItemAttr(Fairy, ITEMATTR_ENERGY, FairyEXP)
    	end
    end
    
    function GetExp_New(dead , atk  )
    	local DeadMonster = GetChaID(dead)
    	if DeadMonster == 66 then 
    		local Fairy = GetChaItem(atk, 2, 1)
    		if Fairy == nil then
    			return 
    		end
    		local FairyType = GetItemType(Fairy)
    		local chance = math.random(1, 100)
    		if FairyType == 59 then
    			if chance >= 50 then
    				fairyexp(atk, Fairy)
    				BickerNotice(atk, "Fairy EXP: Fairy Received x [1] EXP ")
    			end
    			
    
    		end
    	end
    end

     

    • Thanks 1

  3. not sure what do you want but you can try like this
     

    local dead_id = GetChaID(dead)
                local mob = {}
            mob[715] = {ItemDrop = 3457, Quantity = 1, Quality = 4,  Rate = .5}    --50% drop
            mob[716] = {ItemDrop = 3457, Quantity = 1, Quality = 4,  Rate = .5}    --50% drop
            mob[717] = {ItemDrop = 3457, Quantity = 1, Quality = 4,  Rate = .5}    --50% drop
                if mob[dead_id] ~= nil then
                    if Percentage_Random(mob[dead_id].Rate) == 1 then
    				mob[dead_id].Quantity = math.random(1,10) -- 1 to 10
                    GiveItemX ( atk, 0, mob[dead_id].ItemDrop, mob[dead_id].Quantity , mob[dead_id].Quality)
                    BickerNotice ( atk, "Received a Kal Runestone! Check your Temp Bag.")
                end
            end    

    or you can use like this
       mob[715] = {ItemDrop = 3457, Quantity = 10, Quality = 4,  Rate = .5}   
    mob[dead_id].Quantity = math.random(1,Quantity) -- 


  4. 2 hours ago, Masuka00 said:

    I got this

     

    sshot-5.png.1a41f1fce156cdb5408a0e72a3a92792.png

     

    but i figure out

     

    sshot-6.png.4f2e6da0594812ae20217af4124767ae.png

     

    The is something between well I know that many already know what I mean but I comment in case anyone wanted to know 😏

     

    and

     

    sshot-7.png.bd893538ae5ed7930ed365e6b672e8dd.png

     

    can you tell the difference? 🤔

     

    If someone out there is just as lazy like me 😅 who only copies and pastes and then comes to say why the scrip  does not work 😥, take the time to inspect every detail, I just say it in a good way.
    And thank you very much for the scrip code, I had not reviewed it until today to take away the doubt, but it took me almost 1 hour to realize my mistake, I have been in the forums for years but this of the scrip codes is not my thing.

    Again, thank you very much

    when you do copy past from forums you may have extra symbols 
    like this
    image.png.05ae253572854c4fb999fb9b7fc252e7.png


  5. 8 hours ago, Masuka00 said:

    its posible to add more monsters id separated with , ?

    try this
     

    function GetExp_PKM(dead, atk)
    	local MonsterIDs = {
    	[789] = 5000,	---monster id --- gold amount 
    	}
    	
    	local monster = GetChaID(dead)
    	for i,v in pairs(MonsterIDs) do
    		if (i == monster) then
    			AddMoney(atk, 0, v)
    			break
    		end
    	end
    	
    end

     

    • Like 1
    • Thanks 2

  6. 	else if( _pItem->sType == 46 )	// 勇者之证
    	{
            PushHint( _pItem->szName, COLOR_WHITE, 5, 1 );
    
    		int show_attr[] = { ITEMATTR_VAL_STR, ITEMATTR_VAL_AGI, ITEMATTR_VAL_DEX, ITEMATTR_VAL_CON, ITEMATTR_VAL_STA };
    		string show_text[] = { g_oLangRec.GetString(650), g_oLangRec.GetString(651), g_oLangRec.GetString(652), g_oLangRec.GetString(653), g_oLangRec.GetString(654) };
    		int value = 0;
    		const int count = sizeof(show_attr)/sizeof(show_attr[0]);
    		for( int i=0; i<count; i++ )
    		{
    			value = item.sInstAttr[show_attr[i]];
    			item.sInstAttr[show_attr[i]] = 0;
    			sprintf( buf, "%s:%d", show_text[i].c_str(), value );
    			PushHint( buf, GENERIC_COLOR );
    		}
    
    		sprintf( buf, g_oLangRec.GetString(655), _ItemData.sEndure[1] );
    		PushHint( buf, GENERIC_COLOR );
    
    		sprintf( buf, "%s:%d", g_oLangRec.GetString(848), _ItemData.sEnergy[1] );	// 乱斗点数
    		PushHint( buf, GENERIC_COLOR );
    
    		_AddDescriptor();
    	}

    inside 

    void CItemCommand::AddHint( int x, int y )

    client source code 


  7. 1 hour ago, Graf said:

    Okay. All install, start server. All nice. no errors.

    I open changeIP, write 127.0.0.1 aaaaand... Long loading and "Connection Error"

     

    image.png.579b7613b71750bf6900612461b979b0.png

     

    GameServer.exe

    image.png.ac425f7257bb6e9d7f83cfa39c752be6.png

     

    But AccountServer.exe, GateServer.exe and GroupServer.exe start..

    How fix?)

    make sure ur username & password is correct 
    to login use this
    start system\Game.exe startgame ip:127.0.0.1 autolog:username,password,startgame
     


  8. 2 hours ago, Lua said:

    any1 got a new link for this?

     

    On 10/23/2016 at 12:28 AM, Wrexor said:

    If someone is interesting in source code:

    
    using System;
    using System.IO;
    using System.Text.RegularExpressions;
    
    internal class a
    {
      private static string b(string A_0)
      {
        string pattern = "(@(?:\"[^\"]*\")+|\"(?:[^\"\\n\\\\]+|\\\\.)*\"|'(?:[^'\\n\\\\]+|\\\\.)*')|//.*|/\\*(?s:.*?)\\*/";
        return Regex.Replace(A_0, pattern, "$1");
      }
    
      private static string aa(string A_0)
      {
        return Regex.Replace(A_0, "^\\s+$[\\r\\n]*", "", RegexOptions.Multiline);
      }
    
      private static void Main(string[] A_0)
      {
        Console.Title = "Comments removal tool - Rtz";
        Console.WriteLine("Please enter the path to the file:\n");
        try
        {
          string path = Console.ReadLine();
          string contents = a.aa(a.b(File.ReadAllText(path)));
          File.WriteAllText(path, contents);
          Console.WriteLine("\nAll comments were successfully removed from - " + path);
          Console.WriteLine("\nPress any key to exit");
        }
        catch (Exception ex)
        {
          Console.WriteLine(Environment.NewLine + ex.Message);
        }
        Console.ReadKey();
      }
    }
    

     

    just build it in vs 

×
×
  • Create New...