Jump to content

Tio Akima

Members
  • Content Count

    349
  • Joined

  • Last visited

  • Days Won

    31

Posts posted by Tio Akima


  1. Hi guys

    I'm looking for information about the relationship between the weapon subtype (that the player has equipped) and the attack animation of the sprite.

    We all know the SPRITE of a class has 3 types of attack:

    attack animation 1
    
    attack animation 2 (no weapon)
    
    attack animation 3 (weapon)


    depending on the weapon (weapon subtype) the player has equipped, the sprite shows an attack.

    A murderer for example, if he is using a Katar, the animation will be the attack2, if he is using a knife, then the animation will be the attack1 ...

    Maybe this is coded on the client side ... But, maybe there is a way to manipulate this from the source, through the subtype of the weapon

     

    Does anyone have information about this?

     

    hahahaha it would be nice to be able to choose

    weapon subtype :

    enum weapon_type {
    	W_FIST,      ///< Bare hands
    	W_DAGGER,    //1
    	W_1HSWORD,   //2
    	W_2HSWORD,   //3
    	W_1HSPEAR,   //4
    	W_2HSPEAR,   //5
    	W_1HAXE,     //6
    	W_2HAXE,     //7
    	W_MACE,      //8
    	W_2HMACE,    //9 (unused)
    	W_STAFF,     //10
    	W_BOW,       //11
    	W_KNUCKLE,   //12
    	W_MUSICAL,   //13
    	W_WHIP,      //14
    	W_BOOK,      //15
    	W_KATAR,     //16
    	W_REVOLVER,  //17
    	W_RIFLE,     //18
    	W_GATLING,   //19
    	W_SHOTGUN,   //20
    	W_GRENADE,   //21
    	W_HUUMA,     //22
    	W_2HSTAFF,   //23
    #ifndef MAX_SINGLE_WEAPON_TYPE
    	MAX_SINGLE_WEAPON_TYPE,
    #endif
    	// dual-wield constants
    	W_DOUBLE_DD, ///< 2 daggers
    	W_DOUBLE_SS, ///< 2 swords
    	W_DOUBLE_AA, ///< 2 axes
    	W_DOUBLE_DS, ///< dagger + sword
    	W_DOUBLE_DA, ///< dagger + axe
    	W_DOUBLE_SA, ///< sword + axe
    #ifndef MAX_WEAPON_TYPE
    	MAX_WEAPON_TYPE,
    #endif
    };

     

     

     

     


  2. 6 hours ago, Kenpachi said:

    Hi.

     

    //members id getpartymember(getcharid(CHAR_ID_PARTY), 1);

    
    //members id
    getpartymember(getcharid(CHAR_ID_PARTY), 1);

    You have to use type 2 instead of 1 to get the account ID of all party members instead of their char IDs.
    (The getunits() command will collect the GID of found units, which is the account ID for player type units. (BL_PC))

    Additionally you should immediately save the IDs  and the member count to prevent other scripts from interfering with your data.

    // Get party data. getpartymember(getcharid(CHAR_ID_PARTY), 2); .@p_mem_cnt = $@partymembercount; copyarray(.@p_mem_aid[0], $@partymemberaid[0], .@p_mem_cnt);

    
    // Get party data.
    getpartymember(getcharid(CHAR_ID_PARTY), 2);
    .@p_mem_cnt = $@partymembercount;
    copyarray(.@p_mem_aid[0], $@partymemberaid[0], .@p_mem_cnt);


                                                                                                                                                                                                                                                                                                                                

     

    .@range= 10;

    
    .@range= 10;

    This should be 5 for a 10x10 area. When setting this to 10, your area is 20x20.

     

                                                                                                                                                                                                                                                                                                                                

     

    .@count = getunits((BL_MOB | BL_PC), .@units, -1, .@m$, max(0, .@x - .@range), max(0, .@y - .@range), .@x + .@range, .@y + .@range);

    
    .@count = getunits((BL_MOB | BL_PC), .@units, -1, .@m$, max(0, .@x - .@range), max(0, .@y - .@range), .@x + .@range, .@y + .@range);

    Any reason to get monster type units (BL_MOB), too? 😯 If you only want to heal party members you should only collect player type units (BL_PC).

    Also better use false for <limit>. -1 works, too, but is less readable.

    .@count = getunits(BL_PC, .@units, false, .@m$, max(0, .@x - .@range), max(0, .@y - .@range), .@x + .@range, .@y + .@range);

    
    .@count = getunits(BL_PC, .@units, false, .@m$, max(0, .@x - .@range), max(0, .@y - .@range), .@x + .@range, .@y + .@range);


                                                                                                                                                                                                                                                                                                                                


     

    And finally you have to add a nested loop to your loop to compare the account IDs. (Loop through found units and for each iteration loop through party members.)

    for (.@i = 0; .@i < .@count; .@i++) { dispbottom(".@units[" + .@i + "]: " + .@units[.@i]); //debug - print the user id (getunits) for (.@j = 0; .@j < .@p_mem_cnt; .@j++) { dispbottom(".@p_mem_aid[" + .@j + "]: " + .@p_mem_aid[.@j]); //debug - print the user id (getpartymember) if (.@units[.@i] == .@p_mem_aid[.@j]) { dispbottom("Party member found. Try healing!"); //debug - party member found if (attachrid(.@p_mem_aid[.@j])) { percentheal(.@porcent, .@porcent); specialeffect(310, AREA, playerattached()); } } } }

    
    for (.@i = 0; .@i < .@count; .@i++) {
    	dispbottom(".@units[" + .@i + "]: " + .@units[.@i]); //debug - print the user id (getunits)
    
    	for (.@j = 0; .@j < .@p_mem_cnt; .@j++) {
    		dispbottom(".@p_mem_aid[" + .@j + "]: " + .@p_mem_aid[.@j]); //debug - print the user id (getpartymember)
    
    		if (.@units[.@i] == .@p_mem_aid[.@j]) {
    			dispbottom("Party member found. Try healing!"); //debug - party member found
    
    			if (attachrid(.@p_mem_aid[.@j])) {
    				percentheal(.@porcent, .@porcent);
    				specialeffect(310, AREA, playerattached());
    			}
    		}
    	}
    }

     

     

    That's just a quick draft. Syntax errors are for free. 😋


    ~Kenpachi

    hahahaha very nice ken! I laughed at the free syntax errors .. hahaha delivery
    Thankssss haha ❤️ 


  3. guys, can someone help me programming this callfunc
    I'm trying to make a callfunc to use on an item
    this item should heal the player and whoever is in the group (only if they are within a 10x10 area
    I am still building, but I have a series of doubts and I am not able to get the id of the party members

     

    function    script    F_HealGroup    {
    
        //members id
        getpartymember(getcharid(CHAR_ID_PARTY), 1);
        
        .@range= 10;
        .@porcent = 50;
        
        //map coordinate
        getmapxy(.@m$,.@x,.@y,0);
    
         //get user in area 10x10
       .@count = getunits((BL_MOB | BL_PC), .@units, -1, .@m$, max(0, .@x - .@range), max(0, .@y - .@range), .@x + .@range, .@y + .@range);
        
        // for the party member
    
        for (.@i = 0; .@i < .@count; .@i++) {
            dispbottom .@units[.@i]; //debug - print the user id
            percentheal( .@porcent, .@porcent);
            specialeffect(310, AREA, .@units[.@i] );                      
        }
    
    
        return;
    }


    I tried to get the idea with getpartymember (getcharid (CHAR_ID_PARTY), 1);
    But I couldn't apply it in the code ... I also tried to use the areapercentheal ("map", x, y, x2, y2, hp, sp); but I couldn't apply it either ... Maybe it's even easier than the shape I'm trying to make.
    I'm not very good with scripts.


  4. my dispbottom stopped working on the whole server ...
    i put a printf in the clif_disp_message (to debug) ...
    he prints the message on the console normally, but does not show in game ... very strange that.
    my client is 2019 ragxeRE
    I switched to a 2018 client ... and the device still doesn't work ...
    Does anyone have any idea what could be happening?
    what may be causing this error.

     

    I didn't edit clif_disp_message or dispbottom (in script.c)
    the functions are original

     

     

    @EDIT kenpachi and dastgir solved! topic closed! 


  5. guys, i'm having that bug where the monster doesn't disappear when dying.

    I researched and found a topic (from 2015) talking about the subject, but I couldn't find the solution.
    Does anyone have information about this error?

    (I will recently change #define MAX_EVENTQUEUE 2 to higher values ... maybe it has something to do with the bug)

     

    (topic on the subject here)

     

    bug print:

    u0s2KEr.png


  6. 1 hour ago, Cretino said:

    I made some changes, now is working fine.

     

    OnPCDieEvent part:

      Reveal hidden contents

    OnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ ARENA_CHECK: if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { deletearray(.@units); .@count = getunits(BL_PC, .@units, false, "fight_05"); if (.@count == 1) { if (attachrid(.@units[0])) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } } end;

    
    
    OnPCDieEvent:
    
    	getmapxy(.@mapa$,.@xi,.@yi,0);
    	
    	if($arenaon){
    	
    		if(strcharinfo(3) == "fight_05" ) {
    			announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all;
    			$@qnton--;
    			sleep2 2000;
    			warp "kame_house",174,177;
    		}
    
    		if(.@mapa$ == "fight_05"){
    ARENA_CHECK:
    			if($@qnton < 1){
    				announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all;
    				donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    				end;
    			}
    				
    			if($@qnton == 2){
    				announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all;
    				end;
    			}
    
    			if($@qnton == 1)
    			{
    				if (isloggedin(killerrid))
    				{
    					if (attachrid(killerrid))
    					{
    						doevent strnpcinfo(0)+"::OnArenaPremio";
    						end;
    					}
    					else
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    						end;
    					}
    				}
    				else
    				{
    					deletearray(.@units);
    					.@count = getunits(BL_PC, .@units, false, "fight_05");
    
    					if (.@count == 1)
    					{
    						if (attachrid(.@units[0]))
    						{
    							doevent strnpcinfo(0)+"::OnArenaPremio";
    							end;
    						}
    						else
    						{
    							donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    							end;
    						}
    					}
    					else
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    						end;
    					}
    				}
    			}
    		}
    	}
    	
    end;

     

     

    OnPCLogoutEvent part:

      Reveal hidden contents

    OnPCLogoutEvent: if (strcharinfo(PC_MAP) == "fight_05" && @enter_arena == true) { @enter_arena = false; if ($arenaon && !$aberto) { announce "[Arena da Destruição]: "+strcharinfo(0)+" fugiu da batalha!",bc_all; $@qnton--; warp "kame_house",174,177; goto ARENA_CHECK; } } end;

    
    
    OnPCLogoutEvent:
    	if (strcharinfo(PC_MAP) == "fight_05" && @enter_arena == true)
    	{
    		@enter_arena = false;
    
    		if ($arenaon && !$aberto)
    		{
    			announce "[Arena da Destruição]: "+strcharinfo(0)+" fugiu da batalha!",bc_all;
    
    			$@qnton--;
    
    			warp "kame_house",174,177;
    			goto ARENA_CHECK;
    		}
    	}
    end;

     

     

    thanks Cretino. it's perfect! thanks for your help.


  7. 1 hour ago, Cretino said:

    'getmapusers' only will count a 'dead player' if he still in the map... but you already added this:

      Hide contents

    if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; }

    
    
    		if(strcharinfo(3) == "fight_05" ) {
    			announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all;
    			$@qnton--;
    			sleep2 2000;
    			warp "kame_house",174,177;
    		}

     

    When a player die, it send back to 'kame_house',

     

    Now about the the quit players you can do this:

    Add:

      Hide contents

    OnPCLogoutEvent: if (strcharinfo(PC_MAP) == "fight_05" && @enter_arena == true) { announce "[Arena da Destruição]: "+strcharinfo(0)+" fugiu da batalha!",bc_all; @enter_arena = false; $@qnton--; sleep2 2000; warp "kame_house",174,177; goto OnArenaEvntCheck; } end;

    
    
    OnPCLogoutEvent:
    	if (strcharinfo(PC_MAP) == "fight_05" && @enter_arena == true)
    	{
    		announce "[Arena da Destruição]: "+strcharinfo(0)+" fugiu da batalha!",bc_all;
    
    		@enter_arena = false;
    		$@qnton--;
    
    		sleep2 2000;
    		warp "kame_house",174,177;
    		goto OnArenaEvntCheck;
    	}
    end;

     

     

    And change these:

     

    OnPCDieEvent part:

      Reveal hidden contents

    OnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ OnArenaEvntCheck: if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { deletearray(.@units); .@count = getunits(BL_PC, .@units, false, "fight_05"); if (.@count == 1) { if (attachrid(.@units[0])) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } } end;

    
    
    OnPCDieEvent:
    
    	getmapxy(.@mapa$,.@xi,.@yi,0);
    	
    	if($arenaon){
    	
    		if(strcharinfo(3) == "fight_05" ) {
    			announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all;
    			$@qnton--;
    			sleep2 2000;
    			warp "kame_house",174,177;
    		}
    
    		if(.@mapa$ == "fight_05"){
    OnArenaEvntCheck:
    			if($@qnton < 1){
    				announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all;
    				donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    				end;
    			}
    				
    			if($@qnton == 2){
    				announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all;
    				end;
    			}
    
    			if($@qnton == 1)
    			{
    				if (isloggedin(killerrid))
    				{
    					if (attachrid(killerrid))
    					{
    						doevent strnpcinfo(0)+"::OnArenaPremio";
    						end;
    					}
    					else
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    						end;
    					}
    				}
    				else
    				{
    					deletearray(.@units);
    					.@count = getunits(BL_PC, .@units, false, "fight_05");
    
    					if (.@count == 1)
    					{
    						if (attachrid(.@units[0]))
    						{
    							doevent strnpcinfo(0)+"::OnArenaPremio";
    							end;
    						}
    						else
    						{
    							donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    							end;
    						}
    					}
    					else
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    						end;
    					}
    				}
    			}
    		}
    	}
    	
    end;

     

     

    Enter arena part:

      Reveal hidden contents

    entrar: announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all; percentheal 100,100; @enter_arena = true; warp "fight_05",0,0; end;

    
    
    entrar:
    	announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all;
    	percentheal 100,100;
    	@enter_arena = true;
    	warp "fight_05",0,0;
    end;

     

     

    I think is it, not tested.

    oh nice... I tested it with OnPCLogoutEvent:
    but... he warned that the player gave up, but did not trigger the label OnArenaEvntCheck; LOL
     

    he stopped for here:

    FeI0wNZ.png


  8. 2 hours ago, Cretino said:

    I made a little mistake, now is tested and working:

      Reveal hidden contents

    //===== Arena de Combate ========================================== kame_house,196,151,3 script [RR] Tenente 4_EP16_STOLZ,{ mes $npc$; mes "Olá "+strcharinfo(0)+"!"; mes "Deseja entrar na Arena de Combate da Destruição?"; next; switch(select("Entrar:Informações:Não, obrigado")){ case 1: mes $npc$; if($aberto == 1) goto entrar; if($aberto == 0) mes "As porta para a Arena de Combate estão fechadas. Evento abre a cada 3 horas..."; close; end; case 2: mes $npc$; mes "Na Arena de Combate nós testaremos sua força."; mes "Você ira para uma arena onde terá uma guerra, o ultimo(a) player sobrevivente será o vencedor."; mes "Lembrando que, não é fácil. Por isso, prepare-se bem."; mes "Não será permitido o uso de poções e iteus consumiveis que abram vantagens."; mes "Caso você sejá o ultimo sobrevivente da Arena de Combate, você será recompensado!"; close; case 3: close; end; } OnArenaEvnt: if($aberto == 0){ donpcevent strnpcinfo(0)+"::OnArenaEvnt2"; } else { dispbottom "Evento Cancelado!"; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; //======================================================= init config's OnInit: $npc$ = "[ ^FF0000Red Rebbon^000000 ] ^9400D3 Tenente^000000 "; //nome npc bindatcmd "goarena",strnpcinfo(0)+"::OnArenaEvnt",99; waitingroom "Arena da Destruição",0; $@MaxMin = 1; // Minutos max pro jogador entrar na arena $@award = 1002; //id award end; //======================================================= end init entrar: announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all; percentheal 100,100; warp "fight_05",0,0; end; OnArenaEvnt2: // Abre-Inicia A ARENA announce "[Arena de Combate] Arena da Destruição está ABERTA!",0; set $aberto,1; //evento aberto para os player entrar set $arenaon,1; pvpoff "fight_05"; for(.@i = $@MaxMin; .@i > 0; .@i--) { announce "Arena da Desrtuição começará em " + .@i + " minutos!", 0; sleep 60000; } announce "[Arena de Combate] Arena da Destruição COMEÇOU!",0; //fecha o evento para não entrar mais ninguem set $aberto,0; //liga o pvp pvpon "fight_05"; set $@qnton,getmapusers("fight_05"); //pega a quantidade de usuarios que tem no mapa if($@qnton < 2){ announce "[Arena de Combate] Arena da Destruição foi encerrada por falta de lutadores!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; OnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } end; OnArenaEvntOff: //fecha o evento set $arenaon,0; set $aberto,0; //desliga o pvp pvpoff "fight_05"; announce "[Arena da Destruição] Arena finalizada!", 0; mapwarp "fight_05","kame_house",174,177; end; OnArenaPremio: announce "[Arena da Destruição]: ACABOU! O ganhador da Arena da Destruição foi " + strcharinfo(0) + "!",bc_all; sleep2 2000; mapannounce "fight_05", "Parabéns! Você é o grande vencedor!", 0; getitem $@award, 1; //entrega o premio sleep2 1000; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; //closed event end; } //////////////////////////////////////// fight_05 mapflag nowarp fight_05 mapflag nowarpto fight_05 mapflag noteleport fight_05 mapflag nosave SavePoint fight_05 mapflag nomemo fight_05 mapflag nobranch fight_05 mapflag nopenalty fight_05 mapflag nostorage fight_05 mapflag pvp_noparty fight_05 mapflag pvp_noguild ////////////////////////////////////////

    
    
    //===== Arena de Combate ==========================================
    
    kame_house,196,151,3	script	[RR] Tenente	4_EP16_STOLZ,{
    
    	mes $npc$;
    	mes "Olá "+strcharinfo(0)+"!";
    	mes "Deseja entrar na Arena de Combate da Destruição?";
    	next;
    	
    switch(select("Entrar:Informações:Não, obrigado")){
    
    	case 1:
    		mes $npc$;
    		if($aberto == 1) goto entrar;
    		if($aberto == 0) mes "As porta para a Arena de Combate estão fechadas. Evento abre a cada 3 horas...";
    		close;
    		end;
    	case 2:
    		mes $npc$;
    		mes "Na Arena de Combate nós testaremos sua força.";
    		mes "Você ira para uma arena onde terá uma guerra, o ultimo(a) player sobrevivente será o vencedor.";
    		mes "Lembrando que, não é fácil. Por isso, prepare-se bem.";
    		mes "Não será permitido o uso de poções e iteus consumiveis que abram vantagens.";
    		mes "Caso você sejá o ultimo sobrevivente da Arena de Combate, você será recompensado!";
    		close;
    	case 3: 
    		close;
    end;
    
    }
    
    
    OnArenaEvnt: if($aberto == 0){ donpcevent strnpcinfo(0)+"::OnArenaEvnt2"; } else { dispbottom "Evento Cancelado!"; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end;
    
    
    //======================================================= init config's
    OnInit:
    	
    	$npc$ = "[ ^FF0000Red Rebbon^000000 ] ^9400D3 Tenente^000000 ";	//nome npc
    
    	bindatcmd "goarena",strnpcinfo(0)+"::OnArenaEvnt",99;
    
    	waitingroom "Arena da Destruição",0;
    	
    	$@MaxMin = 1;						// Minutos max pro jogador entrar na arena
    	
    	$@award = 1002;					//id award
    
    end;
    //======================================================= end init
    
    
    entrar:
    	announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all;
    	percentheal 100,100;
    	warp "fight_05",0,0;
    end;
    
    
    OnArenaEvnt2:		// Abre-Inicia  A ARENA
    
    	announce "[Arena de Combate] Arena da Destruição está ABERTA!",0;
    	set $aberto,1;	//evento aberto para os player entrar
    	set $arenaon,1;
    	pvpoff "fight_05";
    
    	for(.@i = $@MaxMin; .@i  > 0; .@i--)
    	{
    		announce "Arena da Desrtuição começará em " + .@i + " minutos!", 0;
    		sleep 60000;
    	}
    
    	announce "[Arena de Combate] Arena da Destruição COMEÇOU!",0;
    	
    	//fecha o evento para não entrar mais ninguem
    	set $aberto,0;
    	
    	//liga o pvp
    	pvpon "fight_05";
    	
    	
    	set $@qnton,getmapusers("fight_05"); //pega a quantidade de usuarios que tem no mapa
    
    	if($@qnton < 2){
    	
    		announce "[Arena de Combate] Arena da Destruição foi encerrada por falta de lutadores!",bc_all;
    		donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    
    	}
    	
    end;
    
    
    OnPCDieEvent:
    
    	getmapxy(.@mapa$,.@xi,.@yi,0);
    	
    	if($arenaon){
    	
    		if(strcharinfo(3) == "fight_05" ) {
    			announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all;
    			$@qnton--;
    			sleep2 2000;
    			warp "kame_house",174,177;
    		}
    		
    		if(.@mapa$ == "fight_05"){
    			
    			if($@qnton < 1){
    				announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all;
    				donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    				end;
    			}
    				
    			if($@qnton == 2){
    				announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all;
    				end;
    			}
    
    			if($@qnton == 1)
    			{
    				if (isloggedin(killerrid))
    				{
    					if (attachrid(killerrid))
    					{
    						doevent strnpcinfo(0)+"::OnArenaPremio";
    						end;
    					}
    					else
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    						end;
    					}
    				}
    				else
    				{
    					donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    					end;
    				}
    			}
    		}
    	}
    	
    end;
    
    OnArenaEvntOff:
    
    	//fecha o evento
    	set $arenaon,0;
    	set $aberto,0;
    	
    	//desliga o pvp
    	pvpoff "fight_05";
    
    	announce "[Arena da Destruição] Arena finalizada!", 0;
    	mapwarp "fight_05","kame_house",174,177;
    
    end;
    
    OnArenaPremio:
    	
    	announce "[Arena da Destruição]: ACABOU! O ganhador da Arena da Destruição foi " + strcharinfo(0) + "!",bc_all;
    	sleep2 2000;
    	mapannounce "fight_05", "Parabéns! Você é o grande vencedor!", 0;
    	
    	getitem $@award, 1;	//entrega o premio
    	
    	sleep2 1000;
    	donpcevent strnpcinfo(0)+"::OnArenaEvntOff";	//closed event
    
    end;
    
    
    
    }
    
    
    
    
    
    
    ////////////////////////////////////////
    
    fight_05	mapflag	nowarp
    fight_05	mapflag	nowarpto
    fight_05	mapflag	noteleport
    fight_05	mapflag	nosave	SavePoint
    fight_05	mapflag	nomemo
    fight_05	mapflag	nobranch
    fight_05	mapflag	nopenalty
    fight_05	mapflag	nostorage
    fight_05	mapflag	pvp_noparty
    fight_05	mapflag	pvp_noguild
    
    ////////////////////////////////////////

     

     

    yeah, now it's great. LOL
    Thanks for your help.
    do you think the logic used to decremented the variable when a player dies, is good?
    Because I just thought about a future error ... if a player quits, the variable will not be decremented, and this can cause a failure.

    I thought about using "getmapusers" but, maybe he can make a mistake in counting, if he also counts the dead player on the map.  o/


  9. 26 minutes ago, Cretino said:

    Not tested, but I think now is working fine.

      Reveal hidden contents

    //===== Arena de Combate ========================================== kame_house,196,151,3 script [RR] Tenente 4_EP16_STOLZ,{ mes $npc$; mes "Olá "+strcharinfo(0)+"!"; mes "Deseja entrar na Arena de Combate da Destruição?"; next; switch(select("Entrar:Informações:Não, obrigado")){ case 1: mes $npc$; if($aberto == 1) goto entrar; if($aberto == 0) mes "As porta para a Arena de Combate estão fechadas. Evento abre a cada 3 horas..."; close; end; case 2: mes $npc$; mes "Na Arena de Combate nós testaremos sua força."; mes "Você ira para uma arena onde terá uma guerra, o ultimo(a) player sobrevivente será o vencedor."; mes "Lembrando que, não é fácil. Por isso, prepare-se bem."; mes "Não será permitido o uso de poções e iteus consumiveis que abram vantagens."; mes "Caso você sejá o ultimo sobrevivente da Arena de Combate, você será recompensado!"; close; case 3: close; end; } OnArenaEvnt: if($aberto == 0){ donpcevent strnpcinfo(0)+"::OnArenaEvnt2"; } else { dispbottom "Evento Cancelado!"; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; //======================================================= init config's OnInit: $npc$ = "[ ^FF0000Red Rebbon^000000 ] ^9400D3 Tenente^000000 "; //nome npc bindatcmd "goarena",strnpcinfo(0)+"::OnArenaEvnt",99; waitingroom "Arena da Destruição",0; $@MaxMin = 1; // Minutos max pro jogador entrar na arena $@award = 1002; //id award end; //======================================================= end init entrar: announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all; percentheal 100,100; warp "fight_05",0,0; end; OnArenaEvnt2: // Abre-Inicia A ARENA announce "[Arena de Combate] Arena da Destruição está ABERTA!",0; set $aberto,1; //evento aberto para os player entrar set $arenaon,1; pvpoff "fight_05"; for(.@i = $@MaxMin; .@i > 0; .@i--) { announce "Arena da Desrtuição começará em " + .@i + " minutos!", 0; sleep 60000; } announce "[Arena de Combate] Arena da Destruição COMEÇOU!",0; //fecha o evento para não entrar mais ninguem set $aberto,0; //liga o pvp pvpon "fight_05"; set $@qnton,getmapusers("fight_05"); //pega a quantidade de usuarios que tem no mapa if($@qnton < 2){ announce "[Arena de Combate] Arena da Destruição foi encerrada por falta de lutadores!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; OnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { donpcevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } end; OnArenaEvntOff: //fecha o evento set $arenaon,0; set $aberto,0; //desliga o pvp pvpoff "fight_05"; announce "[Arena da Destruição] Arena finalizada!", 0; mapwarp "fight_05","kame_house",174,177; end; OnArenaPremio: announce "[Arena da Destruição]: ACABOU! O ganhador da Arena da Destruição foi " + strcharinfo(0) + "!",bc_all; sleep2 2000; mapannounce "fight_05", "Parabéns! Você é o grande vencedor!", 0; getitem $@award; //entrega o premio sleep2 1000; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; //closed event end; } //////////////////////////////////////// fight_05 mapflag nowarp fight_05 mapflag nowarpto fight_05 mapflag noteleport fight_05 mapflag nosave SavePoint fight_05 mapflag nomemo fight_05 mapflag nobranch fight_05 mapflag nopenalty fight_05 mapflag nostorage fight_05 mapflag pvp_noparty fight_05 mapflag pvp_noguild ////////////////////////////////////////

    
    
    //===== Arena de Combate ==========================================
    
    kame_house,196,151,3	script	[RR] Tenente	4_EP16_STOLZ,{
    
    	mes $npc$;
    	mes "Olá "+strcharinfo(0)+"!";
    	mes "Deseja entrar na Arena de Combate da Destruição?";
    	next;
    	
    switch(select("Entrar:Informações:Não, obrigado")){
    
    	case 1:
    		mes $npc$;
    		if($aberto == 1) goto entrar;
    		if($aberto == 0) mes "As porta para a Arena de Combate estão fechadas. Evento abre a cada 3 horas...";
    		close;
    		end;
    	case 2:
    		mes $npc$;
    		mes "Na Arena de Combate nós testaremos sua força.";
    		mes "Você ira para uma arena onde terá uma guerra, o ultimo(a) player sobrevivente será o vencedor.";
    		mes "Lembrando que, não é fácil. Por isso, prepare-se bem.";
    		mes "Não será permitido o uso de poções e iteus consumiveis que abram vantagens.";
    		mes "Caso você sejá o ultimo sobrevivente da Arena de Combate, você será recompensado!";
    		close;
    	case 3: 
    		close;
    end;
    
    }
    
    
    OnArenaEvnt: if($aberto == 0){ donpcevent strnpcinfo(0)+"::OnArenaEvnt2"; } else { dispbottom "Evento Cancelado!"; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end;
    
    
    //======================================================= init config's
    OnInit:
    	
    	$npc$ = "[ ^FF0000Red Rebbon^000000 ] ^9400D3 Tenente^000000 ";	//nome npc
    
    	bindatcmd "goarena",strnpcinfo(0)+"::OnArenaEvnt",99;
    
    	waitingroom "Arena da Destruição",0;
    	
    	$@MaxMin = 1;						// Minutos max pro jogador entrar na arena
    	
    	$@award = 1002;					//id award
    
    end;
    //======================================================= end init
    
    
    entrar:
    	announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all;
    	percentheal 100,100;
    	warp "fight_05",0,0;
    end;
    
    
    OnArenaEvnt2:		// Abre-Inicia  A ARENA
    
    	announce "[Arena de Combate] Arena da Destruição está ABERTA!",0;
    	set $aberto,1;	//evento aberto para os player entrar
    	set $arenaon,1;
    	pvpoff "fight_05";
    
    	for(.@i = $@MaxMin; .@i  > 0; .@i--)
    	{
    		announce "Arena da Desrtuição começará em " + .@i + " minutos!", 0;
    		sleep 60000;
    	}
    
    	announce "[Arena de Combate] Arena da Destruição COMEÇOU!",0;
    	
    	//fecha o evento para não entrar mais ninguem
    	set $aberto,0;
    	
    	//liga o pvp
    	pvpon "fight_05";
    	
    	
    	set $@qnton,getmapusers("fight_05"); //pega a quantidade de usuarios que tem no mapa
    
    	if($@qnton < 2){
    	
    		announce "[Arena de Combate] Arena da Destruição foi encerrada por falta de lutadores!",bc_all;
    		donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    
    	}
    	
    end;
    
    
    OnPCDieEvent:
    
    	getmapxy(.@mapa$,.@xi,.@yi,0);
    	
    	if($arenaon){
    	
    		if(strcharinfo(3) == "fight_05" ) {
    			announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all;
    			$@qnton--;
    			sleep2 2000;
    			warp "kame_house",174,177;
    		}
    		
    		if(.@mapa$ == "fight_05"){
    			
    			if($@qnton < 1){
    				announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all;
    				donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    				end;
    			}
    				
    			if($@qnton == 2){
    				announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all;
    				end;
    			}
    
    			if($@qnton == 1)
    			{
    				if (isloggedin(killerrid))
    				{
    					if (attachrid(killerrid))
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaPremio";
    						end;
    					}
    					else
    					{
    						donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    						end;
    					}
    				}
    				else
    				{
    					donpcevent strnpcinfo(0)+"::OnArenaEvntOff";
    					end;
    				}
    			}
    		}
    	}
    	
    end;
    
    OnArenaEvntOff:
    
    	//fecha o evento
    	set $arenaon,0;
    	set $aberto,0;
    	
    	//desliga o pvp
    	pvpoff "fight_05";
    
    	announce "[Arena da Destruição] Arena finalizada!", 0;
    	mapwarp "fight_05","kame_house",174,177;
    
    end;
    
    
    OnArenaPremio:
    	
    	announce "[Arena da Destruição]: ACABOU! O ganhador da Arena da Destruição foi " + strcharinfo(0) + "!",bc_all;
    	sleep2 2000;
    	mapannounce "fight_05", "Parabéns! Você é o grande vencedor!", 0;
    	
    	getitem $@award;	//entrega o premio
    	
    	sleep2 1000;
    	donpcevent strnpcinfo(0)+"::OnArenaEvntOff";	//closed event
    
    end;
    
    
    
    }
    
    
    
    
    
    
    ////////////////////////////////////////
    
    fight_05	mapflag	nowarp
    fight_05	mapflag	nowarpto
    fight_05	mapflag	noteleport
    fight_05	mapflag	nosave	SavePoint
    fight_05	mapflag	nomemo
    fight_05	mapflag	nobranch
    fight_05	mapflag	nopenalty
    fight_05	mapflag	nostorage
    fight_05	mapflag	pvp_noparty
    fight_05	mapflag	pvp_noguild
    
    ////////////////////////////////////////

     

     

     

    hi Cretino, Thanks for the answer..
    I did a test with two fighters ... And when one of them dies, the prize label is not triggered.
    the console error

    [Error]: script_rid2sd: fatal error ! player not attached!
    [Debug]: Function: strcharinfo (1 parameter):
    [Debug]: Data: number value=0


  10. 12983344170162.png

    RPD-newprint-08b.png

     

    Hi ... I've finished a series of maps recently, inspired by a horror story theme. The main map is a modern city,
    freely inspired by Raccon City (RE)
    with classic places such as the famous Mansion of RE1 and also the raccon city police station.
    A map made for RO, but the idea was to remove all the medieval elements, to maintain a modern aesthetic, to approach our present world.


    I've posted here the city and also the mansion ...
    I recently finished the police department

     

     RPD - Raccoon City Police Department

     

    rpd-01.jpg

     

    B01

    rpd-b01.png

     

    first floor with several rooms

     

     

    RPD-b1-newprint-06.png

     

    RPD-b1-newprint-05.png

     

    RPD-b1-newprint-04.png

     

    RPD-b1-newprint-03.png

     

    RPD-b1-newprint-02.png

     

    RPD-b1-newprint-01.png

     

    rpd-03.jpg

     

     

    B02

    rpd-b02.png

     

    second floor with several other rooms

     

    RPD-newprint-02.png

     

     

    RPD-newprint-03.png

     

     

    RPD-newprint-04.png

     

     

    RPD-newprint-05.png

     

    RPD-newprint-06.png

     

    RPD-newprint-09.png

     

    RPD-newprint-10.png

     

    RPD-newprint-11.png

     

     

    RPD-newprint-12.png

     

     

    Now there are 3 huge maps
    The city, the mansion and the police department

     

    36345049-zombies-wallpaper.jpg

    RPD

    RPD-newprint-01.png

    MANSION

    mansion-hall02.png

    CITY

    Survival-city-02.png

     

    Zombie-Background-Images-0282.png

     

    Survival-city-01.png

     

     

     


  11. Hi
    I wanted to do a Barter shop

    however, in the same npc, put a menu for the player to choose which Barter shop he wants to enter ....
    How can I do this?

     

    exmp:
     

    switch(select("- Shop 1:- Shop 2:- Shop 3:- not..thanks.."))
    {
    
            case 1: 
            callshop " Shop 1",1;
            end;
    
            case 2: 
            callshop " Shop 2",1;
            end;
    
            case 3: 
            callshop " Shop 3",1;
            end;
    
            case 4: 
            end;
    
    }
    
    OnInit: {
                sellitem White_Herb, 100, Red_Potion, 2;
                sellitem Blue_Herb, 200, Red_Potion, 3;
                sellitem Green_Herb, 100, Red_Potion, 4;
                sellitem White_Herb, 100, Red_Potion, 1;
                 end;
                            
        }

    How to call Barter shop and separate items in shop ?

    it's possible?

     


  12. On 2/11/2020 at 3:57 AM, Kenpachi said:

    Hi.

     

    Maybe a little bit late, but...

    You can disguise a player with the changelook() script command. Just use an item's OnEquipScript/OnUnequipScript.

    An example to disguise the player as Swordman when equipping Hat.

    { Id: 2220 AegisName: "Hat" Name: "Hat" Type: "IT_ARMOR" Buy: 1000 Weight: 200 Def: 2 Loc: "EQP_HEAD_TOP" ViewSprite: 16 OnEquipScript: <" changelook(LOOK_BASE, Job_Swordman); "> OnUnequipScript: <" changelook(LOOK_BASE, Class); "> }

    
    {
    	Id: 2220
    	AegisName: "Hat"
    	Name: "Hat"
    	Type: "IT_ARMOR"
    	Buy: 1000
    	Weight: 200
    	Def: 2
    	Loc: "EQP_HEAD_TOP"
    	ViewSprite: 16
    	OnEquipScript: <" changelook(LOOK_BASE, Job_Swordman); ">
    	OnUnequipScript: <" changelook(LOOK_BASE, Class); ">
    }

    But this works only with jobs. If you have custom body sprites, you have to add them as new jobs.

     

     

    ~Kenpachi

    oh, thanks for answering kenpachi ...
    It is a pity, as this greatly limits the use of this resource.
    You can exchange only for the clothes of the classes.

    I wanted to understand how a Dreesroom works, as it exchanges a sprite of the class for another sprite of the same class ...
    Body Sprite A and Body B Sprite

    2 different body for each renewal class

     

    it may be possible to add more options besides A and B
    And it may also be possible to do this using item

     

    I don't know ... I'm just thinking about logic


  13. Guys, can someone help me with an idea
    I made an NPC with some missions and that creates an instance
    In one of the missions the player needs to use a certain skill an amount "x" on a given map (in the instance)

     

    example: Use Stormgust 50 times


    So, I'm thinking about how to make this count
    Does anyone have any ideas?
    I've been thinking about on that NPC who tests the damage on Imperium, I don't know ...


  14. 16 hours ago, meko said:

    It's IOT_CHAR, not IM_CHAR

    .@char = getcharid(CHAR_ID_CHAR); .@account = getcharid(CHAR_ID_ACCOUNT); .@map_name$ = "mapname"; // the map you want to instance .@instance_name$ = sprintf("%s@%i%d", .@map_name$, .@char, gettime(GETTIME_SECOND)); // a unique name for your instance .@instance = instance_create(.@instance_name$, .@account, IOT_CHAR); // create the instance and attach it to the char .@instanced_map_name$ = sprintf("%s@%i", .@map_name$, .@instance); // a unique name for the instanced map .@map$ = instance_attachmap(.@map_name$, .@instance, false, .@instanced_map_name$); // attach the instanced map to your instance instance_timeout(600, 1, .@instance); // alive and idle timeout, in seconds // setup is ready so init the instance and warp the player instance_init(.@instance); warpchar(.@map$, 20, 20, .@char); // the (x,y) starting point

    
    .@char = getcharid(CHAR_ID_CHAR);
    .@account = getcharid(CHAR_ID_ACCOUNT);
    .@map_name$ = "mapname"; // the map you want to instance
    .@instance_name$ = sprintf("%s@%i%d", .@map_name$, .@char, gettime(GETTIME_SECOND)); // a unique name for your instance
    .@instance = instance_create(.@instance_name$, .@account, IOT_CHAR); // create the instance and attach it to the char
    .@instanced_map_name$ = sprintf("%s@%i", .@map_name$, .@instance); // a unique name for the instanced map
    .@map$ = instance_attachmap(.@map_name$, .@instance, false, .@instanced_map_name$); // attach the instanced map to your instance
    instance_timeout(600, 1, .@instance); // alive and idle timeout, in seconds
    
    // setup is ready so init the instance and warp the player
    instance_init(.@instance);
    warpchar(.@map$, 20, 20, .@char); // the (x,y) starting point

     

    oh nice!!! thanks Meko 
    Solved


  15. [ Create instance for just one player ]

     

    guys

     

    I created an npc with several quests and that creates an instance and teleports the player to the map ...

    Everything works normal if the player has a group, but if I attach the instance to the player it does not teleport.

     

    IM_NONE: Attached to no one.  

    IM_CHAR: Attached to a single character.  

    IM_PARTY: Attached to a party (default instance mode).  

    IM_GUILD: Attached to a guild.  

    IM_CLAN: Attached to a clan.

     

    It creates the instance, however when attaching the instance in the player (and not in the group) the script does not execute the instance_enter Is it possible to do that?

    attach only one player? (without being in a group)


  16. 10 hours ago, Ridley said:

    There is a limit in polygons, I just can't remember the exact amount. You need to split it into smaller parts and then puzzle it together.

    ok Ridley, thanks, i will divide them into smaller parts. I think this will be the only solution. Thanks.

     

    5 hours ago, Naruto said:

    glue all the models together using the weld or merge option in your 3d modeler

     

    then wrap them all on the same texture

     

    thats 1 polygon 

    sorry, but you have no idea what was asked in the post. it doesn't make any sense to "merge" or "weld" my models of 60k polygon.

    hugs


  17. On 1/14/2020 at 5:15 PM, Naruto said:

     

    Yeah thats easy pokerag does it one their custom bodies

     

    its just a matter of this.... 

    giphy.gif

     

    dunno why iro never made shoulder pad spikes and stuff, I guess making costumes for 1 specific job is tough when everyone kinda has a different body shape like how the dancer has her hand on her hips and stuff 

    I didn't understand your answer
    and I also didn't understand the giff.


  18. What is the limit of polygons in a model?

    Is there a limit of polygons per map?


    I have 3 models with 60k polygons each ... And the client is not working (client 2019)
    it crashes when trying to display the models.

    I used the proOptmize modifier, but it still didn't work.

     

    Are there any other customer restrictions regarding 3D models other than polygons?

×
×
  • Create New...

Important Information

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