Domanda Codice Anello anti exp

Stato
Discussione chiusa ad ulteriori risposte.

sumotara

Utente Silver
11 Aprile 2017
50
9
11
51
Per chi fosse più esperto, potrebbe dirmi la quest o comunque il codice per inserire le pozze blu rosse infinite e anello exp infinito perfavore. :p do +1a chi risponde, mica scherziamo qua ahahaa
 
Ultima modifica:
Per pozioni infinite
in config.cpp (source game)

cerca
int gPlayerMaxLevel = 99;

e aggiungi sotto

int SnYesilMorpot = 0;
int SnKirmiziMavipot = 0;

poi cerca
TOKEN ( "max_level")

e aggiungici sotto

TOKEN ( "SN_YM_POT")
{
str_to_number (SnYesilMorpot, value_string);
Continua;
}

TOKEN ( "SN_KM_POT")
{
str_to_number (SnKirmiziMavipot, value_string);
Continua;
}


poi vai in chat_item.cpp

e cerca

PointChange (POINT_HP_RECOVERY, item-> GetValue (0) * MIN (200, (100 + GetPoint (POINT_POTION_BONUS))) / 100);

troverai
item-> SetCount (item-> GetCount () - 1);


sostituiscilo con


if ((SnKirmiziMavipot == 0))
{
item-> SetCount (item-> GetCount () - 1);
}

poi cerca

AddAffect (effect_type, apply_type, apply_value, 0, apply_duration, 0, true, true);

trova

item-> SetCount (item-> GetCount () - 1);

sostituiscilo con

if ((SnYesilMorpot == 0))
{
item-> SetCount (item-> GetCount () - 1);
}


Hai finito la parte source
ora basta che vai in ogni config di ogni tuo channel/core
e inverire queste due righe

SN_YM_POT: 1
SN_KM_POT: 1



Se tutto questo procedimento per te è troppo complicato o sbagli qualcosa e ti da problemi,
prova in questo altro modo.
cerca semplicemente
item-> SetCount (item-> GetCount () - 1);
e sostituiscilo con
item-> SetCount (item-> GetCount () - 0);

Facci sapere in ogni caso.

Per anello anti exp

Codice:
quest antiexpring begin
state start begin
when 000.use with pc.getqf("antiexp") == 0 begin
local anti = pc.get_exp()
pc.setqf("exp", anti)
pc.setqf("antiexp", 1)
timer("antiexptimer", 1)
chat("scrivici robe che vuoi che escano scritte")
end
when 000.use with pc.getqf("antiexp") == 1 begin
pc.setqf("antiexp", 0)
chat("Scrivici quello che ti pare")
end
when kill with pc.getqf("antiexp") == 1 begin
local exp = pc.get_exp()
pc.give_exp2(-exp+pc.getqf("exp"))
end
when antiexptimer.timer with pc.getqf("antiexp") == 1 begin
local exp = pc.get_exp()
pc.give_exp2(-exp+pc.getqf("exp"))
end
end
end


Per l'anello antiexp è facile, basta creare una quest, inserire questo script, fare ovviamente il ./qc e testare.
Però devi assegnargli tu un value in quanto ti ho scritto 000 in questa quest non conoscendo il value che vuoi utilizzare come anello anti-exp
se non lo hai nel client ti consiglio di scaricare un icona come questa https://m2icondb.karbust.me/img/72501.png e sostituirla all'icona di un ITEM_QUEST inutilizzato.
Se non capisci qualche passaggio aggiungimi su telegram al contatto @jason657
 
Per pozioni infinite
in config.cpp (source game)

cerca
int gPlayerMaxLevel = 99;

e aggiungi sotto

int SnYesilMorpot = 0;
int SnKirmiziMavipot = 0;

poi cerca
TOKEN ( "max_level")

e aggiungici sotto

TOKEN ( "SN_YM_POT")
{
str_to_number (SnYesilMorpot, value_string);
Continua;
}

TOKEN ( "SN_KM_POT")
{
str_to_number (SnKirmiziMavipot, value_string);
Continua;
}


poi vai in chat_item.cpp

e cerca

PointChange (POINT_HP_RECOVERY, item-> GetValue (0) * MIN (200, (100 + GetPoint (POINT_POTION_BONUS))) / 100);

troverai
item-> SetCount (item-> GetCount () - 1);


sostituiscilo con


if ((SnKirmiziMavipot == 0))
{
item-> SetCount (item-> GetCount () - 1);
}

poi cerca

AddAffect (effect_type, apply_type, apply_value, 0, apply_duration, 0, true, true);

trova

item-> SetCount (item-> GetCount () - 1);

sostituiscilo con

if ((SnYesilMorpot == 0))
{
item-> SetCount (item-> GetCount () - 1);
}


Hai finito la parte source
ora basta che vai in ogni config di ogni tuo channel/core
e inverire queste due righe

SN_YM_POT: 1
SN_KM_POT: 1



Se tutto questo procedimento per te è troppo complicato o sbagli qualcosa e ti da problemi,
prova in questo altro modo.
cerca semplicemente
item-> SetCount (item-> GetCount () - 1);
e sostituiscilo con
item-> SetCount (item-> GetCount () - 0);

Facci sapere in ogni caso.

Per anello anti exp

Codice:
quest antiexpring begin
state start begin
when 000.use with pc.getqf("antiexp") == 0 begin
local anti = pc.get_exp()
pc.setqf("exp", anti)
pc.setqf("antiexp", 1)
timer("antiexptimer", 1)
chat("scrivici robe che vuoi che escano scritte")
end
when 000.use with pc.getqf("antiexp") == 1 begin
pc.setqf("antiexp", 0)
chat("Scrivici quello che ti pare")
end
when kill with pc.getqf("antiexp") == 1 begin
local exp = pc.get_exp()
pc.give_exp2(-exp+pc.getqf("exp"))
end
when antiexptimer.timer with pc.getqf("antiexp") == 1 begin
local exp = pc.get_exp()
pc.give_exp2(-exp+pc.getqf("exp"))
end
end
end


Per l'anello antiexp è facile, basta creare una quest, inserire questo script, fare ovviamente il ./qc e testare.
Però devi assegnargli tu un value in quanto ti ho scritto 000 in questa quest non conoscendo il value che vuoi utilizzare come anello anti-exp
se non lo hai nel client ti consiglio di scaricare un icona come questa https://m2icondb.karbust.me/img/72501.png e sostituirla all'icona di un ITEM_QUEST inutilizzato.
Se non capisci qualche passaggio aggiungimi su telegram al contatto @jason657

Nel primo caso basta cercare il vnum delle pozze (27003) in char_item.cpp e commentare
item-> SetCount (item-> GetCount () - 1);
in
//item-> SetCount (item-> GetCount () - 1);

Nel secondo caso non è l'ideale utilizzare un timer che ogni secondo calcola il numero di exp attuale e sottrae quella che viene fatta, comunque dovrebbe esserci qualcosa di già pronto in c++ cercando su google
 
Stato
Discussione chiusa ad ulteriori risposte.