Перейти к содержанию

Костерок


Рекомендуемые сообщения

Кароч Хабиля вчера Барагозил на Герковском Дискорд канале с тами Гангстаганами как  Dastgir и Asheraf,

И Хабиле пришла еще одна Ах*нная идея

 

Идея:

Костерок востанавливающий ХП и СП.

Кароч разводишь костерок, и когда садищся у костра, начинаешь чувствовать тепло и комфорт и ХП/СП регенирируют быстро.

VvXo4vX.jpg

 

 

Топ пачан Meko уже писал подобный скрипт 

Menhir (Монолитный блок, сидя рядом с которым, регенирируються ХП и СП)

Ат души Meko!

А Хабиля крочб падумал... А почему-бы не замутить этот скрипт портативным?

 

Крочь смари сюда,

в клиенте, удобненько, есть такой спрайт НПЦ :

p63Qr0f.gif

4_BONFIRE
ID: 10252 (0x280C)

 

В клиенте уже очень давно есть такой Веш :

7035.gif Matchstick    Item ID# 7035 (Matchstick)

7035.gif

A phosphorus tipped stick that can be used to start a fire.

http://ratemyserver.net/index.php?page=item_db&item_id=7035

 

Dastgir, посоветовал использоваь плагин для копирования НПЦ:

https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/npc-duplicate.c

 

 

Механика 

Когда используеш Спичку   Matchstick   в инвентаре,  спавнится копия НПЦ  "Костерок".

чтобы кароч когда, ты с пачанами в поле, можно было развести костерок, отдохнуть/Бухнуть

VvXo4vX.jpg

- Чтобы чувствовать тепло и комфорт нужно сидеть близко к костру (в пределах 3 клеток ).

- ВСЕ могут садиться и отдыхать у твоего костра.

- Костерок горит минуты 2-3.

- Нужно сидеть 3 секунды чтобы начать чувствовать тпело и комфорт.

- Невозможно развести костер в пределахх 5 клеток от другого костра.

- Если уже развел костер и  еще раз используеш спичку, старый костер исчезнет, загориться новый.

 

Хабиля думает это добавит элементы РолеПлейя и оразнообразит ГеймПлей.

(А еще Хабиля Чувствительный и романтичный пацан хуле B38cFIv.jpg).

 

Обсуждайте, ожидайте релиза...

  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты

2 часа назад, Habilis сказал:

(А еще Хабиля Чувствительный и романтичный пацан хуле B38cFIv.jpg).

Учим английский с Хабилей ^^

212d34e3ce31.png

P>S> А для еа релиз намечается? ))

Ссылка на комментарий
Поделиться на другие сайты

Ах*нный Английский!

 

13 часа назад, KeLLyPrinCes$ сказал:

P>S> А для еа релиз намечается? ))

Ну какая еА, все прогрессивные пачаны и чиксы мутят на Герке!

Ну или на рА... но, на рА Хабиля забанен.

 

 

 

dfUPJPu.jpg

 

Вам стало тепло и уютно.

 

 

Изменено пользователем Habilis
  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты

В 20.06.2018в3:35 AM, Habilis сказал:

Ну какая еА, все прогрессивные пачаны и чиксы мутят на Герке!

Ну или на рА... но, на рА Хабиля забанен.

Хорошо, я пыталась в герк - ничего не поняла. вот есть кейс из моей первой темы. Задача разделить конфиг monster_damage_delay_rate на три разных конфига - для простых монстров, для минибоссов и мвп, чтобы можно было править стопрейт для разных групп, а не для всех сразу.

Как это сделать на еА:

В mob.c заменяем

	status->dmotion = atoi(str[29]);
-	if(battle_config.monster_damage_delay_rate != 100)
-		status->dmotion = status->dmotion * battle_config.monster_damage_delay_rate / 100;
+	if(status->mode&MD_BOSS && !db->mexp && battle_config.boss_damage_delay_rate != 100)
+		status->dmotion = status->dmotion * battle_config.boss_damage_delay_rate / 100;
+	if(!status->mode&MD_BOSS && !db->mexp && battle_config.monster_damage_delay_rate != 100)
+		status->dmotion = status->dmotion * battle_config.monster_damage_delay_rate / 100;
...
	db->mexp = (unsigned int)cap_value(exp, 0, UINT_MAX);
+	if(status->mode&MD_BOSS && db->mexp && battle_config.mvp_damage_delay_rate != 100)
+		status->dmotion = status->dmotion * battle_config.mvp_damage_delay_rate / 100;

Что я вижу на Герке в mob.c:

	if (mob->lookup_const(mobt, "DamageMotion", &i32) && i32 >= 0) {
		if (battle_config.monster_damage_delay_rate != 100)
			md.status.dmotion = i32 * battle_config.monster_damage_delay_rate / 100;
		else
			md.status.dmotion = i32;
	}

И как тут вставить проверку на MvP, если функция if закрытая, и со следующей опцией // MVP EXP Bonus: MEXP не пересекается? Или я не поняла принцип

Вот такие вопросы я задавала в нубка спамит и не только, но все подумали что мне нужна азурка на инглише и админка, ну отлично

Ссылка на комментарий
Поделиться на другие сайты

Ну во первых в участке кода

if (mob->lookup_const(mobt, "DamageMotion", &i32) && i32 >= 0) {
	if (battle_config.monster_damage_delay_rate != 100)
		md.status.dmotion = i32 * battle_config.monster_damage_delay_rate / 100;
	else
		md.status.dmotion = i32;
}

нужно добавить проверку, считается ли моб боссом

if (mob->lookup_const(mobt, "DamageMotion", &i32) && i32 >= 0) {
	if (!(md.status.mode & MD_BOSS) && battle_config.monster_damage_delay_rate != 100)
		md.status.dmotion = i32 * battle_config.monster_damage_delay_rate / 100;
	else
		md.status.dmotion = i32;
}

и далее после участка кода

// MVP EXP Bonus: MEXP
if (mob->lookup_const(mobt, "MvpExp", &i32) && i32 >= 0) {
	// Some new MVP's MEXP multiple by high exp-rate cause overflow. [LuzZza]
	int64 exp = apply_percentrate64(i32, battle_config.mvp_exp_rate, 100);
	md.mexp = (unsigned int)cap_value(exp, 0, UINT_MAX);
}

добавляем

if ((md.status.mode & MD_BOSS)) {
	if (md.mexp == 0 && battle_config.boss_damage_delay_rate != 100)
		md.status.dmotion = md.status.dmotion * battle_config.boss_damage_delay_rate / 100;
	else if (md.mexp > 0 && battle_config.mvp_damage_delay_rate != 100)
		md.status.dmotion = md.status.dmotion * battle_config.mvp_damage_delay_rate / 100;
	else if (battle_config.monster_damage_delay_rate != 100)
		md.status.dmotion = md.status.dmotion * battle_config.monster_damage_delay_rate / 100;
}

 

  • Upvote 2
Ссылка на комментарий
Поделиться на другие сайты

Получается логика та де -  прописываем часть дмоушена - не в функции дмоушена, блеск )) а на что влияют скобки вообще? {} в еа скобок после if нет, в герке есть, даже по-красивее получается

Извините за этот маленкий оффтоп

Изменено пользователем KeLLyPrinCes$
Ссылка на комментарий
Поделиться на другие сайты

В 22.06.2018в10:52 AM, KeLLyPrinCes$ сказал:

Получается логика та де -  прописываем часть дмоушена - не в функции дмоушена, блеск )) а на что влияют скобки вообще? {} в еа скобок после if нет, в герке есть, даже по-красивее получается

Извините за этот маленкий оффтоп

Скрытый текст

*if (<condition>) <statement or block>

This is the basic conditional command.

The condition can be any expression. All expressions resulting in a
non-zero value will be considered True, including negative values. All
expressions resulting in a zero are false.

If the expression results in True, the statement will be executed. If it
isn't true, nothing happens and we move on to the next line of the script.

    if (true)
    mes("This will always print.");
    if (0)
    mes("And this will never print.");
    if (5)
    mes("This will also always print.");
    if (-1)
    mes("Funny as it is, this will also print just fine.");

For more information on conditional operators see the operators section
above.
Anything that is returned by a function can be used in a condition check
without bothering to store it in a specific variable:

    if (strcharinfo(PC_NAME) == "Daniel Jackson")
        mes("It is true, you are Daniel!");

More examples of using the 'if' command in the real world:

Example 1:

    .@var1 = 1;
    input(.@var2);
    if (.@var1 == .@var2)
        close();
    mes("Sorry that is wrong");
    close();

Example 2:

    .@var1 = 1;
    input(.@var2);
    if (.@var1 != .@var2)
        mes("Sorry that is wrong");
    close();

(Notice examples 1 and 2 have the same effect.)

Example 3:

    ++@var1;
    mes("[Forgetfull Man]");
    if (@var == 1)
        mes("This is the first time you have talked to me");
    if (@var == 2)
        mes("This is the second time you have talked to me");
    if (@var == 3)
        mes("This is the third time you have talked to me");
    if (@var == 4)
        mes("This is the forth time you have talked to me, but I think I am getting amnesia, I have forgotten about you");
    if (@var == 4)
        @var = 0;
    close();

Example 4:

    mes("[Quest Person]");
    // The (AegisName) constant Apple comes from item_db, it is the item number 512.
    if (countitem(Apple) >= 1) {
        mes("Oh an apple, I didn't want it, I just wanted to see one");
        close();
    }
    mes("Can you please bring me an apple?");
    close();

Example 5: Using complex conditions.

    mes("[Multi Checker]");
    if ((queststarted == 1) && (countitem(Apple) >= 5)) {
        // Executed only if the quest has been started AND You have 5 apples
        mes("[Multi Checker]");
        mes("Well done you have started the quest of got me 5 apples");
        mes("Thank you");
        queststarted = 0;
        delitem(Apple, 5);
        close();
    }
    mes("Please get me 5 apples");
    queststarted = 1;
    close();

If the condition doesn't meet, it'll do the action following the else.
We can also group several actions depending on a condition, this way:

if (<condition>) {
    dothis1();
    dothis2();
} else {
    dothat1();
    dothat2();
    dothat3();
}

Example 6:

    mes("[Person Checker]");
    if ($name$ == "") {
        mes("Please tell me someone's name");
        next();
        input($name$);
        $name2$ = strcharinfo(PC_NAME);
        mes("[Person Checker]");
        mes("Thank you");
        close();
    }
    if ($name$ == strcharinfo(PC_NAME)) {
        mes("You are the person that " +$name2$+ " just mentioned");
        mes("nice to meet you");
    } else {
        mes("You are not the person that " +$name2$+ " mentioned");
    }
    $name$ = "";
    $name2$ = "";
    close();

See strcharinfo() for explanation of what this function does.

Remember that if you plan to do several actions upon the condition being
false, and you forget to use the curly braces (the { } ), the second
action will be executed regardless the output of the condition, unless of
course, you stop the execution of the script if the condition is true
(that is, in the first grouping using a return, and end or a close()).

Also, you can have multiple conditions nested or chained, and don't worry
about limits as to how many nested if you can have, there is no spoon ;).

...
if (<condition 1>) {
    dothis();
} else if (<condition 2>) {
    dotheother();
    do_that();
    end;
} else {
    do_this();
}
...

 

Изменено пользователем botka4aet
  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика