Jump to content

Like it~*

Members
  • Content Count

    175
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Like it~*


  1. the files are encrypted? i'm searching for iRO.grf to edit originals hats :/

     

     

    There is no encryption at all

     

    I downloaded option 2 and when I try to open grf, all files are corrupted. Yes, I did the process more than once and with different programs. Note that there is one more complaint of the files being encrypted here on this same page.


  2. Olá.

    Hoje vim trazer um tutorial muito simples, mas que é de grande utilidade para todos, até pelo motivo de eu não ter encontrado em nenhuma comunidade PT-BR. Tive um grande trabalho para achar um tutorial que tivesse uma línguagem mais prática e funcionasse, então devido a isso decidi postar. 

     

    Utilizar multíplos iteminfo.lub/lua.

     

    Primeiro, como sabemos, os clientes mais novos estão usando itemInfo.lua / lub para substituir arquivos TXT para informações de item no lado do cliente, dentro da pasta System.

    Acho que grande parte dos criadores de servidores mais complexos, se depararam com a situação de adicionar algum(ns) item(ns) de outro RO como idRO, iRO, & jRO, KRO e sempre receber "Item desconhecido" e "Maçãs", e não saber o verdadeiro motivo causador disso, exceto ao trocar os arquivos itemInfo.lua/lub. Eis que surgiu uma solução! Vamos lá.

     

    Utilidade:  utilizar itemInfo de outros servidores oficiais, como kRO, iRO e idRO, e fazer com que aqueles possam substituir informações não existentes de outros arquivos.

    Tutorial

    - 1º Passo:

    Prepare os arquivos a ser utilizado, exemplo:

    "itemInfo_bRO.lua" - Traduzido do BRO com todos os arquivos em PT-BR.

    "itemInfo_iRO.lua" Servidor internacional iRO.

    "itemInfo_idRO.lua".

    "iteminfo_custom" - Seu iteminfo customizado, com seus itens criados.

    "itemInfo_kRO.lua" - Servidor oficial e distribuidor do jogo RO.

     

    - 2º Passo:

    Faça um arquivo .lua vazio, dê o nome "itemInfo.lua". Este será o arquivo principal para ser lido pelo cliente.
    Edite o "itemInfo.lua", e cole este código.

     

     

     

     

    main = function()
    	iiFiles = {
    		"System/itemInfo_Translation.lua", -- 1st priority
    		"System/itemInfo_iRO.lua", -- 2nd
    		"System/itemInfo_idRO.lua", -- 3rd
    		"System/itemInfo_kRO.lua", -- 4th
    	}
    
    	_TempItems = {}
    	_Num = 0
    
    	-- check existing item
    	function CheckItem(ItemID, DESC)
    		if not (_TempItems[ItemID]) then
    			_TempItems[ItemID] = DESC
    			_Num = _Num + 1
    		else
    			myTbl = {}
    			for pos,val in pairs(_TempItems[ItemID]) do
    				myTbl[pos] = val
    			end
    
    			for pos,val in pairs(DESC) do
    				if not (myTbl[pos]) or myTbl[pos] == "" then
    					myTbl[pos] = val
    				end
    
    			end
    
    			_TempItems[ItemID] = myTbl
    		end
    
    	end
    	-- end check
    
    	-- Read all files
    	for i,iiFile in pairs(iiFiles) do
    		d = dofile(iiFile)
    	end
    	-- Read all files
    
    
    	-- process _TempItems
    	for ItemID,DESC in pairs(_TempItems) do
    		--print("ItemID",ItemID,"Name",DESC.identifiedDisplayName)
    		result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
    		if not result then
    			return false, msg
    		end
    		for k,v in pairs(DESC.unidentifiedDescriptionName) do
    			result, msg = AddItemUnidentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    		for k,v in pairs(DESC.identifiedDescriptionName) do
    			result, msg = AddItemIdentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    	end
    	-- process _TempItems
    
    	_TempItems = nil
    
        return true, "good"
    end

     

     

     

     

    - 3º Passo:
    entre no arquivo criado iteminfo.lua, que foi colado o código e onde estiver essa parte
     
    main = function()
    	iiFiles = {
    		"System/itemInfo_Translation.lua", -- 1st priority
    		"System/itemInfo_iRO.lua", -- 2nd
    		"System/itemInfo_idRO.lua", -- 3rd
    		"System/itemInfo_kRO.lua", -- 4th
    	}
     

    Mude para o nome dos seus arquivos, colocando em ordem de prioridade qual arquivo deve ser lido primeiro pelo Hexed (Geralmente iniciado com o BRO). Salve e feche.

     

    - 4º Passo: 

    Em seguida, copie o arquivo e renomeie o arquivo copiado para "iteminfo.lub".

     

    - 5º Passo:

    Entre em todos seus arquivos preparados no Passo 1, e verifique se ambos começam assim:

     
    tbl = {
    ...
    }

    Caso sim, continue no mesmo arquivo e vá para o próximo passo.

     

    - 6º Passo:

    Vá até o final do arquivo e remova a função principal. Geralmente estará assim.

     

    function main()
    	for ItemID, DESC in pairs(tbl) do
    		result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
    		if not result then
    			return false, msg
    		end
    		for k, v in pairs(DESC.unidentifiedDescriptionName) do
    			result, msg = AddItemUnidentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    		for k, v in pairs(DESC.identifiedDescriptionName) do
    			result, msg = AddItemIdentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    	end
    	return true, "good"
    end

     

     

     

    Adicione ao lugar removido o seguinte código.

    for ItemID,DESC in pairs(tbl) do
    CheckItem(ItemID,DESC)
    end
     

    Fim!

    Aprecie seus novos arquivos.

    Notas e Créditos.

     

    OBS¹: Apenas traduzi um tutorial já existente, no qual vou estar deixando a fonte a baixo. Mas tive que modificar praticamente todo tutorial, então os créditos são a ambos.

    OBS²: Não irei fornecer nenhum arquivo, isto é apenas um tutorial, não me envie pm me solicitando nada.

    OBS³: todos os arquivos devem ser decompilado .lua, não compilado.

    OBS4:Se você tiver itens com ícone vazio , isso significa que sua data não tem o sprite / textura necessária ou seus arquivos itemInfo estão com o "unidentifiedResourceName" ou "identifiedResourceName" vazio ou não preenchidos. 

    Fonte: http://pservero.com/multi-iteminfo-files/


  3. Hello. I wonder if it is possible to clone the transclasses skills that had change with the arrival of the renewal, and apply the mechanical pre-renewal on a renewa server?
    Example: Storm Gust and Lord of Vermilion of Warlock reached IC (instant cast) with 150 DEX before renewal. If I clone the skills, would I apply the above pre-renewal formula? If so, how would I do it? Would I add a skill normally, as if it were a custom skill? And then would she give the player through an NPC?
    I thought about following this tutorial: http://herc.ws/wiki/Adding_new_skills
    Is there another easy way to clone skill?

     


  4. So, for each point:

     

    1- I've never tried it, I must admit it. Just change the value for integers, and change the rand. For instance, 0.1%, set 1 for success rate, and make a rand(1000) instead of a rand(100). It'll enable more lower chance.

    2- remove the dispbottom, and add a getitem for the "bad luck" item.

    3- check for the @pt[@i] value. if it's under a certain value (1, if you make a rand 1000, 10 for rand 1000...) and add an announce before the "end" command in the success section.

     

    It looks like this:

    function	script	Surp	{
    setarray @id[0], 501,502,503; //Id of the awards that can be obtained.
    setarray @qn[0], 10, 3, 1; //Quantity wins.
    setarray @pt[0], 10,5,10; //Percentage of chance to get the item. (10 = 1% - 100 = 10% - 1000 = 100%)
    
    for(set @i,0; @i < getarraysize(@id);set @i,@i+1){
    if(@pt[@i] >= rand(1000)){
    getitem @id[@i],@qn[@i];
    dispbottom "Congrats you were awarded with "+@qn[@i]+" "+getitemname(@id[@i]);
    end;
    }
    }
    getitem @id[@i],@qn[@i];
    end;
    }
    

    But it does not work. It became harder to get the items and still fails most of the time. I think it's best to do the same package. But thanks for the help!


  5. Hello, I'm trying to create a custom egg, but I'm having problems ...

    1st - I can not put numbers that are not integers. Ex: 0.1, 5.2, 4.3 etc ...

    2nd - Would like you to always win an item, regardless of the percentage. Eg: when opening the egg, the message "dispbottom" would never appear. There was no prize in this egg. ";", Since there will always be an item, the player will never open the egg and will not win anything.

    3th - Announce upon receiving an item with a low percentage eg chance of getting an item = 0.1;%, when someone received this item, was announced for every server.

     


    function script Surp {
    setarray @id[0], 501,502,503; /*  Id of the awards that can be obtained. */
    setarray @qn[0], 10, 1,1; /* Quantity wins.*/
    setarray @pt[0], 1,0.5,0.1; /*Percentage of chance to get the item. (1 = 1% - 10 = 10% - 100 = 100%) */

    for(set @i,0; @i < getarraysize(@id);set @i,@i+1){
    if(@pt[@i] >= rand(100)){
    getitem @id[@i],@qn[@i];
    dispbottom "Congrats you were awarded with "+@qn[@i]+" "+getitemname(@id[@i]);
    end;
    }
    }
    dispbottom "There was no prize in this egg..";
    end;
    }

     

    NOTE: I know you can do this for the package, but I find it easier for the function and it gets much faster.


  6. Do you already have any way to save these data(Kills, deaths and emp breaker)? Or it needs to be coded from scratch?

     

    What KDR means? Maybe Kills and Deaths Ratio?

     
    It would have to be started from the beginning. I have tested several scripts, and many do not work completely or partially ...
    Yes. KDR = Kills and Deaths Ratio or Kills and Deaths relation.

  7. Primeiro NPC

     

    O Hercules já possui um sistema de Túmulos, não entendo o que quer fazer com isso.

     

    Caso queira usar seu próprio sistema tudo bem...

     

    O evento OnTombstone está sendo chamado onde?

    Você que fez?

     

    Segundo NPC

     

    O setarray e o set antes do evento OnPCDieEvent, não irão funcionar até que o script seja executado do início (click no npc).

    O que você deve fazer é adicionar um evento para que ele configure essas variáveis, se não elas estarão vazias e o npc não fará nada.

     

    antes do setarray, coloque um OnInit:

     

    Assim elas serão definidas assim que o npc for carregado.

     

    Terceiro NPC

     

    O mesmo que o segundo npc, não há nenhum evento à ser disparado, quando os comandos agitstart() ou agitstart2() são utilizados, eles disparam eventos OnAgitInit e OnAgitInit2, antes das condições coloque as labels de evento, OnAgitInit e OnAgitInit2, desse modo:

    OnAgitInit:
    OnAgitInit2:
     if(agitcheck() == 1 || agitcheck2() == 1){
      // code...
     }
     end();

     

    Outra observação, sua comparação está incorreta, você está usando | ao invés de ||.

     

     

    Espero ter ajudado :D

     

    Olá, eu já havia conseguido resolver. Mas sua resposta foi de grande importância. muito obrigado! Abraços!


  8. Olá.

     

    Estou tentando utilizar os seguintes NPCS, e cansei de quebrar a cabeça tentando fazê-los funcionar, mas não consegui. Nenhum apresenta erro no map-server, mas não funciona

     

     

    Esse é pra criar um túmulo quando um mvp morrer.

    OBS: sistema de túmulos está ligado em conf/battle/monster

    // Utilizar ou não sistema de túmulos de MvP
    // Veja http://irowiki.org/wiki/MVP#Gravestone
    mvp_tomb_enabled: on-    script    Tumulo::TOMBSTONE    565,{
    mes "[ ^FF0000" + getmonsterinfo(atoi(strnpcinfo(2)),0) + "^000000 ]";
    mes "Sua curta vida acabou.";
    mes "Horário da Derrota : ^FF0000"+getd(".h"+strnpcinfo(3)+"")+":"+getd(".m"+strnpcinfo(3)+"")+"^000000";
    mes "Herói que derrotou o MVP";
    set .@b, (atoi(strnpcinfo(3))/ pow(10,(getstrlen(strnpcinfo(3)) - 6)));
    query_sql "SELECT `name` FROM `char` WHERE `char_id` = "+ .@b +"",.@charname$;
    mes "[^FF0000" + .@charname$ + "^000000]";
    close;
    OnTombstone:
    setd ".h"+strnpcinfo(3)+"",gettime(3);
    setd ".m"+strnpcinfo(3)+"",gettime(2);
    sleep2 10000;
    setnpcdisplay(strnpcinfo(3),565);
    end;
    } 

    Essse para teleportar o jogador ao ponto de retorno automaticamente qdo morrer.

    -    script    noress    -1,{

    setarray .mapas$,"bossnia_01"; // Adicione os mapas. ,"",""
    set .mapa_r$,"SavePoint"; // Mapa de retorno.
    OnPCDieEvent:
    for (set @i,0; @i < getarraysize(.mapas$); set @i,@i+1) {
    if (strcharinfo(3) == .mapas$) {
    sleep 1;
    warp .mapa_r$,0,0;
    }
    }
    end ();
    } 

    E esse para kickar automaticamente, quanto o comando agitstart e agitstart2 forem ligados.

    -    script    autokick    -1,{
    if (agitcheck() == 1 | agitcheck2() == 1 ) {
    dispbottom "Desabilitada em WOE!";
    mapwarp "bossnia_01","SavePoint",0,0;
    end;
    }
    } 
    • 0

     

     


  9. Hello.
     
    I would like to limit the number of job per guild. Example, a guild can only have a maximum of 5 Wizards, 5 Assassins, 5 archer, etc. Is this possible? Novices would also have to be automatically rejected so that no one enters as an novice and becomes a limited class within the guild. This would aim to balance WOE.

    It would be two scripts.

    At where:

    1 - Block and expel all guild with the amount of classes in excess.
    Example: My guild has 5 wizards, and the added leader tried to add one more. This Sixth would automatically be kicked out when entering the guild.
    2 - A check would be made in the castle of the woe, in case there were some flaw in script 1, the 2 would act by expelling the amount of excess classes automatically.

    PS: I already saw some similar script, however, it was not the amount of jobs but the total amount of clan.


  10. Use job names (example):

    Job: {
    		Swordsman: true
    		Magician: true
    		Merchant: true
    		Knight: true
    		Wizard: true
    		Blacksmith: true
    		Crusader: true
    		Rogue: true
    		Alchemist: true
    		Taekwon: true
    		Star_Gladiator: true
    		Soul_Linker: true
    		Gunslinger: true
    	}
    

    and you could check the header of item db file for a list of all the available jobs.

     

    That would not block the evolutions of each class using such equipment, right?


  11.  

    Even when it's a noble intention to share with community with different battlegrounds liked by more people, you can't avoid the fact that those are custom content and Hercules is an emulator that emulates official content (mainly from kRO).
     
    I guess it couldn't be implemented to main repository because it's custom content but, you can still share it with community through script/plugin releases.

     

    Firstly, thank you for stating your opinion. But, I believe you have misunderstood. The intention here is not to add to the official repository but to complement the hBG - BG eAmod custom plugin with the official ragnarok BGs, understand? Even why the plugin is being developed exclusively for the Hercules emulator.


  12. Sure, I don't see why official BGs can't be converted to HBG. By changing the script commands the official script uses to HBG commands, although for this project I won't be doing this.

    But feel free to donate any such implementations to my repository.

     

    I ask for everyone's help. Thank you!

     

     

    Hello guys. All right?
    I do not know if it's all known, but fortunately, Hercules is getting a conversion from BG eAmod to our emulator. However, you all know, that with this, the official BGs of Ragnarok will end up being left behind ... and that is not good. So, I thought, why not add official BGs to BG eAmod mode?
    Due to this, I come here to ask the help of all, to begin a campaign of conversion of the official BGs to the mode BG eAmod. The intention is to find people capable and willing to help, thus contributing to the entire Hercules community.
    Those interested should look to @Smoke, who is our great developer responsible for the implementation project of BG eAmod in the emulator Hercules.
     
    I ask the help of everyone to share the message with all friends, so we can reach as many people as possible, thus getting as many contributors as possible. Thank you very much for your attention.
     
    Greetings.
     
    Official repository of the Hercules emulator, where it contains official BGs that need to be converted.
     
    Official BG eAmod conversion project repository for the emulator.
    Perfil developer Smoke.
    Official project topic.

     

    http://herc.ws/board/topic/14204-campaign-of-conversion-of-the-official-bgs-to-the-mode-bg-eamod/



  13. Hello guys. All right?

    I do not know if it's all known, but fortunately, Hercules is getting a conversion from BG eAmod to our emulator. However, you all know, that with this, the official BGs of Ragnarok will end up being left behind ... and that is not good. So, I thought, why not add official BGs to BG eAmod mode?

    Due to this, I come here to ask the help of all, to begin a campaign of conversion of the official BGs to the mode BG eAmod. The intention is to find people capable and willing to help, thus contributing to the entire Hercules community.

    Those interested should look to @Smoke, who is our great developer responsible for the implementation project of BG eAmod in the emulator Hercules.

     

    I ask the help of everyone to share the message with all friends, so we can reach as many people as possible, thus getting as many contributors as possible. Thank you very much for your attention.

     

    Greetings.

     



    Official repository of the Hercules emulator, where it contains official BGs that need to be converted.



     

    Official BG eAmod conversion project repository for the emulator.


    Perfil developer Smoke.


    Official project topic.



  14. Sure, I don't see why official BGs can't be converted to HBG. By changing the script commands the official script uses to HBG commands, although for this project I won't be doing this.

    But feel free to donate any such implementations to my repository.

     

    Glad to. But unfortunately I'm not a scripter should be something very difficult for a newbie like me. Too bad you have no interest in adding them.


  15. Name: The battle

     

     

     

     

    Description:

    • The Game contains 3 teams (modifiable).
    • Each team contains 3 players (modifiable).
    • Each team has its point: return / initial, where it begins and recomposes after being killed.
    • This initial / return point would be random, ranging from 3 (modifiable).
    • Each team has a mission, which is received when entering the map.
    • Each team needs to meet its mission, where it will be subject to many things.
    • PvP will be connected at all times.
    • At death you are automatically directed to the return point.
    • The game lasts for 20 minutes.
    • Each team must score 3 points (modifiable, depending on the number of players in each team).

    How it works?

     

    There will be a npc of registration with open chat informing the amount of players entered and the amount of players needed to start the battle.By completing the number of subscribers, the battle chat would close, all players would be teleported to the battle map, where 3 teams will be formed randomly, and will be informed the mission of each team (In brodcast will appear at the top of the screen, just for the players of cda time, the name of the team that they will have to eliminate.

    Example: Your task is to delete the "Blue" group. And for the "Blue" members, the message would be: Your task is to eliminate the "Red" group and so on ...). Each team will be at its starting point / return. Then a countdown will be made (no one can move) and the battle will begin. The 20-minute count starts. The PvP will be turned on,
    And from there, players would have to hunt on the map the assigned team on the mission, this happening on the same map, while other teams also seek their respective missions (times to remove). At death you are automatically directed to the return point. When the death occurs for the hunter team (team that aims to eliminate its team), it counts a point, otherwise, no.
    It will win the first team to accomplish its mission, which is: add 3 points, defeating 3 players of the target team.
     
    Comments
     
    I tried to start the script myself based on a custom BG script from AnnieRuru, but since I'm not a programmer and much less scripter, it did not work very well. So because of this, I decided to bring the idea to the community, and also post here my initial flawed script, for anyone who knows someone who wants to contribute to the community, help us in creating the script. The script of our master AnnieRuru already has some parts (The Battle) and it sure will also help us a lot to start.
     
    My initial script. Display error on line 25

     

     

    -	script	battle#custom	-1,{
    L_Start:
    	if ( .signup_count < .min2start *2 ) end;
    	for ( .@i = 0; .@i < .signup_count; .@i++ ) {
    		if ( attachrid( .signup_aid[.@i] ) ) {
    			if ( strcharinfo(3) != strnpcinfo(4) ) { // player is no longer on this map
    				deletearray .signup_aid[.@i], 1;
    				.signup_count--;
    				.@i--;
    			}
    		}
    		else {
    			deletearray .signup_aid[.@i], 1;
    			.signup_count--;
    			.@i--;
    		}
    	}
    	if ( .start || .signup_count < .min2start *2 ) end;
    	announce "event started", bc_all;
    	.start = 1;
    	.red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" );
    	.blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" );
    	.black = createbgid( "guild_vs3", 49,15, strnpcinfo(0)+"::OnblackQuit", strnpcinfo(0)+"::OnblackDead" );
    	for ( .@i = 0; .@i < .min2start *2; .@i++ )
    		setbgid ( .@i %3 )? .red : .blue : .black, .signup_aid[.@i];
    	deletearray .signup_aid, .min2start *2;
    	.signup_count -= .min2start *2;
    	bg_warp .red, "guild_vs3", 13,50;
    	bg_warp .blue, "guild_vs3", 86,50;
    	bg_warp .black, "guild_vs3", 49,15;
    	.score[1] = .score[2] .score[3] = .startingscore;
    	bg_updatescore "guild_vs3", .score[1], .score[2], .score[3] ;
    	sleep .eventlasting * 1000;
    	if ( .start == 1 ) {
    		if ( .score[1] == .score[2] == .score[3] )
    			mapannounce "guild_vs3", "Draw !", bc_map;
    		else if ( .score[1] > .score[2] & .score[3]) {
    			mapannounce "guild_vs3", " Red side wins !", 0;
    			callsub L_reward, .red;
    		}
    		else if ( .score[1] & .score[3] < .score[2] ) {
    			mapannounce "guild_vs3", " Blue side wins !", 0;
    			callsub L_reward, .blue;
    		}
    		else if ( .score[3] > .score[2] & .score[1] ) {
    		mapannounce "guild_vs3", " Black side wins !", 0;
    		callsub L_reward, .black;
    		}
    	}
    	bg_warp .red, "prt_gld", 155,82;
    	bg_warp .blue, "prt_gld", 158,82;
    	bg_warp .black, "prt_gld", 158,82;
    	bg_destroy .red;
    	bg_destroy .blue;
    	bg_destroy .black;
    	.start = .score[1] = .score[2] = .score[3] = 0;
    	goto L_Start;
    L_Reward:
    	getbgusers getarg(0);
    	for ( .@i = 0; .@i < $@arenamembersnum; .@i++ )
    		getitem 501, 1, $@arenamembers[.@i]; // item Reward
    	return;
    OnredDead: callsub L_dead, 1;
    OnblueDead: callsub L_dead, 2;
    OnblackDead: callsub L_dead, 3;
    L_dead:
    	.score[ getarg(0) ]--;
    	bg_updatescore "guild_vs3", .score[1], .score[2] .score[3];
    	if ( !.score[ getarg(0) ] )
    		awake strnpcinfo(0);
    	sleep2 1250;
    	percentheal 100,100;
    	end;
    OnredQuit: callsub L_quit, 1, .red;
    OnblueQuit: callsub L_quit, 2, .blue;
    OnblackQuit: callsub L_quit, 3, .black;
    L_quit:
    	percentheal 100, 100;
    	if ( bg_get_data( getarg(1), 0 ) ) end;
    	.score[ getarg(0) ] = 0;
    	awake strnpcinfo(0);
    	end;
    OnInit:
    	.eventlasting = 20 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins
    	.min2start = 1; // minimum player to start. If 1vs1 (2 players to start), set to 1. If 2vs2 (4 players to start), set to 2.
    	.startingscore = 3; // score at start
    	end;
    //	setarray .rewarditem,
    //		501, 10, // reward to the winning team
    //		501, 3, // reward to the losing team
    //		501, 3; // reward to the losing team
    //	set .red_cloth, 1; // color value from red clothing
    //	set .blue_cloth, 2; // color value from blue clothing
    //	set .black_cloth, ?; // color value from black clothing
    //	end;
    	}
    
    prt_gld,174,104,5	script	Sala de entrada	100,{
    	end;
    OnInit:
    		waitingroom "Name",4, "battle#custom::L_Start", .min2start *2;
    		end;
    }
    
    guild_vs3	mapflag	battleground	2
    guild_vs3	mapflag	nosave	SavePoint
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	noteleport
    guild_vs3	mapflag	nomemo
    guild_vs3	mapflag	nopenalty
    guild_vs3	mapflag	nobranch
    guild_vs3	mapflag	noicewall
    
    function	script	rand__	{
    	.@range = getarg(0);
    	.@count = getarg(2, 0);
    	if ( !.@count || .@count > .@range )		.@count = .@range;
    	else if ( .@count > 128 )		.@count = 128;
    	while ( .@i < .@count ) {		.@r = .@save = rand( .@i, .@range -1 ) ;
    		if ( !getd( ".@tmp1_"+ .@i ) ) {			.@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r;
    			setd ".@tmp2_"+ .@i, .@r;
    			setd ".@tmp2_"+ .@save , .@i;
    			setd ".@tmp1_"+ .@save , 1;
    			set getelementofarray( getarg(1), .@i ), .@r;
    			if ( .@save < .@count )				set getelementofarray( getarg(1), .@save ), .@i;
    		}		.@i++;
    	}	return .@count;
    }
    

     

     
    AnnieRuru Script base
     

    prontera,150,153,5	script	kjdhfkdjsf	100,{
    	mes "wanna sign up";
    	if ( select( "yes", "no" ) == 2 ) close;
    	while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) .@i++;
    	if ( .@i < .signup_count ) {
    		mes "you have already sign up in this event";
    		close;
    	}
    	.signup_aid[ .signup_count ] = getcharid(3);
    	.signup_count++;
    	mes "You are now signed to the BG event";
    //	.@i = 0; // DEBUG
    //	while ( .signup_aid[.@i] ) {
    //		.@signup_name$ = .@signup_name$ +","+ rid2name( .signup_aid[.@i] );
    //		.@i++;
    //	}
    //	mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$;
    	close2;
    L_Start:
    	if ( .signup_count < .min2start *2 ) end;
    	for ( .@i = 0; .@i < .signup_count; .@i++ ) {
    		if ( attachrid( .signup_aid[.@i] ) ) {
    			if ( strcharinfo(3) != strnpcinfo(4) ) { // player is no longer on this map
    				deletearray .signup_aid[.@i], 1;
    				.signup_count--;
    				.@i--;
    			}
    		}
    		else {
    			deletearray .signup_aid[.@i], 1;
    			.signup_count--;
    			.@i--;
    		}
    	}
    	if ( .start || .signup_count < .min2start *2 ) end;
    	announce "event started", bc_all;
    	.start = 1;
    	.red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" );
    	.blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" );
    	for ( .@i = 0; .@i < .min2start *2; .@i++ )
    		setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i];
    	deletearray .signup_aid, .min2start *2;
    	.signup_count -= .min2start *2;
    	bg_warp .red, "guild_vs3", 13,50;
    	bg_warp .blue, "guild_vs3", 86,50;
    	.score[1] = .score[2] = .startingscore;
    	bg_updatescore "guild_vs3", .score[1], .score[2];
    	sleep .eventlasting * 1000;
    	if ( .start == 1 ) {
    		if ( .score[1] == .score[2] )
    			mapannounce "guild_vs3", "Draw !", bc_map;
    		else if ( .score[1] > .score[2] ) {
    			mapannounce "guild_vs3", " Red side wins !", bc_map;
    			callsub L_Reward, .red;
    		}
    		else if ( .score[1] < .score[2] ) {
    			mapannounce "guild_vs3", " Blue side wins !", bc_map;
    			callsub L_Reward, .blue;
    		}
    	}
    	bg_warp .red, "prontera", 155,182;
    	bg_warp .blue, "prontera", 158,182;
    	bg_destroy .red;
    	bg_destroy .blue;
    	.start = .score[1] = .score[2] = 0;
    	goto L_Start;
    L_Reward:
    	getbgusers getarg(0);
    	for ( .@i = 0; .@i < $@arenamembersnum; .@i++ )
    		getitem 501, 1, $@arenamembers[.@i]; // item Reward
    	return;
    OnredDead: callsub L_dead, 1;
    OnblueDead: callsub L_dead, 2;
    L_dead:
    	.score[ getarg(0) ]--;
    	bg_updatescore "guild_vs3", .score[1], .score[2];
    	if ( !.score[ getarg(0) ] )
    		awake strnpcinfo(0);
    	sleep2 1250;
    	percentheal 100,100;
    	end;
    OnredQuit: callsub L_quit, 1, .red;
    OnblueQuit: callsub L_quit, 2, .blue;
    L_quit:
    	percentheal 100, 100;
    	if ( bg_get_data( getarg(1), 0 ) ) end;
    	.score[ getarg(0) ] = 0;
    	awake strnpcinfo(0);
    	end;
    OnInit:
    	.eventlasting = 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins
    	.min2start = 1; // minimum player to start. If 1vs1 (2 players to start), set to 1. If 2vs2 (4 players to start), set to 2.
    	.startingscore = 5; // score at start
    	end;
    }
    guild_vs3	mapflag	battleground	2
    guild_vs3	mapflag	nosave	SavePoint
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	noteleport
    guild_vs3	mapflag	nomemo
    guild_vs3	mapflag	nopenalty
    guild_vs3	mapflag	nobranch
    guild_vs3	mapflag	noicewall
    
    
    function	script	rand__	{
    	.@range = getarg(0);
    	.@count = getarg(2, 0);
    	if ( !.@count || .@count > .@range )		.@count = .@range;
    	else if ( .@count > 128 )		.@count = 128;
    	while ( .@i < .@count ) {		.@r = .@save = rand( .@i, .@range -1 ) ;
    		if ( !getd( ".@tmp1_"+ .@i ) ) {			.@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r;
    			setd ".@tmp2_"+ .@i, .@r;
    			setd ".@tmp2_"+ .@save , .@i;
    			setd ".@tmp1_"+ .@save , 1;
    			set getelementofarray( getarg(1), .@i ), .@r;
    			if ( .@save < .@count )				set getelementofarray( getarg(1), .@save ), .@i;
    		}		.@i++;
    	}	return .@count;
    }
    

     

     

     


  16.  

    Problem AFK continues and News. #2

     

    https://github.com/Smokexyz/HerculesBG/issues?q=is%3Aopen+is%3Aissue

     

    @edit

     

    @Smokexyz 

     

    Would it be possible to add the official Ragnarok BGs to Hercules-BG-eAmod mode?

    Have you checked out and compiled the latest revision?

     

    Yes, I just tested again and the problem persists. Some errors are being presented on map-server also ...

    [Error]: script error in file 'npc/custom/hBG/bg_tierra_ti.txt' line 111 column
    1
    set_label: dup label
    108: end;
    109:
    110: OnTimer900000:
    
    111: OnMatchEnd:
    ^
    112: stopnpctimer;
    113: cleanmap "region_8"; // Removes all ground items
    114: donpcevent "#gti_respawn::OnBGStop";
    [Error]: quest_add: Character 150000 already has quest 8506.
    [Error]: quest_add: Character 150002 already has quest 8506.
    [Error]: quest_add: Character 150000 already has quest 8506.
    

    About the Official BGs, you forgot to reply.


  17. Could compile fine with VS15, your compiler is 5 years old you maybe should think of using a new one.

     

    Tks  :)

     

     

    --------------

    Open New Issue.

     

     

    Commit 40d08d2f8eac2387416a9f4be68b60d7cad7d7be

    Improvements in the way BGs are exited, guild information is refreshed.

    Removal of BG Skulls on exiting the BG.

    Initial implementation of BG stats. @TODO saving to database.

    Addition of @bgstart/stop commands for GMs to start and stop battlegrounds. (Credits to Vylow and Micheiru for the idea.)

    Initial implementation of BG rankings.

     

    Problem AFK continues and News. #2

    https://github.com/Smokexyz/HerculesBG/issues?q=is%3Aopen+is%3Aissue

     

    @edit

     

    @Smokexyz 

     

    Would it be possible to add the official Ragnarok BGs to Hercules-BG-eAmod mode?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.