-
Posts
265 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Scofield
-
-
Hello community,
I have a modification in my emulator called pvpmode. When I use it, the character enters PK mode, and in this system, it is possible to configure it to receive experience bonuses. I would like to implement the feature of receiving drop bonuses while the PK mode is active. Does anyone know how I could achieve this?
Here is the part of the source code (src) that seems to be related to the experience bonus system.
pc.c /*========================================== * Alters experienced based on self bonuses that do not get even shared to the party. *------------------------------------------*/ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { int bonus = 0; struct status_data *status = status_get_status_data(src); struct region_data* rd; unsigned int ebonus = 0, jbonus = 0; if (sd->expaddrace[status->race]) bonus += sd->expaddrace[status->race]; bonus += sd->expaddrace[status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS]; if (battle_config.pk_mode && (int)(status_get_lv(src) - sd->status.base_level) >= 20) bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris] if (sd->sc.data[SC_EXPBOOST]) bonus += sd->sc.data[SC_EXPBOOST]->val1; if( sd->status.iprank ) bonus += (sd->status.iprank * 2); if( pc_isPremium(sd) && battle_config.premium_bonusexp ) bonus += battle_config.premium_bonusexp; if( sd->state.pvpmode && battle_config.pvpmode_expbonus ) { int rank; if( (rank = pc_pvpfamerank(sd->status.char_id)) && rand()%100 < ((MAX_FAME_LIST + 1 - rank) * 4) ) bonus += battle_config.pvpmode_expbonus; } if (sd->sc.data[SC_JEXPBOOST]) jbonus += sd->sc.data[SC_JEXPBOOST]->val1; if( sd->status.guild_id && (rd = region_search(map[sd->bl.m].region_id)) != NULL && sd->status.guild_id == rd->guild_id ) { ebonus += rd->bonus_bexp; jbonus += rd->bonus_jexp; } if( !bonus && !ebonus && !jbonus ) return; *base_exp = (unsigned int) cap_value(*base_exp + (double)*base_exp * (bonus + ebonus)/100., 1, UINT_MAX); *job_exp = (unsigned int) cap_value(*job_exp + (double)*job_exp * (bonus + jbonus)/100., 1, UINT_MAX); return; } battle.c { "pvpmode_onlypc", &battle_config.pvpmode_onlypc, 1, 0, 1, }, { "pvpmode_gvgreductions", &battle_config.pvpmode_gvgreductions, 0, 0, 1, }, { "pvpmode_expbonus", &battle_config.pvpmode_expbonus, 0, 0, 100, }, { "pvpmode_nowarp_cmd", &battle_config.pvpmode_nowarp_cmd, 0, 0, 1, }, { "pvpmode_enable_delay", &battle_config.pvpmode_enable_delay, 120, 0, INT_MAX, }, { "pvpmode_disable_delay", &battle_config.pvpmode_disable_delay, 60, 0, INT_MAX, }, battle.h int pvpmode_onlypc; int pvpmode_gvgreductions; int pvpmode_expbonus; int pvpmode_nowarp_cmd; int pvpmode_enable_delay; int pvpmode_disable_delay;
-
What would it be like for merchants not to use the discount when they went to buy?
-
just use adelays.
- 1
-
+// Autor Goddameit +// Versão 20/12/2015 +// Web http://goo.gl/0vY9GV +// +// +- script bot_at -1,{ + função __onoff; +OnInit: + bindatcmd "boton",strnpcinfo(3)+"::OnDo"; + bindatcmd "botoff",strnpcinfo(3)+"::OnDo2"; + bindatcmd "botend",strnpcinfo(3)+"::OnDo2"; + fim; +OnDo: + sc_end SC_BOT; + .@SP_BOT_NA = 1; + enquanto(1) + { + .@C = select("[Terminar]","[Cancelar]","Ataque normal "+__onoff(.@SP_BOT_NA))k; + se( .@C == 1 ) + pausa; + senão se( .@C == 2 ) + fechar; + mais + interruptor(.@C) + { + caso 3: + .@SP_BOT_NA = !.@SP_BOT_NA; + pausa; + } + } + mensagem strcharinfo(0),"EXECUTAR"; + se( .@C == 1 || .@C > 2 ) + { + show "OK"; + fechar2; + } + sc_start4 SC_BOT,600000,.@SP_BOT_NA,0,0,0; + fim; +OnDo2: + sc_end SC_BOT; + mensagem strcharinfo(0),"END"; + fim; + função __onoff { + se(getarg(0) == 0) + retornar "^BEBEBE[OFF]^000000"; + mais + retornar "^000088[ON]^000000"; + } +}
Didn't this NPC give errors?
-
Did the NPC work? did you make an error?
-
sc_config does not exist in rathena, this file only exists in the hercules emulator, I don't know which file in rathena has the same effect
-
Hello everyone,
A few years ago, I made a post about the modification of BOT v.3, native to the Hercules emulator. I'm resurrecting this discussion in the hope of finding someone who can help adapt this bot to work on rathena.
It seems that someone has already made this modification and even put it up for sale, but I don't have confirmed information. If anyone has knowledge about this or knows someone who can help, I would greatly appreciate it. I'm eager to bring this functionality to the rathena community.
Thank you in advance for everyone's attention, and I look forward to any information or assistance you can provide.
Index: db/const.txt =================================================================== --- db/const.txt (revision 14530) +++ db/const.txt (working copy) @@ -1258,6 +1258,7 @@ SC__CHAOS 577 SC__FEINTBOMB_MASTER 578 SC_FALLENEMPIRE 579 +SC_BOT 581 e_gasp 0 e_what 1 Index: db/sc_config.txt =================================================================== --- db/sc_config.txt (revision 14530) +++ db/sc_config.txt (working copy) @@ -14,6 +14,7 @@ //Example: //SC_ENDURE, 21 //SC_ENDURE: cannot be removed by death and dispell and cosidered as buff. (16 + 4 + 1 = 21) +SC_BOT, 6 SC_PROVOKE, 32 SC_ENDURE, 21 SC_CLOAKING, 2 Index: npc/bot.txt =================================================================== --- npc/bot.txt (revision 0) +++ npc/bot.txt (working copy) @@ -0,0 +1,51 @@ +// +// +// Author Goddameit +// Version 2015/12/20 +// Web http://goo.gl/0vY9GV +// +// +- script bot_at -1,{ + function __onoff ; +OnInit: + bindatcmd "boton",strnpcinfo(3)+"::OnDo"; + bindatcmd "botoff",strnpcinfo(3)+"::OnDo2"; + bindatcmd "botend",strnpcinfo(3)+"::OnDo2"; + end; +OnDo: + sc_end SC_BOT; + .@SP_BOT_NA = 1; + while(1) + { + .@C = select("[Finish]","[Cancel]","Normal Attack "+__onoff(.@SP_BOT_NA))k; + if( .@C == 1 ) + break; + else if( .@C == 2 ) + close; + else + switch(.@C) + { + case 3: + .@SP_BOT_NA = !.@SP_BOT_NA; + break; + } + } + message strcharinfo(0),"RUN"; + if( .@C == 1 || .@C > 2 ) + { + mes "OK"; + close2; + } + sc_start4 SC_BOT,600000,.@SP_BOT_NA,0,0,0; + end; +OnDo2: + sc_end SC_BOT; + message strcharinfo(0),"END"; + end; + function __onoff { + if(getarg(0) == 0) + return "^BEBEBE[OFF]^000000"; + else + return "^000088[ON]^000000"; + } +} \ No newline at end of file Index: src/map/status.c =================================================================== --- src/map/status.c (revision 14530) +++ src/map/status.c (working copy) @@ -8982,6 +8982,10 @@ if(val2 == MH_MD_FIGHTING) val2 = MH_MD_GRAPPLING; else val2 = MH_MD_FIGHTING; break; + case SC_BOT: + tick_time = 100; + val4 = tick / tick_time; + break; case SC_FULL_THROTTLE: status_percent_heal(bl,100,0); val2 = 7 - val1; @@ -9701,6 +9705,15 @@ } } } + + if (type == SC_BOT) + { + if (sc->data[type]->val4 > 0) + { + //Record how many time you left + pc->setreg(sd, script->add_str("@SP_BOT_LTICK"), sc->data[type]->val4 * 100); + } + } (sc->count)--; @@ -10464,6 +10477,145 @@ } while(0) switch(type) { + case SC_BOT: + if (--(sce->val4) > 0) { + { + int i_ = 0; + struct mmo_charstatus *sta = &sd->status; + unsigned short inf_ = 0; + int64 last_tick = (int64)time(NULL); + unsigned short idle_ = cap_value(DIFF_TICK32(last_tick, sd->idletime), 0, USHRT_MAX); + unsigned short tele_ = cap_value(DIFF_TICK32(last_tick, pc->readreg(sd, script->add_str("@SP_BOT_TELE"))), 0, USHRT_MAX); + unsigned int starget_id_ = bot_check_target_alive(bl, pc->readreg(sd, script->add_str("@SP_BOT_TGID"))); + {//Heal + unsigned short item_id_ = sta->hotkeys[9].id; + if ((sd->battle_status.hp * 100 / 80) < sd->battle_status.max_hp && item_id_ > 0) + { + i_ = pc->search_inventory(sd, item_id_); + if (i_ >= 0) + pc->useitem(sd, i_); + } + item_id_ = sta->hotkeys[10].id; + if ((sd->battle_status.sp * 100 / 80) < sd->battle_status.max_sp && item_id_ > 0) + { + i_ = pc->search_inventory(sd, item_id_); + if (i_ >= 0) + pc->useitem(sd, i_); + } + } + {//Buff + for (i_ = 2; i_ <= 6; i_++) + { + if ((inf_ = bot_chec_khotkeys_is_skill(sd, i_)) > 0) + { + unsigned short id_ = sta->hotkeys[i_].id; + if (inf_ == 4 || inf_ == 16) + { + if (!sc->data[status->skill2sc(id_)]) + unit->skilluse_id(bl, bl->id, id_, sta->hotkeys[i_].lv); + } + } + } + } + if (idle_ % 7 != 0)//Attack + { + { + unsigned short inf_ = 0; + starget_id_ = bot_check_target_alive(bl, pc->readreg(sd, script->add_str("@SP_BOT_TGID"))); + if (starget_id_ > 0) { + if (sce->val1 > 0) + { + switch (rand() % 10) + { + case 0: + case 1: + case 2: + inf_ = bot_chec_khotkeys_is_skill(sd, 7); + if (inf_ == 1) + { + unit->stop_attack(bl); + unit->skilluse_id(bl, starget_id_, sta->hotkeys[7].id, sta->hotkeys[7].lv); + } + break; + case 5: + case 6: + inf_ = bot_chec_khotkeys_is_skill(sd, 8); + if (inf_ == 1) + { + unit->stop_attack(bl); + unit->skilluse_id(bl, starget_id_, sta->hotkeys[8].id, sta->hotkeys[8].lv); + } + break; + default: + unit->attack(bl, starget_id_, 1); + break; + } + } + else + { + switch (rand() % 7) + { + case 0: + case 1: + case 2: + case 3: + case 4: + inf_ = bot_chec_khotkeys_is_skill(sd, 7); + if (inf_ == 1) + { + unit->skilluse_id(bl, starget_id_, sta->hotkeys[7].id, sta->hotkeys[7].lv); + } + break; + case 5: + case 6: + inf_ = bot_chec_khotkeys_is_skill(sd, 8); + if (inf_ == 1) + { + unit->skilluse_id(bl, starget_id_, sta->hotkeys[8].id, sta->hotkeys[8].lv); + } + break; + } + } + } + } + } + else + {//Move + bool flywing_ = false; + if (bot_check_target(bl, starget_id_) == false) + { + if (tele_ > 7) + { + if (sta->hotkeys[0].type == 0 && sta->hotkeys[0].id == 601 && sta->hotkeys[0].lv == 0) + { + i_ = pc->search_inventory(sd, 601); + if (i_ >= 0) + { + pc->useitem(sd, i_); + flywing_ = true; + } + } + if ((st->sp > 20) && (flywing_ == false) && (sta->hotkeys[1].type == 1 && sta->hotkeys[1].id == AL_TELEPORT && sta->hotkeys[1].lv > 0)) + { + if (pc->checkskill(sd, AL_TELEPORT) > 0) + { + pc->randomwarp(sd, CLR_TELEPORT); + status->heal(&sd->bl, 0, -(skill->get_sp(AL_TELEPORT, 1)), 1); + flywing_ = true; + } + } + if (flywing_ == true) + pc->setreg(sd, script->add_str("@SP_BOT_TELE"), last_tick); + } + } + if ((idle_ % 9 == 0 && idle_ > 0) || starget_id_ == 0) + unit->walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), sd->bl.y + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), 0); + } + } + sc_timer_next(100 + tick, status->change_timer, bl->id, data); + return 0; + } + break; case SC_MAXIMIZEPOWER: case SC_CLOAKING: if(!status->charge(bl, 0, 1)) @@ -12237,3 +12389,73 @@ status->readdb_refine = status_readdb_refine; status->readdb_scconfig = status_readdb_scconfig; } + +bool bot_check_target(struct block_list *src, unsigned int id) +{ + struct block_list *bl = map->id2bl(id); + if (bl) + { + if (path->search(NULL, src->m, src->x, src->y, bl->x, bl->y, 1, CELL_CHKNOREACH) && distance_xy(src->x, src->y, bl->x, bl->y) < 11) + { + TBL_MOB *md = BL_CAST(BL_MOB, bl); + if (md) + { + if (md->status.hp > 0) + { + return true; + } + } + } + } + return false; +} + +int buildin_autoattack_sub(struct block_list *bl, va_list ap) +{ + int *target_id = va_arg(ap, int *); + int src_id = va_arg(ap, int); + struct block_list *src = map->id2bl(src_id); + if (!src || !bl) + return 1; + if (bot_check_target(src, bl->id) == true) + *target_id = bl->id; + else + *target_id = 0; + return 1; +} + +short bot_chec_khotkeys_is_skill(struct map_session_data *sd, unsigned short idx) +{ + if (sd) + { + struct mmo_charstatus *sta = &sd->status; + if (sta) + { + if (sta->hotkeys[idx].type == 1 && pc->checkskill(sd, sta->hotkeys[idx].id) > 0 && sta->hotkeys[idx].lv > 0) + return skill->get_inf(sta->hotkeys[idx].id); + } + } + return -1; +} + +unsigned int bot_check_target_alive(struct block_list *src, unsigned int id) +{ + if (bot_check_target(src, id) == true) + return id; + { + int i_, target_id_; + for (i_ = 0; i_ < 15; i_++) + { + target_id_ = 0; + map->foreachinarea(buildin_autoattack_sub, src->m, src->x - i_, src->y - i_, src->x + i_, src->y + i_, BL_MOB, &target_id_, src->id); + if (target_id_) + { + pc->setreg(map->id2sd(src->id), script->add_str("@SP_BOT_TGID"), target_id_); + break; + } + } + if (target_id_) + return target_id_; + } + return 0; +} \ No newline at end of file Index: src/map/status.h =================================================================== --- src/map/status.h (revision 14530) +++ src/map/status.h (working copy) @@ -715,6 +715,7 @@ SC_FALLENEMPIRE, SC_FLASHCOMBO, + SC_BOT, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; @@ -2089,4 +2090,8 @@ void status_defaults(void); +bool bot_check_target(struct block_list *src, unsigned int id); +int buildin_autoattack_sub(struct block_list *bl, va_list ap); +short bot_chec_khotkeys_is_skill(struct map_session_data *sd, unsigned short idx); +unsigned int bot_check_target_alive(struct block_list *src, unsigned int id); #endif /* MAP_STATUS_H */
- 1
-
Para funcionar no eAthena basta colocar int bool onde tem apenas bool.
o aqui sc_config.txt tem apenas no Hercules, não sei como replicar isso no rathena. -
VCP 2.0 (Updated PHP 8.2.1)
vCP (Version 2.0)
The vCP (Version 2.0) is a point-based voting system designed for the game Ragnarok. This version of the system has undergone significant updates to enhance security, ensure compatibility with the latest PHP version (8.2.1), and improve code organization.
Features
Point-Based Voting: Players can earn points by voting and then exchange them for items that will be delivered directly to their in-game accounts.
Installation
Access install/index.php and fill out the installation form. Upon completion, the system will create all the necessary infrastructure for its operation.
Common Errors and Solutions:
Error when altering the login table: Check if the "vcp_pontos" field does not exist in the table. If it exists, you can delete it and attempt the installation again.
Error when writing the configuration file: If you encounter this error, it may be due to insufficient writing permissions in the "inc" folder. Ensure that your account has the necessary permissions.
Key Improvements
In this version 2.0, the following improvements have been implemented:
Introduction of the vCP class instance: An instance of the vCP class has been introduced to improve code organization and maintenance.
Code improvements in files: The code has been enhanced to make it more secure and robust. Practices such as input sanitization using htmlspecialchars have been adopted.
Updated Charset: The charset has been changed to UTF-8, ensuring support for special characters.
Sql class improvements: The Sql class has been improved to make it more robust and secure.
Transition to MySQLi: The system now utilizes the MySQLi extension for database communication, enhancing query security and efficiency.
How to Contribute
If you wish to contribute to this project or report issues, feel free to open issues or pull requests. Contributions are welcome!
Conclusion
The Point-Based Voting system for Ragnarok is an excellent way to encourage player participation and increase competitiveness among servers. Additionally, it provides a richer and more diverse gaming experience. The system's installation is simple and quick and can be carried out through the install/index.php file.
License
This project is licensed under the MIT License. Please refer to the LICENSE file for more details.
Github: https://github.com/felipemike/vcp
-
Submitter
-
Submitted10/31/23
-
Category
-
Video
-
Content AuthorSkape
- 1
- 1
-
-
Okay, I partially solved the problem, I just removed the part that took the ip and just used the other parameters, they are enough to meet my business rule
prontera,155,172,3 script Comece Com o Pé Direito 880,{
set .@aid,getcharid(3);
set .@cid,getcharid(0);
set .@unique_id$,get_unique_id();
query_sql("SELECT `id`,`time` FROM `reward_for_first_50` WHERE `aid` = "+.@aid+" OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$);
query_sql("SELECT COUNT(`id`) FROM `reward_for_first_50`", .@size);
if (.@size >= .max_redeem) {
mes "Desculpe, você perdeu a recompensa. Apenas os primeiros "+.max_redeem+" jogadores receberam a recompensa.";
}
else if (.@id) {
mes "Você já reivindicou as recompensas em "+.@time$+".";
}
else {
query_sql("INSERT INTO `reward_for_first_50` (`aid`,`cid`,`last_unique_id`,`time`) VALUES ("+.@aid+","+.@cid+",'"+escape_sql(.@unique_id$)+"', NOW())");
if (.@size < 10) {
getitem 20001, 10;
getitem 12411, 10;
getitem 12312, 20;
getitem 12214, 30;
getitem 12210, 10;
getitem 14232, 2;
getitem 13989, 1;
getitem 13973, 1;
if (.@size == 49) {
announce "Parabéns ao jogador número 50! Ele ganhou um prêmio especial!", 0, 0xFFFF00;
getitem 12925, 1; // Dê um item especial ao jogador número 50
getitem 20001, 10;
getitem 12411, 10;
getitem 12312, 20;
getitem 12214, 30;
getitem 12210, 10;
getitem 14232, 2;
getitem 13989, 1;
getitem 13973, 1;
getitem 7558, 1;
}
mes "Parabéns! Você é um dos 10 primeiros jogadores a receber a recompensa. Aqui estão seus itens:";
} else {
getitem 20001, 5;
getitem 12411, 5;
getitem 12312, 10;
getitem 12214, 15;
getitem 12210, 5;
getitem 14232, 1;
getitem 13989, 1;
getitem 13973, 1;
mes "Você recebeu uma recompensa. Aqui estão seus itens exclusivos:";
}
mes "Você é o "+(.@size+1)+"/"+.max_redeem+" jogadores que receberam a recompensa";
}
close;
OnInit:
set .max_redeem,50;
end;
}
-
I didn't understand your suggestion, the script problem is exactly along these lines
set .@ip$,getcharip(.@aid); -
I have this NPC that is showing the following error in the console, and it's possible that I'm not using the correct syntax. I'm using the eAthena emulator for my project, as it's an old-time project, and I prefer it for various reasons.
prontera,155,172,3 script Comece Com o Pé Direito 880,{
set .@aid,getcharid(3);
set .@cid,getcharid(0);
set .@ip$,getcharip(.@aid);
set .@unique_id$,get_unique_id();
query_logsql("SELECT `id`,`time` FROM `reward_for_first_50` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$);
query_logsql("SELECT COUNT(`id`) FROM `reward_for_first_50`", .@size);
if (.@size >= .max_redeem) {
mes "Desculpe, você perdeu a recompensa. Apenas os primeiros "+.max_redeem+" jogadores receberam a recompensa.";
}
else if (.@id) {
mes "Você já reivindicou as recompensas em "+.@time$+".";
}
else {
query_logsql("INSERT INTO `reward_for_first_50` (`aid`,`cid`,`last_ip`,`last_unique_id`,`time`) VALUES ("+.@aid+","+.@cid+",'"+escape_sql(.@ip$)+"','"+escape_sql(.@unique_id$)+"', NOW())");
if (.@size < 10) {
getitem 20001, 10;
getitem 12411, 10;
getitem 12312, 20;
getitem 12214, 30;
getitem 12210, 10;
getitem 14232, 2;
getitem 13989, 1;
getitem 13973, 1;
if (.@size == 49) {
announce "Parabéns ao jogador número 50! Ele ganhou um prêmio especial!", 0, 0xFFFF00;
getitem 12925, 1; // Dê um item especial ao jogador número 50
getitem 20001, 10;
getitem 12411, 10;
getitem 12312, 20;
getitem 12214, 30;
getitem 12210, 10;
getitem 14232, 2;
getitem 13989, 1;
getitem 13973, 1;
getitem 7558, 1;
}
mes "Parabéns! Você é um dos 10 primeiros jogadores a receber a recompensa. Aqui estão seus itens:";
} else {
getitem 20001, 5;
getitem 12411, 5;
getitem 12312, 10;
getitem 12214, 15;
getitem 12210, 5;
getitem 14232, 1;
getitem 13989, 1;
getitem 13973, 1;
mes "Você recebeu uma recompensa. Aqui está seu item exclusivo:";
}
mes "Você é o "+(.@size+1)+"/"+.max_redeem+" jogadores que receberam a recompensa";
}
close;
OnInit:
set .max_redeem,50;
end;
}
erro
[Error]: Loading NPC file: npc/personalizado/josedias/estreia.txt
script error on npc/personalizado/josedias/estreia.txt line 5
parse_line: need ';'
1 : {
2 :
3 : set .@aid,getcharid(3);
4 : set .@cid,getcharid(0);
* 5 : set .@ip$,getcharip'('.@aid);
6 : set .@unique_id$,get_unique_id();
7 :
8 : query_logsql("SELECT `id`,`time` FROM `reward_for_first_50` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$);
9 : query_logsql("SELECT COUNT(`id`) FROM `reward_for_first_50`", .@size);
10 : if (.@size >= .max_redeem) { -
for me to give this error would anyone know how to help me?
Failed to parse LUA: Only supporting v5.0, sorry
-
hello, the following error is appearing on my linux console, I would like to know what it would be
erro:[Debug]: log_picktype2char: Unknown pick type 256.
-
Hello, I was wondering how I can activate for skill storm gust have a chance to be reflected only the damage by the Maya card
-
Hello, I have this pvp sql ranking, the problem is that he is not registering the class, the kills and deaths part works well, just not computing the class.
- script Rank2 -1,{ OnPCKillEvent: getmapxy @map$,@x,@y,0; if ( @map$ == "amatsu" ) goto Kill; end; Kill: if( @last_killed$ == rid2name( killedrid ) ) end; set @last_killed$, rid2name( killedrid ); Announce "The player [ " + strcharinfo(0)+" ] defeated the player [ " + rid2name(killedrid) + " ] and now it has " + @points + " wins!", bc_map, 0xFF7F50; set @CID,getcharid(0); set @pvp,0; set @name$,""; set @Job$,jobname(Class); query_sql "SELECT `kills` FROM `pvp` WHERE `char_id`="+@CID+"",@pvp; query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$; query_sql "SELECT `classe` FROM `pvp` WHERE `char_id`="+@CID+"",@Job$; if (@name$ == ""){ query_sql "INSERT INTO `pvp` (`char_id`,`name`,`kills`,`classe`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1,'"+jobname(Class)+"',1)",@esc$; set @points,@points+1; dispbottom " Your Score: "+@points; end; } query_sql "UPDATE `pvp` SET `kills` = `kills` +1 WHERE `char_id`="+@CID+"",@esc$; set @points,@points+1; dispbottom " Your Score: "+@points; end; } - script Rank3 -1,{ OnPCDieEvent: getmapxy @map$,@x,@y,0; if ( @map$ == "amatsu" ) goto Deat; end; Deat: set @CID,getcharid(0); set @pvp,0; set @name$,""; set @Job$,jobname(Class); query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="+@CID+"",@pvp; query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$; query_sql "SELECT `classe` FROM `pvp` WHERE `char_id`="+@CID+"",@Job$; if (@name$ == ""){ query_sql "INSERT INTO `pvp` (`char_id`,`name`,`deaths`,`classe`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1,'"+jobname(Class)+"',-1)",@esc$; set @points,@points+1; end; } query_sql "UPDATE `pvp` SET `deaths` = `deaths` +1 WHERE `char_id`="+@CID+"",@esc$; set @points,@points+1; end; }
-
on my map-server this warning message ( WARING skill_unitgrouptickset_search: tickset is full ) is showing, would anyone know why?
skill_unitgrouptickset_search: tickset is full
-
I would like to change the movement of the asura, I wanted him to jump instead of slide,
example: the character disappeared and appeared behind the opponent as before.
i have an old-time project and i use a version of eathena.
I believe that the part corresponding to this is this src/map/skill.c
case MO_EXTREMITYFIST: if( skillid == MO_EXTREMITYFIST ) { status_change_end(src,SC_EXPLOSIONSPIRITS,-1); status_change_end(src,SC_BLADESTOP,-1); } //Client expects you to move to target regardless of distance { struct unit_data *ud = unit_bl2ud(src); short dx,dy; int i,speed; i = skillid == MO_EXTREMITYFIST?1:2; //Move 2 cells for Issen, 1 for Asura dx = bl->x - src->x; dy = bl->y - src->y; if (dx < 0) dx-=i; else if (dx > 0) dx+=i; if (dy < 0) dy-=i; else if (dy > 0) dy+=i; if (!dx && !dy) dy++; if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS)) { dx = bl->x; dy = bl->y; } else { dx = src->x + dx; dy = src->y + dy; } skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); if(unit_walktoxy(src, dx, dy, 2) && ud) { //Increase can't walk delay to not alter your walk path ud->canmove_tick = tick; speed = status_get_speed(src); for (i = 0; i < ud->walkpath.path_len; i ++) { if(ud->walkpath.path[i]&1) ud->canmove_tick+=7*speed/5; else ud->canmove_tick+=speed; } } } break;
-
I tested it and the people who take the test and pass the npc question again I wish that people who were not bot the npc would not ask more until she relog
-
after the char is kicked will the npc work with it again?
-
i want to put this npc to activate on 3 maps instead of just 1, and even if the person reloged it would be checked again.
- script bot2 -1,{ OnInit: OnPCLoadMapEvent: if( !Checking ) end; OnNPCKillEvent: if ( strcharinfo(3) == "bat_c01" ) { set Kill,Kill+1; if( Kill >= rand( 15,35 ) ){ set Checking,1; announce "RO Guard : Bot Check time! Thank you for your patience!",bc_yellow|bc_self; atcommand "@option 2"; mes "[^ff557fRO Guard^000000]"; mes "Please enter the ^FF0000RED COLOUR NUMBER^000000"; next; set .@Number,rand( 999999 ); mes "[^ff557fRO Guard^000000]"; mes "Number : "; mes rand( 999999 )+"^ff0000"+.@Number+"^000000"+rand( 999999 ); input @Number; if( @Number != .@Number ){ mes "Sorry, WRONG."; atcommand "@kick "+strcharinfo(0); }else{ mes "Thank you. You now can move!."; dispbottom "100% of effectiveness."; announce "RO Guard : To rewared your kindness, please take a bonus of some Buffs.",bc_blue|bc_self; sc_start SC_INCREASEAGI,500000,10; sc_start SC_BLESSING,500000,10; percentheal 100,100; atcommand "@option 0 0 0"; if(@cart == 1) { setcart; set @cart,0; } if(@falcon == 1) { setfalcon; set @falcon,0; } if(@riding == 1) { setriding; set @riding,0; } set Checking,0; set Kill,0; } close; } } } bat_c01 mapflag loadevent
-
where would i put this condition in the script?
-
Pronto arrumei, bem eu andei mexendo e coloquei ele para iniciar 3 vezes por dia, queria saber como eu deixo apenas se a pessoa estiver em um grupo entrar no evento. tipo se ela não estiver em grupo o npc não recolhe o ticket e nem o ouro e mandar o jogar entrar em um grupo..
outra coisa o grupo usar o ticket e pagar os 500 ouros poderá voltar para o evento quando morrer até os 30 minutos de evento terminar... depois dos 30 minutos o grupo vai ter que pagar denovo
-
hello I wanted to npc just take players who were in a group, if he does not have a group npc did not complete the lock
- script Sample -1,{ OnClock1900: OnClock2000: OnClock2100: for( set .@i,0; .@i < 3; set .@i,.@i + 1 ){ announce "O evento Cheffenia será aberto dentro de "+( 3 - .@i )+" Minutos.",0; sleep 60000; } enablenpc "Cheffenia::bsw"; announce "Evento Cheffenia Aberto.",0; sleep ( 30 * 60000 ); announce "Evento Cheffenia Fechado.",0; OnInit: disablenpc "Cheffenia::bsw"; end; } prontera,164,164,4 script Cheffenia::bsw 421,{ mes "[Riss]"; mes "Olá "+strcharinfo(0)+""; mes "Posso levar seu grupo a um lugar muito misterioso.. "; next; mes "[Riss]"; mes "Enquanto eu viajava por todo esse mundo eu descobrir esse lugar..."; next; mes "[Riss]"; mes "Eu sou um aventureiro..."; mes "Haha~"; next; mes "[Riss]"; mes "Deseja se aventurar na Cheffênia?"; next; menu "É claro!",sim, "Talvez uma outra hora..",nao, "Oque é preciso para ir?",item; sim: if(countitem(7227) < 1) || (countitem(969) < 500){ mes "[Riss]"; mes "Você não tem os itens necessários para embarcar nessa aventura.."; mes "Requerimento:"; mes "1x "+getitemname(7227); mes "500x "+getitemname(969); close; } next; mes "[Riss]"; mes "Você vai enfrentar este desafio ?"; mes "Certo. Em seguida, escolha seu destino ."; next; set .@i, select("Primeiro","Segundo","Terceiro","Quarto"); mes "[Riss]"; mes "Ser cuidadoso, jovem rapaz."; mes "Não fique com raiva de mim."; delitem 7227,1; delitem 969,500; set .@party_id, getcharid(1); close2; warpparty "bossnia_0"+.@i,rand(202,204),rand(202,204),.@party_id; end; nao: mes "[Riss]"; mes "Sempre estarei aqui..."; close; item: mes "[Riss]"; mes "Só é necessário que você me traga esses itens:"; next; mes "x500 Ouro e 1 Passe para Cheffênia"; mes "Ao trabalho.."; close; } // Warp Portals //============================================================ bossnia_01,207,207,0 warp bossnia01 1,1,prontera,155,180 bossnia_02,207,207,0 warp bossnia02 1,1,prontera,155,180 bossnia_03,207,207,0 warp bossnia03 1,1,prontera,155,180 bossnia_04,207,207,0 warp bossnia04 1,1,prontera,155,180 // monster Spawns //============================================================ //---------------------------------------------------------------------------- // bossnia_01 - Bossnia //---------------------------------------------------------------------------- bossnia_01,0,0,0,0 monster Garm 1252,1,7200000,0,1 bossnia_01,0,0,0,0 monster Gloom Under Night 1768,1,7200000,0,1 bossnia_01,0,0,0,0 monster Dark Lord 1272,1,7200000,0,1 bossnia_01,0,0,0,0 monster Doppelganger 1046,1,7200000,0,1 bossnia_01,0,0,0,0 monster Dracula 1389,1,1800000,0,1 bossnia_01,0,0,0,0 monster Drake 1112,1,1800000,0,1 bossnia_01,0,0,0,0 monster Detale 1719,1,7200000,0,1 bossnia_01,0,0,0,0 monster Maya 1147,1,1800000,0,1 bossnia_01,0,0,0,0 monster Mistress 1059,1,1800000,0,1 bossnia_01,0,0,0,0 monster Baphomet 1039,1,1800000,0,1 bossnia_01,0,0,0,0 monster Egnigem Cenia 1658,1,1800000,0,1 bossnia_01,0,0,0,0 monster Amon Ra 1511,1,1800000,0,1 bossnia_01,0,0,0,0 monster Atroce 1785,1,1800000,0,1 bossnia_01,0,0,0,0 monster Vesper 1685,1,7200000,0,1 bossnia_01,0,0,0,0 monster Eddga 1115,1,1800000,0,1 bossnia_01,0,0,0,0 monster Osiris 1038,1,7200000,0,1 bossnia_01,0,0,0,0 monster Orc Lord 1190,1,7200000,0,1 bossnia_01,0,0,0,0 monster Orc Hero 1087,1,1800000,0,1 bossnia_01,0,0,0,0 monster Samurai Specter 1492,1,3600000,0,1 bossnia_01,0,0,0,0 monster Moonlight Flower 1150,1,3600000,0,1 bossnia_01,0,0,0,0 monster Lord of the Dead 1373,1,3600000,0,1 bossnia_01,0,0,0,0 monster Ktullanux 1779,1,7200000,0,1 bossnia_01,0,0,0,0 monster Kiel D-01 1734,1,7200000,0,1 bossnia_01,0,0,0,0 monster Thanatos Phantom 1708,1,7200000,0,1 bossnia_01,0,0,0,0 monster Lady Tanee 1688,1,3600000,0,1 bossnia_01,0,0,0,0 monster Tao Gunka 1583,1,3600000,0,1 bossnia_01,0,0,0,0 monster Turtle General 1312,1,7200000,0,1 bossnia_01,0,0,0,0 monster Pharaoh 1157,1,3600000,0,1 bossnia_01,0,0,0,0 monster Stormy Knight 1251,1,3600000,0,1 bossnia_01,0,0,0,0 monster Falling Bishop 1871,1,7200000,0,1 bossnia_01,0,0,0,0 monster Phreeoni 1159,1,7200000,0,1 bossnia_01,0,0,0,0 monster Golden Thief Bug 1086,1,3600000,0,1 bossnia_01,0,0,0,0 monster Evil Snake Lord 1418,1,7200000,0,1 bossnia_01,0,0,0,0 monster RSX-0806 1623,1,7200000,0,1 bossnia_01,0,0,0,0 monster Assassin Cross Eremes 1647,1,0,0,1 bossnia_01,137,118,1,1 monster Whitesmith Howard 1648,1,0,0,1 bossnia_01,122,195,1,1 monster Beelzebub 1873,1,0,0,1 bossnia_01,45,118,1,1 monster Beelzebub 1873,1,0,0,1 bossnia_01,196,122,1,1 monster Valkyrie Randgris 1751,1,0,0,1 bossnia_01,142,61,1,1 monster Ifrit 1832,1,0,0,1 //---------------------------------------------------------------------------- // bossnia_02 - Bossnia //---------------------------------------------------------------------------- bossnia_02,0,0,0,0 monster Garm 1252,2,7200000,0,1 bossnia_02,0,0,0,0 monster Gloom Under Night 1768,2,7200000,0,1 bossnia_02,0,0,0,0 monster Dark Lord 1272,2,7200000,0,1 bossnia_02,0,0,0,0 monster Doppelganger 1046,2,7200000,0,1 bossnia_02,0,0,0,0 monster Dracula 1389,2,1800000,0,1 bossnia_02,0,0,0,0 monster Drake 1112,2,1800000,0,1 bossnia_02,0,0,0,0 monster Detale 1719,2,7200000,0,1 bossnia_02,0,0,0,0 monster Maya 1147,2,1800000,0,1 bossnia_02,0,0,0,0 monster Mistress 1059,2,1800000,0,1 bossnia_02,0,0,0,0 monster Baphomet 1039,2,1800000,0,1 bossnia_02,0,0,0,0 monster Egnigem Cenia 1658,2,1800000,0,1 bossnia_02,0,0,0,0 monster Amon Ra 1511,2,1800000,0,1 bossnia_02,0,0,0,0 monster Atroce 1785,2,1800000,0,1 bossnia_02,0,0,0,0 monster Vesper 1685,2,7200000,0,1 bossnia_02,0,0,0,0 monster Eddga 1115,2,1800000,0,1 bossnia_02,0,0,0,0 monster Osiris 1038,2,7200000,0,1 bossnia_02,0,0,0,0 monster Orc Lord 1190,2,7200000,0,1 bossnia_02,0,0,0,0 monster Orc Hero 1087,2,1800000,0,1 bossnia_02,0,0,0,0 monster Samurai Specter 1492,2,3600000,0,1 bossnia_02,0,0,0,0 monster Moonlight Flower 1150,2,3600000,0,1 bossnia_02,0,0,0,0 monster Lord of the Dead 1373,2,3600000,0,1 bossnia_02,0,0,0,0 monster Ktullanux 1779,2,7200000,0,1 bossnia_02,0,0,0,0 monster Kiel D-01 1734,2,7200000,0,1 bossnia_02,0,0,0,0 monster Thanatos Phantom 1708,2,7200000,0,1 bossnia_02,0,0,0,0 monster Lady Tanee 1688,2,3600000,0,1 bossnia_02,0,0,0,0 monster Tao Gunka 1583,2,3600000,0,1 bossnia_02,0,0,0,0 monster Turtle General 1312,2,7200000,0,1 bossnia_02,0,0,0,0 monster Pharaoh 1157,2,3600000,0,1 bossnia_02,0,0,0,0 monster Stormy Knight 1251,2,3600000,0,1 bossnia_02,0,0,0,0 monster Falling Bishop 1871,2,7200000,0,1 bossnia_02,0,0,0,0 monster Phreeoni 1159,2,7200000,0,1 bossnia_02,0,0,0,0 monster Golden Thief Bug 1086,2,3600000,0,1 bossnia_02,0,0,0,0 monster Evil Snake Lord 1418,2,7200000,0,1 bossnia_02,0,0,0,0 monster RSX-0806 1623,2,7200000,0,1 bossnia_02,0,0,0,0 monster Assassin Cross Eremes 1647,2,0,0,1 bossnia_02,137,118,1,1 monster Whitesmith Howard 1648,2,0,0,1 bossnia_02,122,195,1,1 monster Beelzebub 1873,2,0,0,1 bossnia_02,45,118,1,1 monster Beelzebub 1873,2,0,0,1 bossnia_02,196,122,1,1 monster Valkyrie Randgris 1751,2,0,0,1 bossnia_02,142,61,1,1 monster Ifrit 1832,2,0,0,1 //---------------------------------------------------------------------------- // bossnia_03 - Bossnia //---------------------------------------------------------------------------- bossnia_03,0,0,0,0 monster Garm 1252,3,7200000,0,1 bossnia_03,0,0,0,0 monster Gloom Under Night 1768,3,7200000,0,1 bossnia_03,0,0,0,0 monster Dark Lord 1272,3,7200000,0,1 bossnia_03,0,0,0,0 monster Doppelganger 1046,3,7200000,0,1 bossnia_03,0,0,0,0 monster Dracula 1389,3,1800000,0,1 bossnia_03,0,0,0,0 monster Drake 1112,3,1800000,0,1 bossnia_03,0,0,0,0 monster Detale 1719,3,7200000,0,1 bossnia_03,0,0,0,0 monster Maya 1147,3,1800000,0,1 bossnia_03,0,0,0,0 monster Mistress 1059,3,1800000,0,1 bossnia_03,0,0,0,0 monster Baphomet 1039,3,1800000,0,1 bossnia_03,0,0,0,0 monster Egnigem Cenia 1658,3,1800000,0,1 bossnia_03,0,0,0,0 monster Amon Ra 1511,3,1800000,0,1 bossnia_03,0,0,0,0 monster Atroce 1785,3,1800000,0,1 bossnia_03,0,0,0,0 monster Vesper 1685,3,7200000,0,1 bossnia_03,0,0,0,0 monster Eddga 1115,3,1800000,0,1 bossnia_03,0,0,0,0 monster Osiris 1038,3,7200000,0,1 bossnia_03,0,0,0,0 monster Orc Lord 1190,3,7200000,0,1 bossnia_03,0,0,0,0 monster Orc Hero 1087,3,1800000,0,1 bossnia_03,0,0,0,0 monster Samurai Specter 1492,3,3600000,0,1 bossnia_03,0,0,0,0 monster Moonlight Flower 1150,3,3600000,0,1 bossnia_03,0,0,0,0 monster Lord of the Dead 1373,3,3600000,0,1 bossnia_03,0,0,0,0 monster Ktullanux 1779,3,7200000,0,1 bossnia_03,0,0,0,0 monster Kiel D-01 1734,3,7200000,0,1 bossnia_03,0,0,0,0 monster Thanatos Phantom 1708,3,7200000,0,1 bossnia_03,0,0,0,0 monster Lady Tanee 1688,3,3600000,0,1 bossnia_03,0,0,0,0 monster Tao Gunka 1583,3,3600000,0,1 bossnia_03,0,0,0,0 monster Turtle General 1312,3,7200000,0,1 bossnia_03,0,0,0,0 monster Pharaoh 1157,3,3600000,0,1 bossnia_03,0,0,0,0 monster Stormy Knight 1251,3,3600000,0,1 bossnia_03,0,0,0,0 monster Falling Bishop 1871,3,7200000,0,1 bossnia_03,0,0,0,0 monster Phreeoni 1159,3,7200000,0,1 bossnia_03,0,0,0,0 monster Golden Thief Bug 1086,3,3600000,0,1 bossnia_03,0,0,0,0 monster Evil Snake Lord 1418,3,7200000,0,1 bossnia_03,0,0,0,0 monster RSX-0806 1623,3,7200000,0,1 bossnia_03,0,0,0,0 monster Assassin Cross Eremes 1647,3,0,0,1 bossnia_03,137,118,1,1 monster Whitesmith Howard 1648,3,0,0,1 bossnia_03,122,195,1,1 monster Beelzebub 1873,3,0,0,1 bossnia_03,45,118,1,1 monster Beelzebub 1873,3,0,0,1 bossnia_03,196,122,1,1 monster Valkyrie Randgris 1751,3,0,0,1 bossnia_03,142,61,1,1 monster Ifrit 1832,3,0,0,1 //---------------------------------------------------------------------------- // bossnia_04 - Bossnia //---------------------------------------------------------------------------- bossnia_04,0,0,0,0 monster Garm 1252,4,7200000,0,1 bossnia_04,0,0,0,0 monster Gloom Under Night 1768,4,7200000,0,1 bossnia_04,0,0,0,0 monster Dark Lord 1272,4,7200000,0,1 bossnia_04,0,0,0,0 monster Doppelganger 1046,4,7200000,0,1 bossnia_04,0,0,0,0 monster Dracula 1389,4,1800000,0,1 bossnia_04,0,0,0,0 monster Drake 1112,4,1800000,0,1 bossnia_04,0,0,0,0 monster Detale 1719,4,7200000,0,1 bossnia_04,0,0,0,0 monster Maya 1147,4,1800000,0,1 bossnia_04,0,0,0,0 monster Mistress 1059,4,1800000,0,1 bossnia_04,0,0,0,0 monster Baphomet 1039,4,1800000,0,1 bossnia_04,0,0,0,0 monster Egnigem Cenia 1658,4,1800000,0,1 bossnia_04,0,0,0,0 monster Amon Ra 1511,4,1800000,0,1 bossnia_04,0,0,0,0 monster Atroce 1785,4,1800000,0,1 bossnia_04,0,0,0,0 monster Vesper 1685,4,7200000,0,1 bossnia_04,0,0,0,0 monster Eddga 1115,4,1800000,0,1 bossnia_04,0,0,0,0 monster Osiris 1038,4,7200000,0,1 bossnia_04,0,0,0,0 monster Orc Lord 1190,4,7200000,0,1 bossnia_04,0,0,0,0 monster Orc Hero 1087,4,1800000,0,1 bossnia_04,0,0,0,0 monster Samurai Specter 1492,4,3600000,0,1 bossnia_04,0,0,0,0 monster Moonlight Flower 1150,4,3600000,0,1 bossnia_04,0,0,0,0 monster Lord of the Dead 1373,4,3600000,0,1 bossnia_04,0,0,0,0 monster Ktullanux 1779,4,7200000,0,1 bossnia_04,0,0,0,0 monster Kiel D-01 1734,4,7200000,0,1 bossnia_04,0,0,0,0 monster Thanatos Phantom 1708,4,7200000,0,1 bossnia_04,0,0,0,0 monster Lady Tanee 1688,4,3600000,0,1 bossnia_04,0,0,0,0 monster Tao Gunka 1583,4,3600000,0,1 bossnia_04,0,0,0,0 monster Turtle General 1312,4,7200000,0,1 bossnia_04,0,0,0,0 monster Pharaoh 1157,4,3600000,0,1 bossnia_04,0,0,0,0 monster Stormy Knight 1251,4,3600000,0,1 bossnia_04,0,0,0,0 monster Falling Bishop 1871,4,7200000,0,1 bossnia_04,0,0,0,0 monster Phreeoni 1159,4,7200000,0,1 bossnia_04,0,0,0,0 monster Golden Thief Bug 1086,4,3600000,0,1 bossnia_04,0,0,0,0 monster Evil Snake Lord 1418,4,7200000,0,1 bossnia_04,0,0,0,0 monster RSX-0806 1623,4,7200000,0,1 bossnia_04,0,0,0,0 monster Assassin Cross Eremes 1647,4,0,0,1 bossnia_04,137,118,1,1 monster Whitesmith Howard 1648,4,0,0,1 bossnia_04,122,195,1,1 monster Beelzebub 1873,4,0,0,1 bossnia_04,45,118,1,1 monster Beelzebub 1873,4,0,0,1 bossnia_04,196,122,1,1 monster Valkyrie Randgris 1751,4,0,0,1 bossnia_04,142,61,1,1 monster Ifrit 1832,4,0,0,1 bossnia_01 mapflag nowarpto bossnia_02 mapflag nowarpto bossnia_03 mapflag nowarpto bossnia_04 mapflag nowarpto bossnia_01 mapflag nowarp bossnia_02 mapflag nowarp bossnia_03 mapflag nowarp bossnia_04 mapflag nowarp bossnia_01 mapflag nomemo bossnia_02 mapflag nomemo bossnia_03 mapflag nomemo bossnia_04 mapflag nomemo bossnia_01 mapflag nobranch bossnia_02 mapflag nobranch bossnia_03 mapflag nobranch bossnia_04 mapflag nobranch bossnia_01 mapflag noreturn bossnia_02 mapflag noreturn bossnia_03 mapflag noreturn bossnia_04 mapflag noreturn bossnia_01 mapflag nosave SavePoint bossnia_02 mapflag nosave SavePoint bossnia_03 mapflag nosave SavePoint bossnia_04 mapflag nosave SavePoint
@pvpmode bonus exp.
in Source Support
Posted
Tranx...