inel anti_xp

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
Fr3dY
Nou Venit

Nou Venit
Mesaje: 44
Membru din: 13 Noi 2013, 19:01
Server: Metin2Western.Com
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Salutari , cand imi faci caracter nou si intru pe server nu pot sa cresc trebuie sa dezactivez inelul anti_exp , ca sa pot creste , chiar daca caracterul are level 1 .
Quest

Cod: Selectaţi tot

quest anti_exp begin
	state start begin
		when login begin
			cmdchat("anti_exp "..q.getcurrentquestindex())
		end
		when button or info begin
		if pc.getqf("anti_exp") == 0 then
			pc.setqf("anti_exp", 1)
			syschat("Experienþa dvs. a fost blocatã!")
			pc.block_exp()
		else
 			pc.setqf("anti_exp", 0)
			pc.unblock_exp()
			syschat("Experienþa dvs. a fost deblocatã!")
			end
		end
		
		when login with pc.getqf("anti_exp") == 1 begin
			syschat("|cFF3CB371|h[System Anti-EXP]:|h|r Activ. Nu veþi mai primi experienþã.")
			pc.setqf("anti_exp", 1)
			pc.block_exp()
		end
	end
end
[ Postat de pe Linux Laptop ] Imagine
Avatar utilizator
Pongo A.K.A Titan
Utilizator interzis !

Utilizator interzis !
Mesaje: 2028
Membru din: 01 Sep 2016, 16:08
Regat: Jinno
Aprecieri: 35  
Mulţumiri: 261  
 Contact:
Medalii

quest anti begin
    state start begin
        when 72501.use begin
        if pc.getqf("antiexp") == 0 then
            pc.setqf("antiexp", 1)
            chat("Inelul este activat. Punctele dvs. de experienþã sunt setate la 0 la fiecare 3 secunde.")
            local ep = pc.get_exp()
            pc.give_exp2(-ep)
            timer("experienta", 3)
        elseif pc.getqf("antiexp") == 1 then
            pc.setqf("antiexp", 0)
            chat("Inelul a fost dezactivat. Acum veþi primi experienþã!")
            end
        end    
                    
        when experienta.timer with pc.getqf("antiexp") == 1 begin
            local ep = pc.get_exp()
            pc.give_exp2(-ep)
            timer("experienta1", 3)
            pc.setqf("antiexp", 1)
        end    
            
        when experienta1.timer with pc.getqf("antiexp") == 1 begin
            local ep = pc.get_exp()
            pc.give_exp2(-ep)
            timer("experienta", 3)
            pc.setqf("antiexp", 1)            
        end
    end
end
 ! Mesaj de la: Pongo A.K.A Titan
Cand credeati ca am sa mor
M-am ridicat ca un invingator
Afișează semnătura
Avatar utilizator
Fr3dY
Nou Venit

Nou Venit
Mesaje: 44
Membru din: 13 Noi 2013, 19:01
Server: Metin2Western.Com
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Am inelul anti_exp incorporat in iventory . Folosesc server files Happiness

[ Postat de pe Android ] Imagine
Avatar utilizator
Pongo A.K.A Titan
Utilizator interzis !

Utilizator interzis !
Mesaje: 2028
Membru din: 01 Sep 2016, 16:08
Regat: Jinno
Aprecieri: 35  
Mulţumiri: 261  
 Contact:
Medalii

In /usr/src/sursa_ta/Srcs/Server/game/src cautati:
Char.cpp deschideti-l si cautati in el:

Cod: Selectaţi tot

					if (gPlayerMaxLevel <= GetLevel())
						return;
Adaugati dupa:

Cod: Selectaţi tot

					if (block_exp)
					{
						return;
					}
Salvati si iesiti din Char.cpp . Acum intrati in Char.h si cautati:

Cod: Selectaţi tot

		void			SetExp(DWORD exp)	{ m_points.exp = exp;	}
Dupa adaugati:

Cod: Selectaţi tot

		bool			block_exp;
Salvati si iesiti. Intrati acum in Questlua_pc.cpp si cautati:

Cod: Selectaţi tot

{ "give_award_socket",	pc_give_award_socket	},
Adaugati dupa:

Cod: Selectaţi tot

			{ "block_exp",			_block_exp },	// blocheaza experienta
			{ "unblock_exp",		_unblock_exp },	//deblocheaza experienta
Cautati:

Cod: Selectaţi tot

	void RegisterPCFunctionTable()
Si deasupra adaugati:

Cod: Selectaţi tot

	int _block_exp(lua_State* L)

	{
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
		ch->block_exp = true;
		return 0;
	}
	int _unblock_exp(lua_State* L)
	{
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
		ch->block_exp = false;
		return 0;
	}
Intrati acum in input_login.cpp si cautati:

Cod: Selectaţi tot

		if (g_bCheckClientVersion)
		{
Si adaugati dupa { adaugati:

Cod: Selectaţi tot

			ch->block_exp = false;
Salvati compilati si inlocuiti game-ul.

Acum trecem la partea de server.
Intrati in quest_function si la final adaugati:

Cod: Selectaţi tot

pc.block_exp
pc.unblock_exp
si quest pt button
quest anti_exp begin
    state start begin
		when login begin
			cmdchat("Nume_buton "..q.getcurrentquestindex())
		end
		when button or info begin
            if pc.getqf("antiexp") == 0 then
                pc.block_exp()
                pc.setqf("antiexp", 1)
                chat("Inelul anti exp a fost activat!!!")
            elseif pc.getqf("antiexp") == 1 then
                pc.unblock_exp()
                pc.setqf("antiexp", 0)
                chat("Inelul antiexp a fost dezactivat!!!")
	     end          
        end
    end
end
 ! Mesaj de la: Pongo A.K.A Titan
Cand credeati ca am sa mor
M-am ridicat ca un invingator
Afișează semnătura
Avatar utilizator
Fr3dY
Nou Venit

Nou Venit
Mesaje: 44
Membru din: 13 Noi 2013, 19:01
Server: Metin2Western.Com
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

@Pongo , partea de sursa , era la fel :) . Crezi ca poate sa fie questu ?

[ Postat de pe Linux Laptop ] Imagine
Avatar utilizator
Pongo A.K.A Titan
Utilizator interzis !

Utilizator interzis !
Mesaje: 2028
Membru din: 01 Sep 2016, 16:08
Regat: Jinno
Aprecieri: 35  
Mulţumiri: 261  
 Contact:
Medalii

Subiect inactiv Arhivat !
 ! Mesaj de la: Pongo A.K.A Titan
Cand credeati ca am sa mor
M-am ridicat ca un invingator
Afișează semnătura
Închis
Răspunsuri
13
Vizualizări
1522
Răspunsuri
7
Vizualizări
271
Răspunsuri
1
Vizualizări
198

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Google [Bot] și 101 vizitatori