Jump to content

sader1992

Content Moderator
  • Posts

    1691
  • Joined

  • Last visited

  • Days Won

    78

Posts posted by sader1992

  1. also you can just redirect to the npc instead of using a duplicate

    for example:

    prontera,263,209,6	duplicate(Deathmatch PvP Warper)	DM PvP Warper#prt02	823

    to

    prontera,263,209,6	script	DM PvP Warper#prt02	823,{ doevent("Deathmatch PvP Warper:OnTalk"); }

    and add OnTalk: at the start of the original npc

    • Upvote 1
    • Love 1
  2. On 4/12/2022 at 3:02 PM, Hitman Monkey said:

    wow! what a  information, this is some high level information right there... thank you for your suggestion, we dont know that we can use search engine what a surprise, thanks capt. obvious!!! wish you goodluck.

    well, you posted your topic in the forum issues section , so i think his assumption that you don't know how to use the search engine is reasonable ?

    • Upvote 2
  3. add

    if(playerattached())

    before

    announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;

    like this

    if(playerattached()) announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;

     

    or just remove

    announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;

    because as I see there is no place calling the OnStop event while a character is attached.

  4. 7 hours ago, AinsLord said:

    im using this sir @sader1992 at 1st it was working fine then several days after when i tried to put options after selecting

    proceed this happens it hangs cant move cant even TP nor chat i need to reboot the whole VPS to bring it back

    i dunno what happen i didnt change any codes or add anything

    i just created another NPC of it for addition ID option i forgot that ID 1 has the same item on the 

    other NPC that has ID 2 like this

    NPC 1

    //Creating Group id 1 , with Hat items inside.
    	AddGroup(1,2220,2221,2222,2223);

    NPC 2

    //Creating Group id 1 , with Hat items inside.
    	AddGroup(2,2223);

    will that affect this 

    DO NOT REUSE THE SAME ITEM ID IN DIFFERENT GROUP!

    image.png.4dcb8aabb991ef19d9f871f4f9bb977c.png

    The groups/ids are per npc , you can use the same item in a different npc copy however you cannot use the same item in the same npc in a different group.

     

    also i need more information about when this happen to you , at any step of the npc ?

    the image you provided the next line is just select , so I don't think this where you are getting the issue

  5. 1 hour ago, Charelle said:

    Reporting back, the sprite is the same as what I did in my earlier attempt, it's static and only shows from the front angle. If I rotate my camera, or change position (side facing for example), the sprite disappears.

    Below a screenshot of the only angle I can see the non-animated sprite:
    image.png.63f21052e6ba359364185dac73b9d676.png

    Any other suggestions? ? 

    if this not the result that you have seen in the official server , then the files have a problem/not correct

    or the sprite is intended to be empty (so you don't see it when you wear it) however it give a effect something like how Costume Dancing Fallen Sakura (Item ID# 20285) works

     

  6. 9 hours ago, Charelle said:

    Hello! I used the sprites directly extracted from TaiwanRO's GRF, also in exactly the same directory. Something seems off about it though if I compare it to the other cons_of_(element) sprites, an animation seems missing, and it has the headgear of Scaraba in one of them. Maybe I'm trying to implement something that's simply not working as intended officially?

    If anyone wants to test, here are the sprites:

    cons_of_poison.rar 204.47 kB · 0 downloads

     the equip sprite is not correct for male and female.

    image.png.1929716439c12809e08c8c0eea484288.png

  7. 23 hours ago, Eross said:

    Thankyou for your time guys ! Ilove you all .. I will try this later when I got home

     

    Hi sader! I tried the script but no monster has spawned .Also, how to spawn a monster that has spawn timer ? Like example in gld_dun01 there is an Eddga that respawn on certain time .. How to make it not respawn automatically after killing instead it will respawn afteer certain minutes

    create a timer , something like this

    OnInstanceInit://Runs once the instance is created.
    	'map_gld_dun01$ = instance_mapname("gld_dun01");//save this map name inside the instance
    	'npc_instance_main_body$ = instance_npcname(strnpcinfo(3));//save this npc name inside the instance
    	
    	monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled");
    	
    	initnpctimer('npc_instance_main_body$);
    	stopnpctimer('npc_instance_main_body$);
    end;
    
    OnPoringKilled:
    	startnpctimer('npc_instance_main_body$);
    end;
    
    OnTimer600000://after 10 minute
    	monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled");
    	setnpctimer(0,'npc_instance_main_body$);
    	stopnpctimer('npc_instance_main_body$);
    end;

    or maybe put a sleep delay

    OnInstanceInit://Runs once the instance is created.
    	'map_gld_dun01$ = instance_mapname("gld_dun01");//save this map name inside the instance
    	'npc_instance_main_body$ = instance_npcname(strnpcinfo(3));//save this npc name inside the instance
    	
    	monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled");
    end;
    
    OnPoringKilled:
    	detachrid;//de attach the player from the event.
    	sleep(600000);//sleep for 10 minutes
    	monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled");
    end;

     

    • Upvote 1
  8. 6 hours ago, Eross said:

    Good day sir @Emistry . I tried this one for my guild dungeon .. Im planning to make it instance like dungeon .. I've managed to create and enter the dungeon but the weird part is theres no monster inside .. 
    Also Destroy Instance is not working
     

      - Id: 22
        Name: Guild Dungeon
        TimeLimit: 7200
        Enter:
          Map: gld_dun01
          X: 32
          Y: 36
        AdditionalMaps:
          gld_dun02: true
          gld_dun03: true
          gld_dun04: true
    
    //prontera,155,181,5	script	Sample	757,{
    brasilis,169,245,3	script	Test 	860,{
    	.@instance_name$ = "Guild Dungeon";
    	if (!is_party_leader()) end;
    	switch(select(
    		"Create",
    		"Enter",
    		"Destroy"
    	)) {
    		case 1:
    			instance_create(.@instance_name$, IM_PARTY);
    			break;
    		case 2:
    			switch(instance_enter(.@instance_name$)) {
    				case IE_NOMEMBER:
    					mes "ERROR: Party not found.";
    					break;
    				case IE_NOINSTANCE:
    					mes "ERROR: Party does not have an instance.";
    					break;
    				case IE_OTHER:
    					mes "ERROR: Unknown error.";
    					break;
    				default:
    					break;
    			}
    			break;
    		case 3:
    			instance_destroy;
    			break;
    	}
    	close;
    }

    image.png.3942358d43c4f58c544b136d65b83dcb.png

    You need to create the instance body in a new npc with the instance map

    you can check the instances commands in 

    https://github.com/rathena/rathena/blob/0aa5e93397d3ddfe7a559747b09c16b055da8b24/doc/script_commands.txt#L9248

    and instances events in

    https://github.com/rathena/rathena/blob/0aa5e93397d3ddfe7a559747b09c16b055da8b24/doc/script_commands.txt#L903

     

    so for example you want to spawn 1 poring when the instance starts and respawn it again everytime id die would be like

    gld_dun01,0,0,0	script	#instance_main_body	444,{
    	end;
    OnInstanceInit://Runs once the instance is created.
    	'instance_id = instance_id();//save the instance id
    	'map_gld_dun01$ = instance_mapname("gld_dun01");//save this map name inside the instance
    	'npc_instance_main_body$ = instance_npcname(strnpcinfo(3));//save this npc name inside the instance
    	//^ 'var is instance variable , you can call it from any script in that instance.
    	
    	//spawn the monster with a death event
    	monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled");
    end;
    
    OnPoringKilled:
    	//announce that the poring is killed inside all the instance's maps
    	instance_announce('instance_id,"The poring is killed!",0);
    	
    	//spawn the monster again after it's dead.
    	monster('map_gld_dun01$,32,36,"--en--",1002,1,'npc_instance_main_body$ + "::OnPoringKilled");
    end;
    }

     

     

    and to destroy the instance from outside you need to provide the instance id

    this should work

    change

    instance_destroy;

    to

    instance_destroy(instance_id(IM_PARTY));

    ^this will destroy the party instance that hooked to the player (it's not a good idea to do that without a lot of other checks like party leader , or the instance is the instance you want to destroy not another instance etc)

    • Upvote 1
×
×
  • Create New...